|
| 1 | +; Script generated by the Inno Setup Script Wizard. |
| 2 | +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
| 3 | + |
| 4 | +#define MyAppName "meteordemod" |
| 5 | +#define MyAppVersion "2.5.5" |
| 6 | +#define MyAppPublisher "Digitelektro" |
| 7 | +#define MyAppURL "https://github.com/Digitelektro/MeteorDemod" |
| 8 | +#define MyAppExeName "meteordemod.exe" |
| 9 | + |
| 10 | +#define AppSourcesFolder ".." |
| 11 | +#define OpenCVSourcesFolder "..\..\..\opencv\own_build_x86\bin\Release\" |
| 12 | + |
| 13 | +[Setup] |
| 14 | +; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. |
| 15 | +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) |
| 16 | +AppId={{3D10F735-AF6A-4032-BA76-620319357A77} |
| 17 | +AppName={#MyAppName} |
| 18 | +AppVersion={#MyAppVersion} |
| 19 | +;AppVerName={#MyAppName} {#MyAppVersion} |
| 20 | +AppPublisher={#MyAppPublisher} |
| 21 | +AppPublisherURL={#MyAppURL} |
| 22 | +AppSupportURL={#MyAppURL} |
| 23 | +AppUpdatesURL={#MyAppURL} |
| 24 | +DefaultDirName={autopf}\{#MyAppName} |
| 25 | +DisableProgramGroupPage=yes |
| 26 | +LicenseFile={#AppSourcesFolder}\LICENSE |
| 27 | +; Uncomment the following line to run in non administrative install mode (install for current user only.) |
| 28 | +;PrivilegesRequired=lowest |
| 29 | +PrivilegesRequiredOverridesAllowed=dialog |
| 30 | +OutputDir=./ |
| 31 | +OutputBaseFilename=meteordemod |
| 32 | +Compression=lzma |
| 33 | +SolidCompression=yes |
| 34 | +WizardStyle=modern |
| 35 | +; Tell Windows Explorer to reload the environment |
| 36 | +ChangesEnvironment=yes |
| 37 | + |
| 38 | +[Registry] |
| 39 | +Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ |
| 40 | + ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; \ |
| 41 | + Check: NeedsAddPath(ExpandConstant('{app}')) |
| 42 | + |
| 43 | +[Languages] |
| 44 | +Name: "english"; MessagesFile: "compiler:Default.isl" |
| 45 | + |
| 46 | +[Files] |
| 47 | +Source: "{#AppSourcesFolder}\build\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion |
| 48 | +Source: "{#AppSourcesFolder}\resources\*"; DestDir: "{app}\resources\"; Flags: ignoreversion recursesubdirs createallsubdirs |
| 49 | +Source: "{#OpenCVSourcesFolder}\opencv_core343.dll"; DestDir: "{app}"; Flags: ignoreversion |
| 50 | +Source: "{#OpenCVSourcesFolder}\opencv_imgcodecs343.dll"; DestDir: "{app}"; Flags: ignoreversion |
| 51 | +Source: "{#OpenCVSourcesFolder}\opencv_imgproc343.dll"; DestDir: "{app}"; Flags: ignoreversion |
| 52 | +; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
| 53 | + |
| 54 | +[Icons] |
| 55 | +Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" |
| 56 | + |
| 57 | + |
| 58 | +[Code] |
| 59 | +
|
| 60 | +function NeedsAddPath(Path: string): boolean; |
| 61 | +var |
| 62 | + OrigPath: string; |
| 63 | +begin |
| 64 | + if not RegQueryStringValue(HKEY_LOCAL_MACHINE, |
| 65 | + 'SYSTEM\CurrentControlSet\Control\Session Manager\Environment', |
| 66 | + 'Path', OrigPath) |
| 67 | + then begin |
| 68 | + Result := True; |
| 69 | + exit; |
| 70 | + end; |
| 71 | + |
| 72 | + { look for the path with leading and trailing semicolon } |
| 73 | + { Pos() returns 0 if not found } |
| 74 | + Result := Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(OrigPath) + ';') = 0; |
| 75 | +end; |
| 76 | +
|
0 commit comments