Commit 2a2a651

Nick committed on
More work on build process..
commit 2a2a651b2d7d3cf3b82e5f6b24375bfcd1736a42 parent 85e7f05
3 changed files +43−8
ModifiedGBEmu.lpi +5−4
@@ -73,7 +73,7 @@
73 </Verbosity> 73 </Verbosity>
74 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/> 74 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/>
75 <ExecuteAfter> 75 <ExecuteAfter>
76 <Command Value="instantfpc PostBuild.pas $Path($(TargetFile))"/> 76 <Command Value="$Path($(CompPath))/instantfpc PostBuild.pas $Path($(TargetFile))"/>
77 </ExecuteAfter> 77 </ExecuteAfter>
78 </Other> 78 </Other>
79 </CompilerOptions> 79 </CompilerOptions>
@@ -132,7 +132,7 @@
132 </Verbosity> 132 </Verbosity>
133 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/> 133 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/>
134 <ExecuteAfter> 134 <ExecuteAfter>
135 <Command Value="instantfpc PostBuild.pas $Path($(TargetFile))"/> 135 <Command Value="$Path($(CompPath))/instantfpc PostBuild.pas $Path($(TargetFile))"/>
136 </ExecuteAfter> 136 </ExecuteAfter>
137 </Other> 137 </Other>
138 </CompilerOptions> 138 </CompilerOptions>
@@ -194,7 +194,7 @@
194 </Verbosity> 194 </Verbosity>
195 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/> 195 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dPRODUCTION"/>
196 <ExecuteAfter> 196 <ExecuteAfter>
197 <Command Value="instantfpc PostBuild.pas $Path($(TargetFile))"/> 197 <Command Value="$Path($(CompPath))/instantfpc PostBuild.pas $Path($(TargetFile))"/>
198 </ExecuteAfter> 198 </ExecuteAfter>
199 </Other> 199 </Other>
200 </CompilerOptions> 200 </CompilerOptions>
@@ -205,6 +205,7 @@
205 </BuildModes> 205 </BuildModes>
206 <PublishOptions> 206 <PublishOptions>
207 <Version Value="2"/> 207 <Version Value="2"/>
208 <OpenInFileMan Value="True"/>
208 </PublishOptions> 209 </PublishOptions>
209 <RunParams> 210 <RunParams>
210 <FormatVersion Value="2"/> 211 <FormatVersion Value="2"/>
@@ -394,7 +395,7 @@
394 </Verbosity> 395 </Verbosity>
395 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dDEVELOPMENT"/> 396 <CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL -dDEVELOPMENT"/>
396 <ExecuteAfter> 397 <ExecuteAfter>
397 <Command Value="instantfpc PostBuild.pas $Path($(TargetFile))"/> 398 <Command Value="$MakeExe(ide,$Path($(CompPath))/instantfpc) --compiler=&quot;$(CompPath)&quot; PostBuild.pas &quot;$Path($(TargetFile))&quot; -d"/>
398 </ExecuteAfter> 399 </ExecuteAfter>
399 </Other> 400 </Other>
400 </CompilerOptions> 401 </CompilerOptions>
ModifiedPostBuild.pas +37−4
@@ -16,20 +16,53 @@
16 simultaneously. 16 simultaneously.
17 } 17 }
18 18
19 {$ifdef UNIX}uses BaseUnix;{$endif} 19 {$mode objfpc}{$H+}
20 {$ifdef WINDOWS}uses Windows;{$endif}
21 20
22 procedure Mklink(Src, Dst: String); 21 uses SysUtils,
22
23 {$ifdef UNIX}BaseUnix;{$endif}
24 {$ifdef WINDOWS}Windows;{$endif}
25
26 // Cringe
27 {$ifdef WINDOWS}
28 const
29 SYMBOLIC_LINK_FLAG_DIRECTORY = $00000001;
30
31 function CreateSymbolicLinkA(
32 lpSymlinkFileName: PAnsiChar;
33 lpTargetFileName: PAnsiChar;
34 dwFlags: DWORD
35 ): Boolean; stdcall; external 'kernel32';
36 {$endif}
37
38 procedure Mklink(Src, Dst: AnsiString; Dir: Boolean = False);
23 begin 39 begin
40 writeln(src, ', ', dst, ', ', dir);
24 {$ifdef UNIX} 41 {$ifdef UNIX}
25 // TODO.... 42 // TODO....
26 {$endif} 43 {$endif}
27 44
28 {$ifdef WINDOWS} 45 {$ifdef WINDOWS}
29 // Todo... 46 if Dir then
47 writeln('link dir ', CreateSymbolicLinkA(PAnsiChar(Dst), PAnsiChar(Src), SYMBOLIC_LINK_FLAG_DIRECTORY))
48 else
49 writeln('link file ', CreateSymbolicLinkA(PAnsiChar(Dst), PAnsiChar(Src), 0))
30 {$endif} 50 {$endif}
31 end; 51 end;
32 52
53 var
54 I: Integer;
55 Dev: Boolean;
56 DestDir: String;
33 begin 57 begin
58 for I := 0 to ParamCount-1 do writeln(Paramstr(I));
59 DestDir := ParamStr(2);
60 Dev := True; ///(ParamCount > 2) and (ParamStr(2) = '-d');
34 61
62 if Dev then begin
63 Mklink('hUGETracker', DestDir+'hUGETracker', True);
64 Mklink('Resources/ROMs/halt.gb', DestDir+'halt.gb');
65 end else begin
66 writeln('not implemented.');
67 end;
35 end. 68 end.
Addedbleh.py +1−0
@@ -0,0 +1 @@
1 import os; print(os.getcwd())