Skip to content

Commit 234e1d1

Browse files
committed
add SIMBACOMMIT_XXX define and SIMBACOMMIT macro
1 parent b672552 commit 234e1d1

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Source/script/imports/simba.import_base.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ procedure ImportBase(Script: TSimbaScript);
819819

820820
addBaseDefine('SIMBA' + Format('%d', [SIMBA_VERSION]));
821821
addBaseDefine('SIMBAMAJOR' + Format('%d', [SIMBA_MAJOR]));
822+
addBaseDefine('SIMBACOMMIT_' + SIMBA_COMMIT);
822823
addBaseDefine('FPC' + Format('%d', [FPC_FULLVERSION]));
823824
addBaseDefine(CPU);
824825
addBaseDefine(OS);

Source/script/simba.script.pas

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ function TSimbaScript.DoCompilerMacro(Sender: TLapeCompiler; Name, Argument: lpS
115115
end;
116116
Value := 'TStringArray([' + Value + '])';
117117
end;
118+
119+
'SIMBACOMMIT':
120+
begin
121+
Value := #39 + SIMBA_COMMIT + #39;
122+
end;
118123
end;
119124
end;
120125

@@ -182,6 +187,7 @@ function TSimbaScript.Compile: Boolean;
182187
FCompiler.addPreprocessorMacro('FINDLIB', @DoCompilerMacro);
183188
FCompiler.addPreprocessorMacro('LOADEDLIB', @DoCompilerMacro);
184189
FCompiler.addPreprocessorMacro('LOADEDLIBS', @DoCompilerMacro);
190+
FCompiler.addPreprocessorMacro('SIMBACOMMIT', @DoCompilerMacro);
185191

186192
FCompiler.addPreprocessorFunc('LOADEDLIB', @DoCompilerPreprocessorFunc);
187193
FCompiler.addPreprocessorFunc('FINDLIB', @DoCompilerPreprocessorFunc);

0 commit comments

Comments
 (0)