]>
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 wxc.pyd imports and an appropriate installer
26 ISCC
= r
"%s\InnoSetup2Ex\ISCC.exe %s"
28 #----------------------------------------------------------------------
31 ;;------------------------------------------------------------
35 AppVerName = wxPython %(VERSION)s for Python %(PYTHONVER)s
36 OutputBaseFilename = wxPythonWIN32-%(VERSION)s-%(PYVER)s
37 AppCopyright = Copyright © 2003 Total Control Software
38 DefaultDirName = {code:GetInstallDir|c:\DoNotInstallHere}
39 DefaultGroupName = wxPython %(SHORTVER)s for Python %(PYTHONVER)s
40 AlwaysCreateUninstallIcon = yes
41 AdminPrivilegesRequired = no
44 UninstallStyle = modern
45 DisableStartupPrompt = true
48 DisableReadyMemo = true
49 DisableReadyPage = true
50 ;;DisableDirPage = true
51 DisableProgramGroupPage = no
52 DisableAppendDir = true
53 UsePreviousAppDir = no
56 UninstallFilesDir = {app}\wxPython
57 AppPublisherURL = http://wxPython.org/
58 LicenseFile = licence\licence.txt
59 CodeFile = %(IFSFILE)s
63 ;;------------------------------------------------------------
68 ;;------------------------------------------------------------
71 Name: core; Description: "wxPython modules and library"; Types: full compact custom; Flags: fixed
72 Name: docs; Description: "Documentation"; Types: full
73 Name: demo; Description: "Demo application"; Types: full
74 Name: samples; Description: "Sample applications"; Types: full
77 ;;------------------------------------------------------------
80 Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
81 Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
82 Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
83 Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
84 Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
85 Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
87 Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core
89 Source: "wxPython\wxc.pyd"; DestDir: "{app}\wxPython"; Components: core
90 Source: "wxPython\gridc.pyd"; DestDir: "{app}\wxPython"; Components: core
91 Source: "wxPython\helpc.pyd"; DestDir: "{app}\wxPython"; Components: core
92 Source: "wxPython\htmlc.pyd"; DestDir: "{app}\wxPython"; Components: core
93 Source: "wxPython\calendarc.pyd"; DestDir: "{app}\wxPython"; Components: core
94 Source: "wxPython\wizardc.pyd"; DestDir: "{app}\wxPython"; Components: core
95 Source: "wxPython\glcanvasc.pyd"; DestDir: "{app}\wxPython"; Components: core
96 Source: "wxPython\oglc.pyd"; DestDir: "{app}\wxPython"; Components: core
97 Source: "wxPython\stc_c.pyd"; DestDir: "{app}\wxPython"; Components: core
98 Source: "wxPython\xrcc.pyd"; DestDir: "{app}\wxPython"; Components: core
99 Source: "wxPython\gizmosc.pyd"; DestDir: "{app}\wxPython"; Components: core
100 Source: "wxPython\iewinc.pyd"; DestDir: "{app}\wxPython"; Components: core
101 Source: "wxPython\dllwidget_c.pyd"; DestDir: "{app}\wxPython"; Components: core
103 Source: "wxPython\*.py"; DestDir: "{app}\wxPython"; Components: core
104 Source: "wxPython\lib\*.py"; DestDir: "{app}\wxPython\lib"; Components: core
105 Source: "wxPython\lib\*.wdr"; DestDir: "{app}\wxPython\lib"; Components: core
106 Source: "wxPython\lib\editor\*.py"; DestDir: "{app}\wxPython\lib\editor"; Components: core
107 Source: "wxPython\lib\editor\*.txt"; DestDir: "{app}\wxPython\lib\editor"; Components: core
108 Source: "wxPython\lib\mixins\*.py"; DestDir: "{app}\wxPython\lib\mixins"; Components: core
109 Source: "wxPython\lib\PyCrust\*.py"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core
110 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core
111 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core
112 Source: "wxPython\py\*.py"; DestDir: "{app}\wxPython\py"; Components: core
113 Source: "wxPython\py\*.txt"; DestDir: "{app}\wxPython\py"; Components: core
114 Source: "wxPython\py\*.ico"; DestDir: "{app}\wxPython\py"; Components: core
115 Source: "wxPython\py\*.png"; DestDir: "{app}\wxPython\py"; Components: core
116 Source: "wxPython\py\tests\*.py"; DestDir: "{app}\wxPython\py\tests"; Components: core
117 Source: "wxPython\py\wxd\*.py"; DestDir: "{app}\wxPython\py\wxd"; Components: core
119 Source: "wx\*.py"; DestDir: "{app}\wx"; Components: core
120 Source: "wx\lib\*.py"; DestDir: "{app}\wx\lib"; Components: core
121 Source: "wx\lib\colourchooser\*.py"; DestDir: "{app}\wx\lib\colourchooser"; Components: core
122 Source: "wx\lib\editor\*.py"; DestDir: "{app}\wx\lib\editor"; Components: core
123 Source: "wx\lib\mixins\*.py"; DestDir: "{app}\wx\lib\mixins"; Components: core
124 Source: "wx\py\*.py"; DestDir: "{app}\wx\py"; Components: core
125 Source: "wx\tools\*.py"; DestDir: "{app}\wx\tools"; Components: core
126 Source: "wx\tools\XRCed\*.py"; DestDir: "{app}\wx\tools\XRCed"; Components: core
131 Source: "demo\*.py"; DestDir: "{app}\wxPython\demo"; Components: demo
132 Source: "demo\*.xml"; DestDir: "{app}\wxPython\demo"; Components: demo
133 Source: "demo\*.txt"; DestDir: "{app}\wxPython\demo"; Components: demo
134 Source: "demo\*.ico"; DestDir: "{app}\wxPython\demo"; Components: demo
135 Source: "demo\*.wdr"; DestDir: "{app}\wxPython\demo"; Components: demo
137 Source: "demo\bitmaps\*.gif"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
138 Source: "demo\bitmaps\*.bmp"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
139 Source: "demo\bitmaps\*.jpg"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
140 Source: "demo\bitmaps\*.png"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
141 Source: "demo\bitmaps\*.ico"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
143 Source: "demo\bmp_source\*.gif"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
144 Source: "demo\bmp_source\*.bmp"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
145 ;;Source: "demo\bmp_source\*.jpg"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
146 Source: "demo\bmp_source\*.png"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
147 Source: "demo\bmp_source\*.ico"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
149 Source: "demo\data\*.htm"; DestDir: "{app}\wxPython\demo\data"; Components: demo
150 Source: "demo\data\*.html"; DestDir: "{app}\wxPython\demo\data"; Components: demo
151 Source: "demo\data\*.py"; DestDir: "{app}\wxPython\demo\data"; Components: demo
152 Source: "demo\data\*.png"; DestDir: "{app}\wxPython\demo\data"; Components: demo
153 Source: "demo\data\*.bmp"; DestDir: "{app}\wxPython\demo\data"; Components: demo
154 Source: "demo\data\*.i"; DestDir: "{app}\wxPython\demo\data"; Components: demo
155 Source: "demo\data\*.dat"; DestDir: "{app}\wxPython\demo\data"; Components: demo
156 Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
157 Source: "demo\data\*.wav"; DestDir: "{app}\wxPython\demo\data"; Components: demo
158 Source: "demo\data\*.wdr"; DestDir: "{app}\wxPython\demo\data"; Components: demo
159 Source: "demo\data\*.xrc"; DestDir: "{app}\wxPython\demo\data"; Components: demo
160 Source: "demo\data\*.gif"; DestDir: "{app}\wxPython\demo\data"; Components: demo
162 Source: "demo\dllwidget\*.cpp"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
163 Source: "demo\dllwidget\*.py"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
164 Source: "demo\dllwidget\Makefile"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
165 Source: "demo\dllwidget\makefile.*"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
167 Source: "README.txt"; DestDir: "{app}\wxPython\docs"; Flags: isreadme; Components: core
168 Source: "CHANGES.txt"; DestDir: "{app}\wxPython\docs"; Components: core
169 Source: "licence\*.txt"; DestDir: "{app}\wxPython\docs\licence"; Components: core
170 Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
171 Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
172 Source: "docs\*.txt"; DestDir: "{app}\wxPython\docs"; Components: docs
173 Source: "docs\*.css"; DestDir: "{app}\wxPython\docs"; Components: docs
174 Source: "docs\*.html"; DestDir: "{app}\wxPython\docs"; Components: docs
175 Source: "docs\*.conf"; DestDir: "{app}\wxPython\docs"; Components: docs
176 Source: "docs\screenshots\*.png"; DestDir: "{app}\wxPython\docs\screenshots"; Components: docs
178 Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: core
179 Source: "wxPython\tools\XRCed\*.txt"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
180 Source: "wxPython\tools\XRCed\sawfishrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
181 Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
182 Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
183 Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
184 Source: "wxPython\tools\XRCed\*.png"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
185 Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
186 Source: "wxPython\tools\XRCed\src-images\*.png"; DestDir: "{app}\wxPython\tools\XRCed\src-images"; Components: core
188 Source: "scripts\*.bat"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
189 Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
190 Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
191 Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
192 Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
193 Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
194 Source: "scripts\pyalacarte"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
195 Source: "scripts\pyalamode"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
196 Source: "scripts\pyshell"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
197 Source: "scripts\pycrust"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
198 Source: "scripts\pywrap"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
199 Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
201 Source: "samples\doodle\*.py"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
202 Source: "samples\doodle\*.txt"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
203 Source: "samples\doodle\sample.ddl"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
204 Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
206 Source: "samples\wxProject\*.txt"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
207 Source: "samples\wxProject\*.py"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
209 Source: "samples\StyleEditor\*.txt"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
210 Source: "samples\StyleEditor\*.py"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
211 Source: "samples\StyleEditor\*.cfg"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
213 Source: "samples\pySketch\*.py"; DestDir: "{app}\wxPython\samples\pySketch"; Components: samples
214 Source: "samples\pySketch\images\*.bmp"; DestDir: "{app}\wxPython\samples\pySketch\images"; Components: samples
216 Source: "samples\frogedit\*.py"; DestDir: "{app}\wxPython\samples\frogedit"; Components: samples
218 Source: "samples\hangman\*.py"; DestDir: "{app}\wxPython\samples\hangman"; Components: samples
220 Source: "samples\embedded\*.py"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
221 Source: "samples\embedded\*.cpp"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
222 Source: "samples\embedded\*.txt"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
223 Source: "samples\embedded\*.vc"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
224 Source: "samples\embedded\*.unx"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
225 Source: "samples\embedded\*.ico"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
226 Source: "samples\embedded\*.xpm"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
228 Source: "samples\wx_examples\basic\*.py"; DestDir: "{app}\wxPython\samples\wx_examples\basic"; Components: samples
229 Source: "samples\wx_examples\hello\*.py"; DestDir: "{app}\wxPython\samples\wx_examples\hello"; Components: samples
230 Source: "samples\wx_examples\hello\*.jpg"; DestDir: "{app}\wxPython\samples\wx_examples\hello"; Components: samples
232 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest"; Components: core
233 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest"; Components: core
236 ;;------------------------------------------------------------
239 ;; Compile the .py files
240 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "{code:GetPythonDir}\Lib\compileall.py {app}\wxPython {app}\wx"; Description: "Compile Python .py files to .pyc"; Flags: postinstall; Components: core
242 ;; Recreate the tool scripts to use the paths on the users machine
243 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "CreateBatchFiles.py"; WorkingDir: "{code:GetPythonDir}\Scripts"; Description: "Create batch files for tool scripts"; Flags: postinstall; Components: core
246 ;;------------------------------------------------------------
249 Name: "{group}\Run the wxPython DEMO"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "{app}\wxPython\demo"; Parameters: "demo.py"; IconFilename: "{app}\wxPython\demo\wxpdemo.ico"; Components: core
250 Name: "{group}\PyCrust"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pycrust"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
251 Name: "{group}\PyShell"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyshell"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
252 Name: "{group}\PyAlaMode"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyalamode"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
253 Name: "{group}\PyAlaCarte"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyalacarte"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
254 Name: "{group}\wxWindows Reference"; Filename: "{app}\wxPython\docs\wx.chm"; Components: docs
255 Name: "{group}\wxOGL Reference"; Filename: "{app}\wxPython\docs\ogl.chm"; Components: docs
256 Name: "{group}\licence.txt"; Filename: "{app}\wxPython\docs\licence\licence.txt"; Components: core
257 Name: "{group}\README.txt"; Filename: "{app}\wxPython\docs\README.txt"; Components: core
258 Name: "{group}\CHANGES.txt"; Filename: "{app}\wxPython\docs\CHANGES.txt"; Components: core
259 Name: "{group}\Sample Apps"; Filename: "{app}\wxPython\samples"; Components: samples
260 Name: "{group}\Resource Editor"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\xrced"; IconFilename: "{app}\wxPython\Tools\XRCed\xrced.ico"; Components: core
261 Name: "{group}\wxPython Docs"; Filename: "{app}\wxPython\docs\wxPythonDocs.html"; Components: docs
264 ;;------------------------------------------------------------
267 Type: files; Name: "{app}\wxPython\*.pyc";
268 Type: files; Name: "{app}\wxPython\*.pyo";
269 Type: files; Name: "{app}\wxPython\*.pyd";
270 Type: files; Name: "{app}\wxPython\lib\*.pyc";
271 Type: files; Name: "{app}\wxPython\lib\*.pyo";
272 Type: files; Name: "{app}\wxPython\lib\editor\*.pyc";
273 Type: files; Name: "{app}\wxPython\lib\editor\*.pyo";
274 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyc";
275 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyo";
276 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyc";
277 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyo";
278 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyc";
279 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyo";
280 Type: files; Name: "{app}\wxPython\py\*.pyc";
281 Type: files; Name: "{app}\wxPython\py\*.pyo";
282 Type: files; Name: "{app}\wxPython\py\tests\*.pyc";
283 Type: files; Name: "{app}\wxPython\py\tests\*.pyo";
284 Type: files; Name: "{app}\wxPython\py\wxd\*.pyc";
285 Type: files; Name: "{app}\wxPython\py\wxd\*.pyo";
286 Type: files; Name: "{app}\wxPython\tools\*.pyc";
287 Type: files; Name: "{app}\wxPython\tools\*.pyo";
288 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
289 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
290 Type: files; Name: "{app}\wxPython\demo\*.pyc";
291 Type: files; Name: "{app}\wxPython\demo\*.pyo";
292 Type: files; Name: "{app}\wxPython\demo\data\showTips";
293 Type: files; Name: "{app}\wxPython\tools\*.pyc";
294 Type: files; Name: "{app}\wxPython\tools\*.pyo";
295 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
296 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
297 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyc";
298 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyo";
299 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyc";
300 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyo";
301 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyc";
302 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyo";
303 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyc";
304 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyo";
305 Type: files; Name: "{app}\wxPython\samples\hangman\*.pyc";
306 Type: files; Name: "{app}\wxPython\samples\hangman\*.pyo";
307 Type: files; Name: "{app}\wxPython\samples\hangman\*.txt";
308 Type: files; Name: "{app}\wxPython\samples\wx_examples\basic\*.pyc";
309 Type: files; Name: "{app}\wxPython\samples\wx_examples\basic\*.pyo";
310 Type: files; Name: "{app}\wxPython\samples\wx_examples\hello\*.pyc";
311 Type: files; Name: "{app}\wxPython\samples\wx_examples\hello\*.pyo";
312 Type: files; Name: "{app}\wxPython\demo\data\*.pyc";
313 Type: files; Name: "{app}\wxPython\demo\data\*.pyo";
314 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyc";
315 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyo";
316 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyc";
317 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyo";
318 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyc";
319 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyo";
320 Type: files; Name: "{app}\wx\*.pyc";
321 Type: files; Name: "{app}\wx\*.pyo";
322 Type: files; Name: "{app}\wx\lib\*.pyc";
323 Type: files; Name: "{app}\wx\lib\*.pyo";
324 Type: files; Name: "{app}\wx\lib\colourchooser\*.pyc";
325 Type: files; Name: "{app}\wx\lib\colourchooser\*.pyo";
326 Type: files; Name: "{app}\wx\lib\editor\*.pyc";
327 Type: files; Name: "{app}\wx\lib\editor\*.pyo";
328 Type: files; Name: "{app}\wx\lib\mixins\*.pyc";
329 Type: files; Name: "{app}\wx\lib\mixins\*.pyo";
330 Type: files; Name: "{app}\wx\py\*.pyc";
331 Type: files; Name: "{app}\wx\py\*.pyo";
332 Type: files; Name: "{app}\wx\tools\*.pyc";
333 Type: files; Name: "{app}\wx\tools\*.pyo";
334 Type: files; Name: "{app}\wx\tools\XRCed\*.pyc";
335 Type: files; Name: "{app}\wx\tools\XRCed\*.pyo";
343 #----------------------------------------------------------------------
351 sysInstall : Boolean;
354 function InitializeSetup(): Boolean;
357 (* -------------------------------------------------------------- *)
358 (* Figure out what to use as a default installation dir *)
360 if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
361 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
362 '', PythonDir) then begin
364 if not RegQueryStringValue(HKEY_CURRENT_USER,
365 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
366 '', PythonDir) then begin
368 MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 +
369 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
370 mbConfirmation, MB_OK);
371 PythonDir := 'C:\Put a directory on PYTHONPATH here\';
374 InstallDir := PythonDir;
378 (* -------------------------------------------------------------- *)
379 (* And now where to put the system DLLs *)
383 (* Check if Python has a regkey in HKLM, if so it installed the DLLs in the SYSTEM dir *)
384 if RegValueExists(HKEY_LOCAL_MACHINE,
385 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath', '') then begin
389 (* If so, ensure that the user can write to HKLM *)
390 if sysInstall and not RegWriteStringValue(HKEY_LOCAL_MACHINE,
391 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
392 '', '%(VERSION)s') then begin
393 (* if not then revert to installing to the Python dir *)
395 (* and put the regkey in HKCU *)
396 RegWriteStringValue(HKEY_CURRENT_USER,
397 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
405 function IsSysInstall(): Boolean;
407 Result := sysInstall;
409 function IsNotSysInstall(): Boolean;
411 Result := not sysInstall;
416 function GetDLLDir(Default: String): String;
418 if sysInstall then begin
426 function GetPythonDir(Default: String): String;
432 function GetInstallDir(Default: String): String;
434 Result := InstallDir;
439 function NextButtonClick(CurPage: Integer): Boolean;
445 if CurPage <> wpSelectDir then Exit;
446 FileName := WizardDirValue() + '\wxPython\unins000.exe';
447 if FileExists(FileName) then begin
448 ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
449 'is recommended that it be uninstalled first.' + #13#13 +
451 mbConfirmation, MB_YESNO);
452 if ResultCode = IDYES then begin
453 InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
465 #----------------------------------------------------------------------
469 WXDLL
= PYTHONVER
= None
471 proc
= os
.popen(r
"dumpbin /imports wxPython\wxc.pyd", "r")
472 lines
= proc
.readlines()
475 if line
[:6] == " wx":
478 if line
[:10] == " python":
479 PYTHONVER
= line
[10] + '.' + line
[11]
481 if WXDLL
and PYTHONVER
:
482 return WXDLL
, PYTHONVER
485 #----------------------------------------------------------------------
487 locale_template
= 'Source: "%s"; DestDir: "{app}\%s"; Components: core'
489 def build_locale_string():
492 def walk_helper(lst
, dirname
, files
):
494 filename
= os
.path
.join(dirname
, f
)
495 if not os
.path
.isdir(filename
):
496 lst
.append( locale_template
% (filename
, dirname
) )
498 os
.path
.walk('wxPython\\locale', walk_helper
, stringlst
)
499 return '\n'.join(stringlst
)
501 def get_system_dir():
502 for p
in [r
"C:\WINNT\SYSTEM32",
503 r
"C:\WINDOWS\SYSTEM32",
505 if os
.path
.exists(p
):
507 raise IOError, "System dir not found"
510 #----------------------------------------------------------------------
515 execfile("wxPython/__version__.py", verglob
)
517 VERSION
= verglob
["wxVERSION_STRING"]
518 SHORTVER
= VERSION
[:3]
520 WXDLL
, PYTHONVER
= find_DLLs()
522 PYVER
= "Py" + PYTHONVER
[0] + PYTHONVER
[2]
523 WXDIR
= os
.environ
["WXWIN"]
524 WXPYDIR
= os
.path
.join(WXDIR
, "wxPython")
525 SYSDIR
= get_system_dir()
526 ISSFILE
= "__wxPython.iss"
527 IFSFILE
= "__wxPython.ifs"
528 LOCALE
= build_locale_string()
530 if PYTHONVER
>= "2.2":
531 IF22
= r
"InstallDir := InstallDir + '\Lib\site-packages';"
535 # Starting with 2.3.3 the hybrid build is the release build too, so
536 # no need to label it that way.
537 ##if WXDLL.find("h") != -1:
538 ## PYVER = PYVER + "-hybrid"
541 if len(sys
.argv
) > 1 and sys
.argv
[1] == "UNICODE=1":
542 MSLU
=r
'Source: "%(WXDIR)s\lib\unicows.dll"; DestDir: "{code:GetPythonDir}"; Components: core' % vars()
544 f
= open(ISSFILE
, "w")
545 f
.write(ISS_Template
% vars())
548 f
= open(IFSFILE
, "w")
549 f
.write(IFS_Template
% vars())
552 os
.system(ISCC
% (os
.environ
['TOOLS'], ISSFILE
))
560 #----------------------------------------------------------------------
562 if __name__
== "__main__":
567 #----------------------------------------------------------------------