request browser and log server during setup
authorOliver Maurhart <oliver.maurhart@ait.ac.at>
Tue, 30 Sep 2014 13:06:37 +0200
changeset 231cab995223c76
parent 230 d2d4421e42ed
child 232 56120b285fc8
request browser and log server during setup
OpenSecurity.iss
     1.1 --- a/OpenSecurity.iss	Tue Sep 30 11:48:14 2014 +0200
     1.2 +++ b/OpenSecurity.iss	Tue Sep 30 13:06:37 2014 +0200
     1.3 @@ -3,7 +3,6 @@
     1.4  ; Inno Setup Compiler (http://www.jrsoftware.org/isinfo.php) 
     1.5  
     1.6  [Setup]
     1.7 -; Basic installation stuff and config
     1.8  AppName=OpenSecurity
     1.9  AppContact=AIT Austrian Institute of Technology
    1.10  AppPublisher=AIT Austrian Institute of Technology
    1.11 @@ -26,7 +25,6 @@
    1.12  UninstallDisplayIcon={app}\bin\ui\gfx\OpenSecurity.ico
    1.13  
    1.14  [Files]
    1.15 -; Files to copy
    1.16  Source: "OpenSecurity\bin\*"; Excludes: "*.pyc,*.swp"; DestDir: "{app}\bin"; Flags: recursesubdirs createallsubdirs;
    1.17  Source: "OpenSecurity\cygwin64\*"; DestDir: "{app}\cygwin64"; Flags: recursesubdirs createallsubdirs;
    1.18  Source: "OpenSecurity\install\*"; DestDir: "{app}\install"; Flags: recursesubdirs createallsubdirs;
    1.19 @@ -42,20 +40,18 @@
    1.20  Name: "{app}\log"; Permissions: everyone-modify
    1.21  
    1.22  [Registry]
    1.23 -; Registry entries to set
    1.24  Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueName: "OpenSecurity Tray Icon"; ValueType: string; ValueData: "{app}\python27\pythonw.exe ""{app}\bin\opensecurity_tray.pyw"""; Flags: uninsdeletevalue
    1.25 -Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "LogServerUrl"; ValueType: string; ValueData: "http://10.215.5.166/opensecurity/log"; Flags: uninsdeletevalue
    1.26 +Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "LogServerUrl"; ValueType: string; ValueData: "{code:URLLogServer}"; Flags: uninsdeletevalue
    1.27 +Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "Browser"; ValueType: string; ValueData: "{code:VMBrowser}"; Flags: uninsdeletevalue
    1.28  Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\services\USBSTOR"; ValueName: "Start"; ValueType: dword; ValueData: 4;
    1.29  
    1.30  [Icons]
    1.31 -; Program Icons in start menu
    1.32  Name: "{group}\OpenSecurity Tray Icon"; Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_tray.pyw"""; WorkingDir: "{userappdata}"; Comment: "The OpenSecurity Tray Icon"; IconFilename: "{app}\bin\ui\gfx\OpenSecurity.ico"
    1.33  Name: "{group}\Secure Browsing"; Filename: "{app}\cygiwn64\bin\wget.exe"; Parameters: """http://localhost:8080/browsing"""; WorkingDir: "{userappdata}"; Comment: "OpenSecurity Secure Browsing"; IconFilename: "{app}\bin\ui\gfx\opensecurity_browsing_64.ico"
    1.34  Name: "{commondesktop}\Secure Browsing"; Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\start_browsing.pyw"""; WorkingDir: "{userappdata}"; Comment: "OpenSecurity Secure Browsing"; IconFilename: "{app}\bin\ui\gfx\opensecurity_browsing_64.ico"
    1.35  Name: "{group}\Uninstall OpenSecurity"; Filename: "{uninstallexe}"
    1.36  
    1.37  [Run]
    1.38 -; Run after installment
    1.39  Filename: "{app}\cygwin64\bin\dash.exe"; Parameters: "/bin/rebaseall"; Description: "Rebasing background system"; WorkingDir: "{app}"; StatusMsg: "Rebasing background system..."; Flags: runascurrentuser
    1.40  Filename: "{app}\install\fix_cygwin_paths.bat"; Description: "Fixing Cygwin paths"; WorkingDir: "{app}\install"; StatusMsg: "Fixing Cygwin Paths...";
    1.41  Filename: "{app}\cygwin64\bin\bash.exe"; Parameters: "-l -i -c echo -n"; Description: "Enforcing login environment for shells"; WorkingDir: "{app}"; StatusMsg: "Enforcing login environment for shells...";
    1.42 @@ -64,10 +60,43 @@
    1.43  Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_tray.pyw"""; WorkingDir: "{userappdata}"; Description: "Launching OpenSecurity Tray Icon"; Flags: nowait
    1.44  
    1.45  [UninstallRun]
    1.46 -; When uninstalling run this command prior
    1.47  Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\terminate_client_tray.pyw"" stop"; WorkingDir: "{app}"; StatusMsg: "Stopping the OpenSecurity Client Tray Service"; Flags: runascurrentuser
    1.48  Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" stop"; WorkingDir: "{app}"; StatusMsg: "Stopping the OpenSecurity Service"; Flags: runascurrentuser
    1.49  Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" remove"; WorkingDir: "{app}"; StatusMsg: "Removing the OpenSecurity Service"; Flags: runascurrentuser
    1.50  
    1.51  [UninstallDelete]
    1.52  Type: filesandordirs; Name: "{app}"
    1.53 +
    1.54 +
    1.55 +[Code]
    1.56 +var
    1.57 +  UserInputPage: TInputQueryWizardPage;
    1.58 +
    1.59 +procedure InitializeWizard;
    1.60 +begin
    1.61 +
    1.62 +  // Create the page
    1.63 +  UserInputPage := CreateInputQueryPage(wpWelcome,
    1.64 +    'Installation Details', 
    1.65 +    'Essential settings for the current OpenSecurity Installation',
    1.66 +    'Please specify concrete details for the OpenSecurity Installation. In doubt, leave unchanged.');
    1.67 +
    1.68 +  // Add items (False means it's not a password edit)
    1.69 +  UserInputPage.Add('VM Browser:', False);
    1.70 +  UserInputPage.Add('URL of Logserver:', False);
    1.71 +
    1.72 +  // Set initial values (optional)
    1.73 +  UserInputPage.Values[0] := '/usr/bin/chromium';
    1.74 +  UserInputPage.Values[1] := 'http://10.215.5.166/opensecurity/log';
    1.75 +
    1.76 +end;
    1.77 +
    1.78 +function VMBrowser(Param: String): String;
    1.79 +begin
    1.80 +  Result := UserInputPage.Values[0]
    1.81 +end;
    1.82 +
    1.83 +function URLLogServer(Param: String): String;
    1.84 +begin
    1.85 +  Result := UserInputPage.Values[1]
    1.86 +end;