-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbuild_windows_package.sh
More file actions
executable file
·135 lines (107 loc) · 4.97 KB
/
Copy pathbuild_windows_package.sh
File metadata and controls
executable file
·135 lines (107 loc) · 4.97 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
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
#!/bin/sh
set -e
BASE_DIR=$(pwd)
PACKAGE_DIR="${BASE_DIR}/d2k"
WIN_SKEL_DIR="${BASE_DIR}/d2k-win"
FREEDOOM_URL='http://static.totaltrash.org/freedoom/freedoom_and_freedm-0.9.tar.xz'
FREEDOOM_PACKAGE=$(basename "$FREEDOOM_URL")
FREEDOOM_TARBALL=$(basename "$FREEDOOM_PACKAGE" .xz)
FREEDOOM_FOLDER='freedoom-0.9'
FREEDM_FOLDER='freedm-0.9'
if [ ! -f ${BASE_DIR}/crossbuild/d2k.exe ]
then
./crossrebuild.sh
fi
if [ ! -f ${BASE_DIR}/data/d2k.wad ]
then
./build_wad.sh
fi
if [ -d "$PACKAGE_DIR" ]
then
rm -rf "$PACKAGE_DIR"
fi
mkdir "$PACKAGE_DIR"
cp ${BASE_DIR}/crossbuild/d2k.exe "${PACKAGE_DIR}/"
cp ${BASE_DIR}/data/d2k.wad "${PACKAGE_DIR}/"
curl -L -O "$FREEDOOM_URL"
xz -d "$FREEDOOM_PACKAGE"
tar xf "$FREEDOOM_TARBALL"
rm "$FREEDOOM_TARBALL"
cp "${FREEDOOM_FOLDER}/freedoom1.wad" \
"${FREEDOOM_FOLDER}/freedoom2.wad" \
"${FREEDM_FOLDER}/freedm.wad" "${PACKAGE_DIR}/"
rm -rf "$FREEDOOM_FOLDER"
rm -rf "$FREEDM_FOLDER"
mkdir -p "${PACKAGE_DIR}/etc/fonts"
cat > "${PACKAGE_DIR}/etc/fonts/fonts.conf" << 'EOF'
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<dir prefix="default">fonts</dir>
<cachedir>font_cache</cachedir>
</fontconfig>
EOF
cp "${BASE_DIR}/fonts" "${PACKAGE_DIR}/" -R
cp "${BASE_DIR}/crossdeps/lib/lua/5.2/lgi/corelgilua51.dll" \
"${PACKAGE_DIR}/lgi.dll"
cp "${BASE_DIR}/scripts" "${PACKAGE_DIR}/" -R
cp -a "${BASE_DIR}/crossdeps/share/lua/5.2/"* \
"${PACKAGE_DIR}/scripts/"
mkdir "${PACKAGE_DIR}/typelibs"
cp "${BASE_DIR}/crossdeps/lib/girepository-1.0/"* \
"${PACKAGE_DIR}/typelibs/"
chmod -x ${PACKAGE_DIR}/typelibs/*
cp "${BASE_DIR}/COPYING" "${PACKAGE_DIR}/COPYING"
cp "${BASE_DIR}/connect.bat" "${PACKAGE_DIR}/connect.bat"
cp "${BASE_DIR}/crossdeps/bin/SDL.dll" \
"${BASE_DIR}/crossdeps/bin/SDL_image.dll" \
"${BASE_DIR}/crossdeps/bin/SDL_mixer.dll" \
"${BASE_DIR}/crossdeps/bin/libFLAC-8.dll" \
"${BASE_DIR}/crossdeps/bin/libcairo-2.dll" \
"${BASE_DIR}/crossdeps/bin/libcairo-gobject-2.dll" \
"${BASE_DIR}/crossdeps/bin/libcairo-script-interpreter-2.dll" \
"${BASE_DIR}/crossdeps/bin/libcrypto-1_1.dll" \
"${BASE_DIR}/crossdeps/bin/libcurl-4.dll" \
"${BASE_DIR}/crossdeps/bin/libdumb.dll" \
"${BASE_DIR}/crossdeps/bin/libexpat-1.dll" \
"${BASE_DIR}/crossdeps/bin/libffi-6.dll" \
"${BASE_DIR}/crossdeps/bin/libfluidsynth.dll" \
"${BASE_DIR}/crossdeps/bin/libfontconfig-1.dll" \
"${BASE_DIR}/crossdeps/bin/libfreetype-6.dll" \
"${BASE_DIR}/crossdeps/bin/libgcc_s_sjlj-1.dll" \
"${BASE_DIR}/crossdeps/bin/libgio-2.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libgirepository-1.0-1.dll" \
"${BASE_DIR}/crossdeps/bin/libglib-2.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libgmodule-2.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libgobject-2.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libharfbuzz-0.dll" \
"${BASE_DIR}/crossdeps/bin/libiconv-2.dll" \
"${BASE_DIR}/crossdeps/bin/libidn2-0.dll" \
"${BASE_DIR}/crossdeps/bin/libintl-8.dll" \
"${BASE_DIR}/crossdeps/bin/libjansson-4.dll" \
"${BASE_DIR}/crossdeps/bin/libjpeg-62.dll" \
"${BASE_DIR}/crossdeps/bin/liblzma-5.dll" \
"${BASE_DIR}/crossdeps/bin/libmad-0.dll" \
"${BASE_DIR}/crossdeps/bin/libmikmod-3.dll" \
"${BASE_DIR}/crossdeps/bin/libogg-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpango-1.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpangocairo-1.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpangoft2-1.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpangowin32-1.0-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpcre-1.dll" \
"${BASE_DIR}/crossdeps/bin/libpcreposix-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpixman-1-0.dll" \
"${BASE_DIR}/crossdeps/bin/libpng16-16.dll" \
"${BASE_DIR}/crossdeps/bin/libportmidi.dll" \
"${BASE_DIR}/crossdeps/bin/libssl-1_1.dll" \
"${BASE_DIR}/crossdeps/bin/libssp-0.dll" \
"${BASE_DIR}/crossdeps/bin/libtiff-5.dll" \
"${BASE_DIR}/crossdeps/bin/libvorbis-0.dll" \
"${BASE_DIR}/crossdeps/bin/libvorbisfile-3.dll" \
"${BASE_DIR}/crossdeps/bin/libwebp-5.dll" \
"${BASE_DIR}/crossdeps/bin/libwinpthread-1.dll" \
"${BASE_DIR}/crossdeps/bin/lua52.dll" \
"${BASE_DIR}/crossdeps/bin/zlib1.dll" \
"${PACKAGE_DIR}/"
chmod -x ${PACKAGE_DIR}/*.dll
7z a d2k.7z d2k