OpenSecurity-IKT.iss
author Oliver Maurhart <oliver.maurhart@ait.ac.at>
Fri, 28 Nov 2014 15:54:20 +0100
changeset 251 d3eb2d026666
permissions -rw-r--r--
added setup script for IKT version
oliver@251
     1
; -- OpenSecurity.iss --
oliver@251
     2
; OpenSecurity setup file for use with
oliver@251
     3
; Inno Setup Compiler (http://www.jrsoftware.org/isinfo.php) 
oliver@251
     4
oliver@251
     5
; Copyright 2013-2014 X-Net and AIT Austrian Institute of Technology
oliver@251
     6
; 
oliver@251
     7
; 
oliver@251
     8
;     X-Net Services GmbH
oliver@251
     9
;     Elisabethstrasse 1
oliver@251
    10
;     4020 Linz
oliver@251
    11
;     AUSTRIA
oliver@251
    12
;     https://www.x-net.at
oliver@251
    13
; 
oliver@251
    14
;     AIT Austrian Institute of Technology
oliver@251
    15
;     Donau City Strasse 1
oliver@251
    16
;     1220 Wien
oliver@251
    17
;     AUSTRIA
oliver@251
    18
;     http://www.ait.ac.at
oliver@251
    19
; 
oliver@251
    20
; 
oliver@251
    21
; Licensed under the Apache License, Version 2.0 (the "License");
oliver@251
    22
; you may not use this file except in compliance with the License.
oliver@251
    23
; You may obtain a copy of the License at
oliver@251
    24
; 
oliver@251
    25
;    http://www.apache.org/licenses/LICENSE-2.0
oliver@251
    26
; 
oliver@251
    27
; Unless required by applicable law or agreed to in writing, software
oliver@251
    28
; distributed under the License is distributed on an "AS IS" BASIS,
oliver@251
    29
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
oliver@251
    30
; See the License for the specific language governing permissions and
oliver@251
    31
; limitations under the License.
oliver@251
    32
oliver@251
    33
[Setup]
oliver@251
    34
AppName=OpenSecurity
oliver@251
    35
AppContact=AIT Austrian Institute of Technology
oliver@251
    36
AppPublisher=AIT Austrian Institute of Technology
oliver@251
    37
AppPublisherURL=http://www.ait.ac.at/
oliver@251
    38
AppVersion=1.0
oliver@251
    39
ArchitecturesInstallIn64BitMode=x64
oliver@251
    40
DefaultDirName={pf}\OpenSecurity
oliver@251
    41
DefaultGroupName=OpenSecurity
oliver@251
    42
; DisableDirPage=yes
oliver@251
    43
; DisableFinishedPage=yes
oliver@251
    44
; DisableProgramGroupPage=yes
oliver@251
    45
; DisableReadyMemo=yes
oliver@251
    46
; DisableReadyPage=yes
oliver@251
    47
; DisableWelcomePage=yes
oliver@251
    48
LicenseFile=OpenSecurity\Lizenz.txt
oliver@251
    49
OutputDir="."
oliver@251
    50
OutputBaseFilename="OpenSecurity Setup IKT V1.0"
oliver@251
    51
OutputManifestFile=OpenSecurity-Setup-Manifest.txt
oliver@251
    52
SetupIconFile=OpenSecurity\bin\ui\gfx\OpenSecurity.ico
oliver@251
    53
SolidCompression=yes
oliver@251
    54
UninstallDisplayIcon={app}\bin\ui\gfx\OpenSecurity.ico
oliver@251
    55
oliver@251
    56
[Files]
oliver@251
    57
Source: "OpenSecurity\Lizenz.txt"; DestDir: "{app}"; 
oliver@251
    58
Source: "OpenSecurity\bin\*"; Excludes: "*.pyc,*.swp"; DestDir: "{app}\bin"; Flags: recursesubdirs createallsubdirs;
oliver@251
    59
Source: "OpenSecurity\cygwin64\*"; DestDir: "{app}\cygwin64"; Flags: recursesubdirs createallsubdirs;
oliver@251
    60
Source: "OpenSecurity\install\*"; DestDir: "{app}\install"; Flags: recursesubdirs createallsubdirs;
oliver@251
    61
Source: "OpenSecurity\python27\*"; DestDir: "{app}\python27"; Flags: recursesubdirs createallsubdirs;
oliver@251
    62
Source: "OpenSecurity\python27\python27.dll"; DestDir: "{sys}"; Flags: sharedfile;
oliver@251
    63
Source: "OpenSecurity\python27\Lib\site-packages\pywin32_system32\pywintypes27.dll"; DestDir: "{sys}"; Flags: sharedfile;
oliver@251
    64
Source: "OpenSecurity\systemprofile-IKT\.VirtualBox\*"; DestDir: "{sys}\config\systemprofile\.VirtualBox"; Flags: recursesubdirs createallsubdirs;
oliver@251
    65
Source: "OpenSecurity\systemprofile-IKT\VirtualBox VMs\*"; DestDir: "{sys}\config\systemprofile\VirtualBox VMs"; Flags: recursesubdirs createallsubdirs;
oliver@251
    66
Source: "OpenSecurity\Apache License, Version 2.0.txt"; DestDir: "{app}";
oliver@251
    67
oliver@251
    68
[Dirs]
oliver@251
    69
Name: "{app}\cygwin64\var\log\xwin"; Permissions: everyone-modify
oliver@251
    70
Name: "{app}\log"; Permissions: everyone-modify
oliver@251
    71
oliver@251
    72
[Registry]
oliver@251
    73
Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueName: "OpenSecurity Tray Icon"; ValueType: string; ValueData: "{app}\python27\pythonw.exe ""{app}\bin\opensecurity_tray.pyw"""; Flags: uninsdeletevalue
oliver@251
    74
Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "LogServerUrl"; ValueType: string; ValueData: "{code:URLLogServer}"; Flags: uninsdeletevalue
oliver@251
    75
Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "Browser"; ValueType: string; ValueData: "{code:VMBrowser}"; Flags: uninsdeletevalue
oliver@251
    76
Root: HKLM; Subkey: "SOFTWARE\OpenSecurity"; ValueName: "ImageUrl"; ValueType: string; ValueData: "http://service.x-net.at/opensecurity/OsecVM_latest.ova"; Flags: uninsdeletevalue
oliver@251
    77
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\services\USBSTOR"; ValueName: "Start"; ValueType: dword; ValueData: 4;
oliver@251
    78
oliver@251
    79
[Icons]
oliver@251
    80
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"
oliver@251
    81
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"
oliver@251
    82
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"
oliver@251
    83
Name: "{group}\Uninstall OpenSecurity"; Filename: "{uninstallexe}"
oliver@251
    84
oliver@251
    85
[Run]
oliver@251
    86
Filename: "{app}\cygwin64\bin\dash.exe"; Parameters: "/bin/rebaseall"; Description: "Rebasing background system"; WorkingDir: "{app}"; StatusMsg: "Rebasing background system..."; Flags: runascurrentuser
oliver@251
    87
Filename: "{app}\install\fix_cygwin_paths.bat"; Description: "Fixing Cygwin paths"; WorkingDir: "{app}\install"; StatusMsg: "Fixing Cygwin Paths...";
oliver@251
    88
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...";
oliver@251
    89
Filename: "{app}\bin\firewall-install.bat"; Description: "Setup firewall rules"; WorkingDir: "{app}"; StatusMsg: "Setup firewall rules...";
oliver@251
    90
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" --startup auto install"; Description: "Installing the OpenSecurity Service"; WorkingDir: "{app}"; StatusMsg: "Installing the OpenSecurity Service"; Flags: runascurrentuser
oliver@251
    91
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" start"; Description: "Starting OpenSecurity Service"; WorkingDir: "{app}"; StatusMsg: "Starting OpenSecurity Service"; Flags: runascurrentuser
oliver@251
    92
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_tray.pyw"""; WorkingDir: "{userappdata}"; Description: "Launching OpenSecurity Tray Icon"; Flags: nowait
oliver@251
    93
oliver@251
    94
[UninstallRun]
oliver@251
    95
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\terminate_client_tray.pyw"" stop"; WorkingDir: "{app}"; StatusMsg: "Stopping the OpenSecurity Client Tray Service"; Flags: runascurrentuser
oliver@251
    96
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" stop"; WorkingDir: "{app}"; StatusMsg: "Stopping the OpenSecurity Service"; Flags: runascurrentuser
oliver@251
    97
Filename: "{app}\python27\pythonw.exe"; Parameters: """{app}\bin\opensecurity_service.pyw"" remove"; WorkingDir: "{app}"; StatusMsg: "Removing the OpenSecurity Service"; Flags: runascurrentuser
oliver@251
    98
Filename: "{app}\bin\firewall-uninstall.bat"; WorkingDir: "{app}"; StatusMsg: "Uninstall firewall rules...";
oliver@251
    99
oliver@251
   100
[UninstallDelete]
oliver@251
   101
Type: filesandordirs; Name: "{app}"
oliver@251
   102
oliver@251
   103
oliver@251
   104
[Code]
oliver@251
   105
var
oliver@251
   106
  UserInputPage: TInputQueryWizardPage;
oliver@251
   107
oliver@251
   108
procedure InitializeWizard;
oliver@251
   109
begin
oliver@251
   110
oliver@251
   111
  // Create the page
oliver@251
   112
  UserInputPage := CreateInputQueryPage(wpWelcome,
oliver@251
   113
    'Installation Details', 
oliver@251
   114
    'Essential settings for the current OpenSecurity Installation',
oliver@251
   115
    'Please specify concrete details for the OpenSecurity Installation. In doubt, leave unchanged.');
oliver@251
   116
oliver@251
   117
  // Add items (False means it's not a password edit)
oliver@251
   118
  UserInputPage.Add('VM Browser:', False);
oliver@251
   119
  UserInputPage.Add('URL of Logserver:', False);
oliver@251
   120
oliver@251
   121
  // Set initial values (optional)
oliver@251
   122
  UserInputPage.Values[0] := '/usr/bin/chromium';
oliver@251
   123
  UserInputPage.Values[1] := 'http://10.215.5.166/opensecurity/log';
oliver@251
   124
oliver@251
   125
end;
oliver@251
   126
oliver@251
   127
function VMBrowser(Param: String): String;
oliver@251
   128
begin
oliver@251
   129
  Result := UserInputPage.Values[0]
oliver@251
   130
end;
oliver@251
   131
oliver@251
   132
function URLLogServer(Param: String): String;
oliver@251
   133
begin
oliver@251
   134
  Result := UserInputPage.Values[1]
oliver@251
   135
end;