kopia lustrzana https://github.com/mate-dev/meshtastic-matrix-relay
Update mmrelay.iss
rodzic
3b55ae7da1
commit
6926e6a144
51
mmrelay.iss
51
mmrelay.iss
|
@ -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]
|
[Setup]
|
||||||
|
// Add the custom wizard page to the installation
|
||||||
|
WizardImageFile=wizard.bmp
|
||||||
|
WizardSmallImageFile=smallwiz.bmp
|
||||||
|
|
||||||
AppName=MM Relay
|
AppName=MM Relay
|
||||||
AppVersion=1.0
|
AppVersion=1.0
|
||||||
DefaultDirName={pf}\MM Relay
|
DefaultDirName={pf}\MM Relay
|
||||||
|
|
Ładowanie…
Reference in New Issue