source: sasview/sansview/installer_new.iss @ 44429d0

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since 44429d0 was b33d4cf, checked in by Jae Cho <jhjcho@…>, 13 years ago

move usrer sansviewpath to sys path

  • Property mode set to 100644
File size: 4.2 KB
RevLine 
[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
8ChangesAssociations=yes
[7f291a3]9AppName=SansView
10AppVerName=SansView-1.9.2dev_JUN
[f5f257b]11AppPublisher=(c) 2009, University of Tennessee
12AppPublisherURL=http://danse.chem.utk.edu
13AppSupportURL=http://danse.chem.utk.edu
14AppUpdatesURL=http://danse.chem.utk.edu
[7f291a3]15ChangesEnvironment=true
16DefaultDirName={pf}\SansView-Dev
17DefaultGroupName=DANSE\SansView-1.9.2dev_JUN
[f5f257b]18DisableProgramGroupPage=yes
19LicenseFile=license.txt
20OutputBaseFilename=setupSansView
21SetupIconFile=images\ball.ico
22Compression=lzma
23SolidCompression=yes
24PrivilegesRequired=none
25
26
27[Registry]
28Root: HKCR;     Subkey: ".xml"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
29Root: HKCR;     Subkey: ".asc"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
30Root: HKCR;     Subkey: ".dat"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
31Root: HKCR;     Subkey: ".tif"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
32Root: HKCR;     Subkey: ".tiff";        ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
33Root: HKCR;     Subkey: ".sans";        ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
34Root: HKCR;     Subkey: ".svs"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
35Root: HKCR;     Subkey: ".fitv";        ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
36Root: HKCR;     Subkey: ".inv"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
37Root: HKCR;     Subkey: ".prv"; ValueType: string;      ValueName: "";  ValueData: "{app}\SansView.exe";         Flags: uninsdeletevalue
38Root: HKCR; Subkey: "{app}\images\ball.ico";    ValueType: string; ValueName: "";       ValueData: "{app}\SansView.exe,0"
39Root: HKCR; Subkey: "{app}\SansView.exe\shell\open\command";    ValueType: string; ValueName: "";       ValueData: """{app}\SansView.exe""  ""%1"""
[b33d4cf]40Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment";     ValueType: expandsz; ValueName: "SANSVIEWPATH"; ValueData: "{app}";      Flags: uninsdeletevalue
[7f291a3]41; Write to PATH (below) is disabled; need more work
42;Root: HKCU; Subkey: "Environment";     ValueType: expandsz; ValueName: "PATH"; ValueData: "%SANSVIEWPATH%;{olddata}";   Check: NeedsAddPath()
[f5f257b]43
44
45[Languages]
46Name: "english";        MessagesFile: "compiler:Default.isl"
47
48
49[Tasks]
50Name: "desktopicon";    Description: "{cm:CreateDesktopIcon}";  GroupDescription: "{cm:AdditionalIcons}";       Flags: unchecked
51
52
53[Files]
54Source: "dist\SansView.exe";    DestDir: "{app}";       Flags: ignoreversion
55Source: "dist\*";       DestDir: "{app}";       Flags: ignoreversion recursesubdirs createallsubdirs
56Source: "images\*";     DestDir: "{app}\images";        Flags: ignoreversion recursesubdirs createallsubdirs
57Source: "test\*";       DestDir: "{app}\test";  Flags: ignoreversion recursesubdirs createallsubdirs
58;       NOTE: Don't use "Flags: ignoreversion" on any shared system files
59
60[Icons]
[7f291a3]61Name: "{group}\SansView";       Filename: "{app}\SansView.exe"; WorkingDir: "{app}"
62Name: "{group}\{cm:UninstallProgram, SansView}";         Filename: "{uninstallexe}"
63Name: "{commondesktop}\SansView-1.9.2dev_JUN";  Filename: "{app}\SansView.exe"; Tasks: desktopicon; WorkingDir: "{app}"
[f5f257b]64
65
66[Run]
[7f291a3]67Filename: "{app}\SansView.exe"; Description: "{cm:LaunchProgram, SansView}";    Flags: nowait postinstall skipifsilent
68
69
70[Code]
71function NeedsAddPath(): boolean;
72var
73  oldpath: string;
74  newpath: string;
75  pathArr:    TArrayOfString;
76  i:        Integer;
77begin
78  RegQueryStringValue(HKEY_CURRENT_USER,'Environment','PATH', oldpath)
79  oldpath := oldpath + ';';
80  newpath := '%SANSVIEWPATH%';
81  i := 0;
82  while (Pos(';', oldpath) > 0) do begin
83    SetArrayLength(pathArr, i+1);
84    pathArr[i] := Copy(oldpath, 0, Pos(';', oldpath)-1);
85    oldpath := Copy(oldpath, Pos(';', oldpath)+1, Length(oldpath));
86    i := i + 1;
87    // Check if current directory matches app dir
88    if newpath = pathArr[i-1]
89    then begin
90      Result := False;
91      exit;
92    end;
93  end;
94  Result := True;
95end;
96
Note: See TracBrowser for help on using the repository browser.