Reviewed by Kevin Ollivier.
[WebKit-https.git] / WebKitTools / wx / packaging / wxWebKitInstaller.iss.in
1 ; Installer script for wxWebKit for wxPython
2
3 [Setup]
4 AppName=wxWebKit
5 AppId=wxWebKit
6 AppVersion=<<VERSION>>
7 AppVerName=wxWebKit <<VERSION>>
8 AppCopyright=LGPL
9 DefaultDirName={code:GetInstallDir|c:\DoNotInstallHere}
10 AppPublisher=wxWebKit Project
11 AppPublisherURL=http://wxwebkit.wxcommunity.com/pmwiki/
12 AppSupportURL=http://wxwebkit.wxcommunity.com/pmwiki/
13 AppUpdatesURL=http://wxwebkit.wxcommunity.com/pmwiki/
14 UninstallDisplayName=wxWebKit <<VERSION>>
15 UninstallFilesDir={app}\Uninstall
16
17 Compression=bzip/9
18 SourceDir=<<ROOTDIR>>
19 OutputDir=win-installer
20 OutputBaseFilename=wxWebKit-wx2.8-Py<<PYTHONVER>>-<<VERSION>>
21 DisableStartupPrompt=yes
22 AllowNoIcons=yes
23 DisableProgramGroupPage=yes
24 DisableReadyPage=yes
25
26 [Files]
27 <<FILES>>
28
29 [Messages]
30 WelcomeLabel1=Welcome to the wxWebKit for wxPython Setup Wizard
31
32 [Code]
33
34 program Setup;
35 var
36     PythonDir  : String;
37     InstallDir : String;
38
39
40 function InitializeSetup(): Boolean;
41 begin
42
43     (* -------------------------------------------------------------- *)
44     (* Figure out what to use as a default installation dir           *)
45
46     if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
47                                'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
48                                '', PythonDir) then begin
49
50         if not RegQueryStringValue(HKEY_CURRENT_USER,
51                                    'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
52                                    '', PythonDir) then begin
53
54             MsgBox('No installation of Python <<PYTHONVER>> found in registry.' + #13 +
55                    'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
56                    mbConfirmation, MB_OK);
57             PythonDir := 'C:\Put a directory on PYTHONPATH here\';
58         end;
59     end;
60     InstallDir := PythonDir + '\Lib\site-packages\wx-2.8-msw-unicode\wx\';
61     Result := True;
62 end;
63
64
65
66 function GetPythonDir(Default: String): String;
67 begin
68     Result := PythonDir;
69 end;
70
71
72
73 function GetInstallDir(Default: String): String;
74 begin
75     Result := InstallDir;
76 end;
77
78 begin
79 end.