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