Commit bc9db8b

Nick committed on
Update unix build script, windows build script
commit bc9db8b40aa0216ec29e0d54388155dfdbad1b74 parent ba80b14
2 changed files +79−4
Modifiedbuild-release-unix.sh +59−1
@@ -1,7 +1,65 @@
1 #!/bin/bash
2 set -x #echo on
3
1 asm=$(which rgbasm) 4 asm=$(which rgbasm)
2 link=$(which rgblink) 5 link=$(which rgblink)
3 fix=$(which rgbfix) 6 fix=$(which rgbfix)
7 ffm=$(which ffmpeg)
8
9 if [ -z "$asm" ]; then {echo "rgbasm not found!"; exit 1; } fi
10 if [ -z "$link" ]; then {echo "rgblink not found!"; exit 1; } fi
11 if [ -z "$fix" ]; then {echo "rgbfix not found!"; exit 1; } fi
12 if [ -z "$ffm" ]; then {echo "ffmpeg not found!"; exit 1; } fi
4 13
5 outdir="$1" 14 outdir="$1"
15 if [ -z "$outdir" ]
16 then
17 echo "Output directory not specified!"
18 exit 1
19 fi
20
21 # Build halt.gb
22
23 function check_fail() {
24 if [ $? -eq 0 ]
25 then
26 echo "Failed, aborting."
27 exit 1
28 fi
29 }
30
31 rgbasm -o halt.obj halt.asm
32 check_fail
33
34 rgblink -n $outdir/halt.sym -o $outdir/halt.gb halt.obj
35 check_fail
36
37 rm halt.obj
38 check_fail
39
40 rgbfix -p0 -v $outdir/halt.gb
41 check_fail
42
43 # Copy needed stuff
44
45 cp $asm $outdir/
46 cp $link $outdir/
47 cp $fix $outdir/
48 cp $ffm $outdir/
49
50 cp Resources/Fonts/PixeliteTTF.ttf $outdir/
51 check_fail
52
53 mkdir $outdir/hUGEDriver
54 pushd $outdir/hUGEDriver
55 curl -L https://api.github.com/repos/SuperDisk/hUGEDriver/tarball | tar xzf - --strip 1
56 check_fail
57 popd
58
59 cp -r "Resources/Sample Songs" "$outdir/Sample Songs"
60 check_fail
61
62 tar czf hUGETracker-$outdir.tar.gz $outdir
63 check_fail
6 64
7 echo $1 65 echo Done
Modifiedbuild-release-win.bat +20−3
@@ -1,11 +1,28 @@
1 rem @echo off 1 @echo on
2 2
3 for /f %%i in ('where rgbasm') do set rgbasm=%%i 3 for /f %%i in ('where rgbasm') do set rgbasm=%%i
4 for /f %%i in ('where rgblink') do set rgblink=%%i 4 for /f %%i in ('where rgblink') do set rgblink=%%i
5 for /f %%i in ('where rgbfix') do set rgbfix=%%i 5 for /f %%i in ('where rgbfix') do set rgbfix=%%i
6 for /f %%i in ('where ffmpeg') do set ffmpeg=%%i 6 for /f %%i in ('where ffmpeg') do set ffmpeg=%%i
7 7
8 set outdir=%1 8 if x%rgbasm%==x (
9 echo rgbasm not found!
10 exit/b 1
11 )
12 if x%rgblink%==x (
13 echo rgblink not found!
14 exit/b 1
15 )
16 if x%rgbfix%==x (
17 echo rgbfix not found!
18 exit/b 1
19 )
20 if x%ffmpeg%==x (
21 echo ffmpeg not found!
22 exit/b 1
23 )
24
25 set) outdir=%1
9 if x%outdir%==x goto no_outdir 26 if x%outdir%==x goto no_outdir
10 27
11 :: Build halt.gb 28 :: Build halt.gb
@@ -34,7 +51,7 @@ if not errorlevel 0 goto copyfail
34 51
35 mkdir %outdir%\hUGEDriver 52 mkdir %outdir%\hUGEDriver
36 pushd %outdir%\hUGEDriver 53 pushd %outdir%\hUGEDriver
37 curl -L https://api.github.com/repos/SuperDisk/hUGEDriver/tarball | tar xf - --strip 1 54 curl -L https://api.github.com/repos/SuperDisk/hUGEDriver/tarball | tar xzf - --strip 1
38 popd 55 popd
39 56
40 Xcopy /E /I /Y "Resources\Sample Songs" "%outdir%\Sample Songs" 57 Xcopy /E /I /Y "Resources\Sample Songs" "%outdir%\Sample Songs"