installer-Windows.iss 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #define MyAppName "obs-plugintemplate"
  2. #define MyAppVersion "0.1.0"
  3. #define MyAppPublisher "Developer Name"
  4. #define MyAppURL "http://www.mywebsite.com"
  5. [Setup]
  6. ; NOTE: The value of AppId uniquely identifies this application.
  7. ; Do not use the same AppId value in installers for other applications.
  8. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
  9. AppId={6D6B5E42-2DF1-4747-9A40-8BEA6AAB433F}
  10. AppName={#MyAppName}
  11. AppVersion={#MyAppVersion}
  12. AppPublisher={#MyAppPublisher}
  13. AppPublisherURL={#MyAppURL}
  14. AppSupportURL={#MyAppURL}
  15. AppUpdatesURL={#MyAppURL}
  16. DefaultDirName={code:GetDirName}
  17. DefaultGroupName={#MyAppName}
  18. OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer
  19. Compression=lzma
  20. SolidCompression=yes
  21. LicenseFile=..\LICENSE
  22. [Languages]
  23. Name: "english"; MessagesFile: "compiler:Default.isl"
  24. [Files]
  25. Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
  26. ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
  27. [Icons]
  28. Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
  29. Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
  30. [Code]
  31. // credit where it's due :
  32. // following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
  33. function GetDirName(Value: string): string;
  34. var
  35. InstallPath: string;
  36. begin
  37. // initialize default path, which will be returned when the following registry
  38. // key queries fail due to missing keys or for some different reason
  39. Result := '{pf}\obs-studio';
  40. // query the first registry value; if this succeeds, return the obtained value
  41. if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
  42. Result := InstallPath
  43. end;