[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] |
---|
[1c57e17] | 28 | Root: HKCR; Subkey: ".txt\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 29 | Root: HKCR; Subkey: ".xml\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 30 | Root: HKCR; Subkey: ".tif\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 31 | Root: HKCR; Subkey: ".tiff\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 32 | Root: HKCR; Subkey: ".asc\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 33 | Root: HKCR; Subkey: ".dat\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 34 | Root: HKCR; Subkey: ".sans\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 35 | Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1""" ; Flags: uninsdeletevalue noerror |
---|
| 36 | Root: HKCU; Subkey: "Software\Classes\.txt\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 37 | Root: HKCU; Subkey: "Software\Classes\.xml\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 38 | Root: HKCU; Subkey: "Software\Classes\.asc\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 39 | Root: HKCU; Subkey: "Software\Classes\.dat\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 40 | Root: HKCU; Subkey: "Software\Classes\.tif\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 41 | Root: HKCU; Subkey: "Software\Classes\.tiff\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 42 | Root: HKCU; Subkey: "Software\Classes\.sans\openwithlist\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 43 | Root: HKCU; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1""" ; Flags: uninsdeletevalue noerror |
---|
[f5f257b] | 44 | Root: HKCR; Subkey: ".svs"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[1c57e17] | 45 | Root: HKCR; Subkey: ".fitv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[f5f257b] | 46 | Root: HKCR; Subkey: ".inv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 47 | Root: HKCR; Subkey: ".prv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[1c57e17] | 48 | Root: HKCR; Subkey: "{app}\SansView.exe"; ValueType: string; ValueName: ""; ValueData: "SansView File"; Flags: uninsdeletekey |
---|
| 49 | Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1""" ; Flags: uninsdeletevalue noerror |
---|
[f5f257b] | 50 | Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe,0" |
---|
[b33d4cf] | 51 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue |
---|
[7f291a3] | 52 | ; Write to PATH (below) is disabled; need more work |
---|
| 53 | ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SANSVIEWPATH%;{olddata}"; Check: NeedsAddPath() |
---|
[f5f257b] | 54 | |
---|
| 55 | |
---|
| 56 | [Languages] |
---|
| 57 | Name: "english"; MessagesFile: "compiler:Default.isl" |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | [Tasks] |
---|
| 61 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
---|
| 62 | |
---|
| 63 | |
---|
[1c57e17] | 64 | |
---|
[f5f257b] | 65 | [Files] |
---|
| 66 | Source: "dist\SansView.exe"; DestDir: "{app}"; Flags: ignoreversion |
---|
| 67 | Source: "dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 68 | Source: "images\*"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 69 | Source: "test\*"; DestDir: "{app}\test"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 70 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
---|
| 71 | |
---|
| 72 | [Icons] |
---|
[7f291a3] | 73 | Name: "{group}\SansView"; Filename: "{app}\SansView.exe"; WorkingDir: "{app}" |
---|
| 74 | Name: "{group}\{cm:UninstallProgram, SansView}"; Filename: "{uninstallexe}" |
---|
[1c57e17] | 75 | Name: "{commondesktop}\SansView"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}" |
---|
| 76 | ;Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\SansView"; Filename: "{app}\SansView.exe" |
---|
[f5f257b] | 77 | |
---|
| 78 | [Run] |
---|
[7f291a3] | 79 | Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}"; Flags: nowait postinstall skipifsilent |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | [Code] |
---|
| 83 | function NeedsAddPath(): boolean; |
---|
| 84 | var |
---|
| 85 | oldpath: string; |
---|
| 86 | newpath: string; |
---|
| 87 | pathArr: TArrayOfString; |
---|
| 88 | i: Integer; |
---|
[1c57e17] | 89 | begin |
---|
[7f291a3] | 90 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) |
---|
| 91 | oldpath := oldpath + ';'; |
---|
| 92 | newpath := '%SANSVIEWPATH%'; |
---|
| 93 | i := 0; |
---|
| 94 | while (Pos(';', oldpath) > 0) do begin |
---|
| 95 | SetArrayLength(pathArr, i+1); |
---|
| 96 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); |
---|
| 97 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); |
---|
| 98 | i := i + 1; |
---|
| 99 | // Check if current directory matches app dir |
---|
| 100 | if newpath = pathArr[i-1] |
---|
| 101 | then begin |
---|
| 102 | Result := False; |
---|
| 103 | exit; |
---|
| 104 | end; |
---|
| 105 | end; |
---|
| 106 | Result := True; |
---|
| 107 | end; |
---|