|
1 | | -#define MyAppName "obs-websocket" |
2 | | -#define MyAppVersion "@OBS_WEBSOCKET_VERSION@" |
3 | | -#define MyAppPublisher "obs-websocket" |
4 | | -#define MyAppURL "http://github.com/obsproject/obs-websocket" |
5 | | -
|
6 | | -[Setup] |
7 | | -; NOTE: The value of AppId uniquely identifies this application. |
8 | | -; Do not use the same AppId value in installers for other applications. |
9 | | -; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) |
10 | | -AppId={{117EE44F-48E1-49E5-A381-CC8D9195CF35} |
11 | | -AppName={#MyAppName} |
12 | | -AppVersion={#MyAppVersion} |
13 | | -AppPublisher={#MyAppPublisher} |
14 | | -AppPublisherURL={#MyAppURL} |
15 | | -AppSupportURL={#MyAppURL} |
16 | | -AppUpdatesURL={#MyAppURL} |
17 | | -DefaultDirName={code:GetDirName} |
18 | | -DefaultGroupName={#MyAppName} |
19 | | -OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer |
20 | | -Compression=lzma |
21 | | -SolidCompression=yes |
22 | | -DirExistsWarning=no |
23 | | -
|
24 | | -[Languages] |
25 | | -Name: "english"; MessagesFile: "compiler:Default.isl" |
26 | | -
|
27 | | -[Files] |
28 | | -Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
29 | | -Source: "..\LICENSE"; Flags: dontcopy |
30 | | -; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
31 | | -
|
32 | | -[Icons] |
33 | | -Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" |
34 | | -Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" |
35 | | -
|
36 | | -[Code] |
37 | | -procedure InitializeWizard(); |
38 | | -var |
39 | | - GPLText: AnsiString; |
40 | | - Page: TOutputMsgMemoWizardPage; |
41 | | -begin |
42 | | - ExtractTemporaryFile('LICENSE'); |
43 | | - LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText); |
44 | | - Page := CreateOutputMsgMemoPage(wpWelcome, |
45 | | - 'License Information', 'Please review the license terms before installing obs-websocket', |
46 | | - 'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.', |
47 | | - String(GPLText) |
48 | | - ); |
49 | | -end; |
50 | | -
|
51 | | -// Validate that obs-studio is installed before installing the plugin |
52 | | -function PrepareToInstall(var NeedsRestart: Boolean): String; |
53 | | -begin |
54 | | - Result := ''; |
55 | | -
|
56 | | - if not DirExists(ExpandConstant('{app}\obs-plugins')) then |
57 | | - begin |
58 | | - Result := 'The selected install directory does not appear to be valid. Please install OBS Studio before installing {#MyAppName} or correct your install path.'; |
59 | | - end; |
60 | | -end; |
61 | | -
|
62 | | -// credit where it's due : |
63 | | -// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45 |
64 | | -function GetDirName(Value: string): string; |
65 | | -var |
66 | | - InstallPath: string; |
67 | | -begin |
68 | | - // initialize default path, which will be returned when the following registry |
69 | | - // key queries fail due to missing keys or for some different reason |
70 | | - Result := '{commonpf}\obs-studio'; |
71 | | - // query the first registry value; if this succeeds, return the obtained value |
72 | | - if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then |
73 | | - Result := InstallPath |
74 | | -end; |
| 1 | +#define MyAppName "obs-websocket" |
| 2 | +#define MyAppVersion "@OBS_WEBSOCKET_VERSION@" |
| 3 | +#define MyAppPublisher "OBS Project" |
| 4 | +#define MyAppURL "http://github.com/obsproject/obs-websocket" |
| 5 | + |
| 6 | +[Setup] |
| 7 | +; NOTE: The value of AppId uniquely identifies this application. |
| 8 | +; Do not use the same AppId value in installers for other applications. |
| 9 | +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) |
| 10 | +AppId={{117EE44F-48E1-49E5-A381-CC8D9195CF35} |
| 11 | +AppName={#MyAppName} |
| 12 | +AppVersion={#MyAppVersion} |
| 13 | +AppPublisher={#MyAppPublisher} |
| 14 | +AppPublisherURL={#MyAppURL} |
| 15 | +AppSupportURL={#MyAppURL} |
| 16 | +AppUpdatesURL={#MyAppURL} |
| 17 | +DefaultDirName={code:GetDirName} |
| 18 | +DefaultGroupName={#MyAppName} |
| 19 | +OutputBaseFilename=obs-websocket-{#MyAppVersion}-Windows-Installer |
| 20 | +Compression=lzma |
| 21 | +SolidCompression=yes |
| 22 | +DirExistsWarning=no |
| 23 | + |
| 24 | +[Languages] |
| 25 | +Name: "english"; MessagesFile: "compiler:Default.isl" |
| 26 | + |
| 27 | +[Files] |
| 28 | +Source: "..\release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
| 29 | +Source: "..\LICENSE"; Flags: dontcopy |
| 30 | +; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
| 31 | + |
| 32 | +[Icons] |
| 33 | +Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}" |
| 34 | +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" |
| 35 | + |
| 36 | +[Code] |
| 37 | +procedure InitializeWizard(); |
| 38 | +var |
| 39 | + GPLText: AnsiString; |
| 40 | + Page: TOutputMsgMemoWizardPage; |
| 41 | +begin |
| 42 | + ExtractTemporaryFile('LICENSE'); |
| 43 | + LoadStringFromFile(ExpandConstant('{tmp}\LICENSE'), GPLText); |
| 44 | + Page := CreateOutputMsgMemoPage(wpWelcome, |
| 45 | + 'License Information', 'Please review the license terms before installing obs-websocket', |
| 46 | + 'Press Page Down to see the rest of the agreement. Once you are aware of your rights, click Next to continue.', |
| 47 | + String(GPLText) |
| 48 | + ); |
| 49 | +end; |
| 50 | + |
| 51 | +// Validate that obs-studio is installed before installing the plugin |
| 52 | +function PrepareToInstall(var NeedsRestart: Boolean): String; |
| 53 | +begin |
| 54 | + Result := ''; |
| 55 | + |
| 56 | + if not DirExists(ExpandConstant('{app}\obs-plugins')) then |
| 57 | + begin |
| 58 | + Result := 'The selected install directory does not appear to be valid. Please install OBS Studio before installing {#MyAppName} or correct your install path.'; |
| 59 | + end; |
| 60 | +end; |
| 61 | + |
| 62 | +// credit where it's due : |
| 63 | +// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45 |
| 64 | +function GetDirName(Value: string): string; |
| 65 | +var |
| 66 | + InstallPath: string; |
| 67 | +begin |
| 68 | + // initialize default path, which will be returned when the following registry |
| 69 | + // key queries fail due to missing keys or for some different reason |
| 70 | + Result := '{commonpf}\obs-studio'; |
| 71 | + // query the first registry value; if this succeeds, return the obtained value |
| 72 | + if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then |
| 73 | + Result := InstallPath |
| 74 | +end; |
0 commit comments