-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuildall.sh
More file actions
executable file
·98 lines (72 loc) · 2.83 KB
/
Copy pathbuildall.sh
File metadata and controls
executable file
·98 lines (72 loc) · 2.83 KB
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
#!/usr/bin/bash
export MSYS_NO_PATHCONV=1
if [[ "$1" == "1" ]] ; then
source ./setenv.sh 1
elif [[ "$1" == "0" ]] ; then
source ./setenv.sh 0
else
echo "Please pass 1 (64-bit compilation) or 0 (32-bit compilation) as first argument"
exit
fi
if [[ "$2" == "" ]] ; then
echo "Please pass number of parallel builds as second argument"
exit
fi
function check-error {
if [ $? -ne 0 ]; then
echo $1
exit
fi
}
which nasm > /dev/null 2>&1
check-error 'Please install nasm'
which MSBuild.exe > /dev/null 2>&1
check-error 'Please install/set environment for visual studio 2019'
which python.exe > /dev/null 2>&1
check-error 'Make sure that python.exe is in the PATH. (e.g. cp /usr/bin/python2.7.exe /usr/bin/python.exe)'
if [[ "$IS64" == "1" ]]; then
MSBuild.exe freetype/freetypevc10.sln /t:Build /p:Configuration="Release Multithreaded" /p:Platform=x64
check-error 'Error compiling freetype'
MSBuild.exe freetype/freetypevc10.sln /t:Build /p:Configuration="Debug Multithreaded" /p:Platform=x64
check-error 'Error compiling freetype'
else
MSBuild.exe freetype/freetypevc10.sln /t:Build /p:Configuration="Release Multithreaded" /p:Platform=Win32
check-error 'Error compiling freetype'
MSBuild.exe freetype/freetypevc10.sln /t:Build /p:Configuration="Debug Multithreaded" /p:Platform=Win32
check-error 'Error compiling freetype'
fi
cd pthreads
nmake VC-static
check-error 'Error compiling pthreads for release'
nmake VC-static-debug
check-error 'Error compiling pthreads for debug'
cd ..
if [[ "$IS64" == "1" ]]; then
if [ ! -f tools/mhmake/Release64/mhmake.exe ]; then
MSBuild.exe tools/mhmake/mhmakevc10.sln /t:Build /p:Configuration=Release /p:Platform=x64
check-error 'Error compiling mhmake for release'
MSBuild.exe tools/mhmake/mhmakevc10.sln /t:Build /p:Configuration=Debug /p:Platform=x64
check-error 'Error compiling mhmake for debug'
fi
export MHMAKECONF=`cygpath -da .`
tools/mhmake/Release64/mhmake -P$2 -C xorg-server MAKESERVER=1 DEBUG=1
check-error 'Error compiling vcxsrv for debug'
tools/mhmake/Release64/mhmake.exe -P$2 -C xorg-server MAKESERVER=1
check-error 'Error compiling vcxsrv for release'
cd xorg-server/installer
./packageall.bat nox86
else
if [ ! -f tools/mhmake/Release/mhmake.exe ]; then
MSBuild.exe tools/mhmake/mhmakevc10.sln /t:Build /p:Configuration=Release /p:Platform=Win32
check-error 'Error compiling mhmake for release'
MSBuild.exe tools/mhmake/mhmakevc10.sln /t:Build /p:Configuration=Debug /p:Platform=Win32
check-error 'Error compiling mhmake for debug'
fi
export MHMAKECONF=`cygpath -da .`
tools/mhmake/Release/mhmake -P$2 -C xorg-server MAKESERVER=1 DEBUG=1
check-error 'Error compiling vcxsrv for debug'
tools/mhmake/Release/mhmake.exe -P$2 -C xorg-server MAKESERVER=1
check-error 'Error compiling vcxsrv for release'
cd xorg-server/installer
./packageall.bat nox64
fi