-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_guest-wrappers.sh
55 lines (47 loc) · 1.36 KB
/
build_guest-wrappers.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
#!/usr/bin/env bash
# check mingw env
if [[ $MSYSTEM != "MINGW32" ]]; then
echo "Error: MSYSTEM == ${MSYSTEM}";
echo "Use MINGW32 shell instead!";
exit 1;
fi
# extract toolchains if they don't exist
if [[ ! -d "/opt/djgpp" ]]; then
7z x -o"/opt/" "download/djgpp-mingw32.7z"
fi
if [[ ! -d "/opt/watcom" ]]; then
7z x -o"/opt/" "download/watcom.7z"
fi
# clean up qemu-3dfx
cd qemu-3dfx && git clean -dfx
export DJDIR=/opt/djgpp/i586-pc-msdosdjgpp
export PATH=${PATH}:/opt/djgpp/i586-pc-msdosdjgpp/bin/:/opt/djgpp/bin/
export WATCOM=/opt/watcom
export PATH=${PATH}:/opt/watcom/binnt/:/opt/watcom/binw/
cd wrappers/3dfx
mkdir build && cd build
bash ../../../scripts/conf_wrapper
make && make clean
if [[ -d "/opt/guest_3dfx" ]]; then
rm -rf /opt/guest_3dfx
fi
mkdir /opt/guest_3dfx && cp *.{vxd,sys,dll,dxe,ovl,exe} /opt/guest_3dfx/
cd ../../mesa
mkdir build && cd build
bash ../../../scripts/conf_wrapper
make && make clean
if [[ -d "/opt/guest_mesa" ]]; then
rm -rf /opt/guest_mesa
fi
mkdir /opt/guest_mesa && cp *.{dll,exe} /opt/guest_mesa/
# clean up qemu-xtra
cd ../../../../qemu-xtra && git clean -dfx
cd openglide
bash ./bootstrap
mkdir ../build && cd ../build
../openglide/configure --disable-sdl && make
cd ../g2xwrap && make
if [[ -d "/opt/guest_openglide" ]]; then
rm -rf /opt/guest_openglide
fi
mkdir /opt/guest_openglide && cp *.dll /opt/guest_openglide/