]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/make_installer.py
1 # -*- coding: iso-8859-1 -*-
2 #----------------------------------------------------------------------
3 # Name: make_installer.py
4 # Purpose: A script to create the wxPython windows installer
8 # Created: 30-April-2001
10 # Copyright: (c) 2003 by Total Control Software
11 # Licence: wxWindows license
12 #----------------------------------------------------------------------
15 This script will generate a setup script for InnoSetup and then run it
16 to make the installer executable. If all goes right the proper versions
17 of Python and wxWindows (including hybrid/final settings) will all be
18 calculated based on what _core_.pyd imports and an appropriate installer
26 # default InnoSetup installer location
27 ISCC
= r
"%s\InnoSetup5\ISCC.exe %s"
29 if os
.environ
.has_key("INNO5"):
30 ISCC
= os
.environ
["INNO5"]
33 #----------------------------------------------------------------------
38 AppName = wxPython%(SHORTVER)s-%(CHARTYPE)s-%(PYVER)s
39 AppVerName = wxPython %(VERSION)s (%(CHARTYPE)s) for Python %(PYTHONVER)s
40 OutputBaseFilename = wxPython%(SHORTVER)s-win32-%(CHARTYPE)s-%(VERSION)s-%(PYVER)s
41 AppCopyright = Copyright © 2006 Total Control Software
42 DefaultDirName = {code:GetInstallDir|c:\DoNotInstallHere}
43 DefaultGroupName = wxPython %(VERSION)s (%(CHARTYPE)s) for Python %(PYTHONVER)s
44 PrivilegesRequired = none
46 DisableStartupPrompt = true
48 SolidCompression = yes
50 DisableReadyMemo = true
51 DisableReadyPage = true
52 ;;DisableDirPage = true
53 DisableProgramGroupPage = true
54 UsePreviousAppDir = no
57 AppPublisher = Total Control Software
58 AppPublisherURL = http://wxPython.org/
59 AppSupportURL = http://wxPython.org/maillist.php
60 AppUpdatesURL = http://wxPython.org/download.php
61 AppVersion = %(VERSION)s-%(CHARTYPE)s
63 UninstallFilesDir = {app}\%(PKGDIR)s
64 LicenseFile = licence\licence.txt
67 ;;------------------------------------------------------------
70 Name: core; Description: "wxPython modules and library"; Types: full custom; Flags: fixed
71 Name: manifest; Description: "Manifest files for XP Themed LnF"; Types: full
72 Name: pthfile; Description: "Make this install be the default wxPython"; Types: full
74 ;;------------------------------------------------------------
78 Source: "%(WXDIR)s\lib\vc_dll\wx*%(WXDLLVER)s_*.dll"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: replacesameversion
79 Source: "distrib\msw\gdiplus.dll"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: replacesameversion
83 ;; The old way, only installs on pre-XP systems...
84 ;;Source: "distrib\msw\gdiplus.dll"; DestDir: "{app}\%(PKGDIR)s\wx"; Check: OnlyBeforeXP; Flags: sharedfile; Components: core
87 Source: "wx\_activex.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
88 Source: "wx\_calendar.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
89 Source: "wx\_combo.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
90 Source: "wx\_controls_.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
91 Source: "wx\_core_.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
92 Source: "wx\_gdi_.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
93 Source: "wx\_animate.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
94 Source: "wx\_gizmos.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
95 Source: "wx\_glcanvas.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
96 Source: "wx\_grid.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
97 Source: "wx\_html.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
98 Source: "wx\_media.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
99 Source: "wx\_misc_.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
100 Source: "wx\_stc.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
101 Source: "wx\_webkit.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
102 Source: "wx\_windows_.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
103 Source: "wx\_wizard.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
104 Source: "wx\_xrc.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
105 Source: "wx\_aui.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
106 Source: "wx\_richtext.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
107 ;;Source: "wx\_iewin.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
108 ;;Source: "wx\_ogl.pyd"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: comparetimestamp
111 Source: "wx\*.py"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core
112 Source: "wx\build\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\build"; Components: core
113 Source: "wx\lib\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib"; Components: core
114 Source: "wx\lib\analogclock\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\analogclock"; Components: core
115 Source: "wx\lib\analogclock\lib_setup\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\analogclock\lib_setup"; Components: core
116 Source: "wx\lib\art\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\art"; Components: core
117 Source: "wx\lib\colourchooser\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\colourchooser"; Components: core
118 Source: "wx\lib\editor\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\editor"; Components: core
119 Source: "wx\lib\editor\*.txt"; DestDir: "{app}\%(PKGDIR)s\wx\lib\editor"; Components: core
120 Source: "wx\lib\mixins\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\mixins"; Components: core
121 Source: "wx\lib\masked\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\masked"; Components: core
122 Source: "wx\lib\ogl\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\ogl"; Components: core
123 Source: "wx\lib\floatcanvas\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\floatcanvas"; Components: core
124 Source: "wx\lib\floatcanvas\Utilities\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\lib\floatcanvas\Utilities"; Components: core
125 Source: "wx\py\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\py"; Components: core
126 Source: "wx\py\*.txt"; DestDir: "{app}\%(PKGDIR)s\wx\py"; Components: core
127 Source: "wx\py\*.ico"; DestDir: "{app}\%(PKGDIR)s\wx\py"; Components: core
128 Source: "wx\py\*.png"; DestDir: "{app}\%(PKGDIR)s\wx\py"; Components: core
129 Source: "wx\py\tests\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\py\tests"; Components: core
130 Source: "wx\tools\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\tools"; Components: core
131 Source: "wx\tools\XRCed\*.txt"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
132 Source: "wx\tools\XRCed\sawfishrc"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
133 Source: "wx\tools\XRCed\*.py"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
134 Source: "wx\tools\XRCed\*.xrc"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
135 Source: "wx\tools\XRCed\*.ico"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
136 Source: "wx\tools\XRCed\*.png"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
137 Source: "wx\tools\XRCed\*.sh"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed"; Components: core
138 Source: "wx\tools\XRCed\src-images\*.png"; DestDir: "{app}\%(PKGDIR)s\wx\tools\XRCed\src-images"; Components: core
141 Source: "wxPython\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython"; Components: core
142 Source: "wxPython\lib\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython\lib"; Components: core
143 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython\lib\colourchooser"; Components: core
144 Source: "wxPython\lib\editor\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython\lib\editor"; Components: core
145 Source: "wxPython\lib\mixins\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython\lib\mixins"; Components: core
146 Source: "wxPython\tools\*.py"; DestDir: "{app}\%(PKGDIR)s\wxPython\tools"; Components: core
149 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest"; Flags: sharedfile; Components: manifest
150 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest"; Flags: sharedfile; Components: manifest
151 Source: "wxversion\wxversion.py"; DestDir: "{app}"; Flags: sharedfile; Components: core
152 Source: "wxaddons\*.py"; DestDir: "{app}\wxaddons"; Flags: sharedfile; Components: core
153 Source: "src\wx.pth"; DestDir: "{app}"; Flags: sharedfile; Components: pthfile
158 Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
159 Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
160 Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
161 Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
162 Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
163 Source: "scripts\pyalacarte"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
164 Source: "scripts\pyalamode"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
165 Source: "scripts\pyshell"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
166 Source: "scripts\pycrust"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
167 Source: "scripts\pywrap"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
168 Source: "scripts\pywxrc"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
169 Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
172 Source: "distrib\README.win32.txt"; DestDir: "{app}\%(PKGDIR)s\docs"; Flags: isreadme; Components: core
173 Source: "licence\*.txt"; DestDir: "{app}\%(PKGDIR)s\docs\licence"; Components: core
174 Source: "docs\CHANGES.*"; DestDir: "{app}\%(PKGDIR)s\docs"; Components: core
175 Source: "docs\MigrationGuide.*"; DestDir: "{app}\%(PKGDIR)s\docs"; Components: core
176 Source: "docs\default.css"; DestDir: "{app}\%(PKGDIR)s\docs"; Components: core
180 ;;------------------------------------------------------------
183 ;; Compile the .py files
184 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "{code:GetPythonDir}\Lib\compileall.py {app}\%(PKGDIR)s"; Description: "Compile Python .py files to .pyc"; Flags: postinstall; Components: core
186 ;; Recreate the tool scripts to use the paths on the users machine
187 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "CreateBatchFiles.py"; WorkingDir: "{code:GetPythonDir}\Scripts"; Description: "Create batch files for tool scripts"; Flags: postinstall; Components: core
192 ;;------------------------------------------------------------
195 Type: files; Name: "{app}\%(PKGDIR)s\wx\*.pyc";
196 Type: files; Name: "{app}\%(PKGDIR)s\wx\*.pyo";
197 Type: files; Name: "{app}\%(PKGDIR)s\wx\*.pyd";
198 Type: files; Name: "{app}\%(PKGDIR)s\wx\build\*.pyc";
199 Type: files; Name: "{app}\%(PKGDIR)s\wx\build\*.pyo";
200 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\*.pyc";
201 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\*.pyo";
202 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\analogclock\*.pyc";
203 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\analogclock\*.pyo";
204 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\analogclock\lib_setup\*.pyc";
205 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\analogclock\lib_setup\*.pyo";
206 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\art\*.pyc";
207 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\art\*.pyo";
208 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\colourchooser\*.pyc";
209 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\colourchooser\*.pyo";
210 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\editor\*.pyc";
211 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\editor\*.pyo";
212 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\mixins\*.pyc";
213 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\mixins\*.pyo";
214 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\masked\*.pyc";
215 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\masked\*.pyo";
216 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\ogl\*.pyc";
217 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\ogl\*.pyo";
218 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\floatcanvas\*.pyc";
219 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\floatcanvas\*.pyo";
220 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\floatcanvas\Utilities\*.pyc";
221 Type: files; Name: "{app}\%(PKGDIR)s\wx\lib\floatcanvas\Utilities\*.pyo";
223 Type: files; Name: "{app}\%(PKGDIR)s\wx\py\*.pyc";
224 Type: files; Name: "{app}\%(PKGDIR)s\wx\py\*.pyo";
225 Type: files; Name: "{app}\%(PKGDIR)s\wx\py\tests\*.pyc";
226 Type: files; Name: "{app}\%(PKGDIR)s\wx\py\tests\*.pyo";
227 Type: files; Name: "{app}\%(PKGDIR)s\wx\tools\*.pyc";
228 Type: files; Name: "{app}\%(PKGDIR)s\wx\tools\*.pyo";
229 Type: files; Name: "{app}\%(PKGDIR)s\wx\tools\XRCed\*.pyc";
230 Type: files; Name: "{app}\%(PKGDIR)s\wx\tools\XRCed\*.pyo";
233 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\*.pyc";
234 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\*.pyo";
235 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\*.pyc";
236 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\*.pyo";
237 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\colourchooser\*.pyc";
238 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\colourchooser\*.pyo";
239 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\editor\*.pyc";
240 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\editor\*.pyo";
241 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\mixins\*.pyc";
242 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\lib\mixins\*.pyo";
243 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyc";
244 Type: files; Name: "{app}\%(PKGDIR)s\wxPython\tools\*.pyo";
246 Type: files; Name: "{app}\wxversion.pyc";
247 Type: files; Name: "{app}\wxversion.pyo";
249 Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyc";
250 Type: files; Name: "{app}\%(PKGDIR)s\wxaddons\*.pyo";
255 ;----------------------------------------------------------------------
265 function InitializeSetup(): Boolean;
268 (* -------------------------------------------------------------- *)
269 (* Figure out what to use as a default installation dir *)
271 if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
272 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
273 '', PythonDir) then begin
275 if not RegQueryStringValue(HKEY_CURRENT_USER,
276 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
277 '', PythonDir) then begin
279 MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 +
280 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
281 mbConfirmation, MB_OK);
282 PythonDir := 'C:\Put a directory on PYTHONPATH here\';
285 InstallDir := PythonDir;
293 function GetPythonDir(Default: String): String;
300 function GetInstallDir(Default: String): String;
302 Result := InstallDir;
307 function UninstallOld(FileName: String): Boolean;
312 if FileExists(FileName) then begin
314 ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
315 'is recommended that it be uninstalled first.' + #13#13 +
317 mbConfirmation, MB_YESNO);
318 if ResultCode = IDYES then begin
319 Exec(FileName, '/SILENT', WizardDirValue(), SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
327 function NextButtonClick(CurPage: Integer): Boolean;
330 if CurPage <> wpSelectDir then Exit;
331 if not UninstallOld(WizardDirValue() + '\wxPython\unins000.exe') then
332 if not UninstallOld(WizardDirValue() + '\wx\unins000.exe') then
333 UninstallOld(WizardDirValue() + '\%(PKGDIR)s\unins000.exe')
338 function OnlyBeforeXP(): Boolean;
340 Version: TWindowsVersion;
342 GetWindowsVersionEx(Version);
344 if (Version.Major > 5) or ((Version.Major = 5) and (Version.Minor >= 1)) then begin
355 #----------------------------------------------------------------------
357 ISS_DocDemo_Template
= r
'''
360 AppName = wxPython%(SHORTVER)s-docs-demos
361 AppVerName = wxPython Docs and Demos %(VERSION)s
362 OutputBaseFilename = wxPython%(SHORTVER)s-win32-docs-demos-%(VERSION)s
363 AppCopyright = Copyright © 2006 Total Control Software
364 DefaultDirName = {pf}\wxPython%(SHORTVER)s Docs and Demos
365 DefaultGroupName = wxPython%(SHORTVER)s Docs Demos and Tools
366 PrivilegesRequired = none
369 DisableStartupPrompt = true
371 DirExistsWarning = no
372 DisableReadyMemo = true
373 DisableReadyPage = true
374 ;;DisableDirPage = true
375 DisableProgramGroupPage = no
376 UsePreviousAppDir = no
377 UsePreviousGroup = no
379 AppPublisher = Total Control Software
380 AppPublisherURL = http://wxPython.org/
381 AppSupportURL = http://wxPython.org/maillist.php
382 AppUpdatesURL = http://wxPython.org/download.php
383 AppVersion = %(VERSION)s
385 UninstallDisplayIcon = {app}\demo\wxpdemo.ico
386 UninstallFilesDir = {app}
387 LicenseFile = licence\licence.txt
392 ;;------------------------------------------------------------
396 Source: "demo\demo.py"; DestDir: "{app}\demo"; DestName: "demo.pyw";
397 Source: "demo\*.py"; DestDir: "{app}\demo";
398 Source: "demo\*.xml"; DestDir: "{app}\demo";
399 Source: "demo\*.txt"; DestDir: "{app}\demo";
400 Source: "demo\*.ico"; DestDir: "{app}\demo";
402 Source: "demo\bitmaps\*.bmp"; DestDir: "{app}\demo\bitmaps";
403 Source: "demo\bitmaps\*.gif"; DestDir: "{app}\demo\bitmaps";
404 Source: "demo\bitmaps\*.jpg"; DestDir: "{app}\demo\bitmaps";
405 Source: "demo\bitmaps\*.png"; DestDir: "{app}\demo\bitmaps";
406 Source: "demo\bitmaps\*.ico"; DestDir: "{app}\demo\bitmaps";
408 Source: "demo\bmp_source\*.gif"; DestDir: "{app}\demo\bmp_source";
409 Source: "demo\bmp_source\*.bmp"; DestDir: "{app}\demo\bmp_source";
410 Source: "demo\bmp_source\*.jpg"; DestDir: "{app}\demo\bmp_source";
411 Source: "demo\bmp_source\*.png"; DestDir: "{app}\demo\bmp_source";
412 Source: "demo\bmp_source\*.ico"; DestDir: "{app}\demo\bmp_source";
414 Source: "demo\data\*.htm"; DestDir: "{app}\demo\data";
415 Source: "demo\data\*.html"; DestDir: "{app}\demo\data";
416 Source: "demo\data\*.py"; DestDir: "{app}\demo\data";
417 Source: "demo\data\*.png"; DestDir: "{app}\demo\data";
418 Source: "demo\data\*.bmp"; DestDir: "{app}\demo\data";
419 Source: "demo\data\*.dat"; DestDir: "{app}\demo\data";
420 Source: "demo\data\*.txt"; DestDir: "{app}\demo\data";
421 Source: "demo\data\*.wav"; DestDir: "{app}\demo\data";
422 Source: "demo\data\*.wdr"; DestDir: "{app}\demo\data";
423 Source: "demo\data\*.xrc"; DestDir: "{app}\demo\data";
424 Source: "demo\data\*.swf"; DestDir: "{app}\demo\data";
425 Source: "demo\data\*.mpg"; DestDir: "{app}\demo\data";
427 Source: "demo\data\locale-src\*.po"; DestDir: "{app}\demo\data\locale-src";
428 Source: "demo\data\locale-src\install"; DestDir: "{app}\demo\data\locale-src";
429 Source: "demo\data\locale\af\LC_MESSAGES\*.mo"; DestDir: "{app}\demo\data\locale\af\LC_MESSAGES";
430 Source: "demo\data\locale\de\LC_MESSAGES\*.mo"; DestDir: "{app}\demo\data\locale\de\LC_MESSAGES";
431 Source: "demo\data\locale\es\LC_MESSAGES\*.mo"; DestDir: "{app}\demo\data\locale\es\LC_MESSAGES";
432 Source: "demo\data\locale\fr\LC_MESSAGES\*.mo"; DestDir: "{app}\demo\data\locale\fr\LC_MESSAGES";
433 Source: "demo\data\locale\it\LC_MESSAGES\*.mo"; DestDir: "{app}\demo\data\locale\it\LC_MESSAGES";
435 ;;Source: "demo\dllwidget\*.cpp"; DestDir: "{app}\demo\dllwidget";
436 ;;Source: "demo\dllwidget\*.py"; DestDir: "{app}\demo\dllwidget";
437 ;;Source: "demo\dllwidget\Makefile"; DestDir: "{app}\demo\dllwidget";
438 ;;Source: "demo\dllwidget\makefile.*"; DestDir: "{app}\demo\dllwidget";
440 Source: "licence\*.txt"; DestDir: "{app}\docs\licence";
441 Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\docs";
442 ;;Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\docs";
443 Source: "docs\README.txt"; DestDir: "{app}\docs"; Flags: isreadme;
444 Source: "docs\*.txt"; DestDir: "{app}\docs";
445 Source: "docs\*.css"; DestDir: "{app}\docs";
446 Source: "docs\*.html"; DestDir: "{app}\docs";
447 Source: "docs\*.conf"; DestDir: "{app}\docs";
448 Source: "docs\screenshots\*.png"; DestDir: "{app}\docs\screenshots";
451 Source: "samples\doodle\*.py"; DestDir: "{app}\samples\doodle";
452 Source: "samples\doodle\*.txt"; DestDir: "{app}\samples\doodle";
453 Source: "samples\doodle\*.bat"; DestDir: "{app}\samples\doodle";
454 Source: "samples\doodle\sample.ddl"; DestDir: "{app}\samples\doodle";
455 Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\samples\doodle";
457 Source: "samples\docview\*.py"; DestDir: "{app}\samples\docview";
458 Source: "samples\pydocview\*.py"; DestDir: "{app}\samples\pydocview";
459 Source: "samples\pydocview\*.png"; DestDir: "{app}\samples\pydocview";
460 Source: "samples\pydocview\*.txt"; DestDir: "{app}\samples\pydocview";
462 Source: "samples\ide\*.py"; DestDir: "{app}\samples\ide";
463 Source: "samples\ide\activegrid\*.py"; DestDir: "{app}\samples\ide\activegrid";
464 Source: "samples\ide\activegrid\tool\*.py"; DestDir: "{app}\samples\ide\activegrid\tool";
465 Source: "samples\ide\activegrid\tool\data\*.txt"; DestDir: "{app}\samples\ide\activegrid\tool\data";
466 Source: "samples\ide\activegrid\util\*.py"; DestDir: "{app}\samples\ide\activegrid\util";
467 Source: "samples\ide\activegrid\model\*.py"; DestDir: "{app}\samples\ide\activegrid\model";
469 Source: "samples\embedded\*.py"; DestDir: "{app}\samples\embedded";
470 Source: "samples\embedded\*.cpp"; DestDir: "{app}\samples\embedded";
471 Source: "samples\embedded\*.txt"; DestDir: "{app}\samples\embedded";
472 Source: "samples\embedded\*.vc"; DestDir: "{app}\samples\embedded";
473 Source: "samples\embedded\*.unx"; DestDir: "{app}\samples\embedded";
474 Source: "samples\embedded\*.ico"; DestDir: "{app}\samples\embedded";
475 Source: "samples\embedded\*.xpm"; DestDir: "{app}\samples\embedded";
476 Source: "samples\embedded\*.rc"; DestDir: "{app}\samples\embedded";
478 Source: "samples\frogedit\*.py"; DestDir: "{app}\samples\frogedit";
480 Source: "samples\hangman\*.py"; DestDir: "{app}\samples\hangman";
482 Source: "samples\mainloop\*.py"; DestDir: "{app}\samples\mainloop";
484 Source: "samples\pySketch\*.py"; DestDir: "{app}\samples\pySketch";
485 Source: "samples\pySketch\images\*.bmp"; DestDir: "{app}\samples\pySketch\images";
487 Source: "samples\simple\*.py"; DestDir: "{app}\samples\simple";
489 Source: "samples\StyleEditor\*.txt"; DestDir: "{app}\samples\StyleEditor";
490 Source: "samples\StyleEditor\*.py"; DestDir: "{app}\samples\StyleEditor";
491 Source: "samples\StyleEditor\*.cfg"; DestDir: "{app}\samples\StyleEditor";
493 Source: "samples\wxProject\*.txt"; DestDir: "{app}\samples\wxProject";
494 Source: "samples\wxProject\*.py"; DestDir: "{app}\samples\wxProject";
496 Source: "samples\wxPIA_book\*"; DestDir: "{app}\wxPython\samples\wxPIA_book";
497 Source: "samples\wxPIA_book\Chapter-01\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-01";
498 Source: "samples\wxPIA_book\Chapter-02\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-02";
499 Source: "samples\wxPIA_book\Chapter-03\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-03";
500 Source: "samples\wxPIA_book\Chapter-04\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-04";
501 Source: "samples\wxPIA_book\Chapter-05\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-05";
502 Source: "samples\wxPIA_book\Chapter-06\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-06";
503 Source: "samples\wxPIA_book\Chapter-07\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-07";
504 Source: "samples\wxPIA_book\Chapter-08\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-08";
505 Source: "samples\wxPIA_book\Chapter-09\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-09";
506 Source: "samples\wxPIA_book\Chapter-10\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-10";
507 Source: "samples\wxPIA_book\Chapter-11\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-11";
508 Source: "samples\wxPIA_book\Chapter-12\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-12";
509 Source: "samples\wxPIA_book\Chapter-13\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-13";
510 Source: "samples\wxPIA_book\Chapter-14\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-14";
511 Source: "samples\wxPIA_book\Chapter-15\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-15";
512 Source: "samples\wxPIA_book\Chapter-16\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-16";
513 Source: "samples\wxPIA_book\Chapter-16\helpfiles\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-16\helpfiles";
514 Source: "samples\wxPIA_book\Chapter-17\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-17";
515 Source: "samples\wxPIA_book\Chapter-18\*"; DestDir: "{app}\wxPython\samples\wxPIA_book\Chapter-18";
518 Source: "scripts\pyshell"; DestDir: "{app}\scripts"; DestName: "pyshell.pyw";
519 Source: "scripts\pycrust"; DestDir: "{app}\scripts"; DestName: "pycrust.pyw";
520 Source: "scripts\pyalamode"; DestDir: "{app}\scripts"; DestName: "pyalamode.pyw";
521 Source: "scripts\pyalacarte"; DestDir: "{app}\scripts"; DestName: "pyalacarte.pyw";
522 Source: "scripts\xrced"; DestDir: "{app}\scripts"; DestName: "xrced.pyw";
524 Source: "wx\py\PyCrust.ico"; DestDir: "{app}\scripts";
525 Source: "wx\tools\XRCed\xrced.ico"; DestDir: "{app}\scripts";
528 ;;------------------------------------------------------------
531 Name: "{group}\Run the wxPython DEMO"; Filename: "{app}\demo\demo.pyw"; WorkingDir: "{app}\demo"; IconFilename: "{app}\demo\wxpdemo.ico";
532 Name: "{group}\PyCrust"; Filename: "{app}\scripts\pycrust.pyw"; WorkingDir: "c:\"; IconFilename: "{app}\scripts\PyCrust.ico";
533 Name: "{group}\PyShell"; Filename: "{app}\scripts\pyshell.pyw"; WorkingDir: "c:\"; IconFilename: "{app}\scripts\PyCrust.ico";
534 Name: "{group}\PyAlaMode"; Filename: "{app}\scripts\pyalamode.pyw"; WorkingDir: "c:\"; IconFilename: "{app}\scripts\PyCrust.ico";
535 Name: "{group}\PyAlaCarte"; Filename: "{app}\scripts\pyalacarte.pyw"; WorkingDir: "c:\"; IconFilename: "{app}\scripts\PyCrust.ico";
536 Name: "{group}\Resource Editor"; Filename: "{app}\scripts\xrced.pyw"; WorkingDir: "c:\"; IconFilename: "{app}\scripts\xrced.ico";
538 Name: "{group}\Sample Apps"; Filename: "{app}\samples";
540 Name: "{group}\wxWidgets Reference"; Filename: "{app}\docs\wx.chm";
541 Name: "{group}\Migration Guide"; Filename: "{app}\docs\MigrationGuide.html";
542 Name: "{group}\Recent Changes"; Filename: "{app}\docs\CHANGES.html";
543 Name: "{group}\Other Docs"; Filename: "{app}\docs";
545 Name: "{group}\Uninstall wxPython Docs and Demos"; Filename: "{uninstallexe}";
550 ;;------------------------------------------------------------
553 Type: files; Name: "{app}\demo\*.pyc";
554 Type: files; Name: "{app}\demo\*.pyo";
555 Type: files; Name: "{app}\demo\data\showTips";
556 Type: files; Name: "{app}\demo\data\*.pyc";
557 Type: files; Name: "{app}\demo\data\*.pyo";
558 Type: files; Name: "{app}\demo\dllwidget\*.pyc";
559 Type: files; Name: "{app}\demo\dllwidget\*.pyo";
561 Type: files; Name: "{app}\samples\doodle\*.pyc";
562 Type: files; Name: "{app}\samples\doodle\*.pyo";
563 Type: files; Name: "{app}\samples\embedded\*.pyc";
564 Type: files; Name: "{app}\samples\embedded\*.pyo";
565 Type: files; Name: "{app}\samples\frogedit\*.pyc";
566 Type: files; Name: "{app}\samples\frogedit\*.pyo";
567 Type: files; Name: "{app}\samples\hangman\*.pyc";
568 Type: files; Name: "{app}\samples\hangman\*.pyo";
569 Type: files; Name: "{app}\samples\hangman\*.txt";
570 Type: files; Name: "{app}\samples\mainloop\*.pyc";
571 Type: files; Name: "{app}\samples\mainloop\*.pyo";
572 Type: files; Name: "{app}\samples\pySketch\*.pyc";
573 Type: files; Name: "{app}\samples\pySketch\*.pyo";
574 Type: files; Name: "{app}\samples\simple\*.pyc";
575 Type: files; Name: "{app}\samples\simple\*.pyo";
576 Type: files; Name: "{app}\samples\StyleEditor\*.pyc";
577 Type: files; Name: "{app}\samples\StyleEditor\*.pyo";
578 Type: files; Name: "{app}\samples\wx_examples\basic\*.pyc";
579 Type: files; Name: "{app}\samples\wx_examples\basic\*.pyo";
580 Type: files; Name: "{app}\samples\wx_examples\hello\*.pyc";
581 Type: files; Name: "{app}\samples\wx_examples\hello\*.pyo";
582 Type: files; Name: "{app}\samples\wxProject\*.pyc";
583 Type: files; Name: "{app}\samples\wxProject\*.pyo";
585 Type: files; Name: "{app}\samples\ide\*.pyc";
586 Type: files; Name: "{app}\samples\ide\activegrid\*.pyc";
587 Type: files; Name: "{app}\samples\ide\activegrid\tool\*.pyc";
588 Type: files; Name: "{app}\samples\ide\activegrid\util\*.pyc";
589 Type: files; Name: "{app}\samples\ide\activegrid\model\*.pyc";
590 Type: files; Name: "{app}\samples\ide\*.pyo";
591 Type: files; Name: "{app}\samples\ide\activegrid\*.pyo";
592 Type: files; Name: "{app}\samples\ide\activegrid\tool\*.pyo";
593 Type: files; Name: "{app}\samples\ide\activegrid\util\*.pyo";
594 Type: files; Name: "{app}\samples\ide\activegrid\model\*.pyo";
596 Type: files; Name: "{app}\samples\docview\*.pyc";
597 Type: files; Name: "{app}\samples\pydocview\*.pyc";
598 Type: files; Name: "{app}\samples\docview\*.pyo";
599 Type: files; Name: "{app}\samples\pydocview\*.pyo";
601 Type: files; Name: "{app}\samples\wxPIA_book\*";
602 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-01\*";
603 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-02\*";
604 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-03\*";
605 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-04\*";
606 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-05\*";
607 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-06\*";
608 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-07\*";
609 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-08\*";
610 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-09\*";
611 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-10\*";
612 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-11\*";
613 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-12\*";
614 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-13\*";
615 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-14\*";
616 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-15\*";
617 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-16\*";
618 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-16\helpfiles\*";
619 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-17\*";
620 Type: files; Name: "{app}\samples\wxPIA_book\Chapter-18\*";
625 #----------------------------------------------------------------------
629 WXDLLVER
= PYTHONVER
= None
631 proc
= os
.popen(r
"dumpbin /imports wx\_core_.pyd", "r")
632 lines
= proc
.readlines()
635 if line
.startswith(" wxmsw"):
636 WXDLLVER
= line
[9:14].split('_')[0]
638 if line
.startswith(" python"):
639 PYTHONVER
= line
[10] + '.' + line
[11]
641 return WXDLLVER
, PYTHONVER
644 #----------------------------------------------------------------------
646 locale_template
= 'Source: "%s"; DestDir: "{app}\%s\%s"; Components: core'
648 def build_locale_string(pkgdir
):
651 def walk_helper(lst
, dirname
, files
):
653 filename
= os
.path
.join(dirname
, f
)
654 if not os
.path
.isdir(filename
):
655 lst
.append( locale_template
% (filename
, pkgdir
, dirname
) )
657 os
.path
.walk('wx\\locale', walk_helper
, stringlst
)
658 return '\n'.join(stringlst
)
661 def get_system_dir():
662 for p
in [r
"C:\WINNT\SYSTEM32",
663 r
"C:\WINDOWS\SYSTEM32",
665 if os
.path
.exists(p
):
667 raise IOError, "System dir not found"
670 def get_batch_files():
672 execfile("scripts/CreateBatchFiles.py", globs
)
673 scripts
= globs
["scripts"]
674 scripts
= ['Type: files; Name: "{code:GetPythonDir}\Scripts\%s.bat";' % i
[0] for i
in scripts
]
675 return '\n'.join(scripts
)
679 runtime_template1
= 'Source: "%(name)s"; DestDir: "{code:GetPythonDir}"; Flags: uninsneveruninstall; Components: core'
680 runtime_template2
= 'Source: "%(name)s"; DestDir: "{app}\%(PKGDIR)s\wx"; Components: core; Flags: replacesameversion'
682 def get_runtime_dlls(PYVER
, PKGDIR
):
684 return ( runtime_template1
% dict(name
=r
"distrib\msw\msvcr71.dll", PKGDIR
=PKGDIR
),
685 runtime_template2
% dict(name
=r
"distrib\msw\msvcp71.dll", PKGDIR
=PKGDIR
) )
687 return ( runtime_template1
% dict(name
=r
"distrib\msw\MSVCRT.dll", PKGDIR
=PKGDIR
),
688 runtime_template2
% dict(name
=r
"distrib\msw\MSVCIRT.dll", PKGDIR
=PKGDIR
) + "\n" +
689 runtime_template2
% dict(name
=r
"distrib\msw\MSVCP60.dll", PKGDIR
=PKGDIR
) )
692 #----------------------------------------------------------------------
697 execfile("wx/__version__.py", verglob
)
699 VERSION
= verglob
["VERSION_STRING"]
700 SHORTVER
= VERSION
[:3]
702 WXDLLVER
, PYTHONVER
= find_DLLs()
704 PYVER
= "py" + PYTHONVER
[0] + PYTHONVER
[2]
705 WXDIR
= os
.environ
["WXWIN"]
706 WXPYDIR
= os
.path
.join(WXDIR
, "wxPython")
707 SYSDIR
= get_system_dir()
708 ISSFILE
= "__wxPython.iss"
709 ISSDEMOFILE
= "__wxPythonDemo.iss"
710 UNINSTALL_BATCH
= get_batch_files()
711 PKGDIR
= open('src/wx.pth').read()
712 LOCALE
= build_locale_string(PKGDIR
)
713 RTDLL
,CPPDLL
= get_runtime_dlls(PYVER
, PKGDIR
)
716 Building Win32 installer for wxPython:
717 VERSION = %(VERSION)s
718 SHORTVER = %(SHORTVER)s
719 WXDLLVER = %(WXDLLVER)s
720 PYTHONVER = %(PYTHONVER)s
724 WXPYDIR = %(WXPYDIR)s
728 if PYTHONVER
>= "2.2":
729 IF22
= r
"InstallDir := InstallDir + '\Lib\site-packages';"
735 if "UNICODE=1" in sys
.argv
:
736 MSLU
=r
'Source: "distrib\msw\unicows.dll"; DestDir: "{code:GetPythonDir}"; Components: core; Flags: replacesameversion sharedfile' % vars()
739 f
= open(ISSFILE
, "w")
740 f
.write(ISS_Template
% vars())
743 f
= open(ISSDEMOFILE
, "w")
744 f
.write(ISS_DocDemo_Template
% vars())
747 TOOLS
= os
.environ
['TOOLS']
748 if TOOLS
.startswith('/cygdrive'):
749 TOOLS
= r
"c:\TOOLS" # temporary hack until I convert everything over to bash
751 os
.system(ISCC
% (TOOLS
, ISSFILE
))
752 os
.system(ISCC
% (TOOLS
, ISSDEMOFILE
))
757 os
.remove(ISSDEMOFILE
)
760 #----------------------------------------------------------------------
762 if __name__
== "__main__":
767 #----------------------------------------------------------------------