-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
81 lines (55 loc) · 2.06 KB
/
configure.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
#!/bin/sh
set -e
#--------------------------------------------------------------------------------------------------
# Settings
#--------------------------------------------------------------------------------------------------
Sky="../Sky"
external="../3rdparty"
#--------------------------------------------------------------------------------------------------
# environment
compiler_win="mingw"
qt="qt5"
#--------------------------------------------------------------------------------------------------
# Syntax
#--------------------------------------------------------------------------------------------------
if [ $# != 1 -a $# != 2 ] \
|| \
[ $1 != "win32" -a $1 != "win64" -a $1 != "macOS" -a $1 != "linux" -a $1 != "android" ] \
|| \
[ $# = 2 -a "$2" != "clean" ]; then
echo "Usage: configure <win32 | win64 | macOS | linux | android> [clean]"
exit 1
fi
#--------------------------------------------------------------------------------------------------
# Configuration
#--------------------------------------------------------------------------------------------------
external="$external/$1"
if [ $1 = "win32" -o $1 = "win64" ]; then
compiler="$compiler_win"
else
compiler="default"
fi
deploy="$Sky/deploy"
#--------------------------------------------------------------------------------------------------
# Clean
#--------------------------------------------------------------------------------------------------
echo "CLEANING"
rm -rf bin/*
touch bin/.gitignore
# NOTE: We have to remove the folder to delete .qmake.stash.
rm -rf build
mkdir build
touch build/.gitignore
if [ "$2" = "clean" ]; then
exit 0
fi
#--------------------------------------------------------------------------------------------------
# MinGW
#--------------------------------------------------------------------------------------------------
echo "CONFIGURING HelloConsole"
if [ $compiler = "mingw" ]; then
echo "COPYING MinGW"
cp "$deploy"/libgcc_s_*-1.dll bin
cp "$deploy"/libstdc++-6.dll bin
cp "$deploy"/libwinpthread-1.dll bin
fi