| 1 |
#!/bin/bash -e |
| 2 |
|
| 3 |
. $(dirname $(readlink -f $0))/make-weekly-common |
| 4 |
|
| 5 |
WXCRAFTER_BUILD_DIR=${ROOT_DIR}/build-release-wxcapp |
| 6 |
CODELITE_BUILD_DIR=${ROOT_DIR}/build-release |
| 7 |
|
| 8 |
# package CodeLite |
| 9 |
function build_codelite() { |
| 10 |
mkdir -p ${CODELITE_BUILD_DIR} |
| 11 |
cd ${CODELITE_BUILD_DIR} |
| 12 |
|
| 13 |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCOPY_WX_LIBS=1 -DWXWIN=$HOME/root -G"MinGW Makefiles" |
| 14 |
mingw32-make -j${cpu_count} install |
| 15 |
} |
| 16 |
|
| 17 |
function package_codelite() { |
| 18 |
cd ${CODELITE_BUILD_DIR} |
| 19 |
mingw32-make -j${cpu_count} setup |
| 20 |
|
| 21 |
# cd to the location where our output file exists and upload it |
| 22 |
cd ${CODELITE_BUILD_DIR}/installer |
| 23 |
|
| 24 |
package_file=$(ls *codelite*.exe) |
| 25 |
echo "Uploading CodeLite installer ${package_file}" |
| 26 |
upload_path="/var/www/html/downloads/codelite/${version}" |
| 27 |
ssh [email protected] "mkdir -p ${upload_path}" |
| 28 |
scp "${package_file}" [email protected]:${upload_path} |
| 29 |
ssh [email protected] \ |
| 30 |
"cd ${upload_path} && sha256sum ${package_file} |cut -d' ' -f1 > ${package_file}.sha1 && cat ${package_file}.sha1" |
| 31 |
} |
| 32 |
|
| 33 |
# package wxCrafter |
| 34 |
function build_wxcrafter() { |
| 35 |
mkdir -p ${WXCRAFTER_BUILD_DIR} |
| 36 |
cd ${WXCRAFTER_BUILD_DIR} |
| 37 |
|
| 38 |
cmake .. -DCMAKE_BUILD_TYPE=Release -DCOPY_WX_LIBS=1 -DWXWIN=$HOME/root -G"MinGW Makefiles" -DWXC_APP=1 |
| 39 |
mingw32-make -j${cpu_count} install |
| 40 |
} |
| 41 |
|
| 42 |
function package_wxcrafter() { |
| 43 |
cd ${WXCRAFTER_BUILD_DIR} |
| 44 |
mingw32-make -j${cpu_count} setup |
| 45 |
|
| 46 |
# cd to the location where our output file exists and upload it |
| 47 |
cd ${WXCRAFTER_BUILD_DIR}/installer |
| 48 |
|
| 49 |
package_file=$(ls *wxcrafter*.exe) |
| 50 |
echo "Uploading wxCrafter installer ${package_file}" |
| 51 |
|
| 52 |
upload_path="/var/www/html/downloads/wxcrafter/${version}" |
| 53 |
ssh [email protected] "mkdir -p ${upload_path}" |
| 54 |
scp "${package_file}" [email protected]:${upload_path} |
| 55 |
ssh [email protected] \ |
| 56 |
"cd ${upload_path} && sha256sum ${package_file} |cut -d' ' -f1 > ${package_file}.sha1 && cat ${package_file}.sha1" |
| 57 |
} |
| 58 |
|
| 59 |
# clear old installers |
| 60 |
rm -fr ${WXCRAFTER_BUILD_DIR}/installer/ |
| 61 |
rm -fr ${CODELITE_BUILD_DIR}/installer/ |
| 62 |
|
| 63 |
build_codelite |
| 64 |
package_codelite |
| 65 |
|
| 66 |
build_wxcrafter |
| 67 |
package_wxcrafter |