Commit 33fe450

Nick Faro committed on
Add version in title bar
commit 33fe4505b00c5bdc10ed54bf1603ab9827bb92cc parent f4d80b9
6 changed files +38−5
Modified.gitignore +1−0
@@ -12,6 +12,7 @@ lib
12 *.map 12 *.map
13 *.gb 13 *.gb
14 *trace*.txt 14 *trace*.txt
15 revision.inc
15 *.so 16 *.so
16 ~* 17 ~*
17 Release-windows 18 Release-windows
Modifiedconstants.pas +2−0
@@ -20,6 +20,8 @@ type
20 const 20 const
21 UGE_FORMAT_VERSION = 6; 21 UGE_FORMAT_VERSION = 6;
22 22
23 HT_GIT_TAG = {$INCLUDE revision.inc} {$ifdef DEVELOPMENT} + '-DEBUG'{$ENDIF};
24
23 SYM_ROW = 'row'; 25 SYM_ROW = 'row';
24 SYM_TICK = 'tick'; 26 SYM_TICK = 'tick';
25 SYM_CURRENT_ORDER = 'current_order'; 27 SYM_CURRENT_ORDER = 'current_order';
Addedgit2revisioninc.cmd +18−0
@@ -0,0 +1,18 @@
1 echo \" <<'BATCH_SCRIPT' >/dev/null ">NUL "\" \`" <#"
2 @ECHO OFF
3 REM ===== Batch Script Begin =====
4 FOR /F "delims=" %%i IN ('git describe --tags --always') DO set gittag=%%i
5 echo '%gittag%' > revision.inc
6 REM ====== Batch Script End ======
7 GOTO :eof
8 TYPE CON >NUL
9 BATCH_SCRIPT
10 #> | Out-Null
11
12 set +o histexpand 2>/dev/null
13 # ===== Bash Script Begin =====
14 echo \'$(git describe --tags --always)\' > revision.inc
15 # ====== Bash Script End ======
16 case $- in *"i"*) cat /dev/stdin >/dev/null ;; esac
17 exit
18 #>
ModifiedhUGETracker.lpi +13−1
@@ -15,7 +15,7 @@
15 <XPManifest> 15 <XPManifest>
16 <DpiAware Value="True"/> 16 <DpiAware Value="True"/>
17 <TextName Value="SuperDisk.UGE.HugeTracker"/> 17 <TextName Value="SuperDisk.UGE.HugeTracker"/>
18 <TextDesc Value="The ultimate soundtracking and composing tool for Gameboy!"/> 18 <TextDesc Value="The ultimate soundtracking and composing tool for Game Boy!"/>
19 </XPManifest> 19 </XPManifest>
20 <Icon Value="0"/> 20 <Icon Value="0"/>
21 </General> 21 </General>
@@ -67,6 +67,9 @@
67 </Verbosity> 67 </Verbosity>
68 <WriteFPCLogo Value="False"/> 68 <WriteFPCLogo Value="False"/>
69 <CustomOptions Value="-dPRODUCTION"/> 69 <CustomOptions Value="-dPRODUCTION"/>
70 <ExecuteBefore>
71 <Command Value="./git2revisioninc.cmd"/>
72 </ExecuteBefore>
70 </Other> 73 </Other>
71 </CompilerOptions> 74 </CompilerOptions>
72 </Item2> 75 </Item2>
@@ -117,6 +120,9 @@
117 </Verbosity> 120 </Verbosity>
118 <WriteFPCLogo Value="False"/> 121 <WriteFPCLogo Value="False"/>
119 <CustomOptions Value="-dPRODUCTION"/> 122 <CustomOptions Value="-dPRODUCTION"/>
123 <ExecuteBefore>
124 <Command Value="./git2revisioninc.cmd"/>
125 </ExecuteBefore>
120 </Other> 126 </Other>
121 </CompilerOptions> 127 </CompilerOptions>
122 </Item3> 128 </Item3>
@@ -169,6 +175,9 @@
169 </Verbosity> 175 </Verbosity>
170 <WriteFPCLogo Value="False"/> 176 <WriteFPCLogo Value="False"/>
171 <CustomOptions Value="-dPRODUCTION"/> 177 <CustomOptions Value="-dPRODUCTION"/>
178 <ExecuteBefore>
179 <Command Value="./git2revisioninc.cmd"/>
180 </ExecuteBefore>
172 </Other> 181 </Other>
173 </CompilerOptions> 182 </CompilerOptions>
174 </Item4> 183 </Item4>
@@ -400,6 +409,9 @@
400 </Verbosity> 409 </Verbosity>
401 <WriteFPCLogo Value="False"/> 410 <WriteFPCLogo Value="False"/>
402 <CustomOptions Value="-dDEVELOPMENT"/> 411 <CustomOptions Value="-dDEVELOPMENT"/>
412 <ExecuteBefore>
413 <Command Value="./git2revisioninc.cmd"/>
414 </ExecuteBefore>
403 </Other> 415 </Other>
404 </CompilerOptions> 416 </CompilerOptions>
405 </CONFIG> 417 </CONFIG>
Modifiedtracker.pas +4−4
@@ -632,10 +632,7 @@ procedure TfrmTracker.UpdateWindowTitle;
632 var 632 var
633 S: String; 633 S: String;
634 begin 634 begin
635 S := 'hUGETracker'; 635 S := 'hUGETracker '+HT_GIT_TAG;
636
637 if Trim(LoadedFileName) <> '' then
638 S += ' - '+LoadedFilename;
639 636
640 if Trim(Song.Name) <> '' then begin 637 if Trim(Song.Name) <> '' then begin
641 S += ' - ['; 638 S += ' - [';
@@ -645,6 +642,9 @@ begin
645 S += Song.Name+']'; 642 S += Song.Name+']';
646 end; 643 end;
647 644
645 if Trim(LoadedFileName) <> '' then
646 S += ' - '+LoadedFilename;
647
648 Self.Caption := S; 648 Self.Caption := S;
649 end; 649 end;
650 650