-
Notifications
You must be signed in to change notification settings - Fork 5
/
my_build.sh
70 lines (59 loc) · 2.52 KB
/
my_build.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
#!/usr/bin/env bash
#
# Usage: github-actions-build.sh <UI> [SVN rXXXXX override, or 'release']
#set -o errexit
set -o nounset
cd "$(dirname $0)"/../..
#
# Build and install xa65. When this stops working, check
# https://www.floodgap.com/retrotech/xa/dists/ to see why
#
XA_VERSION=$(wget --tries=1 -O - https://www.floodgap.com/retrotech/xa/dists/ 2>/dev/null | grep '"xa-[^"]*gz"' | sed -e 's,.*xa-,,' -e 's,.tar.gz.*,,' | sort -V | tail -n1)
if [ ! -e /usr/local/bin/xa65.exe ]
then
pushd /usr/local
mkdir -p src
cd src
wget https://www.floodgap.com/retrotech/xa/dists/xa-${XA_VERSION}.tar.gz
tar -xzf xa-${XA_VERSION}.tar.gz
cd xa-${XA_VERSION}
make mingw install
cp /usr/local/bin/xa.exe /usr/local/bin/xa65.exe
popd
fi
if [ ! -f mingw-w64-x86_64-ffmpeg-4.4.3-6-any.pkg.tar.zst ]
then
wget https://mirror.cs.jmu.edu/pub/msys2/mingw/mingw64/mingw-w64-x86_64-ffmpeg-4.4.3-6-any.pkg.tar.zst
fi
if [ ! -f mingw-w64-x86_64-celt-0.11.3-5-any.pkg.tar.zst ]
then
wget https://mirror.cs.jmu.edu/pub/msys2/mingw/mingw64/mingw-w64-x86_64-celt-0.11.3-5-any.pkg.tar.zst
fi
pacman -U --noconfirm mingw-w64-x86_64-ffmpeg-4.4.3-6-any.pkg.tar.zst mingw-w64-x86_64-celt-0.11.3-5-any.pkg.tar.zst
ARGS="--disable-arch --disable-pdf-docs --with-png --with-gif --with-vorbis --with-flac --enable-ethernet --enable-midi --enable-cpuhistory --enable-platformdox --enable-html-docs --enable-rs232 --enable-new8580filter --with-resid --enable-x64 --enable-x64-image --enable-realdevice --enable-ffmpeg"
case "$1" in
GTK3)
ARGS="--enable-gtk3ui $ARGS"
;;
SDL2)
ARGS="--enable-sdlui2 $ARGS"
;;
*)
echo "Bad UI: $1"
exit 1
;;
esac
export SVN_REVISION_OVERRIDE=$(curl -s "http://svn.code.sf.net/p/vice-emu/code/"|grep -i revis|cut -d " " -f 5|cut -d" " -f3|tail -n 1|cut -d ":" -f 1)
export PATH="/c/Program Files/TortoiseSVN/bin:$PATH"
#sed -i "s/The %s Emulator/𝓩𝓲𝓫𝓻𝓲'𝓼 𝓑𝓾𝓲𝓵𝓭./" src/arch/gtk3/uiabout.c
./autogen.sh
export USE_SVN_REVISION=1
./configure SVN_REVISION_OVERRIDE=$(curl -s "http://svn.code.sf.net/p/vice-emu/code/"|grep -i revis|cut -d " " -f 5|cut -d" " -f3|tail -n 1|cut -d ":" -f 1) $ARGS
patch -p0 <../patches.zibri
make -j8 clean
sync
VVER=$(src/vice-version.sh)
sed -i "s/svnversion \$TOPSRCDIR/$SVN_REVISION_OVERRIDE/g" src/arch/gtk3/make-bindist_win32.sh
make -j8 && make bindist7zip
mv &>/dev/null GTK3VICE-$VVER-win64.7z GTK3VICE-$VVER-win64-r${SVN_REVISION_OVERRIDE}.7z || true
#mv &>/dev/null SDL2VICE-$VVER-win64.7z SDL2VICE-$VVER-win64-r${SVN_REVISION_OVERRIDE}.7z || true