[fa597990] | 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 |
---|
| 9 | AppName=SansView |
---|
| 10 | AppVerName=SansView-1.9.2dev_AUG |
---|
| 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 |
---|
| 15 | ChangesEnvironment=true |
---|
| 16 | DefaultDirName={pf}\SansView-Dev |
---|
| 17 | DefaultGroupName=DANSE\SansView-1.9.2dev_AUG |
---|
| 18 | DisableProgramGroupPage=yes |
---|
| 19 | LicenseFile=license.txt |
---|
| 20 | OutputBaseFilename=setupSansView |
---|
[d4c19e5] | 21 | SetupIconFile=images\ball.ico |
---|
[fa597990] | 22 | Compression=lzma |
---|
| 23 | SolidCompression=yes |
---|
| 24 | PrivilegesRequired=none |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | [Registry] |
---|
[50282f8] | 28 | Root: HKCR; Subkey: ".xml\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 29 | Root: HKCR; Subkey: ".txt\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 30 | Root: HKCR; Subkey: ".asc\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 31 | Root: HKCR; Subkey: ".dat\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 32 | Root: HKCR; Subkey: ".tif\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 33 | Root: HKCR; Subkey: ".abs\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 34 | Root: HKCR; Subkey: ".d1d\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 35 | Root: HKCR; Subkey: ".sans\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 36 | Root: HKCR; Subkey: "applications\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
| 37 | Root: HKCU; Subkey: "Software\Classes\.xml\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 38 | Root: HKCU; Subkey: "Software\Classes\.txt\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 39 | Root: HKCU; Subkey: "Software\Classes\.asc\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 40 | Root: HKCU; Subkey: "Software\Classes\.dat\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 41 | Root: HKCU; Subkey: "Software\Classes\.tif\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 42 | Root: HKCU; Subkey: "Software\Classes\.abs\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 43 | Root: HKCU; Subkey: "Software\Classes\.d1d\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 44 | Root: HKCU; Subkey: "Software\Classes\.sans\OpenWithList\SansView.exe"; Flags: uninsdeletekey noerror |
---|
| 45 | Root: HKCR; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
[fa597990] | 46 | Root: HKCR; Subkey: ".svs"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[50282f8] | 47 | Root: HKCR; Subkey: ".fitv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[fa597990] | 48 | Root: HKCR; Subkey: ".inv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
| 49 | Root: HKCR; Subkey: ".prv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue |
---|
[50282f8] | 50 | Root: HKCR; Subkey: "{app}\SansView.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView File"; Flags: uninsdeletekey |
---|
| 51 | Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
[d4c19e5] | 52 | Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe,0" |
---|
[fa597990] | 53 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue |
---|
[50282f8] | 54 | ; Write to PATH (below) is disabled; need more tests |
---|
[fa597990] | 55 | ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SANSVIEWPATH%;{olddata}"; Check: NeedsAddPath() |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | [Languages] |
---|
| 59 | Name: "english"; MessagesFile: "compiler:Default.isl" |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | [Tasks] |
---|
| 63 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | [Files] |
---|
[d4c19e5] | 67 | Source: "dist\SansView.exe"; DestDir: "{app}"; Flags: ignoreversion |
---|
[fa597990] | 68 | Source: "dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
[d4c19e5] | 69 | Source: "images\*"; DestDir: "{app}\images"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
| 70 | Source: "test\*"; DestDir: "{app}\test"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
[50282f8] | 71 | Source: "media\*"; DestDir: "{app}\media"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
[fa597990] | 72 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
---|
| 73 | |
---|
| 74 | [Icons] |
---|
| 75 | Name: "{group}\SansView"; Filename: "{app}\SansView.exe"; WorkingDir: "{app}" |
---|
| 76 | Name: "{group}\{cm:UninstallProgram, SansView}"; Filename: "{uninstallexe}" |
---|
| 77 | Name: "{commondesktop}\SansView-1.9.2dev_AUG"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}" |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | [Run] |
---|
| 81 | Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}"; Flags: nowait postinstall skipifsilent |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | [Code] |
---|
| 85 | function NeedsAddPath(): boolean; |
---|
| 86 | var |
---|
| 87 | oldpath: string; |
---|
| 88 | newpath: string; |
---|
| 89 | pathArr: TArrayOfString; |
---|
| 90 | i: Integer; |
---|
| 91 | begin |
---|
| 92 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) |
---|
| 93 | oldpath := oldpath + ';'; |
---|
| 94 | newpath := '%SANSVIEWPATH%'; |
---|
| 95 | i := 0; |
---|
| 96 | while (Pos(';', oldpath) > 0) do begin |
---|
| 97 | SetArrayLength(pathArr, i+1); |
---|
| 98 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); |
---|
| 99 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); |
---|
| 100 | i := i + 1; |
---|
| 101 | // Check if current directory matches app dir |
---|
| 102 | if newpath = pathArr[i-1] |
---|
| 103 | then begin |
---|
| 104 | Result := False; |
---|
| 105 | exit; |
---|
| 106 | end; |
---|
| 107 | end; |
---|
| 108 | Result := True; |
---|
| 109 | end; |
---|
| 110 | |
---|