Update mmrelay.iss

pull/1/head
geoffwhittington 2023-04-21 21:06:39 -04:00 zatwierdzone przez GitHub
rodzic d857426b66
commit 0d0d09e07b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 0 dodań i 47 usunięć

Wyświetl plik

@ -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