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