Commit 9173625

Nick Faro committed on
Remove unused scripts for setting up dev env (will make proper ones later)
commit 91736258b92062a206b7b2e8de3f8144dffb6d7c parent d0ddde2
4 changed files +0−246
DeletedPostBuild.pas +0−67
@@ -1,67 +0,0 @@
1 {
2 This script runs after build.
3
4 In a production build, it populates the directory with
5 - Halt.gb
6 - hUGEDriver
7 - The manual
8 - PixeliteTTF
9 - Sample Songs
10
11 In a development build, it hardlinks
12 - Halt.gb
13 - hUGEDriver
14 - PixeliteTTF
15
16 into the build output folder so that the driver and tracker can be developed
17 simultaneously.
18 }
19
20 {$mode objfpc}{$H+}
21
22 uses SysUtils, StrUtils;
23
24 procedure HTCopyFile(Source: String);
25 begin
26 {$ifdef WINDOWS}
27 ExecuteProcess('cmd.exe', '/c "copy ' + ExpandFileName(Source) + ' ' + ParamStr(2) + ExtractFileName(Source) + '"');
28 {$endif}
29
30 {$ifdef UNIX}
31 ExecuteProcess('/bin/bash', '-c "cp -rf ' + Source + ' ' + ParamStr(2) + ExtractFileName(Source) + '" > /dev/null');
32 {$endif}
33 end;
34
35 procedure HTCopyDir(Source: String);
36 begin
37 {$ifdef WINDOWS}
38 ExecuteProcess('cmd.exe', '/c "robocopy /E ' + ExpandFileName(Source) + ' ' + ParamStr(2) + ExtractFileName(Source) + '"');
39 {$endif}
40
41 {$ifdef UNIX}
42 ExecuteProcess('/bin/bash', '-c "cp -rf ' + Source + ' ' + ParamStr(2) + ExtractFileName(Source) + '" > /dev/null');
43 {$endif}
44 end;
45
46 var
47 I: Integer;
48 Dev: Boolean;
49 DestDir: String;
50 begin
51 DestDir := ParamStr(2);
52 Dev := ContainsText(DestDir, 'Development');
53
54 if not DirectoryExists(DestDir+'render') then
55 MkDir(DestDir+'render');
56
57 HTCopyFile('Resources/ROMs/halt.gb');
58 HTCopyFile('Resources/Fonts/PixeliteTTF.ttf');
59
60 if not Dev then begin
61 HTCopyDir('hUGEDriver');
62 HTCopyDir('Resources/SampleSongs');
63 end else begin
64 if not DirectoryExists(DestDir+'hUGEDriver') then
65 Writeln('hUGEDriver not copied in development mode. Manually link it there yourself!');
66 end;
67 end.
Deletedbuild-release-unix.sh +0−65
@@ -1,65 +0,0 @@
1 #!/bin/bash
2 set -x #echo on
3
4 asm=$(which rgbasm)
5 link=$(which rgblink)
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
13
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 [ $? -ne 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
64
65 echo Done
Deletedbuild-release-win.bat +0−93
@@ -1,93 +0,0 @@
1 @echo on
2
3 for /f %%i in ('where rgbasm') do set rgbasm=%%i
4 for /f %%i in ('where rgblink') do set rgblink=%%i
5 for /f %%i in ('where rgbfix') do set rgbfix=%%i
6 for /f %%i in ('where ffmpeg') do set ffmpeg=%%i
7
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
26 if x%outdir%==x goto no_outdir
27
28 :: Build halt.gb
29 rgbasm -o halt.obj halt.asm
30 if not errorlevel 0 goto buildfail
31 rgblink -n %outdir%\halt.sym -o %outdir%\halt.gb halt.obj
32 if not errorlevel 0 goto buildfail
33
34 erase halt.obj
35
36 rgbfix -p0 -v %outdir%\halt.gb
37 if not errorlevel 0 goto fixfail
38
39 :: Copy needed stuff
40
41 copy %rgbasm% %outdir%\
42 copy %rgblink% %outdir%\
43 copy %rgbfix% %outdir%\
44 copy %ffmpeg% %outdir%\
45
46 copy Resources\Fonts\PixeliteTTF.ttf %outdir%\
47 if not errorlevel 0 goto copyfail
48
49 copy Resources\Libs\SDL2.dll %outdir%\
50 if not errorlevel 0 goto copyfail
51
52 mkdir %outdir%\hUGEDriver
53 pushd %outdir%\hUGEDriver
54 curl -L https://api.github.com/repos/SuperDisk/hUGEDriver/tarball | tar xzf - --strip 1
55 popd
56
57 Xcopy /E /I /Y "Resources\Sample Songs" "%outdir%\Sample Songs"
58 if not errorlevel 0 goto copyfail
59
60 :: Zip it up
61
62 powershell Compress-Archive %outdir%\* hUGETracker-%outdir%.zip -Force
63
64 echo Done
65 exit/b 0
66
67 :norgbasm
68 echo rgbasm.exe not found!
69 exit/b 1
70
71 :norgblink
72 echo rgblink not found!
73 exit/b 1
74
75 :norgbfix
76 echo rgbfix not found!
77 exit/b 1
78
79 :buildfail
80 echo Building halt.gb and halt.sym failed!
81 exit/b 1
82
83 :fixfail
84 echo rgbfix failed while fixing halt.gb!
85 exit/b 1
86
87 :copyfail
88 echo Error while copying required things from resources!
89 exit/b 1
90
91 :no_outdir
92 echo Output directory not specified!
93 exit/b 1
Deletedsetup-windows-dev.bat +0−21
@@ -1,21 +0,0 @@
1 set outdir=lib\Development\x86_64-win64
2 mkdir %outdir%
3
4 copy Resources\Fonts\PixeliteTTF.ttf %outdir%\
5 if not errorlevel 0 goto copyfail
6
7 copy Resources\Libs\SDL2.dll %outdir%\
8 if not errorlevel 0 goto copyfail
9
10 Xcopy /E /I /Y hUGEDriver %outdir%\hUGEDriver
11 if not errorlevel 0 goto copyfail
12
13 Xcopy /E /I /Y "Resources\Sample Songs" "%outdir%\Sample Songs"
14 if not errorlevel 0 goto copyfail
15
16 exit/b 0
17
18 :copyfail
19
20 echo Error while copying required files!
21 exit/b 1