1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
|
#!/bin/bash
# Clear old installers
os_name=`uname -s`
no_upload=$1
if [ ${os_name} = "CYGWIN_NT-6.1" ]; then
echo Building CodeLite for Windows...
# Windows
cd /cygdrive/c/src/codelite
# Update our source tree
echo "Pulling CodeLite changes..."
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
echo "Pulling wxCrafter changes..."
cd wxcrafter
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
cd ..
export PATH=/cygdrive/c/Program\ Files/CodeLite:/cygdrive/d/software/Inno\ Setup\ 5/:$PATH
export WXCFG=gcc_dll/mswu
export WXWIN=D:/src/wxWidgets
# Initiate the build
cmd /c "C:\Program Files/CodeLite/codelite-make.exe" \
--workspace=LiteEditor.workspace \
--project=CodeLiteIDE --config=Win_x64_Release --execute
# Build wxCrafter
echo Building wxCrafter for Windows...
cd /cygdrive/c/src/codelite/wxcrafter
# Initiate the build
cmd /c "C:\Program Files/CodeLite/codelite-make.exe" \
--workspace=wxcrafter.workspace \
--project=wxcrafter --config=Win_x64_Release --execute
# Build wxCrafter
echo Building Utils for Windows...
cd /cygdrive/c/src/codelite/codelite_utils
# Initiate the build
cmd /c "C:\Program Files/CodeLite/codelite-make.exe" \
--workspace=codelite_utils.workspace \
--project=build_all --config=Win_x64_Release --execute
# Package
cd /cygdrive/c/src/codelite/InnoSetup
rm -f output/*.exe
# Compile
iscc codelite64_mingw.iss
# upload the binaries
if [ "${no_upload}" != "--no-upload" ]; then
cd output
output_file=`ls -l *.exe |awk '{print $9;}'`
output_file_7z="${output_file%.*}"
output_file_7z=${output_file_7z}.7z
# Zip it
/usr/bin/7za a ${output_file_7z} ${output_file}
# Echo the sha1sum
/usr/bin/sha1sum ${output_file_7z} ${output_file_7z}
scp ${output_file_7z} root@codelite.org:/var/www/html/downloads/codelite/wip
# update the owner
ssh root@codelite.org 'chown -R www-data:www-data /var/www/html/downloads/codelite/wip'
fi
else
cd build-release
curdir=`pwd`
builddir=`basename ${curdir}`
if [ ${builddir} != "build-release" ]; then
echo "You must run this script from CodeLite root folder"
exit -1
fi
# Clear old installers
os_name=`uname -s`
if [ ${os_name} == "Darwin" ]; then
echo rm -f codelite.app.tar.gz
rm -f codelite.app.tar.gz
else
echo rm -fr *.deb
rm -fr *.deb
fi
# Update our source tree
echo "Pulling CodeLite changes..."
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
echo "Pulling wxCrafter changes..."
cd ../wxcrafter
git pull --rebase
if [ $? -ne 0 ]; then
exit $?
fi
cd ../build-release
# Build and upload
if [ ${os_name} == "Darwin" ]; then
cmake -DCMAKE_BUILD_TYPE=Release .. -DWITH_PCH=1
make -j4 && make install
if [ "${no_upload}" != "--no-upload" ]; then
tar cvfz codelite.app.tar.gz codelite.app/*
scp codelite.app.tar.gz root@codelite.org:/var/www/html/downloads/codelite/wip
fi
else
cmake -DCMAKE_BUILD_TYPE=Release -DMAKE_DEB=1 -DCOPY_WX_LIBS=1 ..
make -j4 && make package
if [ "${no_upload}" != "--no-upload" ]; then
deb_file=`ls -lt *.deb|awk '{print $9;}'|head -n 1`
echo Uploading deb file ${deb_file}
scp ${deb_file} root@codelite.org:/var/www/html/downloads/codelite/wip
fi
fi
fi
|