Skip to content

Commit

Permalink
Add version string baked in during compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperDisk committed Dec 8, 2023
1 parent 07f720a commit 0057d26
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 61 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
working-directory: hUGETracker
run: | # The PATH manipulation is because the macOS and Windows installs do NOT put it in the PATH >_<
export PATH="$PATH":/Applications/Lazarus:/c/lazarus
export VERSION_STRING=`git describe --tags --dirty --always`
lazbuild --add-package-link src/rackctls/RackCtlsPkg.lpk
lazbuild --add-package-link src/bgrabitmap/bgrabitmap/bgrabitmappack.lpk
Expand Down
68 changes: 34 additions & 34 deletions src/about_hugetracker.lfm
Original file line number Diff line number Diff line change
@@ -1,70 +1,60 @@
object frmAboutHugetracker: TfrmAboutHugetracker
Left = 1187
Height = 322
Top = 331
Left = 1719
Height = 350
Top = 326
Width = 545
BorderStyle = bsDialog
Caption = 'About hUGETracker'
ClientHeight = 322
ClientHeight = 350
ClientWidth = 545
OnCreate = FormCreate
OnDeactivate = FormDeactivate
Position = poDesktopCenter
LCLVersion = '2.0.12.0'
LCLVersion = '2.2.7.0'
object Label1: TLabel
Left = 185
Height = 15
Top = 120
Width = 175
Left = 179
Height = 17
Top = 144
Width = 186
Alignment = taCenter
Caption = 'Created by Nick "SuperDisk" Faro'
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
ParentColor = False
ParentFont = False
WordWrap = True
end
object Button1: TButton
Left = 208
Left = 207
Height = 25
Top = 280
Top = 312
Width = 135
Caption = 'Close'
OnClick = Button1Click
ParentFont = False
TabOrder = 0
end
object Label2: TLabel
Left = 145
Height = 90
Top = 176
Width = 98
Left = 144
Height = 102
Top = 192
Width = 104
Caption = 'Christian Hackbart'#13#10'Toxa'#13#10'RichardULZ'#13#10'Daid'#13#10'LIJI32'#13#10'ISSOtm'
ParentColor = False
end
object Label3: TLabel
Left = 321
Height = 90
Top = 176
Width = 78
Left = 320
Height = 102
Top = 192
Width = 81
Caption = 'Eevee'#13#10'B00daW'#13#10'MelonadeM'#13#10'Goodnight Girl'#13#10'Kabcorp'#13#10'TakuikaNinja'
ParentColor = False
end
object Label4: TLabel
Left = 235
Height = 15
Top = 152
Width = 75
Left = 232
Height = 17
Top = 168
Width = 80
Caption = 'Special thanks'
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
Font.Style = [fsUnderline]
ParentColor = False
ParentFont = False
Expand Down Expand Up @@ -5726,4 +5716,14 @@ object frmAboutHugetracker: TfrmAboutHugetracker
}
end
end
object VersionLabel: TLabel
Left = 10
Height = 24
Top = 104
Width = 524
Alignment = taRightJustify
AutoSize = False
Caption = 'Version'
ParentColor = False
end
end
13 changes: 13 additions & 0 deletions src/about_hugetracker.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ TfrmAboutHugetracker = class(TForm)
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
VersionLabel: TLabel;
Panel1: TPanel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
private

Expand All @@ -41,6 +43,17 @@ procedure TfrmAboutHugetracker.Button1Click(Sender: TObject);
Close;
end;

procedure TfrmAboutHugetracker.FormCreate(Sender: TObject);
var
GitVersion: String;
begin
GitVersion := {$I %VERSION_STRING%};
if GitVersion = '' then
VersionLabel.Caption := 'Unknown Version'
else
VersionLabel.Caption := 'Version '+GitVersion;
end;

procedure TfrmAboutHugetracker.FormDeactivate(Sender: TObject);
begin
Close;
Expand Down
54 changes: 27 additions & 27 deletions src/tracker.lfm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object frmTracker: TfrmTracker
Top = 8
Width = 297
Caption = 'Song information'
ClientHeight = 173
ClientHeight = 188
ClientWidth = 293
ParentFont = False
TabOrder = 0
Expand Down Expand Up @@ -299,28 +299,28 @@ object frmTracker: TfrmTracker
MinSize = 33
MaxSize = 33
Title.Caption = 'Dty1'
Width = 35
Width = 38
end
item
Alignment = taCenter
MinSize = 33
MaxSize = 33
Title.Caption = 'Dty2'
Width = 35
Width = 38
end
item
Alignment = taCenter
MinSize = 33
MaxSize = 33
Title.Caption = 'Wav'
Width = 35
Width = 38
end
item
Alignment = taCenter
MinSize = 33
MaxSize = 33
Title.Caption = 'Nse'
Width = 38
Width = 39
end>
DefaultColWidth = 17
DefaultRowHeight = 21
Expand All @@ -344,10 +344,10 @@ object frmTracker: TfrmTracker
OnValidateEntry = OrderEditStringGridValidateEntry
ColWidths = (
64
35
35
35
38
38
38
39
)
end
object Splitter2: TSplitter
Expand Down Expand Up @@ -1862,7 +1862,7 @@ object frmTracker: TfrmTracker
ParentShowHint = False
end
object PanicToolButton: TToolButton
Left = 495
Left = 499
Hint = 'Stops all sound output'
Top = 0
AutoSize = True
Expand All @@ -1873,17 +1873,17 @@ object frmTracker: TfrmTracker
ShowHint = True
end
object ToolButton2: TToolButton
Left = 119
Left = 120
Top = 0
Action = PlayCursorAction
end
object ToolButton4: TToolButton
Left = 148
Left = 149
Top = 0
Action = StopAction
end
object ExportGBButton: TToolButton
Left = 214
Left = 217
Hint = 'Export the song as a standalone ROM'
Top = 0
AutoSize = True
Expand All @@ -1899,21 +1899,21 @@ object frmTracker: TfrmTracker
Style = tbsDivider
end
object ToolButton6: TToolButton
Left = 177
Left = 178
Height = 22
Top = 0
Caption = 'ToolButton6'
Style = tbsDivider
end
object ToolButton7: TToolButton
Left = 1037
Left = 1043
Height = 22
Top = 0
Caption = 'ToolButton7'
Style = tbsSeparator
end
object OctaveSpinEdit: TSpinEdit
Left = 603
Left = 609
Height = 27
Hint = 'The octave offset for entering new notes'
Top = 0
Expand All @@ -1924,14 +1924,14 @@ object frmTracker: TfrmTracker
TabOrder = 0
end
object ToolButton9: TToolButton
Left = 554
Left = 558
Height = 22
Top = 0
Caption = 'ToolButton9'
Style = tbsSeparator
end
object Label22: TLabel
Left = 560
Left = 566
Height = 22
Top = 0
Width = 43
Expand All @@ -1942,7 +1942,7 @@ object frmTracker: TfrmTracker
ParentFont = False
end
object Label23: TLabel
Left = 668
Left = 674
Height = 22
Top = 0
Width = 70
Expand All @@ -1953,7 +1953,7 @@ object frmTracker: TfrmTracker
ParentFont = False
end
object InstrumentComboBox: TComboBox
Left = 738
Left = 744
Height = 25
Hint = 'The selected instrument for new notes'
Top = 0
Expand All @@ -1971,7 +1971,7 @@ object frmTracker: TfrmTracker
Text = '(no instrument)'
end
object Label24: TLabel
Left = 952
Left = 958
Height = 22
Top = 0
Width = 35
Expand All @@ -1982,7 +1982,7 @@ object frmTracker: TfrmTracker
ParentFont = False
end
object StepSpinEdit: TSpinEdit
Left = 987
Left = 993
Height = 27
Hint = 'How many rows to step down after entering a new note'
Top = 0
Expand All @@ -1993,42 +1993,42 @@ object frmTracker: TfrmTracker
TabOrder = 2
end
object ToolButton3: TToolButton
Left = 90
Left = 91
Top = 0
Action = PlayStartAction
end
object ExportGBSButton: TToolButton
Left = 299
Left = 302
Hint = 'Export the song as a GBS soundtrack'
Top = 0
Caption = 'Export GBS'
ImageIndex = 80
OnClick = ExportGBSButtonClick
end
object ToolButton5: TToolButton
Left = 491
Left = 494
Height = 22
Top = 0
Caption = 'ToolButton5'
Style = tbsDivider
end
object ToolButton10: TToolButton
Left = 391
Left = 394
Hint = 'Export the song as WAV or MP3'
Top = 0
Caption = 'Render Song'
ImageIndex = 77
OnClick = ToolButton10Click
end
object ToolButton11: TToolButton
Left = 210
Left = 212
Height = 22
Top = 0
Caption = 'ToolButton11'
Style = tbsDivider
end
object LoopSongToolButton: TToolButton
Left = 181
Left = 183
Top = 0
ImageIndex = 87
OnClick = LoopSongToolButtonClick
Expand Down

0 comments on commit 0057d26

Please sign in to comment.