Skip to content

Commit

Permalink
Merge pull request #178 from sempare/confirm_license_required_release…
Browse files Browse the repository at this point in the history
…_mode

#175 - release mode should force compiler to stop if license is not confirmed
  • Loading branch information
darnocian authored Jul 21, 2024
2 parents 7f4a3b2 + a401f77 commit 12f8830
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Sempare.Template.pas
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ class procedure Template.EvalWithContext(const AContext: ITemplateContext; const
LConfirmLicense: TStringStream;
{$ENDIF}
begin
{$IFDEF RELEASE}
{$IFNDEF SEMPARE_TEMPLATE_CONFIRM_LICENSE }
{$MESSAGE FATAL 'The SEMPARE_TEMPLATE_CONFIRM_LICENSE define must be set in RELEASE mode.'}
{$ENDIF}
{$ENDIF}
{$IFNDEF SEMPARE_TEMPLATE_CONFIRM_LICENSE}
LConfirmLicense := TStringStream.Create('Thank you for trying the Sempare Template Engine.'#13#10#13#10 + //
'To supress this message, set the conditional define SEMPARE_TEMPLATE_CONFIRM_LICENSE in the project options.'#13#10#13#10#13#10 + //
Expand Down

0 comments on commit 12f8830

Please sign in to comment.