74 lines
3.1 KiB
Text
74 lines
3.1 KiB
Text
|
|
#define MyAppVersion "0.1.0"
|
||
|
|
|
||
|
|
[Setup]
|
||
|
|
AppName=DragonMoonlight
|
||
|
|
AppVersion={#MyAppVersion}
|
||
|
|
AppPublisher=Wild Dragon
|
||
|
|
AppPublisherURL=https://forge.wilddragon.net/zgaetano/dragonmoonlight
|
||
|
|
DefaultDirName={autopf}\DragonMoonlight
|
||
|
|
DefaultGroupName=DragonMoonlight
|
||
|
|
OutputBaseFilename=DragonMoonlight-{#MyAppVersion}-Setup
|
||
|
|
OutputDir=dist
|
||
|
|
Compression=lzma2/ultra64
|
||
|
|
SolidCompression=yes
|
||
|
|
ArchitecturesInstallIn64BitMode=x64
|
||
|
|
PrivilegesRequired=admin
|
||
|
|
WizardStyle=modern
|
||
|
|
SetupIconFile=app\icon.ico
|
||
|
|
UninstallDisplayIcon={app}\DragonMoonlight.exe
|
||
|
|
VersionInfoVersion={#MyAppVersion}
|
||
|
|
VersionInfoCompany=Wild Dragon
|
||
|
|
VersionInfoProductName=DragonMoonlight
|
||
|
|
VersionInfoProductVersion={#MyAppVersion}
|
||
|
|
|
||
|
|
; Code signing configuration - uses SignTool if SIGNTOOL_CERT env var is set
|
||
|
|
SignTool=signtool sign /f {%SIGNTOOL_CERT} /p {%SIGNTOOL_PASSWORD} /td sha256 /fd sha256 /tr http://timestamp.digicert.com $f
|
||
|
|
|
||
|
|
[Files]
|
||
|
|
Source: "{src}\dist\win\DragonMoonlight.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||
|
|
Source: "{src}\dist\win\wintun.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||
|
|
Source: "{src}\dist\win\*.dll"; DestDir: "{app}"; Flags: ignoreversion skipifnotexists
|
||
|
|
Source: "{src}\dist\win\*.exe"; DestDir: "{app}"; Flags: ignoreversion skipifnotexists
|
||
|
|
Source: "{src}\dist\win\platforms\*"; DestDir: "{app}\platforms"; Flags: ignoreversion recursesubdirs createallsubdirs skipifnotexists
|
||
|
|
Source: "{src}\dist\win\styles\*"; DestDir: "{app}\styles"; Flags: ignoreversion recursesubdirs createallsubdirs skipifnotexists
|
||
|
|
Source: "{src}\dist\win\imageformats\*"; DestDir: "{app}\imageformats"; Flags: ignoreversion recursesubdirs createallsubdirs skipifnotexists
|
||
|
|
Source: "{src}\dist\win\qml\*"; DestDir: "{app}\qml"; Flags: ignoreversion recursesubdirs createallsubdirs skipifnotexists
|
||
|
|
Source: "{src}\dist\win\translations\*"; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs skipifnotexists
|
||
|
|
Source: "{src}\package\win\pre-install.ps1"; DestDir: "{tmp}"; Flags: deleteafterinstall
|
||
|
|
|
||
|
|
[Icons]
|
||
|
|
Name: "{userdesktop}\DragonMoonlight"; Filename: "{app}\DragonMoonlight.exe"
|
||
|
|
Name: "{group}\DragonMoonlight"; Filename: "{app}\DragonMoonlight.exe"
|
||
|
|
Name: "{group}\Uninstall DragonMoonlight"; Filename: "{uninstallexe}"
|
||
|
|
|
||
|
|
[Run]
|
||
|
|
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{tmp}\pre-install.ps1"""; Flags: runhidden waituntilterminated; Description: "Running pre-installation checks..."
|
||
|
|
Filename: "{app}\DragonMoonlight.exe"; Flags: nowait postinstall skipifsilent; Description: "Launch DragonMoonlight"
|
||
|
|
|
||
|
|
[UninstallRun]
|
||
|
|
Filename: "powershell.exe"; Parameters: "-Command ""Get-Process DragonMoonlight -EA SilentlyContinue | Stop-Process -Force"""; Flags: runhidden
|
||
|
|
|
||
|
|
[Code]
|
||
|
|
function InitializeSetup(): Boolean;
|
||
|
|
begin
|
||
|
|
if GetWindowsVersion() < $0A00 then
|
||
|
|
begin
|
||
|
|
MsgBox('DragonMoonlight requires Windows 10 or later.' + #13#13 +
|
||
|
|
'Your system does not meet the minimum requirements.',
|
||
|
|
mbCriticalError, MB_OK);
|
||
|
|
Result := False;
|
||
|
|
end
|
||
|
|
else
|
||
|
|
begin
|
||
|
|
Result := True;
|
||
|
|
end;
|
||
|
|
end;
|
||
|
|
|
||
|
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||
|
|
begin
|
||
|
|
if CurStep = ssPostInstall then
|
||
|
|
begin
|
||
|
|
Log('DragonMoonlight installed successfully');
|
||
|
|
end;
|
||
|
|
end;
|