Statistics
| Branch: | Revision:

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

History | View | Annotate | Download (17.2 kB)

1
; Script generated by the Inno Setup Script Wizard.
2
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3

    
4
#define MyAppName "Pithos+"
5
#define SrcApp "PSourcex64\Pithos.Client.WPF.exe"
6
#define MyAppPublisher "GRNET"
7
#define MyAppURL "http://pithos.grnet.gr/"
8
#define MyAppExeName "Pithos.Client.WPF.exe"
9
#define MyAppVersion GetFileVersion(SrcApp)
10
#define MyURL "http://www.grnet.gr/"
11

    
12
[Setup]
13
;WARNING: DO NOT CHANGE THE APP ID (AppId) or the update will not work correctly.
14
;AppId is used to check if we are installed using this isntaller and not by other means.
15
AppId={{926354B2-04D2-47CF-8FAA-04AB3682008B}
16
AppName={#MyAppName}
17
AppVersion={#MyAppVersion}
18
AppVerName={#MyAppName} {#MyAppVersion}
19
UninstallDisplayName={#MyAppName} {#MyAppVersion}
20
AppPublisher={#MyAppPublisher}
21
AppPublisherURL={#MyAppURL}
22
AppSupportURL={#MyAppURL}
23
AppUpdatesURL={#MyAppURL}
24
DefaultDirName={pf}\PithosPlus
25
DefaultGroupName={#MyAppName}
26
AllowNoIcons=yes
27
LicenseFile=Licenses\GRNET License.txt
28
OutputBaseFilename=PithosPlus_Setupv{#MyAppVersion}
29
SolidCompression=True
30
UsePreviousSetupType=False
31
UsePreviousTasks=False
32
UsePreviousLanguage=False
33
ShowTasksTreeLines=True
34
AppCopyright=(c) 2011 - 2012 GRNET
35
PrivilegesRequired=none
36
EnableDirDoesntExistWarning=True
37
DirExistsWarning=yes
38
AppContact=okeanos@grnet.gr
39
AppSupportPhone=+30 210 0000000
40
AppReadmeFile=My Readme
41
UninstallDisplayIcon={app}\Pithos.Client.WPF.exe
42
WizardImageFile=Images\ppWZDImage.bmp
43
WizardSmallImageFile=Images\ppWZDSmall.bmp
44
VersionInfoVersion={#MyAppVersion}
45
MinVersion=0,5.01sp3
46

    
47
[Languages]
48
Name: "english"; MessagesFile: "compiler:Default.isl"
49
Name: "greek"; MessagesFile: "compiler:Languages\Greek.isl"
50
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
51
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
52
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
53

    
54
[CustomMessages]
55
Web=You can visit our web site for more info
56

    
57
[Tasks]
58
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; Components: Documentation RequiredFiles
59
;Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1; Components: Manual RequiredFiles Source
60
Name: "visitweb"; Description: "{cm:Web}"; GroupDescription: "{cm:Web}"; Flags: unchecked; Components: Documentation RequiredFiles; Languages: english french german greek spanish
61

    
62
[Files]
63
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
64
Source: "PSourcex64\Pithos.Client.WPF.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek; Check: Is64BitInstallMode
65
Source: "PSource\Pithos.Client.WPF.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek; Check: not Is64BitInstallMode
66
Source: "PSourcex64\AsyncCtpLibrary.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Tasks: desktopicon; Languages: english french german spanish greek
67
Source: "PSourcex64\Castle.ActiveRecord.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
68
Source: "PSourcex64\Caliburn.Micro.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
69
Source: "PSourcex64\Castle.ActiveRecord.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
70
Source: "PSourcex64\Castle.Components.Validator.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
71
Source: "PSourcex64\Castle.Core.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
72
Source: "PSourcex64\Hardcodet.Wpf.TaskbarNotification.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
73
Source: "PSourcex64\Iesi.Collections.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
74
Source: "PSourcex64\log4net.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
75
Source: "PSourcex64\Newtonsoft.Json.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
76
Source: "PSourcex64\NHibernate.ByteCode.Castle.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
77
Source: "PSourcex64\NHibernate.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
78
Source: "PSourcex64\NHibernate.Search.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
79
Source: "PSourcex64\ParallelExtensionsExtras.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
80
Source: "PSourcex64\Pithos.Client.WPF.exe.config"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
81
Source: "PSourcex64\Pithos.Core.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
82
Source: "PSourcex64\Pithos.Interfaces.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
83
Source: "PSourcex64\Pithos.Network.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
84
Source: "PSourcex64\Pithos.ShellExtensions.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
85
;Source: "PSourcex64\Pithos.ShellExtensions.tlb"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
86
Source: "PSourcex64\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
87
Source: "PSourcex64\System.Threading.Tasks.Dataflow.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
88
Source: "PSourcex64\System.Windows.Interactivity.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
89
Source: "PSourcex64\WPFToolkit.Extended.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
90
Source: "TortoiseOverlays\License.txt"; DestDir: "{cf}/\TortoiseOverlays"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
91
Source: "TortoiseOverlays\TortoiseOverlays.dll"; DestDir: "{cf}/\TortoiseOverlays"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
92
Source: "TortoiseOverlays\icons\XPStyle\AddedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
93
Source: "TortoiseOverlays\icons\XPStyle\ConflictIcon.ico"; DestDir: "{cf}/TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
94
Source: "TortoiseOverlays\icons\XPStyle\DeletedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
95
Source: "TortoiseOverlays\icons\XPStyle\IgnoredIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
96
Source: "TortoiseOverlays\icons\XPStyle\LockedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
97
Source: "TortoiseOverlays\icons\XPStyle\ModifiedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
98
Source: "TortoiseOverlays\icons\XPStyle\NormalIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
99
Source: "TortoiseOverlays\icons\XPStyle\ReadOnlyIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
100
Source: "TortoiseOverlays\icons\XPStyle\UnversionedIcon.ico"; DestDir: "{cf}/\TortoiseOverlays/icons/\XPStyle"; Flags: ignoreversion; Components: RequiredFiles; Languages: english french german spanish greek
101
;32 & 64 Bit
102
;Source: "PSourcex64\Pithos.Client.WPF.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Is64BitInstallMode
103
;Source: "PSource\Pithos.Client.WPF.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode
104
;Redistributables
105
Source: "Redistributables\*"; DestDir: "{tmp}"; Flags: ignoreversion deleteafterinstall
106
Source: "Images\grnet-logo.bmp"; Flags: dontcopy
107
Source: "Images\account.bmp"; Flags: dontcopy
108

    
109
[Icons]
110
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
111
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
112
Name: "{group}\{cm:ProgramOnTheWeb,GRNET}"; Filename: "{#MyURL}"
113
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
114
Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
115
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
116
;Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
117

    
118
[Run]
119
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
120

    
121
[Registry]
122
;Startup 
123
;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Pithos+"; ValueData: """{app}\{#MyAppExeName}"""; Flags: createvalueifdoesntexist uninsdeletevalue
124

    
125
Root: "HKCR"; Subkey: "*\shellex\ContextMenuHandlers\Pithos.FileContextMenu"; ValueData: "b1f1405d-94a1-4692-b72f-fc8caf8b8700"; Flags: createvalueifdoesntexist uninsdeletekey
126
Root: "HKCR"; Subkey: "CLSID\0CFB4119-DABE-4E32-AB2D-2D41873BC599"; ValueData: "PithosContextMenu Class"; Flags: createvalueifdoesntexist uninsdeletekey
127

    
128
[Components]
129
Name: "RequiredFiles"; Description: "Required Files"; Types: Advanced Default; Flags: checkablealone fixed; Languages: english french german greek spanish
130
Name: "Documentation"; Description: "Documentation"; Types: Default Advanced; Flags: dontinheritcheck; Languages: english french german greek spanish
131

    
132
[Types]
133
Name: "Default"; Description: "Default Installation"; Languages: english french german greek spanish
134
Name: "Advanced"; Description: "Custom Installation"; Flags: iscustom; Languages: english german french greek spanish
135

    
136
[Dirs]
137
Name: "{cf}/\TortoiseOverlays"; Components: RequiredFiles; Tasks: desktopicon; Languages: english french german greek spanish
138
Name: "{cf}/\TortoiseOverlays/\icons"
139
Name: "{cf}/\TortoiseOverlays/icons/\XPStyle"
140

    
141

    
142
[Code]
143
const 
144
  WM_QUIT = 18;
145
  MyAppMutex = 'MYAPPMUTEX';
146
var 
147
dotNET40Missing: Boolean;
148
       IsUpdate: boolean;
149
      UsagePage: TOutputMsgWizardPage;
150
      Wz1, Wz2 : TOutputMsgWizardPage;
151

    
152
function IsDotNetDetected(version: string; service: cardinal): boolean;
153
//    'v1.1.4322'     .NET Framework 1.1
154
//    'v2.0.50727'    .NET Framework 2.0
155
//    'v3.0'          .NET Framework 3.0
156
//    'v3.5'          .NET Framework 3.5
157
//    'v4\Client'     .NET Framework 4.0 Client Profile
158
//    'v4\Full'       .NET Framework 4.0 Full Installation
159
// service pack
160
//    0               No service packs required
161
//    1, 2, etc.      Service pack 1, 2, etc. required
162
//    if not IsDotNetDetected('v4\Client', 0) then begin
163
var
164
    key: string;
165
    install, serviceCount: cardinal;
166
    success: boolean;
167
    
168
begin
169
    key := 'SOFTWARE\Microsoft\NET Framework Setup\NDP\' + version;
170
    // .NET 3.0 uses value InstallSuccess in subkey Setup
171
    if Pos('v3.0', version) = 1 then begin
172
        success := RegQueryDWordValue(HKLM, key + '\Setup', 'InstallSuccess', install);
173
    end else begin
174
        success := RegQueryDWordValue(HKLM, key, 'Install', install);
175
    end;
176
    // .NET 4.0 uses value Servicing instead of SP
177
    if Pos('v4', version) = 1 then begin
178
        success := success and RegQueryDWordValue(HKLM, key, 'Servicing', serviceCount);
179
    end else begin
180
        success := success and RegQueryDWordValue(HKLM, key, 'SP', serviceCount);
181
    end;
182
    result := success and (install = 1) and (serviceCount >= service);
183
end;
184

    
185
function InitializeSetup(): Boolean;
186
begin
187
    // Test the presence of .NET 4.0
188
    if (not(RegKeyExists(HKLM, 'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4'))) then
189
        dotNET40Missing := True;
190

    
191
    Result := True;
192
end;
193

    
194
function ShouldInstalldotNET40(): Boolean;
195
begin
196
    Result := dotNET40Missing;
197
end;
198

    
199
procedure CurPageChanged(CurPageID: Integer);
200
begin
201
  if CurPageID = wpInstalling then
202
    IsUpdate := FileExists(ExpandConstant('{app}\{#MyAppExeName}'));
203
end;
204

    
205
function NotAnUpdate: Boolean;
206
begin
207
  result := not IsUpdate;
208
end;
209

    
210
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
211
var
212
mRes : integer;
213
begin
214
  case CurUninstallStep of
215
    usUninstall:
216
      begin
217
        mRes := MsgBox('Do you want to remove your settings?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
218
        if mRes = IDYES then
219
          begin
220
            DelTree(ExpandConstant('{localappdata}')+'\GRNET',true,true,true);
221
          End
222
        else
223
          MsgBox ('Settings will not be removed', mbInformation, MB_OK);        
224
      end;
225
  end;
226
end;
227

    
228
procedure BitmapImageOnClick(Sender: TObject);
229
var
230
  ErrCode: integer;
231
begin
232
  ShellExec('open', 'http://pithos.grnet.gr','', '', SW_SHOW, ewNoWait, ErrCode);
233
end;
234

    
235
procedure CreateTheWizardPages;
236
var
237
  Page: TWizardPage;
238
  Button, FormButton: TNewButton;
239
  BitmapImage,BitmapImage1: TBitmapImage;
240
  BitmapFileName: String;
241
  Memo: TMemo;
242
  LabelWz: TLabel;
243
begin
244

    
245
  Page := CreateCustomPage(wpWelcome, 'GRNET Pithos+ Dev Build {#MyAppVersion}', 'Software License');
246
  BitmapFileName := ExpandConstant('{tmp}\grnet-logo.bmp');
247
  ExtractTemporaryFile(ExtractFileName(BitmapFileName));
248
  
249
  Page.Surface.Color := clWhite;
250
  BitmapImage := TBitmapImage.Create(Page);
251
  BitmapImage.AutoSize := True;
252
  BitmapImage.Bitmap.LoadFromFile(BitmapFileName);
253
  BitmapImage.Cursor := crHand;
254
  BitmapImage.Left := (Page.Surfacewidth - BitmapImage.Width) / 2;
255
  BitmapImage.Top := Page.Surface.Top;
256
  BitmapImage.OnClick := @BitmapImageOnClick;
257
  BitmapImage.Parent := Page.Surface;
258
  
259
  Memo := TMemo.Create(Page);
260
  Memo.Top := BitmapImage.Height;
261
  Memo.Width := Page.SurfaceWidth;
262
  Memo.Height := Page.SurfaceHeight - (BitmapImage.Height)
263
  Memo.ScrollBars := ssVertical;
264
  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
  Memo.Parent := Page.Surface;
266
  
267
  Page := CreateCustomPage(wpInfoAfter, 'First Steps', 'Setup your account');
268
  BitmapFileName := ExpandConstant('{tmp}\account.bmp');
269
  ExtractTemporaryFile(ExtractFileName(BitmapFileName));
270

    
271
  Page.Surface.Color := clWhite;
272
  BitmapImage1 := TBitmapImage.Create(Page);
273
  BitmapImage1.width := Page.SurfaceWidth;
274
  BitmapImage1.height := PAge.SurfaceHeight;
275
  BitmapImage1.Bitmap.LoadFromFile(BitmapFileName);
276
  //BitmapImage1.Cursor := crHand;
277
  BitmapImage1.Left := 0 //(Page.Surfacewidth - BitmapImage.Width) / 2;
278
  BitmapImage1.Top := Page.Surface.Top;
279
  //BitmapImage1.OnClick := @BitmapImageOnClick;
280
  BitmapImage1.Parent := Page.Surface;
281
  
282
  LabelWz := Tlabel.Create(Page);
283
  LabelWz.Top := 0;
284
  LabelWz.Caption := 'To setup your account right click on the Pithos+ icon in the taskbar.';
285
  LabelWz.Parent := Page.Surface;
286
end;
287

    
288
procedure InitializeWizard;
289
var
290
winHwnd: longint;
291
retVal : boolean;
292
strProg: string;
293
begin
294
  winHwnd := FindWindowByClassName('{#MyAppExeName}');
295
  if winHwnd<>0 then begin { no module found or ignored pressed}
296
      postmessage(winHwnd,WM_QUIT,0,0);
297
   //abort();  
298
  end;   
299

    
300
  CreateTheWizardPages;
301
end;
302

    
303
[Run]
304
Filename: {tmp}\dotNetFx40_Client_setup.exe; Description: Install Microsoft .Net Framework 4.0;    Parameters: /q /noreboot; Flags: skipifdoesntexist; Check: ShouldInstalldotNET40