-
Notifications
You must be signed in to change notification settings - Fork 14
/
build-mingw32_nt
executable file
·74 lines (59 loc) · 2.32 KB
/
build-mingw32_nt
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
#!/bin/sh
# GNUSTEP_MSYS=${MSYSTEM,,}/../
export CC=gcc
export CXX=g++
MSYS_ROOT=/
USR_ROOT=${MSYS_ROOT}usr
GNUSTEP_ROOT=${USR_ROOT}/GNUstep
echo "Copying patched shlwapi.h header"
cp ./tools-scripts/Patched/shlwapi.h /mingw64/x86_64-w64-mingw32/include/shlwapi.h
echo "Installation directory is $GNUSTEP_ROOT"
echo "Building GNUstep for MSYS64 on Windows"
echo ""
#if [ -f ${USR_ROOT}/lib/pkgconfig/fontconfig.pc ]; then
# echo "fontconfig.pc file exists..."
#else
# echo "fontconfig.pc does not exist, copying..."
# mkdir -p ${USR_ROOT}/lib/pkgconfig
# cp ./tools-scripts/fontconfig.pc ${USR_ROOT}/lib/pkgconfig
#fi
export PKG_CONFIG_PATH=${USR_ROOT}/local/lib/pkgconfig:${USR_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}
# Build make
echo "Build make"
cd tools-make
./configure --with-library-combo=gnu-gnu-gnu --with-layout=gnustep --prefix=${GNUSTEP_ROOT} --enable-install-ld-so-conf && make install messages=yes
source ${GNUSTEP_ROOT}/System/Library/Makefiles/GNUstep.sh
# Copy libobjc2
#echo "Copy libobjc2"
#cd ../libobjc2
# copy headers...
#mkdir -p ${GNUSTEP_ROOT}/System/Library/Headers/objc
#cp -r objc/* ${GNUSTEP_ROOT}/System/Library/Headers/objc
#cd build
#cp libobjc.pc /usr/lib/pkgconfig
#mkdir -p ${GNUSTEP_ROOT}/System/Library/Libraries
#cp objc.dll ${GNUSTEP_ROOT}/System/Library/Libraries
#cp objc.dll ${GNUSTEP_ROOT}/System/Library/Libraries/libobjc.dll
#cp objc.dll ${GNUSTEP_ROOT}/System/Library/Libraries/libobjc.dll.a
#cp objc.lib ${GNUSTEP_ROOT}/System/Library/Libraries/libobjc.a
#cd ..
# Build base
echo "Build base"
cd ../libs-base
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
CFLAGS+=-I/usr/local/include LDFLAGS+=-L/usr/local/lib ./configure --with-installation-domain=SYSTEM --disable-libdispatch --disable-icu --without-unwind && make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Build gui
echo "Build gui"
cd ../libs-gui
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure && make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Build backend
echo "Build back"
cd ../libs-back
# make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM distclean
./configure --enable-graphics=cairo && make GNUSTEP_INSTALLATION_DOMAIN=SYSTEM debug=yes install messages=no -j4
# Set default backend
# defaults write NSGlobalDomain GSBackend libgnustep-cairo
echo ""
echo "Done."
exit 0