-
Notifications
You must be signed in to change notification settings - Fork 34
/
face(andmore)tracker-setup.iss
97 lines (83 loc) · 4.48 KB
/
face(andmore)tracker-setup.iss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{97BA0788-E123-471D-8BBA-2FE397C66899}
AppName=OpenCV Face (and more) Tracker
AppVersion=V1.05
DefaultDirName={pf}\Face(andmore)Tracker
DefaultGroupName=Face(andmore)Tracker
OutputBaseFilename=face(andmore)tracker-setup
Compression=lzma
SolidCompression=yes
VersionInfoVersion= 1.0.5
;ArchitecturesInstallIn64BitMode=x64
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
;Source: "Face(andmore)Tracker\bin\x64\Release\Face(andmore)Tracker.exe"; DestDir: "{app}"; Check: Is64BitInstallMode;Flags: ignoreversion
Source: "Face(andmore)Tracker\bin\Release\Face(andmore)Tracker.exe"; DestDir: "{app}";
Source: "Face(andmore)Tracker\bin\Release\*"; Excludes: "*.pdb,*.vshost*,AForge.xml,AForge.Video.xml,AForge.Video.DirectShow.xml,Emgu.CV.xml,Emgu.Util.xml"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "Face(andmore)Tracker\bin\x86\Release\*"; Excludes: "*.pdb,*.vshost*,AForge.xml,AForge.Video.xml,AForge.Video.DirectShow.xml,Emgu.CV.xml,Emgu.Util.xml"; DestDir: "{app}"; Check: not Is64BitInstallMode; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "installers\dotNetFx40_Full_setup.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallFramework; Check: FrameworkIsNotInstalled
Source: "installers\vcredist_x64.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallVCRedistx64; Check: Is64BitInstallMode and VCRedistx64NotInstalled
Source: "installers\vcredist_x86.exe"; DestDir: {tmp}; Flags: deleteafterinstall; AfterInstall: InstallVCRedistx86; Check: (not Is64BitInstallMode) and VCRedistx86NotInstalled
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\Face(andmore)Tracker"; Filename: "{app}\Face(andmore)Tracker.exe"
Name: "{commondesktop}\Face(andmore)Tracker"; Filename: "{app}\Face(andmore)Tracker.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\Face(andmore)Tracker.exe"; Description: "{cm:LaunchProgram,Face(andmore)Tracker}"; Flags: nowait postinstall skipifsilent
Filename: "http://blog.a9t9.com/p/opencv-face-andmore-tracker.html?scr=installer"; Flags: shellexec runasoriginaluser postinstall; Description: "Show help page (online)"
[Code]
function FrameworkIsNotInstalled: Boolean;
begin
Result := not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\.NETFramework\policy\v4.0');
end;
function VCRedistx64NotInstalled: Boolean;
begin
Result := (not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x64')) and
(not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x64'));
end;
function VCRedistx86NotInstalled: Boolean;
begin
Result := (not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\VC\VCRedist\x86')) and
(not RegKeyExists(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\10.0\VC\VCRedist\x86'));
end;
procedure InstallVCRedistx86;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{tmp}\vcredist_x86.exe'), '/quiet /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
// you can interact with the user that the installation failed
MsgBox('VC++ redistributable installation failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
end;
end;
procedure InstallVCRedistx64;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{tmp}\vcredist_x64.exe'), '/quiet /norestart', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
// you can interact with the user that the installation failed
MsgBox('VC++ redistributable installation failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
end;
end;
procedure InstallFramework;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{tmp}\dotNetFx40_Full_setup.exe'), '/q /noreboot', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
// you can interact with the user that the installation failed
MsgBox('.NET installation failed with code: ' + IntToStr(ResultCode) + '.',
mbError, MB_OK);
end;
end;