[f5f257b] | 1 | |
---|
| 2 | ; Script generated by the Inno Setup Script Wizard |
---|
| 3 | |
---|
| 4 | ; and local_config.py located in this directory. |
---|
| 5 | ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! |
---|
| 6 | [Setup] |
---|
| 7 | |
---|
| 8 | ChangesAssociations=yes |
---|
[7f291a3] | 9 | AppName=SansView |
---|
| 10 | AppVerName=SansView-1.9.2dev_JUN |
---|
[f5f257b] | 11 | AppPublisher=(c) 2009, University of Tennessee |
---|
| 12 | AppPublisherURL=http://danse.chem.utk.edu |
---|
| 13 | AppSupportURL=http://danse.chem.utk.edu |
---|
| 14 | AppUpdatesURL=http://danse.chem.utk.edu |
---|
[7f291a3] | 15 | ChangesEnvironment=true |
---|
| 16 | DefaultDirName={pf}\SansView-Dev |
---|
| 17 | DefaultGroupName=DANSE\SansView-1.9.2dev_JUN |
---|
[f5f257b] | 18 | DisableProgramGroupPage=yes |
---|
| 19 | LicenseFile=license.txt |
---|
| 20 | OutputBaseFilename=setupSansView |
---|
| 21 | SetupIconFile=images\ball.ico |
---|
| 22 | Compression=lzma |
---|
| 23 | SolidCompression=yes |
---|
| 24 | PrivilegesRequired=none |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | [Registry] |
---|
| 28 | Root: HKCR; Subkey: ".xml"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 29 | Root: HKCR; Subkey: ".asc"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 30 | Root: HKCR; Subkey: ".dat"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 31 | Root: HKCR; Subkey: ".tif"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 32 | Root: HKCR; Subkey: ".tiff"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 33 | Root: HKCR; Subkey: ".sans"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 34 | Root: HKCR; Subkey: ".svs"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 35 | Root: HKCR; Subkey: ".fitv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 36 | Root: HKCR; Subkey: ".inv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 37 | Root: HKCR; Subkey: ".prv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 38 | Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe,0" |
---|
| 39 | Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1""" |
---|
[b33d4cf] | 40 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue |
---|
[7f291a3] | 41 | ; Write to PATH (below) is disabled; need more work |
---|
| 42 | ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SANSVIEWPATH%;{olddata}"; Check: NeedsAddPath() |
---|
[f5f257b] | 43 | |
---|
| 44 | |
---|
| 45 | [Languages] |
---|
| 46 | Name: "english"; MessagesFile: "compiler:Default.isl" |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | [Tasks] |
---|
| 50 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | [Files] |
---|
| 54 | Source: "dist\SansView.exe"; DestDir: "{app}"; Flags: ignoreversion |
---|
| 55 | Source: "dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 56 | Source: "images\*"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 57 | Source: "test\*"; DestDir: "{app}\test"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 58 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
---|
| 59 | |
---|
| 60 | [Icons] |
---|
[7f291a3] | 61 | Name: "{group}\SansView"; Filename: "{app}\SansView.exe"; WorkingDir: "{app}" |
---|
| 62 | Name: "{group}\{cm:UninstallProgram, SansView}"; Filename: "{uninstallexe}" |
---|
| 63 | Name: "{commondesktop}\SansView-1.9.2dev_JUN"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}" |
---|
[f5f257b] | 64 | |
---|
| 65 | |
---|
| 66 | [Run] |
---|
[7f291a3] | 67 | Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}"; Flags: nowait postinstall skipifsilent |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | [Code] |
---|
| 71 | function NeedsAddPath(): boolean; |
---|
| 72 | var |
---|
| 73 | oldpath: string; |
---|
| 74 | newpath: string; |
---|
| 75 | pathArr: TArrayOfString; |
---|
| 76 | i: Integer; |
---|
| 77 | begin |
---|
| 78 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) |
---|
| 79 | oldpath := oldpath + ';'; |
---|
| 80 | newpath := '%SANSVIEWPATH%'; |
---|
| 81 | i := 0; |
---|
| 82 | while (Pos(';', oldpath) > 0) do begin |
---|
| 83 | SetArrayLength(pathArr, i+1); |
---|
| 84 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); |
---|
| 85 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); |
---|
| 86 | i := i + 1; |
---|
| 87 | // Check if current directory matches app dir |
---|
| 88 | if newpath = pathArr[i-1] |
---|
| 89 | then begin |
---|
| 90 | Result := False; |
---|
| 91 | exit; |
---|
| 92 | end; |
---|
| 93 | end; |
---|
| 94 | Result := True; |
---|
| 95 | end; |
---|
| 96 | |
---|