From 0d0d09e07bd421caa4f76da2bec91e32042bff4d Mon Sep 17 00:00:00 2001 From: geoffwhittington Date: Fri, 21 Apr 2023 21:06:39 -0400 Subject: [PATCH] Update mmrelay.iss --- mmrelay.iss | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/mmrelay.iss b/mmrelay.iss index b30833d..bb949eb 100644 --- a/mmrelay.iss +++ b/mmrelay.iss @@ -1,50 +1,3 @@ -[Code] -var - YamlPage: TWizardPage; - Memo: TMemo; - -procedure InitializeWizard(); -begin - // Create the wizard page - YamlPage := CreateCustomPage(wpWelcome, 'YAML Configuration', 'Enter the YAML configuration for your application:'); - - // Add a memo control to the page - Memo := TMemo.Create(WizardForm); - Memo.Parent := YamlPage.Surface; - Memo.Align := alClient; - Memo.ScrollBars := ssBoth; - Memo.WordWrap := False; -end; - -procedure SaveYamlConfig(); -var - YamlText: string; - ConfigFile: string; - FileStream: TFileStream; -begin - // Get the YAML text from the memo control - YamlText := Memo.Text; - - // Save the YAML text to a file - ConfigFile := ExpandConstant('{app}\config.yaml'); - FileStream := TFileStream.Create(ConfigFile, fmCreate); - try - FileStream.WriteBuffer(YamlText, Length(YamlText) * SizeOf(Char)); - finally - FileStream.Free; - end; -end; - -function NextButtonClick(CurPageID: Integer): Boolean; -begin - // Save the YAML configuration when the user clicks Next - if CurPageID = YamlPage.ID then - begin - SaveYamlConfig(); - end; - Result := True; -end; - [Setup] // Add the custom wizard page to the installation //WizardImageFile=wizard.bmp