forked from visualfc/liteide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_macos_qt4.sh
executable file
·107 lines (77 loc) · 1.92 KB
/
build_macos_qt4.sh
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
#!/bin/sh
export BUILD_ROOT=$PWD
if [ -z $LITEIDE_ROOT ]; then
export LITEIDE_ROOT=$PWD/../liteidex
fi
echo build liteide
echo GOROOT=$GOROOT
echo BUILD_ROOT=$BUILD_ROOT
echo LITEIDE_ROOT=$LITEIDE_ROOT
echo .
if [ -z $QTDIR ]; then
echo 'error, QTDIR is null'
exit 1
fi
export PATH=$QTDIR/bin:$PATH
echo qmake liteide ...
echo .
qmake $LITEIDE_ROOT -spec macx-g++ "CONFIG+=release"
if [ $? -ge 1 ]; then
echo 'error, qmake fail'
exit 1
fi
echo make liteide ...
echo .
make
if [ $? -ge 1 ]; then
echo 'error, make fail'
exit 1
fi
go version
if [ $? -ge 1 ]; then
echo 'error, not find go in PATH'
exit 1
fi
echo build liteide tools ...
cd $LITEIDE_ROOT
if [ -z $GOPATH ]; then
export GOPATH=$PWD
else
export GOPATH=$PWD:$GOPATH
fi
go install -ldflags "-s" -v github.com/visualfc/gotools
if [ $? -ge 1 ]; then
echo 'error, go install fail'
exit 1
fi
go install -ldflags "-s" -v github.com/visualfc/gocode
if [ $? -ge 1 ]; then
echo 'error, go install fail'
exit 1
fi
go install -ldflags "-s" -v github.com/fatih/gomodifytags
if [ $? -ge 1 ]; then
echo 'error, go install fail'
exit 1
fi
echo export qrc images
go run src/tools/exportqrc/main.go -root .
if [ $? -ge 1 ]; then
echo 'error, go run fail'
exit 1
fi
echo deploy ...
cd $BUILD_ROOT
rm -r liteide
mkdir -p liteide
cp -R -v $LITEIDE_ROOT/liteide/bin/LiteIDE.app liteide
rm liteide/LiteIDE.app/Contents/PlugIns/*.a
cp -R -v $LITEIDE_ROOT/LICENSE.LGPL liteide
cp -R -v $LITEIDE_ROOT/LGPL_EXCEPTION.TXT liteide
cp -R -v $LITEIDE_ROOT/../README.md liteide
cp -R -v $LITEIDE_ROOT/../CONTRIBUTORS liteide
cp -R -v $LITEIDE_ROOT/bin/gotools liteide/LiteIDE.app/Contents/MacOS
cp -R -v $LITEIDE_ROOT/bin/gocode liteide/LiteIDE.app/Contents/MacOS
cp -R -v $LITEIDE_ROOT/bin/gomodifytags liteide/LiteIDE.app/Contents/MacOS
cp -R -v $LITEIDE_ROOT/deploy/* liteide/LiteIDE.app/Contents/Resources
cp -R -v $LITEIDE_ROOT/os_deploy/macosx/* liteide/LiteIDE.app/Contents/Resources