Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Script generated by the Inno Script Studio Wizard.
- ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
- #define MyAppName "King of The Road SE MOD"
- #define MyAppVersion "1.0"
- #define MyAppPublisher "aleko2144"
- #define MyAppURL "https://vk.com/rnr_mods"
- #define MyAppExeName "Launcher.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={{6134FFC7-0A30-4CEB-A684-0DEE7F2B4D43}
- AppName={#MyAppName}
- AppVersion={#MyAppVersion}
- ;AppVerName={#MyAppName} {#MyAppVersion}
- AppPublisher={#MyAppPublisher}
- AppPublisherURL={#MyAppURL}
- AppSupportURL={#MyAppURL}
- AppUpdatesURL={#MyAppURL}
- DefaultDirName={code:GetDirName}
- DefaultGroupName={#MyAppName}
- AllowNoIcons=yes
- LicenseFile=F:\King of The Road SE MOD\license.txt
- InfoBeforeFile=F:\King of The Road SE MOD\readme_mod.txt
- OutputDir=F:\compiled_installer
- OutputBaseFilename=setup
- Compression=lzma2/max
- SolidCompression=yes
- DirExistsWarning=no
- ;[Types]
- ;Name: "full"; Description: "Full installation"
- ;Name: "compact"; Description: "Compact installation"
- ;Name: "custom"; Description: "Custom installation"; Flags: iscustom
- [Components]
- Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
- [Languages]
- Name: "english"; MessagesFile: "compiler:Default.isl"
- Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
- [Tasks]
- Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
- [Files]
- Source: "F:\King of The Road SE MOD\Launcher.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: main
- Source: "F:\King of The Road SE MOD\*"; Excludes: "DATA"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: main
- ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
- [Icons]
- Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
- Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
- Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
- Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
- [Run]
- Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
- [Code]
- function GetDirName(Value: string): string;
- var
- InstallPath: string;
- begin
- // initialize default path, which will be returned when the following registry
- // key queries fail due to missing keys or for some different reason
- Result := '{#MyAppName}';
- // query the first registry value; if this succeeds, return the obtained value
- if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\SoftLab-Nsk\King\1.0', 'HomeDir', InstallPath) then
- Result := InstallPath
- // otherwise the first registry key query failed, so...
- else
- // query the second registry value; if it succeeds, return the obtained value
- if RegQueryStringValue(HKLM, 'SOFTWARE\SoftLab-Nsk\King\1.0', 'HomeDir', InstallPath) then
- Result := InstallPath;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement