forked from eranif/codelite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make-weekly
executable file
·170 lines (147 loc) · 5.49 KB
/
make-weekly
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
# Clear old installers
os_name=`uname -s`
no_upload=$1
is_32_bit_windows=`uname -a|grep i686|wc -l`
if [ "${is_32_bit_windows}" = "1" ]; then
echo "Windows 32 bit detected"
fi
if [ ${os_name} = "CYGWIN_NT-6.1" ] || [ ${os_name} = "CYGWIN_NT-6.3-WOW" ]; 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 ..
# Initiate the build
if [ "${is_32_bit_windows}" = "1" ]; then
export PATH=/cygdrive/c/Program\ Files\ \(x86\)/CodeLite:/cygdrive/c/Program\ Files\ \(x86\)/Inno\ Setup\ 5/:$PATH
export WXCFG=gcc_dll/mswu
export WXWIN=C:/src/wxWidgets
cmd /c "C:\Program Files (x86)\CodeLite\codelite-make.exe" \
--workspace=LiteEditor.workspace \
--project=CodeLiteIDE --config=Win_x86_Release --execute
# Build wxCrafter
echo Building wxCrafter for Windows...
cd /cygdrive/c/src/codelite/wxcrafter
# Initiate the build
cmd /c "C:\Program Files (x86)\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 (x86)\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 codelite_mingw.iss
else
export PATH=/cygdrive/c/Program\ Files/CodeLite:/cygdrive/d/software/Inno\ Setup\ 5/:$PATH
export WXCFG=gcc_dll/mswu
export WXWIN=D:/src/wxWidgets
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
fi
# upload the binaries
if [ "${no_upload}" != "--no-upload" ]; then
cd output
./finalize-upload.sh
#output_file=`ls -l *.exe |awk '{print $9;}'`
#output_file_7z="${output_file%.*}"
#output_file_7z=${output_file_7z}.7z
#
## Zip it
#echo `pwd`
#echo "Generating 7z file and uploading it..."
#echo /usr/bin/7za a ${output_file_7z} ${output_file}
#7za a ${output_file_7z} ${output_file}
#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'
#
#echo "Generating 7z file and uploading it...done"
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