; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Advanced Scene Switcher" #define MyAppVersion "@GIT_SHA1@" #define MyAppURL "https://github.com/WarmUpTill/SceneSwitcher" [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={{A4ADDF26-4426-4D2E-B26A-C7C878DA8FC9} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={code:GetDefaultDirectory} DefaultGroupName={#MyAppName} AllowNoIcons=yes ; Uncomment the following line to run in non administrative install mode (install for current user only.) ;PrivilegesRequired=lowest OutputBaseFilename=AdvancedSceneSwitcherSetup Compression=lzma SolidCompression=yes WizardStyle=modern ArchitecturesInstallIn64BitMode=x64 [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Files] Source: "@ISS_MSVC_REDIST_HELPER_DIR@\msvc-redist-helper-64.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy; Check: Is64BitInstallMode Source: "@ISS_MSVC_REDIST_HELPER_DIR@\msvc-redist-helper-32.exe"; DestDir: "{app}"; DestName: "msvc-redist-helper.exe"; Flags: ignoreversion dontcopy; Check: not Is64BitInstallMode Source: "@ISS_PLUGIN_FILES_DIR@\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Icons] Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" [Code] function GetDefaultDirectory(Value: String): String; var sInstallPath: String; begin sInstallPath := Value; if (sInstallPath = '') then RegQueryStringValue(HKLM64, 'SOFTWARE\OBS Studio', '', sInstallPath); if (sInstallPath = '') then RegQueryStringValue(HKCU64, 'SOFTWARE\OBS Studio', '', sInstallPath); if (sInstallPath = '') then sInstallPath := ExpandConstant('{commonpf}\obs-studio'); Result := sInstallPath end; procedure CurStepChanged(CurStep: TSetupStep); var ResultCode: Integer; begin if (CurStep=ssPostInstall) then begin ExtractTemporaryFile('msvc-redist-helper.exe'); Exec(ExpandConstant('{tmp}\msvc-redist-helper.exe'), '2019', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); end; end;