Add Inno Setup scripts for online and offline installers
This commit is contained in:
parent
31e53661d0
commit
72af2546ef
52
WebEditor.iss
Normal file
52
WebEditor.iss
Normal file
@ -0,0 +1,52 @@
|
||||
; Script generated by the Inno Script Studio Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Web Editor"
|
||||
#define MyAppVersion "1.0"
|
||||
#define MyAppExeName "webeditor.exe"
|
||||
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{AE44E46B-A4EC-46DB-9C76-76DD8C00FF4F}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||
DefaultDirName={pf}\{#MyAppName}
|
||||
DefaultGroupName={#MyAppName}
|
||||
;AllowNoIcons=yes
|
||||
OutputBaseFilename=webeditor-setup
|
||||
Compression=lzma2/max
|
||||
SolidCompression=yes
|
||||
OutputDir=C:\Users\matt\MyPrograms\DesktopApps\WebEditor\out
|
||||
DisableDirPage=no
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||
|
||||
[Dirs]
|
||||
Name: "{app}"; Permissions: users-modify
|
||||
|
||||
[Files]
|
||||
Source: "C:\Users\matt\MyPrograms\DesktopApps\WebEditor\out\webeditor-win32-x64\webeditor.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: "C:\Users\matt\MyPrograms\DesktopApps\WebEditor\out\webeditor-win32-x64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Icons]
|
||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
|
||||
[Registry]
|
||||
Root: "HKLM64"; Subkey: "Software\Classes\.ewe\OpenWithProgids"; ValueType: string; ValueName: "EnckesWebEditor.ewe"; Flags: uninsdeletevalue
|
||||
Root: "HKLM64"; Subkey: "Software\Classes\EnckesWebEditor.ewe"; ValueType: string; ValueData: "Enckes Web Editor"; Flags: uninsdeletevalue
|
||||
Root: "HKLM64"; Subkey: "Software\Classes\EnckesWebEditor.ewe\DefaultIcon"; ValueType: string; ValueData: "{app}\webeditor.exe,0"; Flags: uninsdeletevalue
|
||||
Root: "HKLM64"; Subkey: "Software\Classes\EnckesWebEditor.ewe\shell\open\command"; ValueType: string; ValueData: """{app}\webeditor.exe"" ""%1"""; Flags: uninsdeletevalue
|
||||
Root: "HKLM64"; Subkey: "Software\Classes\Applications\webeditor.exe\SupportedTypes"; ValueType: string; ValueName: ".ewe"; Flags: uninsdeletevalue
|
80
WebEditorOnline.iss
Normal file
80
WebEditorOnline.iss
Normal file
@ -0,0 +1,80 @@
|
||||
; Script generated by the Inno Script Studio Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "Web Editor"
|
||||
#define MyAppVersion "1.0"
|
||||
#define MyAppExeName "webeditor.exe"
|
||||
|
||||
|
||||
; Script generated by the Inno Script Studio Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{AE44E46B-A4EC-46DB-9C76-76DD8C00FF4F}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
;AppVerName={#MyAppName} {#MyAppVersion}
|
||||
;DefaultGroupName={#MyAppName}
|
||||
AllowNoIcons=yes
|
||||
OutputBaseFilename=online-webeditor-setup
|
||||
Compression=lzma2/max
|
||||
SolidCompression=yes
|
||||
OutputDir=C:\Users\matt\MyPrograms\DesktopApps\WebEditor\out
|
||||
Uninstallable=no
|
||||
CreateAppDir=False
|
||||
DisableProgramGroupPage=yes
|
||||
DisableFinishedPage=True
|
||||
PrivilegesRequired=lowest
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
|
||||
[Files]
|
||||
Source: "{tmp}\webeditor-setup.exe"; DestDir: "{tmp}"; Flags: external deleteafterinstall
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Run]
|
||||
Filename: "{tmp}\webeditor-setup.exe";
|
||||
|
||||
[Code]
|
||||
var
|
||||
DownloadPage: TDownloadWizardPage;
|
||||
|
||||
function OnDownloadProgress(const Url, FileName: String; const Progress, ProgressMax: Int64): Boolean;
|
||||
begin
|
||||
if Progress = ProgressMax then
|
||||
Log(Format('Successfully downloaded file to {tmp}: %s', [FileName]));
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure InitializeWizard;
|
||||
begin
|
||||
DownloadPage := CreateDownloadPage(SetupMessage(msgWizardPreparing), SetupMessage(msgPreparingDesc), @OnDownloadProgress);
|
||||
end;
|
||||
|
||||
function NextButtonClick(CurPageID: Integer): Boolean;
|
||||
begin
|
||||
if CurPageID = wpReady then begin
|
||||
DownloadPage.Clear;
|
||||
DownloadPage.Add('https://welchsoftwaredevelopers.com/webeditor-setup.exe', 'webeditor-setup.exe', '');
|
||||
DownloadPage.Show;
|
||||
try
|
||||
try
|
||||
DownloadPage.Download;
|
||||
Result := True;
|
||||
except
|
||||
if DownloadPage.AbortButton.Cancel then
|
||||
Log('Aborted by user.')
|
||||
else
|
||||
SuppressibleMsgBox(AddPeriod(GetExceptionMessage), mbCriticalError, MB_OK, IDOK);
|
||||
Result := False;
|
||||
end;
|
||||
finally
|
||||
DownloadPage.Hide;
|
||||
end;
|
||||
end else
|
||||
Result := True;
|
||||
end;
|
Loading…
Reference in New Issue
Block a user