-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildrelease.sh
executable file
·98 lines (71 loc) · 2.43 KB
/
buildrelease.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
#!/bin/bash
{
source util.sh
NJOBS="$(nproc)"
./cleanrelease.sh
[[ ${#} -eq 0 ]] && modules=(engine server editor tools) || modules=("${@}")
pkgrel() {
"${ARCHIVER[@]}" "${OUTPUT}" "${FILES[@]}"
}
FPLATDESC="$(printf '%s' "${PLATDESC// /_}" | tr '[:upper:]' '[:lower:]')"
FPLATDESC32="$(printf '%s' "${PLATDESC32// /_}" | tr '[:upper:]' '[:lower:]')"
debmake() {
# debrun runs commands inside a debian buster chroot
debrun make "${@}"
}
# Platforms that require disc images or similar file storage methods will not be included here (Emscripten, Dreamcast, etc.).
build_engine() {
BASE="psrc_engine"
ARCHIVER=_tar_u
FILES=(psrc)
OUTPUT="${BASE}_${FPLATDESC}"
MAKE=debmake buildrel "${1}" "${PLATDESC}" "${@:2}"
OUTPUT="${BASE}_${FPLATDESC32}"
MAKE=debmake buildrel "${1}" "${PLATDESC32}" "${@:2}" M32=y
ARCHIVER=_zip_u
FILES=(psrc.exe)
OUTPUT="${BASE}_windows_i686"
buildrel "${1}" "Windows 2000+ i686" "${@:2}" CROSS=win32 M32=y TOOLCHAIN='wine '
OUTPUT="${BASE}_win9x_i686"
buildrel "${1}" "Windows 95/98 i686" "${@:2}" CROSS=win32 M32=y USESDL1=y NOMT=y TOOLCHAIN='wine '
FILES=(xiso/default.xbe)
OUTPUT="${BASE}_nxdk"
buildrel "${1}" "Xbox (NXDK)" "${@:2}" CROSS=nxdk
}
build_server() {
BASE="psrc_server"
ARCHIVER=_tar_u
FILES=(psrc-server)
OUTPUT="${BASE}_${FPLATDESC}"
MAKE=debmake buildrel "${1}" "${PLATDESC}" "${@:2}"
ARCHIVER=_zip_u
FILES=(psrc-server.exe)
OUTPUT="${BASE}_windows_i686"
buildrel "${1}" "Windows i686" "${@:2}" CROSS=win32 M32=y TOOLCHAIN='wine '
}
build_editor() {
BASE="psrc_editor"
ARCHIVER=_tar_u
FILES=(psrc-editor)
OUTPUT="${BASE}_${FPLATDESC}"
MAKE=debmake buildrel "${1}" "${PLATDESC}" "${@:2}"
ARCHIVER=_zip_u
FILES=(psrc-editor.exe)
OUTPUT="${BASE}_windows_i686"
buildrel "${1}" "Windows i686" "${@:2}" CROSS=win32 M32=y TOOLCHAIN='wine '
}
build_tools() {
BASE="psrc_tools"
ARCHIVER=_tar
FILES=(tools/platinum/platinum tools/ptftool/ptftool)
OUTPUT="${BASE}_${FPLATDESC}"
MAKE=debmake buildrel "${1}" "${PLATDESC}" -C tools "${@:2}"
ARCHIVER=_zip
FILES=(tools/platinum/platinum.exe tools/ptftool/ptftool.exe)
OUTPUT="${BASE}_windows_i686"
buildrel "${1}" "Windows i686" -C tools "${@:2}" OS=Windows_NT CC=gcc CFLAGS+=-m32 TOOLCHAIN='wine ' null=NUL
}
for i in "${modules[@]}"; do
"build_${i}" "${i}" MODULE="${i}" deps= || _exit
done
}