Update mmrelay.iss

pull/1/head
geoffwhittington 2023-04-21 20:15:11 -04:00 zatwierdzone przez GitHub
rodzic 5e42493230
commit dbb665a2b0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 51 dodań i 0 usunięć

Wyświetl plik

@ -1,4 +1,55 @@
[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
Stream_WriteString(FileStream, YamlText);
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
WizardSmallImageFile=smallwiz.bmp
AppName=MM Relay
AppVersion=1.0
DefaultDirName={pf}\MM Relay