SHARE
TWEET

Untitled

a guest Mar 14th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Script generated by the Inno Script Studio Wizard.
  2. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
  3.  
  4. #define MyAppName "King of The Road SE MOD"
  5. #define MyAppVersion "1.0"
  6. #define MyAppPublisher "aleko2144"
  7. #define MyAppURL "https://vk.com/rnr_mods"
  8. #define MyAppExeName "Launcher.exe"
  9.  
  10. [Setup]
  11. ; NOTE: The value of AppId uniquely identifies this application.
  12. ; Do not use the same AppId value in installers for other applications.
  13. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  14. AppId={{6134FFC7-0A30-4CEB-A684-0DEE7F2B4D43}
  15. AppName={#MyAppName}
  16. AppVersion={#MyAppVersion}
  17. ;AppVerName={#MyAppName} {#MyAppVersion}
  18. AppPublisher={#MyAppPublisher}
  19. AppPublisherURL={#MyAppURL}
  20. AppSupportURL={#MyAppURL}
  21. AppUpdatesURL={#MyAppURL}
  22. DefaultDirName={code:GetDirName}
  23. DefaultGroupName={#MyAppName}
  24. AllowNoIcons=yes
  25. LicenseFile=F:\King of The Road SE MOD\license.txt
  26. InfoBeforeFile=F:\King of The Road SE MOD\readme_mod.txt
  27. OutputDir=F:\compiled_installer
  28. OutputBaseFilename=setup
  29. Compression=lzma2/max
  30. SolidCompression=yes
  31. DirExistsWarning=no
  32.  
  33. ;[Types]
  34. ;Name: "full"; Description: "Full installation"
  35. ;Name: "compact"; Description: "Compact installation"
  36. ;Name: "custom"; Description: "Custom installation"; Flags: iscustom
  37.  
  38. [Components]
  39. Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
  40.  
  41. [Languages]
  42. Name: "english"; MessagesFile: "compiler:Default.isl"
  43. Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
  44.  
  45. [Tasks]
  46. Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
  47.  
  48. [Files]
  49. Source: "F:\King of The Road SE MOD\Launcher.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: main
  50. Source: "F:\King of The Road SE MOD\*"; Excludes: "DATA"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: main
  51. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  52.  
  53. [Icons]
  54. Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
  55. Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
  56. Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
  57. Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
  58.  
  59. [Run]
  60. Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall skipifsilent
  61.  
  62. [Code]
  63. function GetDirName(Value: string): string;
  64. var          
  65.  InstallPath: string;
  66. begin
  67.  // initialize default path, which will be returned when the following registry
  68.  // key queries fail due to missing keys or for some different reason
  69.  Result := '{#MyAppName}';
  70.  // query the first registry value; if this succeeds, return the obtained value
  71.  if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\SoftLab-Nsk\King\1.0', 'HomeDir', InstallPath) then
  72.    Result := InstallPath
  73.  // otherwise the first registry key query failed, so...
  74.  else
  75.  // query the second registry value; if it succeeds, return the obtained value
  76.  if RegQueryStringValue(HKLM, 'SOFTWARE\SoftLab-Nsk\King\1.0', 'HomeDir', InstallPath) then
  77.    Result := InstallPath;
  78. end;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top