]>
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
23 # TODO: Remove the registry entry upon uninstall.
28 ISCC
= r
"%s\InnoSetup2Ex\ISCC.exe %s"
30 #----------------------------------------------------------------------
33 ;;------------------------------------------------------------
37 AppVerName = wxPython %(VERSION)s for Python %(PYTHONVER)s
38 OutputBaseFilename = wxPythonWIN32-%(VERSION)s-%(PYVER)s
39 AppCopyright = Copyright © 2003 Total Control Software
40 DefaultDirName = {code:GetInstallDir|c:\DoNotInstallHere}
41 DefaultGroupName = wxPython %(SHORTVER)s for Python %(PYTHONVER)s
42 AlwaysCreateUninstallIcon = yes
43 AdminPrivilegesRequired = no
46 UninstallStyle = modern
47 DisableStartupPrompt = true
50 DisableReadyMemo = true
51 DisableReadyPage = true
52 ;;DisableDirPage = true
53 DisableProgramGroupPage = no
54 DisableAppendDir = true
55 UsePreviousAppDir = no
58 UninstallFilesDir = {app}\wxPython
59 AppPublisherURL = http://wxPython.org/
60 LicenseFile = licence\licence.txt
61 CodeFile = %(IFSFILE)s
65 ;;------------------------------------------------------------
70 ;;------------------------------------------------------------
73 Name: core; Description: "wxPython modules and library"; Types: full compact custom; Flags: fixed
74 Name: docs; Description: "Documentation"; Types: full
75 Name: demo; Description: "Demo application"; Types: full
76 Name: samples; Description: "Sample applications"; Types: full
79 ;;------------------------------------------------------------
82 Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
83 Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
84 Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
85 Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
86 Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
87 Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
89 Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core
91 Source: "wxPython\wxc.pyd"; DestDir: "{app}\wxPython"; Components: core
92 Source: "wxPython\gridc.pyd"; DestDir: "{app}\wxPython"; Components: core
93 Source: "wxPython\helpc.pyd"; DestDir: "{app}\wxPython"; Components: core
94 Source: "wxPython\htmlc.pyd"; DestDir: "{app}\wxPython"; Components: core
95 Source: "wxPython\calendarc.pyd"; DestDir: "{app}\wxPython"; Components: core
96 Source: "wxPython\wizardc.pyd"; DestDir: "{app}\wxPython"; Components: core
97 Source: "wxPython\glcanvasc.pyd"; DestDir: "{app}\wxPython"; Components: core
98 Source: "wxPython\oglc.pyd"; DestDir: "{app}\wxPython"; Components: core
99 Source: "wxPython\stc_c.pyd"; DestDir: "{app}\wxPython"; Components: core
100 Source: "wxPython\xrcc.pyd"; DestDir: "{app}\wxPython"; Components: core
101 Source: "wxPython\gizmosc.pyd"; DestDir: "{app}\wxPython"; Components: core
102 Source: "wxPython\iewinc.pyd"; DestDir: "{app}\wxPython"; Components: core
103 Source: "wxPython\dllwidget_c.pyd"; DestDir: "{app}\wxPython"; Components: core
105 Source: "wxPython\*.py"; DestDir: "{app}\wxPython"; Components: core
106 Source: "wxPython\lib\*.py"; DestDir: "{app}\wxPython\lib"; Components: core
107 Source: "wxPython\lib\*.wdr"; DestDir: "{app}\wxPython\lib"; Components: core
108 Source: "wxPython\lib\editor\*.py"; DestDir: "{app}\wxPython\lib\editor"; Components: core
109 Source: "wxPython\lib\editor\*.txt"; DestDir: "{app}\wxPython\lib\editor"; Components: core
110 Source: "wxPython\lib\mixins\*.py"; DestDir: "{app}\wxPython\lib\mixins"; Components: core
111 Source: "wxPython\lib\PyCrust\*.py"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core
112 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core
113 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core
114 Source: "wxPython\py\*.py"; DestDir: "{app}\wxPython\py"; Components: core
115 Source: "wxPython\py\*.txt"; DestDir: "{app}\wxPython\py"; Components: core
116 Source: "wxPython\py\*.ico"; DestDir: "{app}\wxPython\py"; Components: core
117 Source: "wxPython\py\*.png"; DestDir: "{app}\wxPython\py"; Components: core
118 Source: "wxPython\py\tests\*.py"; DestDir: "{app}\wxPython\py\tests"; Components: core
119 Source: "wxPython\py\wxd\*.py"; DestDir: "{app}\wxPython\py\wxd"; Components: core
121 Source: "wx\*.py"; DestDir: "{app}\wx"; Components: core
122 Source: "wx\lib\*.py"; DestDir: "{app}\wx\lib"; Components: core
123 Source: "wx\lib\colourchooser\*.py"; DestDir: "{app}\wx\lib\colourchooser"; Components: core
124 Source: "wx\lib\editor\*.py"; DestDir: "{app}\wx\lib\editor"; Components: core
125 Source: "wx\lib\mixins\*.py"; DestDir: "{app}\wx\lib\mixins"; Components: core
126 Source: "wx\py\*.py"; DestDir: "{app}\wx\py"; Components: core
127 Source: "wx\tools\*.py"; DestDir: "{app}\wx\tools"; Components: core
128 Source: "wx\tools\XRCed\*.py"; DestDir: "{app}\wx\tools\XRCed"; Components: core
133 Source: "demo\*.py"; DestDir: "{app}\wxPython\demo"; Components: demo
134 Source: "demo\*.xml"; DestDir: "{app}\wxPython\demo"; Components: demo
135 Source: "demo\*.txt"; DestDir: "{app}\wxPython\demo"; Components: demo
136 Source: "demo\*.ico"; DestDir: "{app}\wxPython\demo"; Components: demo
137 Source: "demo\*.wdr"; DestDir: "{app}\wxPython\demo"; Components: demo
139 Source: "demo\bitmaps\*.gif"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
140 Source: "demo\bitmaps\*.bmp"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
141 Source: "demo\bitmaps\*.jpg"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
142 Source: "demo\bitmaps\*.png"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
143 Source: "demo\bitmaps\*.ico"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
145 Source: "demo\bmp_source\*.gif"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
146 Source: "demo\bmp_source\*.bmp"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
147 ;;Source: "demo\bmp_source\*.jpg"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
148 Source: "demo\bmp_source\*.png"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
149 Source: "demo\bmp_source\*.ico"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
151 Source: "demo\data\*.htm"; DestDir: "{app}\wxPython\demo\data"; Components: demo
152 Source: "demo\data\*.html"; DestDir: "{app}\wxPython\demo\data"; Components: demo
153 Source: "demo\data\*.py"; DestDir: "{app}\wxPython\demo\data"; Components: demo
154 Source: "demo\data\*.png"; DestDir: "{app}\wxPython\demo\data"; Components: demo
155 Source: "demo\data\*.bmp"; DestDir: "{app}\wxPython\demo\data"; Components: demo
156 Source: "demo\data\*.i"; DestDir: "{app}\wxPython\demo\data"; Components: demo
157 Source: "demo\data\*.dat"; DestDir: "{app}\wxPython\demo\data"; Components: demo
158 Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
159 Source: "demo\data\*.wav"; DestDir: "{app}\wxPython\demo\data"; Components: demo
160 Source: "demo\data\*.wdr"; DestDir: "{app}\wxPython\demo\data"; Components: demo
161 Source: "demo\data\*.xrc"; DestDir: "{app}\wxPython\demo\data"; Components: demo
162 Source: "demo\data\*.gif"; DestDir: "{app}\wxPython\demo\data"; Components: demo
164 Source: "demo\dllwidget\*.cpp"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
165 Source: "demo\dllwidget\*.py"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
166 Source: "demo\dllwidget\Makefile"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
167 Source: "demo\dllwidget\makefile.*"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
169 Source: "README.txt"; DestDir: "{app}\wxPython\docs"; Flags: isreadme; Components: core
170 Source: "CHANGES.txt"; DestDir: "{app}\wxPython\docs"; Components: core
171 Source: "licence\*.txt"; DestDir: "{app}\wxPython\docs\licence"; Components: core
172 Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
173 Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
174 Source: "docs\*.txt"; DestDir: "{app}\wxPython\docs"; Components: docs
175 Source: "docs\*.css"; DestDir: "{app}\wxPython\docs"; Components: docs
176 Source: "docs\*.html"; DestDir: "{app}\wxPython\docs"; Components: docs
177 Source: "docs\*.conf"; DestDir: "{app}\wxPython\docs"; Components: docs
178 Source: "docs\screenshots\*.png"; DestDir: "{app}\wxPython\docs\screenshots"; Components: docs
180 Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: core
181 Source: "wxPython\tools\XRCed\*.txt"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
182 Source: "wxPython\tools\XRCed\sawfishrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
183 Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
184 Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
185 Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
186 Source: "wxPython\tools\XRCed\*.png"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
187 Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed"; Components: core
188 Source: "wxPython\tools\XRCed\src-images\*.png"; DestDir: "{app}\wxPython\tools\XRCed\src-images"; Components: core
190 Source: "scripts\*.bat"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
191 Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
192 Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
193 Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
194 Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
195 Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
196 Source: "scripts\pyalacarte"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
197 Source: "scripts\pyalamode"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
198 Source: "scripts\pyshell"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
199 Source: "scripts\pycrust"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
200 Source: "scripts\pywrap"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
201 Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core
203 Source: "samples\doodle\*.py"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
204 Source: "samples\doodle\*.txt"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
205 Source: "samples\doodle\sample.ddl"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
206 Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
208 Source: "samples\wxProject\*.txt"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
209 Source: "samples\wxProject\*.py"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
211 Source: "samples\StyleEditor\*.txt"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
212 Source: "samples\StyleEditor\*.py"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
213 Source: "samples\StyleEditor\*.cfg"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
215 Source: "samples\pySketch\*.py"; DestDir: "{app}\wxPython\samples\pySketch"; Components: samples
216 Source: "samples\pySketch\images\*.bmp"; DestDir: "{app}\wxPython\samples\pySketch\images"; Components: samples
218 Source: "samples\frogedit\*.py"; DestDir: "{app}\wxPython\samples\frogedit"; Components: samples
220 Source: "samples\hangman\*.py"; DestDir: "{app}\wxPython\samples\hangman"; Components: samples
222 Source: "samples\embedded\*.py"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
223 Source: "samples\embedded\*.cpp"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
224 Source: "samples\embedded\*.txt"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
225 Source: "samples\embedded\*.vc"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
226 Source: "samples\embedded\*.unx"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
227 Source: "samples\embedded\*.ico"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
228 Source: "samples\embedded\*.xpm"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
230 Source: "samples\wx_examples\basic\*.py"; DestDir: "{app}\wxPython\samples\wx_examples\basic"; Components: samples
231 Source: "samples\wx_examples\hello\*.py"; DestDir: "{app}\wxPython\samples\wx_examples\hello"; Components: samples
232 Source: "samples\wx_examples\hello\*.jpg"; DestDir: "{app}\wxPython\samples\wx_examples\hello"; Components: samples
234 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest"; Components: core
235 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest"; Components: core
238 ;;------------------------------------------------------------
241 ;; Compile the .py files
242 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
244 ;; Recreate the tool scripts to use the paths on the users machine
245 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "CreateBatchFiles.py"; WorkingDir: "{code:GetPythonDir}\Scripts"; Description: "Create batch files for tool scripts"; Flags: postinstall; Components: core
248 ;;------------------------------------------------------------
251 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
252 Name: "{group}\PyCrust"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pycrust"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
253 Name: "{group}\PyShell"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyshell"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
254 Name: "{group}\PyAlaMode"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyalamode"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
255 Name: "{group}\PyAlaCarte"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyalacarte"; IconFilename: "{app}\wxPython\py\PyCrust.ico"; Components: core
256 Name: "{group}\wxWindows Reference"; Filename: "{app}\wxPython\docs\wx.chm"; Components: docs
257 Name: "{group}\wxOGL Reference"; Filename: "{app}\wxPython\docs\ogl.chm"; Components: docs
258 Name: "{group}\licence.txt"; Filename: "{app}\wxPython\docs\licence\licence.txt"; Components: core
259 Name: "{group}\README.txt"; Filename: "{app}\wxPython\docs\README.txt"; Components: core
260 Name: "{group}\CHANGES.txt"; Filename: "{app}\wxPython\docs\CHANGES.txt"; Components: core
261 Name: "{group}\Sample Apps"; Filename: "{app}\wxPython\samples"; Components: samples
262 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
263 Name: "{group}\wxPython Docs"; Filename: "{app}\wxPython\docs\wxPythonDocs.html"; Components: docs
266 ;;------------------------------------------------------------
269 Type: files; Name: "{app}\wxPython\*.pyc";
270 Type: files; Name: "{app}\wxPython\*.pyo";
271 Type: files; Name: "{app}\wxPython\*.pyd";
272 Type: files; Name: "{app}\wxPython\lib\*.pyc";
273 Type: files; Name: "{app}\wxPython\lib\*.pyo";
274 Type: files; Name: "{app}\wxPython\lib\editor\*.pyc";
275 Type: files; Name: "{app}\wxPython\lib\editor\*.pyo";
276 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyc";
277 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyo";
278 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyc";
279 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyo";
280 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyc";
281 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyo";
282 Type: files; Name: "{app}\wxPython\py\*.pyc";
283 Type: files; Name: "{app}\wxPython\py\*.pyo";
284 Type: files; Name: "{app}\wxPython\py\tests\*.pyc";
285 Type: files; Name: "{app}\wxPython\py\tests\*.pyo";
286 Type: files; Name: "{app}\wxPython\py\wxd\*.pyc";
287 Type: files; Name: "{app}\wxPython\py\wxd\*.pyo";
288 Type: files; Name: "{app}\wxPython\tools\*.pyc";
289 Type: files; Name: "{app}\wxPython\tools\*.pyo";
290 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
291 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
292 Type: files; Name: "{app}\wxPython\demo\*.pyc";
293 Type: files; Name: "{app}\wxPython\demo\*.pyo";
294 Type: files; Name: "{app}\wxPython\demo\data\showTips";
295 Type: files; Name: "{app}\wxPython\tools\*.pyc";
296 Type: files; Name: "{app}\wxPython\tools\*.pyo";
297 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
298 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
299 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyc";
300 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyo";
301 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyc";
302 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyo";
303 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyc";
304 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyo";
305 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyc";
306 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyo";
307 Type: files; Name: "{app}\wxPython\samples\hangman\*.pyc";
308 Type: files; Name: "{app}\wxPython\samples\hangman\*.pyo";
309 Type: files; Name: "{app}\wxPython\samples\hangman\*.txt";
310 Type: files; Name: "{app}\wxPython\samples\wx_examples\basic\*.pyc";
311 Type: files; Name: "{app}\wxPython\samples\wx_examples\basic\*.pyo";
312 Type: files; Name: "{app}\wxPython\samples\wx_examples\hello\*.pyc";
313 Type: files; Name: "{app}\wxPython\samples\wx_examples\hello\*.pyo";
314 Type: files; Name: "{app}\wxPython\demo\data\*.pyc";
315 Type: files; Name: "{app}\wxPython\demo\data\*.pyo";
316 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyc";
317 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyo";
318 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyc";
319 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyo";
320 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyc";
321 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyo";
322 Type: files; Name: "{app}\wx\*.pyc";
323 Type: files; Name: "{app}\wx\*.pyo";
324 Type: files; Name: "{app}\wx\lib\*.pyc";
325 Type: files; Name: "{app}\wx\lib\*.pyo";
326 Type: files; Name: "{app}\wx\lib\colourchooser\*.pyc";
327 Type: files; Name: "{app}\wx\lib\colourchooser\*.pyo";
328 Type: files; Name: "{app}\wx\lib\editor\*.pyc";
329 Type: files; Name: "{app}\wx\lib\editor\*.pyo";
330 Type: files; Name: "{app}\wx\lib\mixins\*.pyc";
331 Type: files; Name: "{app}\wx\lib\mixins\*.pyo";
332 Type: files; Name: "{app}\wx\py\*.pyc";
333 Type: files; Name: "{app}\wx\py\*.pyo";
334 Type: files; Name: "{app}\wx\tools\*.pyc";
335 Type: files; Name: "{app}\wx\tools\*.pyo";
336 Type: files; Name: "{app}\wx\tools\XRCed\*.pyc";
337 Type: files; Name: "{app}\wx\tools\XRCed\*.pyo";
345 #----------------------------------------------------------------------
353 sysInstall : Boolean;
356 function InitializeSetup(): Boolean;
359 (* -------------------------------------------------------------- *)
360 (* Figure out what to use as a default installation dir *)
362 if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
363 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
364 '', PythonDir) then begin
366 if not RegQueryStringValue(HKEY_CURRENT_USER,
367 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
368 '', PythonDir) then begin
370 MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 +
371 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
372 mbConfirmation, MB_OK);
373 PythonDir := 'C:\Put a directory on PYTHONPATH here\';
376 InstallDir := PythonDir;
380 (* -------------------------------------------------------------- *)
381 (* And now where to put the system DLLs *)
385 (* Check if Python has a regkey in HKLM, if so it installed the DLLs in the SYSTEM dir *)
386 if RegValueExists(HKEY_LOCAL_MACHINE,
387 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath', '') then begin
391 (* If so, ensure that the user can write to HKLM *)
392 if sysInstall and not RegWriteStringValue(HKEY_LOCAL_MACHINE,
393 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
394 '', '%(VERSION)s') then begin
395 (* if not then revert to installing to the Python dir *)
397 (* and put the regkey in HKCU *)
398 RegWriteStringValue(HKEY_CURRENT_USER,
399 'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
407 function IsSysInstall(): Boolean;
409 Result := sysInstall;
411 function IsNotSysInstall(): Boolean;
413 Result := not sysInstall;
418 function GetDLLDir(Default: String): String;
420 if sysInstall then begin
428 function GetPythonDir(Default: String): String;
434 function GetInstallDir(Default: String): String;
436 Result := InstallDir;
441 function NextButtonClick(CurPage: Integer): Boolean;
447 if CurPage <> wpSelectDir then Exit;
448 FileName := WizardDirValue() + '\wxPython\unins000.exe';
449 if FileExists(FileName) then begin
450 ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
451 'is recommended that it be uninstalled first.' + #13#13 +
453 mbConfirmation, MB_YESNO);
454 if ResultCode = IDYES then begin
455 InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
467 #----------------------------------------------------------------------
471 WXDLL
= PYTHONVER
= None
473 proc
= os
.popen(r
"dumpbin /imports wxPython\wxc.pyd", "r")
474 lines
= proc
.readlines()
477 if line
[:6] == " wx":
480 if line
[:10] == " python":
481 PYTHONVER
= line
[10] + '.' + line
[11]
483 if WXDLL
and PYTHONVER
:
484 return WXDLL
, PYTHONVER
487 #----------------------------------------------------------------------
489 locale_template
= 'Source: "%s"; DestDir: "{app}\%s"; Components: core'
491 def build_locale_string():
494 def walk_helper(lst
, dirname
, files
):
496 filename
= os
.path
.join(dirname
, f
)
497 if not os
.path
.isdir(filename
):
498 lst
.append( locale_template
% (filename
, dirname
) )
500 os
.path
.walk('wxPython\\locale', walk_helper
, stringlst
)
501 return '\n'.join(stringlst
)
503 def get_system_dir():
504 for p
in [r
"C:\WINNT\SYSTEM32",
505 r
"C:\WINDOWS\SYSTEM32",
507 if os
.path
.exists(p
):
509 raise IOError, "System dir not found"
512 #----------------------------------------------------------------------
517 execfile("wxPython/__version__.py", verglob
)
519 VERSION
= verglob
["wxVERSION_STRING"]
520 SHORTVER
= VERSION
[:3]
522 WXDLL
, PYTHONVER
= find_DLLs()
524 PYVER
= "Py" + PYTHONVER
[0] + PYTHONVER
[2]
525 WXDIR
= os
.environ
["WXWIN"]
526 WXPYDIR
= os
.path
.join(WXDIR
, "wxPython")
527 SYSDIR
= get_system_dir()
528 ISSFILE
= "__wxPython.iss"
529 IFSFILE
= "__wxPython.ifs"
530 LOCALE
= build_locale_string()
532 if PYTHONVER
>= "2.2":
533 IF22
= r
"InstallDir := InstallDir + '\Lib\site-packages';"
537 # Starting with 2.3.3 the hybrid build is the release build too, so
538 # no need to label it that way.
539 ##if WXDLL.find("h") != -1:
540 ## PYVER = PYVER + "-hybrid"
543 if len(sys
.argv
) > 1 and sys
.argv
[1] == "UNICODE=1":
544 MSLU
=r
'Source: "%(WXDIR)s\lib\unicows.dll"; DestDir: "{code:GetPythonDir}"; Components: core' % vars()
546 f
= open(ISSFILE
, "w")
547 f
.write(ISS_Template
% vars())
550 f
= open(IFSFILE
, "w")
551 f
.write(IFS_Template
% vars())
554 os
.system(ISCC
% (os
.environ
['TOOLS'], ISSFILE
))
562 #----------------------------------------------------------------------
564 if __name__
== "__main__":
569 #----------------------------------------------------------------------