Statistics
| Branch: | Revision:

root / trunk / Pithos.Installer / PithosPlus.iss @ 7e0e06d0

History | View | Annotate | Download (17.2 kB)

1 4a1a5303 Panagiotis Kanavos
; Script generated by the Inno Setup Script Wizard.
2 4a1a5303 Panagiotis Kanavos
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3 4a1a5303 Panagiotis Kanavos
4 4a1a5303 Panagiotis Kanavos
#define MyAppName "Pithos+"
5 4a1a5303 Panagiotis Kanavos
#define SrcApp "PSourcex64\Pithos.Client.WPF.exe"
6 4a1a5303 Panagiotis Kanavos
#define MyAppPublisher "GRNET"
7 4a1a5303 Panagiotis Kanavos
#define MyAppURL "http://pithos.grnet.gr/"
8 4a1a5303 Panagiotis Kanavos
#define MyAppExeName "Pithos.Client.WPF.exe"
9 4a1a5303 Panagiotis Kanavos
#define MyAppVersion GetFileVersion(SrcApp)
10 4a1a5303 Panagiotis Kanavos
#define MyURL "http://www.grnet.gr/"
11 4a1a5303 Panagiotis Kanavos
12 4a1a5303 Panagiotis Kanavos
[Setup]
13 4a1a5303 Panagiotis Kanavos
;WARNING: DO NOT CHANGE THE APP ID (AppId) or the update will not work correctly.
14 4a1a5303 Panagiotis Kanavos
;AppId is used to check if we are installed using this isntaller and not by other means.
15 4a1a5303 Panagiotis Kanavos
AppId={{926354B2-04D2-47CF-8FAA-04AB3682008B}
16 4a1a5303 Panagiotis Kanavos
AppName={#MyAppName}
17 4a1a5303 Panagiotis Kanavos
AppVersion={#MyAppVersion}
18 4a1a5303 Panagiotis Kanavos
AppVerName={#MyAppName} {#MyAppVersion}
19 4a1a5303 Panagiotis Kanavos
UninstallDisplayName={#MyAppName} {#MyAppVersion}
20 4a1a5303 Panagiotis Kanavos
AppPublisher={#MyAppPublisher}
21 4a1a5303 Panagiotis Kanavos
AppPublisherURL={#MyAppURL}
22 4a1a5303 Panagiotis Kanavos
AppSupportURL={#MyAppURL}
23 4a1a5303 Panagiotis Kanavos
AppUpdatesURL={#MyAppURL}
24 4a1a5303 Panagiotis Kanavos
DefaultDirName={pf}\PithosPlus
25 4a1a5303 Panagiotis Kanavos
DefaultGroupName={#MyAppName}
26 4a1a5303 Panagiotis Kanavos
AllowNoIcons=yes
27 4a1a5303 Panagiotis Kanavos
LicenseFile=Licenses\GRNET License.txt
28 4a1a5303 Panagiotis Kanavos
OutputBaseFilename=PithosPlus_Setupv{#MyAppVersion}
29 4a1a5303 Panagiotis Kanavos
SolidCompression=True
30 4a1a5303 Panagiotis Kanavos
UsePreviousSetupType=False
31 4a1a5303 Panagiotis Kanavos
UsePreviousTasks=False
32 4a1a5303 Panagiotis Kanavos
UsePreviousLanguage=False
33 4a1a5303 Panagiotis Kanavos
ShowTasksTreeLines=True
34 4a1a5303 Panagiotis Kanavos
AppCopyright=(c) 2011 - 2012 GRNET
35 4a1a5303 Panagiotis Kanavos
PrivilegesRequired=none
36 4a1a5303 Panagiotis Kanavos
EnableDirDoesntExistWarning=True
37 4a1a5303 Panagiotis Kanavos
DirExistsWarning=yes
38 4a1a5303 Panagiotis Kanavos
AppContact=okeanos@grnet.gr
39 4a1a5303 Panagiotis Kanavos
AppSupportPhone=+30 210 0000000
40 4a1a5303 Panagiotis Kanavos
AppReadmeFile=My Readme
41 4a1a5303 Panagiotis Kanavos
UninstallDisplayIcon={app}\Pithos.Client.WPF.exe
42 4a1a5303 Panagiotis Kanavos
WizardImageFile=Images\ppWZDImage.bmp
43 4a1a5303 Panagiotis Kanavos
WizardSmallImageFile=Images\ppWZDSmall.bmp
44 4a1a5303 Panagiotis Kanavos
VersionInfoVersion={#MyAppVersion}
45 4a1a5303 Panagiotis Kanavos
MinVersion=0,5.01sp3
46 4a1a5303 Panagiotis Kanavos
47 4a1a5303 Panagiotis Kanavos
[Languages]
48 4a1a5303 Panagiotis Kanavos
Name: "english"; MessagesFile: "compiler:Default.isl"
49 4a1a5303 Panagiotis Kanavos
Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl"
50 4a1a5303 Panagiotis Kanavos
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
51 4a1a5303 Panagiotis Kanavos
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
52 4a1a5303 Panagiotis Kanavos
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
53 4a1a5303 Panagiotis Kanavos
54 4a1a5303 Panagiotis Kanavos
[CustomMessages]
55 4a1a5303 Panagiotis Kanavos
Web=You can visit our web site for more info
56 4a1a5303 Panagiotis Kanavos
57 4a1a5303 Panagiotis Kanavos
[Tasks]
58 4a1a5303 Panagiotis Kanavos
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; Components: Documentation RequiredFiles
59 4a1a5303 Panagiotis Kanavos
;Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1; Components: Manual RequiredFiles Source
60 4a1a5303 Panagiotis Kanavos
Name: "visitweb"; Description: "{cm:Web}"; GroupDescription: "{cm:Web}"; Flags: unchecked; Components: Documentation RequiredFiles; Languages: english french german greek spanish
61 4a1a5303 Panagiotis Kanavos
62 4a1a5303 Panagiotis Kanavos
[Files]
63 4a1a5303 Panagiotis Kanavos
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
64 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.Client.WPF.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek; Check: Is64BitInstallMode
65 4a1a5303 Panagiotis Kanavos
Source: "PSource\Pithos.Client.WPF.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek; Check: not Is64BitInstallMode
66 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\AsyncCtpLibrary.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Tasks: desktopicon; Languages: english french german spanish greek
67 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Castle.ActiveRecord.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
68 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Caliburn.Micro.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
69 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Castle.ActiveRecord.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
70 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Castle.Components.Validator.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
71 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Castle.Core.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
72 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Hardcodet.Wpf.TaskbarNotification.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
73 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Iesi.Collections.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
74 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\log4net.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
75 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
76 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\NHibernate.ByteCode.Castle.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
77 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\NHibernate.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
78 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\NHibernate.Search.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
79 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\ParallelExtensionsExtras.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
80 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.Client.WPF.exe.config"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
81 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.Core.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
82 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.Interfaces.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
83 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.Network.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
84 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\Pithos.ShellExtensions.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
85 4a1a5303 Panagiotis Kanavos
;Source: "PSourcex64\Pithos.ShellExtensions.tlb"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
86 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
87 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\System.Threading.Tasks.Dataflow.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
88 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
89 4a1a5303 Panagiotis Kanavos
Source: "PSourcex64\WPFToolkit.Extended.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
90 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\License.txt"; DestDir: "{cf}/\TortoiseOverlays"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
91 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\TortoiseOverlays.dll"; DestDir: "{cf}/\TortoiseOverlays"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
92 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\AddedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
93 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\ConflictIcon.ico"; DestDir: "{cf}/TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
94 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\DeletedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
95 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\IgnoredIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
96 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\LockedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
97 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\ModifiedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
98 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\NormalIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
99 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\ReadOnlyIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
100 4a1a5303 Panagiotis Kanavos
Source: "TortoiseOverlays\icons\XPStyle\UnversionedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
101 4a1a5303 Panagiotis Kanavos
;32 & 64 Bit
102 4a1a5303 Panagiotis Kanavos
;Source: "PSourcex64\Pithos.Client.WPF.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Is64BitInstallMode
103 4a1a5303 Panagiotis Kanavos
;Source: "PSource\Pithos.Client.WPF.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode
104 4a1a5303 Panagiotis Kanavos
;Redistributables
105 4a1a5303 Panagiotis Kanavos
Source: "Redistributables\*"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall
106 4a1a5303 Panagiotis Kanavos
Source: "Images\grnet-logo.bmp"; Flags: dontcopy
107 4a1a5303 Panagiotis Kanavos
Source: "Images\account.bmp"; Flags: dontcopy
108 4a1a5303 Panagiotis Kanavos
109 4a1a5303 Panagiotis Kanavos
[Icons]
110 4a1a5303 Panagiotis Kanavos
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
111 4a1a5303 Panagiotis Kanavos
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
112 4a1a5303 Panagiotis Kanavos
Name: "{group}\{cm:ProgramOnTheWeb,GRNET}"; Filename: "{#MyURL}"
113 4a1a5303 Panagiotis Kanavos
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
114 4a1a5303 Panagiotis Kanavos
Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
115 4a1a5303 Panagiotis Kanavos
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
116 4a1a5303 Panagiotis Kanavos
;Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
117 4a1a5303 Panagiotis Kanavos
118 4a1a5303 Panagiotis Kanavos
[Run]
119 4a1a5303 Panagiotis Kanavos
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
120 4a1a5303 Panagiotis Kanavos
121 4a1a5303 Panagiotis Kanavos
[Registry]
122 4a1a5303 Panagiotis Kanavos
;Startup 
123 4a1a5303 Panagiotis Kanavos
;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Pithos+"; ValueData: """{app}\{#MyAppExeName}"""; Flags: createvalueifdoesntexist uninsdeletevalue
124 4a1a5303 Panagiotis Kanavos
125 4a1a5303 Panagiotis Kanavos
Root: "HKCR"; Subkey: "*\shellex\ContextMenuHandlers\Pithos.FileContextMenu"; ValueData: "b1f1405d-94a1-4692-b72f-fc8caf8b8700"; Flags: createvalueifdoesntexist uninsdeletekey
126 4a1a5303 Panagiotis Kanavos
Root: "HKCR"; Subkey: "CLSID\0CFB4119-DABE-4E32-AB2D-2D41873BC599"; ValueData: "PithosContextMenu Class"; Flags: createvalueifdoesntexist uninsdeletekey
127 4a1a5303 Panagiotis Kanavos
128 4a1a5303 Panagiotis Kanavos
[Components]
129 4a1a5303 Panagiotis Kanavos
Name: "RequiredFiles"; Description: "Required Files"; Types: Advanced Default; Flags: checkablealone fixed; Languages: english french german greek spanish
130 4a1a5303 Panagiotis Kanavos
Name: "Documentation"; Description: "Documentation"; Types: Default Advanced; Flags: dontinheritcheck; Languages: english french german greek spanish
131 4a1a5303 Panagiotis Kanavos
132 4a1a5303 Panagiotis Kanavos
[Types]
133 4a1a5303 Panagiotis Kanavos
Name: "Default"; Description: "Default Installation"; Languages: english french german greek spanish
134 4a1a5303 Panagiotis Kanavos
Name: "Advanced"; Description: "Custom Installation"; Flags: iscustom; Languages: english german french greek spanish
135 4a1a5303 Panagiotis Kanavos
136 4a1a5303 Panagiotis Kanavos
[Dirs]
137 4a1a5303 Panagiotis Kanavos
Name: "{cf}/\TortoiseOverlays"; Components: RequiredFiles; Tasks: desktopicon; Languages: english french german greek spanish
138 4a1a5303 Panagiotis Kanavos
Name: "{cf}/\TortoiseOverlays/\icons"
139 4a1a5303 Panagiotis Kanavos
Name: "{cf}/\TortoiseOverlays/icons/\XPStyle"
140 4a1a5303 Panagiotis Kanavos
141 4a1a5303 Panagiotis Kanavos
142 4a1a5303 Panagiotis Kanavos
[Code]
143 4a1a5303 Panagiotis Kanavos
const 
144 4a1a5303 Panagiotis Kanavos
  WM_QUIT = 18;
145 4a1a5303 Panagiotis Kanavos
  MyAppMutex = 'MYAPPMUTEX';
146 4a1a5303 Panagiotis Kanavos
var 
147 4a1a5303 Panagiotis Kanavos
dotNET40Missing: Boolean;
148 4a1a5303 Panagiotis Kanavos
       IsUpdate: boolean;
149 4a1a5303 Panagiotis Kanavos
      UsagePage: TOutputMsgWizardPage;
150 4a1a5303 Panagiotis Kanavos
      Wz1, Wz2 : TOutputMsgWizardPage;
151 4a1a5303 Panagiotis Kanavos
152 4a1a5303 Panagiotis Kanavos
function IsDotNetDetected(version: string; service: cardinal): boolean;
153 4a1a5303 Panagiotis Kanavos
//    'v1.1.4322'     .NET Framework 1.1
154 4a1a5303 Panagiotis Kanavos
//    'v2.0.50727'    .NET Framework 2.0
155 4a1a5303 Panagiotis Kanavos
//    'v3.0'          .NET Framework 3.0
156 4a1a5303 Panagiotis Kanavos
//    'v3.5'          .NET Framework 3.5
157 4a1a5303 Panagiotis Kanavos
//    'v4\Client'     .NET Framework 4.0 Client Profile
158 4a1a5303 Panagiotis Kanavos
//    'v4\Full'       .NET Framework 4.0 Full Installation
159 4a1a5303 Panagiotis Kanavos
// service pack
160 4a1a5303 Panagiotis Kanavos
//    0               No service packs required
161 4a1a5303 Panagiotis Kanavos
//    1, 2, etc.      Service pack 1, 2, etc. required
162 4a1a5303 Panagiotis Kanavos
//    if not IsDotNetDetected('v4\Client', 0) then begin
163 4a1a5303 Panagiotis Kanavos
var
164 4a1a5303 Panagiotis Kanavos
    key: string;
165 4a1a5303 Panagiotis Kanavos
    install, serviceCount: cardinal;
166 4a1a5303 Panagiotis Kanavos
    success: boolean;
167 4a1a5303 Panagiotis Kanavos
    
168 4a1a5303 Panagiotis Kanavos
begin
169 4a1a5303 Panagiotis Kanavos
    key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + version;
170 4a1a5303 Panagiotis Kanavos
    // .NET 3.0 uses value InstallSuccess in subkey Setup
171 4a1a5303 Panagiotis Kanavos
    if Pos('v3.0', version) = 1 then begin
172 4a1a5303 Panagiotis Kanavos
        success := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install);
173 4a1a5303 Panagiotis Kanavos
    end else begin
174 4a1a5303 Panagiotis Kanavos
        success := RegQueryDWordValue(HKLM, key, 'Install', install);
175 4a1a5303 Panagiotis Kanavos
    end;
176 4a1a5303 Panagiotis Kanavos
    // .NET 4.0 uses value Servicing instead of SP
177 4a1a5303 Panagiotis Kanavos
    if Pos('v4', version) = 1 then begin
178 4a1a5303 Panagiotis Kanavos
        success := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount);
179 4a1a5303 Panagiotis Kanavos
    end else begin
180 4a1a5303 Panagiotis Kanavos
        success := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount);
181 4a1a5303 Panagiotis Kanavos
    end;
182 4a1a5303 Panagiotis Kanavos
    result := success and (install = 1) and (serviceCount >= service);
183 4a1a5303 Panagiotis Kanavos
end;
184 4a1a5303 Panagiotis Kanavos
185 4a1a5303 Panagiotis Kanavos
function InitializeSetup(): Boolean;
186 4a1a5303 Panagiotis Kanavos
begin
187 4a1a5303 Panagiotis Kanavos
    // Test the presence of .NET 4.0
188 4a1a5303 Panagiotis Kanavos
    if (not(RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4'))) then
189 4a1a5303 Panagiotis Kanavos
        dotNET40Missing := True;
190 4a1a5303 Panagiotis Kanavos
191 4a1a5303 Panagiotis Kanavos
    Result := True;
192 4a1a5303 Panagiotis Kanavos
end;
193 4a1a5303 Panagiotis Kanavos
194 4a1a5303 Panagiotis Kanavos
function ShouldInstalldotNET40(): Boolean;
195 4a1a5303 Panagiotis Kanavos
begin
196 4a1a5303 Panagiotis Kanavos
    Result := dotNET40Missing;
197 4a1a5303 Panagiotis Kanavos
end;
198 4a1a5303 Panagiotis Kanavos
199 4a1a5303 Panagiotis Kanavos
procedure CurPageChanged(CurPageID: Integer);
200 4a1a5303 Panagiotis Kanavos
begin
201 4a1a5303 Panagiotis Kanavos
  if CurPageID = wpInstalling then
202 4a1a5303 Panagiotis Kanavos
    IsUpdate := FileExists(ExpandConstant('{app}\{#MyAppExeName}'));
203 4a1a5303 Panagiotis Kanavos
end;
204 4a1a5303 Panagiotis Kanavos
205 4a1a5303 Panagiotis Kanavos
function NotAnUpdate: Boolean;
206 4a1a5303 Panagiotis Kanavos
begin
207 4a1a5303 Panagiotis Kanavos
  result := not IsUpdate;
208 4a1a5303 Panagiotis Kanavos
end;
209 4a1a5303 Panagiotis Kanavos
210 4a1a5303 Panagiotis Kanavos
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
211 4a1a5303 Panagiotis Kanavos
var
212 4a1a5303 Panagiotis Kanavos
mRes : integer;
213 4a1a5303 Panagiotis Kanavos
begin
214 4a1a5303 Panagiotis Kanavos
  case CurUninstallStep of
215 4a1a5303 Panagiotis Kanavos
    usUninstall:
216 4a1a5303 Panagiotis Kanavos
      begin
217 4a1a5303 Panagiotis Kanavos
        mRes := MsgBox('Do you want to remove your settings?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
218 4a1a5303 Panagiotis Kanavos
        if mRes = IDYES then
219 4a1a5303 Panagiotis Kanavos
          begin
220 4a1a5303 Panagiotis Kanavos
            DelTree(ExpandConstant('{localappdata}')+'\GRNET',true,true,true);
221 4a1a5303 Panagiotis Kanavos
          End
222 4a1a5303 Panagiotis Kanavos
        else
223 4a1a5303 Panagiotis Kanavos
          MsgBox ('Settings will not be removed', mbInformation, MB_OK);        
224 4a1a5303 Panagiotis Kanavos
      end;
225 4a1a5303 Panagiotis Kanavos
  end;
226 4a1a5303 Panagiotis Kanavos
end;
227 4a1a5303 Panagiotis Kanavos
228 4a1a5303 Panagiotis Kanavos
procedure BitmapImageOnClick(Sender: TObject);
229 4a1a5303 Panagiotis Kanavos
var
230 4a1a5303 Panagiotis Kanavos
  ErrCode: integer;
231 4a1a5303 Panagiotis Kanavos
begin
232 4a1a5303 Panagiotis Kanavos
  ShellExec('open', 'http://pithos.grnet.gr','', '', SW_SHOW, ewNoWait, ErrCode);
233 4a1a5303 Panagiotis Kanavos
end;
234 4a1a5303 Panagiotis Kanavos
235 4a1a5303 Panagiotis Kanavos
procedure CreateTheWizardPages;
236 4a1a5303 Panagiotis Kanavos
var
237 4a1a5303 Panagiotis Kanavos
  Page: TWizardPage;
238 4a1a5303 Panagiotis Kanavos
  Button, FormButton: TNewButton;
239 4a1a5303 Panagiotis Kanavos
  BitmapImage,BitmapImage1: TBitmapImage;
240 4a1a5303 Panagiotis Kanavos
  BitmapFileName: String;
241 4a1a5303 Panagiotis Kanavos
  Memo: TMemo;
242 4a1a5303 Panagiotis Kanavos
  LabelWz: TLabel;
243 4a1a5303 Panagiotis Kanavos
begin
244 4a1a5303 Panagiotis Kanavos
245 4a1a5303 Panagiotis Kanavos
  Page := CreateCustomPage(wpWelcome, 'GRNET Pithos+ Dev Build {#MyAppVersion}', 'Software License');
246 4a1a5303 Panagiotis Kanavos
  BitmapFileName := ExpandConstant('{tmp}\grnet-logo.bmp');
247 4a1a5303 Panagiotis Kanavos
  ExtractTemporaryFile(ExtractFileName(BitmapFileName));
248 4a1a5303 Panagiotis Kanavos
  
249 4a1a5303 Panagiotis Kanavos
  Page.Surface.Color := clWhite;
250 4a1a5303 Panagiotis Kanavos
  BitmapImage := TBitmapImage.Create(Page);
251 4a1a5303 Panagiotis Kanavos
  BitmapImage.AutoSize := True;
252 4a1a5303 Panagiotis Kanavos
  BitmapImage.Bitmap.LoadFromFile(BitmapFileName);
253 4a1a5303 Panagiotis Kanavos
  BitmapImage.Cursor := crHand;
254 4a1a5303 Panagiotis Kanavos
  BitmapImage.Left := (Page.Surfacewidth - BitmapImage.Width) / 2;
255 4a1a5303 Panagiotis Kanavos
  BitmapImage.Top := Page.Surface.Top;
256 4a1a5303 Panagiotis Kanavos
  BitmapImage.OnClick := @BitmapImageOnClick;
257 4a1a5303 Panagiotis Kanavos
  BitmapImage.Parent := Page.Surface;
258 4a1a5303 Panagiotis Kanavos
  
259 4a1a5303 Panagiotis Kanavos
  Memo := TMemo.Create(Page);
260 4a1a5303 Panagiotis Kanavos
  Memo.Top := BitmapImage.Height;
261 4a1a5303 Panagiotis Kanavos
  Memo.Width := Page.SurfaceWidth;
262 4a1a5303 Panagiotis Kanavos
  Memo.Height := Page.SurfaceHeight - (BitmapImage.Height)
263 4a1a5303 Panagiotis Kanavos
  Memo.ScrollBars := ssVertical;
264 4a1a5303 Panagiotis Kanavos
  Memo.Text := 'This software is provided by GRNET S.A. "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall GRNET S.A. or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.';
265 4a1a5303 Panagiotis Kanavos
  Memo.Parent := Page.Surface;
266 4a1a5303 Panagiotis Kanavos
  
267 4a1a5303 Panagiotis Kanavos
  Page := CreateCustomPage(wpInfoAfter, 'First Steps', 'Setup your account');
268 4a1a5303 Panagiotis Kanavos
  BitmapFileName := ExpandConstant('{tmp}\account.bmp');
269 4a1a5303 Panagiotis Kanavos
  ExtractTemporaryFile(ExtractFileName(BitmapFileName));
270 4a1a5303 Panagiotis Kanavos
271 4a1a5303 Panagiotis Kanavos
  Page.Surface.Color := clWhite;
272 4a1a5303 Panagiotis Kanavos
  BitmapImage1 := TBitmapImage.Create(Page);
273 4a1a5303 Panagiotis Kanavos
  BitmapImage1.width := Page.SurfaceWidth;
274 4a1a5303 Panagiotis Kanavos
  BitmapImage1.height := PAge.SurfaceHeight;
275 4a1a5303 Panagiotis Kanavos
  BitmapImage1.Bitmap.LoadFromFile(BitmapFileName);
276 4a1a5303 Panagiotis Kanavos
  //BitmapImage1.Cursor := crHand;
277 4a1a5303 Panagiotis Kanavos
  BitmapImage1.Left := 0 //(Page.Surfacewidth - BitmapImage.Width) / 2;
278 4a1a5303 Panagiotis Kanavos
  BitmapImage1.Top := Page.Surface.Top;
279 4a1a5303 Panagiotis Kanavos
  //BitmapImage1.OnClick := @BitmapImageOnClick;
280 4a1a5303 Panagiotis Kanavos
  BitmapImage1.Parent := Page.Surface;
281 4a1a5303 Panagiotis Kanavos
  
282 4a1a5303 Panagiotis Kanavos
  LabelWz := Tlabel.Create(Page);
283 4a1a5303 Panagiotis Kanavos
  LabelWz.Top := 0;
284 4a1a5303 Panagiotis Kanavos
  LabelWz.Caption := 'To setup your account right click on the Pithos+ icon in the taskbar.';
285 4a1a5303 Panagiotis Kanavos
  LabelWz.Parent := Page.Surface;
286 4a1a5303 Panagiotis Kanavos
end;
287 4a1a5303 Panagiotis Kanavos
288 4a1a5303 Panagiotis Kanavos
procedure InitializeWizard;
289 4a1a5303 Panagiotis Kanavos
var
290 4a1a5303 Panagiotis Kanavos
winHwnd: longint;
291 4a1a5303 Panagiotis Kanavos
retVal : boolean;
292 4a1a5303 Panagiotis Kanavos
strProg: string;
293 4a1a5303 Panagiotis Kanavos
begin
294 4a1a5303 Panagiotis Kanavos
  winHwnd := FindWindowByClassName('{#MyAppExeName}');
295 4a1a5303 Panagiotis Kanavos
  if winHwnd<>0 then begin { no module found or ignored pressed}
296 4a1a5303 Panagiotis Kanavos
      postmessage(winHwnd,WM_QUIT,0,0);
297 4a1a5303 Panagiotis Kanavos
   //abort();  
298 4a1a5303 Panagiotis Kanavos
  end;   
299 4a1a5303 Panagiotis Kanavos
300 4a1a5303 Panagiotis Kanavos
  CreateTheWizardPages;
301 4a1a5303 Panagiotis Kanavos
end;
302 4a1a5303 Panagiotis Kanavos
303 4a1a5303 Panagiotis Kanavos
[Run]
304 4a1a5303 Panagiotis Kanavos
Filename: {tmp}\dotNetFx40_Client_setup.exe; Description: Install Microsoft .Net Framework 4.0;    Parameters: /q /noreboot; Flags: skipifdoesntexist; Check: ShouldInstalldotNET40