[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 |
---|
[a2898df] | 10 | AppVerName=SansView-2.0.0 |
---|
| 11 | AppPublisher=(c) 2009 - 2011, University of Tennessee |
---|
[fa597990] | 12 | AppPublisherURL=http://danse.chem.utk.edu |
---|
| 13 | AppSupportURL=http://danse.chem.utk.edu |
---|
| 14 | AppUpdatesURL=http://danse.chem.utk.edu |
---|
| 15 | ChangesEnvironment=true |
---|
[a2898df] | 16 | DefaultDirName={pf}\SansView |
---|
| 17 | DefaultGroupName=DANSE\SansView-2.0.0 |
---|
[fa597990] | 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 |
---|
[c648414] | 45 | Root: HKCU; Subkey: "Software\Classes\applications\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
[dd16ad6] | 46 | Root: HKCR; Subkey: ".svs"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue noerror |
---|
| 47 | Root: HKCR; Subkey: ".fitv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue noerror |
---|
| 48 | Root: HKCR; Subkey: ".inv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue noerror |
---|
| 49 | Root: HKCR; Subkey: ".prv"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe"; Flags: uninsdeletevalue noerror |
---|
| 50 | Root: HKCR; Subkey: "{app}\SansView.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView File"; Flags: uninsdeletekey noerror |
---|
[50282f8] | 51 | Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SansView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
[dd16ad6] | 52 | Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SansView.exe,0"; Flags: uninsdeletevalue noerror |
---|
| 53 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue noerror |
---|
[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}" |
---|
[a2898df] | 77 | Name: "{commondesktop}\SansView-2.0.0"; Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}" |
---|
[fa597990] | 78 | |
---|
| 79 | |
---|
| 80 | [Run] |
---|
| 81 | Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}"; Flags: nowait postinstall skipifsilent |
---|
| 82 | |
---|
| 83 | |
---|
[e7281fd] | 84 | [Dirs] |
---|
| 85 | Name: "{app}\"; Permissions: everyone-modify |
---|
| 86 | |
---|
| 87 | |
---|
[fa597990] | 88 | [Code] |
---|
| 89 | function NeedsAddPath(): boolean; |
---|
| 90 | var |
---|
| 91 | oldpath: string; |
---|
| 92 | newpath: string; |
---|
| 93 | pathArr: TArrayOfString; |
---|
| 94 | i: Integer; |
---|
| 95 | begin |
---|
| 96 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) |
---|
| 97 | oldpath := oldpath + ';'; |
---|
| 98 | newpath := '%SANSVIEWPATH%'; |
---|
| 99 | i := 0; |
---|
| 100 | while (Pos(';', oldpath) > 0) do begin |
---|
| 101 | SetArrayLength(pathArr, i+1); |
---|
| 102 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); |
---|
| 103 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); |
---|
| 104 | i := i + 1; |
---|
| 105 | // Check if current directory matches app dir |
---|
| 106 | if newpath = pathArr[i-1] |
---|
| 107 | then begin |
---|
| 108 | Result := False; |
---|
| 109 | exit; |
---|
| 110 | end; |
---|
| 111 | end; |
---|
| 112 | Result := True; |
---|
| 113 | end; |
---|
| 114 | |
---|