[fa597990] | 1 | |
---|
[5c3aafa] | 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! |
---|
[fa597990] | 6 | [Setup] |
---|
[5c3aafa] | 7 | |
---|
| 8 | ChangesAssociations=yes |
---|
[c329f4d] | 9 | AppName=SasView |
---|
| 10 | AppVerName=SasView-2.1.1 |
---|
[7f8cb75] | 11 | AppPublisher=(c) 2009 - 2012, University of Tennessee |
---|
[5c3aafa] | 12 | AppPublisherURL=http://danse.chem.utk.edu |
---|
| 13 | AppSupportURL=http://danse.chem.utk.edu |
---|
| 14 | AppUpdatesURL=http://danse.chem.utk.edu |
---|
| 15 | ChangesEnvironment=true |
---|
[c329f4d] | 16 | DefaultDirName={pf}\SasView |
---|
| 17 | DefaultGroupName=.\SasView-2.1.1 |
---|
[fa597990] | 18 | DisableProgramGroupPage=yes |
---|
| 19 | LicenseFile=license.txt |
---|
[c329f4d] | 20 | OutputBaseFilename=setupSasView |
---|
[fa597990] | 21 | SetupIconFile=images\ball.ico |
---|
| 22 | Compression=lzma |
---|
| 23 | SolidCompression=yes |
---|
| 24 | PrivilegesRequired=none |
---|
[7f8cb75] | 25 | UsePreviousAppDir=no |
---|
[fa597990] | 26 | |
---|
| 27 | |
---|
[5c3aafa] | 28 | [Registry] |
---|
[c329f4d] | 29 | Root: HKCR; Subkey: ".xml\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 30 | Root: HKCR; Subkey: ".txt\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 31 | Root: HKCR; Subkey: ".asc\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 32 | Root: HKCR; Subkey: ".dat\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 33 | Root: HKCR; Subkey: ".tif\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 34 | Root: HKCR; Subkey: ".abs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 35 | Root: HKCR; Subkey: ".d1d\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 36 | Root: HKCR; Subkey: ".sans\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 37 | Root: HKCR; Subkey: ".nxs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 38 | Root: HKCR; Subkey: "applications\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
| 39 | Root: HKCU; Subkey: "Software\Classes\.xml\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 40 | Root: HKCU; Subkey: "Software\Classes\.txt\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 41 | Root: HKCU; Subkey: "Software\Classes\.asc\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 42 | Root: HKCU; Subkey: "Software\Classes\.dat\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 43 | Root: HKCU; Subkey: "Software\Classes\.tif\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 44 | Root: HKCU; Subkey: "Software\Classes\.abs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 45 | Root: HKCU; Subkey: "Software\Classes\.d1d\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 46 | Root: HKCU; Subkey: "Software\Classes\.sans\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 47 | Root: HKCU; Subkey: "Software\Classes\.nxs\OpenWithList\SasView.exe"; Flags: uninsdeletekey noerror |
---|
| 48 | Root: HKCU; Subkey: "Software\Classes\applications\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
| 49 | Root: HKCR; Subkey: ".svs"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe"; Flags: uninsdeletevalue noerror |
---|
| 50 | Root: HKCR; Subkey: ".fitv"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe"; Flags: uninsdeletevalue noerror |
---|
| 51 | Root: HKCR; Subkey: ".inv"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe"; Flags: uninsdeletevalue noerror |
---|
| 52 | Root: HKCR; Subkey: ".prv"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe"; Flags: uninsdeletevalue noerror |
---|
| 53 | Root: HKCR; Subkey: "{app}\SasView.exe"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView File"; Flags: uninsdeletekey noerror |
---|
| 54 | Root: HKCR; Subkey: "{app}\SasView.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\SasView.exe"" ""%1"""; Flags: uninsdeletevalue noerror |
---|
| 55 | Root: HKCR; Subkey: "{app}\images\ball.ico"; ValueType: string; ValueName: ""; ValueData: "{app}\SasView.exe,0"; Flags: uninsdeletevalue noerror |
---|
| 56 | Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "SASVIEWPATH"; ValueData: "{app}"; Flags: uninsdeletevalue noerror |
---|
[5c3aafa] | 57 | ; Write to PATH (below) is disabled; need more tests |
---|
[c329f4d] | 58 | ;Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "PATH"; ValueData: "%SASVIEWPATH%;{olddata}"; Check: NeedsAddPath() |
---|
[5c3aafa] | 59 | |
---|
| 60 | |
---|
[fa597990] | 61 | [Languages] |
---|
[5c3aafa] | 62 | Name: "english"; MessagesFile: "compiler:Default.isl" |
---|
| 63 | |
---|
[fa597990] | 64 | |
---|
| 65 | [Tasks] |
---|
[5c3aafa] | 66 | Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked |
---|
| 67 | Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; |
---|
| 68 | |
---|
[fa597990] | 69 | |
---|
| 70 | [Files] |
---|
[c329f4d] | 71 | Source: "dist\SasView.exe"; DestDir: "{app}"; Flags: ignoreversion |
---|
[5c3aafa] | 72 | Source: "dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs |
---|
[c329f4d] | 73 | Source: "dist\plugin_models\*"; DestDir: "{userappdata}\..\.sasview\plugin_models"; Flags: recursesubdirs createallsubdirs |
---|
| 74 | Source: "dist\config\custom_config.py"; DestDir: "{userappdata}\..\.sasview\config"; Flags: recursesubdirs createallsubdirs |
---|
[5c3aafa] | 75 | ; NOTE: Don't use "Flags: ignoreversion" on any shared system files |
---|
[fa597990] | 76 | |
---|
| 77 | [Icons] |
---|
[c329f4d] | 78 | Name: "{group}\SasView"; Filename: "{app}\SasView.exe"; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" |
---|
| 79 | Name: "{group}\{cm:UninstallProgram, SasView}"; Filename: "{uninstallexe}" |
---|
| 80 | Name: "{commondesktop}\SasView-2.1.1"; Filename: "{app}\SasView.exe"; Tasks: desktopicon; WorkingDir: "{app}" ; IconFilename: "{app}\images\ball.ico" |
---|
| 81 | Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\SasView-2.1.1"; Filename: "{app}\SasView.exe"; Tasks: quicklaunchicon; WorkingDir: "{app}"; IconFilename: "{app}\images\ball.ico" |
---|
[5c3aafa] | 82 | |
---|
[fa597990] | 83 | |
---|
| 84 | [Run] |
---|
[c329f4d] | 85 | Filename: "{app}\SasView.exe"; Description: "{cm:LaunchProgram, SasView}"; Flags: nowait postinstall skipifsilent |
---|
[5c3aafa] | 86 | ; Install the Microsoft C++ DLL redistributable package if it is provided and the DLLs are not present on the target system. |
---|
| 87 | ; Note that the redistributable package is included if the app was built using Python 2.6 or 2.7, but not with 2.5. |
---|
| 88 | ; Parameter options: |
---|
| 89 | ; - for silent install use: "/q" |
---|
| 90 | ; - for silent install with progress bar use: "/qb" |
---|
| 91 | ; - for silent install with progress bar but disallow cancellation of operation use: "/qb!" |
---|
| 92 | ; Note that we do not use the postinstall flag as this would display a checkbox and thus require the user to decide what to do. |
---|
| 93 | ;Filename: "{app}\vcredist_x86.exe"; Parameters: "/qb!"; WorkingDir: "{tmp}"; StatusMsg: "Installing Microsoft Visual C++ 2008 Redistributable Package ..."; Check: InstallVC90CRT(); Flags: skipifdoesntexist waituntilterminated |
---|
| 94 | |
---|
| 95 | |
---|
| 96 | [Dirs] |
---|
| 97 | Name: "{app}\"; Permissions: everyone-modify |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | [Code] |
---|
| 101 | function InstallVC90CRT(): Boolean; |
---|
| 102 | begin |
---|
| 103 | Result := not DirExists('C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375'); |
---|
| 104 | end; |
---|
| 105 | |
---|
| 106 | function NeedsAddPath(): boolean; |
---|
| 107 | var |
---|
| 108 | oldpath: string; |
---|
| 109 | newpath: string; |
---|
| 110 | pathArr: TArrayOfString; |
---|
| 111 | i: Integer; |
---|
| 112 | begin |
---|
| 113 | RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath) |
---|
| 114 | oldpath := oldpath + ';'; |
---|
[c329f4d] | 115 | newpath := '%SASVIEWPATH%'; |
---|
[5c3aafa] | 116 | i := 0; |
---|
| 117 | while (Pos(';', oldpath) > 0) do begin |
---|
| 118 | SetArrayLength(pathArr, i+1); |
---|
| 119 | pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1); |
---|
| 120 | oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath)); |
---|
| 121 | i := i + 1; |
---|
| 122 | // Check if current directory matches app dir |
---|
| 123 | if newpath = pathArr[i-1] |
---|
| 124 | then begin |
---|
| 125 | Result := False; |
---|
| 126 | exit; |
---|
| 127 | end; |
---|
| 128 | end; |
---|
| 129 | Result := True; |
---|
| 130 | end; |
---|
| 131 | |
---|
| 132 | |
---|
| 133 | [UninstallDelete] |
---|
| 134 | ; Delete directories and files that are dynamically created by the application (i.e. at runtime). |
---|
| 135 | Type: filesandordirs; Name: "{app}\.matplotlib" |
---|
| 136 | Type: files; Name: "{app}\*.*" |
---|
| 137 | ; The following is a workaround for the case where the application is installed and uninstalled but the |
---|
| 138 | ;{app} directory is not deleted because it has user files. Then the application is installed into the |
---|
| 139 | ; existing directory, user files are deleted, and the application is un-installed again. Without the |
---|
| 140 | ; directive below, {app} will not be deleted because Inno Setup did not create it during the previous |
---|
| 141 | ; installation. |
---|
| 142 | Type: dirifempty; Name: "{app}" |
---|
[fa597990] | 143 | |
---|