]> git.saurik.com Git - wxWidgets.git/blob - wxPython/distrib/make_installer.py
update to make digitalmars compile/link libraries
[wxWidgets.git] / wxPython / distrib / make_installer.py
1 """
2 This script will generate a setup script for InnoSetup and then run it
3 to make the installer executable. If all goes right the proper versions
4 of Python and wxWindows (including hybrid/final settings) will all be
5 calculated based on what wxc.pyd imports and an appropriate installer
6 will be created.
7 """
8
9
10 import sys, os, time
11
12 KEEP_TEMPS = 0
13 ISCC = r"%s\InnoSetup2Ex\ISCC.exe %s"
14
15 #----------------------------------------------------------------------
16
17 ISS_Template = r'''
18 ;;------------------------------------------------------------
19
20 [Setup]
21 AppName = wxPython
22 AppVerName = wxPython %(VERSION)s for Python %(PYTHONVER)s
23 OutputBaseFilename = wxPythonWIN32-%(VERSION)s-%(PYVER)s
24 AppCopyright = Copyright © 2003 Total Control Software
25 DefaultDirName = {code:GetInstallDir|c:\DoNotInstallHere}
26 DefaultGroupName = wxPython %(SHORTVER)s for Python %(PYTHONVER)s
27 AlwaysCreateUninstallIcon = yes
28
29 ;; SourceDir = .
30 ;; OutputDir is relative to SourceDir
31 OutputDir = dist
32 WizardStyle = modern
33 UninstallStyle = modern
34 DisableStartupPrompt = true
35 Compression = bzip
36 DirExistsWarning = no
37 DisableReadyMemo = true
38 DisableReadyPage = true
39 ;;DisableDirPage = true
40 DisableProgramGroupPage = no
41 DisableAppendDir = true
42 UsePreviousAppDir = no
43 UsePreviousGroup = no
44
45 UninstallFilesDir = {app}\wxPython
46 AppPublisherURL = http://wxPython.org/
47 LicenseFile = licence\licence.txt
48 CodeFile = %(IFSFILE)s
49
50 ;; WizardDebug = yes
51
52 ;;------------------------------------------------------------
53
54 ;;[Dirs]
55 ;;Name: "{app}\"
56
57 ;;------------------------------------------------------------
58
59 [Components]
60 Name: core; Description: "wxPython modules and library"; Types: full compact custom; Flags: fixed
61 Name: docs; Description: "Documentation"; Types: full
62 Name: demo; Description: "Demo application"; Types: full
63 Name: samples; Description: "Sample applications"; Types: full
64 Name: tools; Description: "Tools"; Types: full
65
66
67 ;;------------------------------------------------------------
68
69 [Files]
70 Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
71 Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
72 Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
73
74 Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core
75 %(MSLU)s
76 Source: "wxPython\wxc.pyd"; DestDir: "{app}\wxPython"; Components: core
77 Source: "wxPython\gridc.pyd"; DestDir: "{app}\wxPython"; Components: core
78 Source: "wxPython\helpc.pyd"; DestDir: "{app}\wxPython"; Components: core
79 Source: "wxPython\htmlc.pyd"; DestDir: "{app}\wxPython"; Components: core
80 Source: "wxPython\calendarc.pyd"; DestDir: "{app}\wxPython"; Components: core
81 Source: "wxPython\wizardc.pyd"; DestDir: "{app}\wxPython"; Components: core
82 Source: "wxPython\glcanvasc.pyd"; DestDir: "{app}\wxPython"; Components: core
83 Source: "wxPython\oglc.pyd"; DestDir: "{app}\wxPython"; Components: core
84 Source: "wxPython\stc_c.pyd"; DestDir: "{app}\wxPython"; Components: core
85 Source: "wxPython\xrcc.pyd"; DestDir: "{app}\wxPython"; Components: core
86 Source: "wxPython\gizmosc.pyd"; DestDir: "{app}\wxPython"; Components: core
87 Source: "wxPython\iewinc.pyd"; DestDir: "{app}\wxPython"; Components: core
88 Source: "wxPython\dllwidget_c.pyd"; DestDir: "{app}\wxPython"; Components: core
89
90 Source: "wxPython\*.py"; DestDir: "{app}\wxPython"; Components: core
91 Source: "wxPython\lib\*.py"; DestDir: "{app}\wxPython\lib"; Components: core
92 Source: "wxPython\lib\*.wdr"; DestDir: "{app}\wxPython\lib"; Components: core
93 Source: "wxPython\lib\editor\*.py"; DestDir: "{app}\wxPython\lib\editor"; Components: core
94 Source: "wxPython\lib\editor\*.txt"; DestDir: "{app}\wxPython\lib\editor"; Components: core
95 Source: "wxPython\lib\mixins\*.py"; DestDir: "{app}\wxPython\lib\mixins"; Components: core
96 Source: "wxPython\lib\PyCrust\*.py"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core
97 Source: "wxPython\lib\PyCrust\*.txt"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core
98 Source: "wxPython\lib\PyCrust\*.ico"; DestDir: "{app}\wxPython\lib\PyCrust"; Components: core
99 Source: "wxPython\lib\PyCrust\wxd\*.py"; DestDir: "{app}\wxPython\lib\PyCrust\wxd"; Components: core
100 Source: "wxPython\lib\colourchooser\*.py"; DestDir: "{app}\wxPython\lib\colourchooser"; Components: core
101
102 %(LOCALE)s
103
104 Source: "demo\*.py"; DestDir: "{app}\wxPython\demo"; Components: demo
105 Source: "demo\*.xml"; DestDir: "{app}\wxPython\demo"; Components: demo
106 Source: "demo\*.txt"; DestDir: "{app}\wxPython\demo"; Components: demo
107 Source: "demo\*.ico"; DestDir: "{app}\wxPython\demo"; Components: demo
108 Source: "demo\*.wdr"; DestDir: "{app}\wxPython\demo"; Components: demo
109
110 Source: "demo\bitmaps\*.gif"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
111 Source: "demo\bitmaps\*.bmp"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
112 Source: "demo\bitmaps\*.jpg"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
113 Source: "demo\bitmaps\*.png"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
114 Source: "demo\bitmaps\*.ico"; DestDir: "{app}\wxPython\demo\bitmaps"; Components: demo
115
116 Source: "demo\bmp_source\*.gif"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
117 Source: "demo\bmp_source\*.bmp"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
118 ;;Source: "demo\bmp_source\*.jpg"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
119 Source: "demo\bmp_source\*.png"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
120 Source: "demo\bmp_source\*.ico"; DestDir: "{app}\wxPython\demo\bmp_source"; Components: demo
121
122 Source: "demo\data\*.htm"; DestDir: "{app}\wxPython\demo\data"; Components: demo
123 Source: "demo\data\*.html"; DestDir: "{app}\wxPython\demo\data"; Components: demo
124 Source: "demo\data\*.py"; DestDir: "{app}\wxPython\demo\data"; Components: demo
125 Source: "demo\data\*.png"; DestDir: "{app}\wxPython\demo\data"; Components: demo
126 Source: "demo\data\*.bmp"; DestDir: "{app}\wxPython\demo\data"; Components: demo
127 Source: "demo\data\*.i"; DestDir: "{app}\wxPython\demo\data"; Components: demo
128 ;;Source: "demo\data\*.h"; DestDir: "{app}\wxPython\demo\data"; Components: demo
129 Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
130 Source: "demo\data\*.wav"; DestDir: "{app}\wxPython\demo\data"; Components: demo
131 Source: "demo\data\*.wdr"; DestDir: "{app}\wxPython\demo\data"; Components: demo
132 Source: "demo\data\*.xrc"; DestDir: "{app}\wxPython\demo\data"; Components: demo
133 Source: "demo\data\*.gif"; DestDir: "{app}\wxPython\demo\data"; Components: demo
134
135 Source: "demo\dllwidget\*.cpp"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
136 Source: "demo\dllwidget\*.py"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
137 Source: "demo\dllwidget\Makefile"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
138 Source: "demo\dllwidget\makefile.*"; DestDir: "{app}\wxPython\demo\dllwidget"; Components: demo
139
140 Source: "README.txt"; DestDir: "{app}\wxPython\docs"; Flags: isreadme; Components: core
141 Source: "CHANGES.txt"; DestDir: "{app}\wxPython\docs"; Components: core
142 Source: "licence\*.txt"; DestDir: "{app}\wxPython\docs\licence"; Components: core
143 Source: "%(WXDIR)s\docs\htmlhelp\wx.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
144 Source: "%(WXDIR)s\docs\htmlhelp\ogl.chm"; DestDir: "{app}\wxPython\docs"; Components: docs
145
146 Source: "wxPython\tools\*.py"; DestDir: "{app}\wxPython\tools"; Components: tools
147 Source: "wxPython\tools\XRCed\*.txt"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
148 Source: "wxPython\tools\XRCed\sawfishrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
149 Source: "wxPython\tools\XRCed\*.py"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
150 Source: "wxPython\tools\XRCed\*.xrc"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
151 Source: "wxPython\tools\XRCed\*.ico"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
152 Source: "wxPython\tools\XRCed\*.sh"; DestDir: "{app}\wxPython\tools\XRCed"; Components: tools
153
154 Source: "scripts\*.bat"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
155 Source: "scripts\*.py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
156 Source: "scripts\helpviewer"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
157 Source: "scripts\img2png"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
158 Source: "scripts\img2py"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
159 Source: "scripts\img2xpm"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
160 Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
161 Source: "scripts\pyshell"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
162 Source: "scripts\pycrust"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
163 Source: "scripts\pycwrap"; DestDir: "{code:GetPythonDir}\Scripts"; Components: tools
164
165 Source: "samples\doodle\*.py"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
166 Source: "samples\doodle\*.txt"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
167 Source: "samples\doodle\sample.ddl"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
168 Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\wxPython\samples\doodle"; Components: samples
169
170 Source: "samples\wxProject\*.txt"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
171 Source: "samples\wxProject\*.py"; DestDir: "{app}\wxPython\samples\wxProject"; Components: samples
172
173 Source: "samples\StyleEditor\*.txt"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
174 Source: "samples\StyleEditor\*.py"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
175 Source: "samples\StyleEditor\*.cfg"; DestDir: "{app}\wxPython\samples\StyleEditor"; Components: samples
176
177 Source: "samples\pySketch\*.py"; DestDir: "{app}\wxPython\samples\pySketch"; Components: samples
178 Source: "samples\pySketch\images\*.bmp"; DestDir: "{app}\wxPython\samples\pySketch\images"; Components: samples
179
180 Source: "samples\frogedit\*.py"; DestDir: "{app}\wxPython\samples\frogedit"; Components: samples
181
182 Source: "samples\embedded\*.py"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
183 Source: "samples\embedded\*.cpp"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
184 Source: "samples\embedded\*.txt"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
185 Source: "samples\embedded\*.vc"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
186 Source: "samples\embedded\*.unx"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
187 Source: "samples\embedded\*.ico"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
188 Source: "samples\embedded\*.xpm"; DestDir: "{app}\wxPython\samples\embedded"; Components: samples
189
190 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "python.exe.manifest"; Components: core
191 Source: "src\winxp.manifest"; DestDir: "{code:GetPythonDir}"; DestName: "pythonw.exe.manifest"; Components: core
192
193
194 ;;------------------------------------------------------------
195
196 [Run]
197 ;; Recreate the tool scripts to use the paths on the users machine
198 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "{code:GetPythonDir}\Lib\compileall.py {app}\wxPython"; Description: "Compile Python .py files to .pyc"; Flags: postinstall; Components: core
199 Filename: "{code:GetPythonDir}\python.exe"; Parameters: "CreateBatchFiles.py"; WorkingDir: "{code:GetPythonDir}\Scripts"; Description: "Create batch files for tool scripts"; Flags: postinstall; Components: tools
200
201
202 ;;------------------------------------------------------------
203
204 [Icons]
205 Name: "{group}\Run the DEMO"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "{app}\wxPython\demo"; Parameters: "demo.py"; IconFilename: "{app}\wxPython\demo\wxpdemo.ico"; Components: core
206 Name: "{group}\PyCrust"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pycrust"; IconFilename: "{app}\wxPython\lib\PyCrust\PyCrust.ico"; Components: core
207 Name: "{group}\PyShell"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\pyshell"; IconFilename: "{app}\wxPython\lib\PyCrust\PyCrust.ico"; Components: core
208 Name: "{group}\wxWindows Reference"; Filename: "{app}\wxPython\docs\wx.chm"; Components: docs
209 Name: "{group}\wxOGL Reference"; Filename: "{app}\wxPython\docs\ogl.chm"; Components: docs
210 Name: "{group}\licence.txt"; Filename: "{app}\wxPython\docs\licence\licence.txt"; Components: core
211 Name: "{group}\README.txt"; Filename: "{app}\wxPython\docs\README.txt"; Components: core
212 Name: "{group}\CHANGES.txt"; Filename: "{app}\wxPython\docs\CHANGES.txt"; Components: core
213 Name: "{group}\Sample Apps"; Filename: "{app}\wxPython\samples"; Components: samples
214 Name: "{group}\Resource Editor"; Filename: "{code:GetPythonDir}\pythonw.exe"; WorkingDir: "c:\"; Parameters: "{code:GetPythonDir}\Scripts\xrced"; IconFilename: "{app}\wxPython\Tools\XRCed\xrced.ico"; Components: tools
215
216
217 ;;------------------------------------------------------------
218
219 [UninstallDelete]
220 Type: files; Name: "{app}\wxPython\*.pyc";
221 Type: files; Name: "{app}\wxPython\*.pyo";
222 Type: files; Name: "{app}\wxPython\*.pyd";
223 Type: files; Name: "{app}\wxPython\lib\*.pyc";
224 Type: files; Name: "{app}\wxPython\lib\*.pyo";
225 Type: files; Name: "{app}\wxPython\lib\editor\*.pyc";
226 Type: files; Name: "{app}\wxPython\lib\editor\*.pyo";
227 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyc";
228 Type: files; Name: "{app}\wxPython\lib\mixins\*.pyo";
229 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyc";
230 Type: files; Name: "{app}\wxPython\lib\PyCrust\*.pyo";
231 Type: files; Name: "{app}\wxPython\lib\PyCrust\decor\*.pyc";
232 Type: files; Name: "{app}\wxPython\lib\PyCrust\decor\*.pyo";
233 Type: files; Name: "{app}\wxPython\lib\PyCrust\wxd\*.pyc";
234 Type: files; Name: "{app}\wxPython\lib\PyCrust\wxd\*.pyo";
235 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyc";
236 Type: files; Name: "{app}\wxPython\lib\colourchooser\*.pyo";
237 Type: files; Name: "{app}\wxPython\tools\*.pyc";
238 Type: files; Name: "{app}\wxPython\tools\*.pyo";
239 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
240 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
241 Type: files; Name: "{app}\wxPython\demo\*.pyc";
242 Type: files; Name: "{app}\wxPython\demo\*.pyo";
243 Type: files; Name: "{app}\wxPython\demo\data\showTips";
244 Type: files; Name: "{app}\wxPython\tools\*.pyc";
245 Type: files; Name: "{app}\wxPython\tools\*.pyo";
246 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyc";
247 Type: files; Name: "{app}\wxPython\tools\XRCed\*.pyo";
248 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyc";
249 Type: files; Name: "{app}\wxPython\samples\doodle\*.pyo";
250 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyc";
251 Type: files; Name: "{app}\wxPython\samples\wxProject\*.pyo";
252 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyc";
253 Type: files; Name: "{app}\wxPython\samples\StyleEditor\*.pyo";
254 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyc";
255 Type: files; Name: "{app}\wxPython\samples\frogedit\*.pyo";
256 Type: files; Name: "{app}\wxPython\demo\data\*.pyc";
257 Type: files; Name: "{app}\wxPython\demo\data\*.pyo";
258 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyc";
259 Type: files; Name: "{app}\wxPython\demo\dllwidget\*.pyo";
260 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyc";
261 Type: files; Name: "{app}\wxPython\samples\embedded\*.pyo";
262 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyc";
263 Type: files; Name: "{app}\wxPython\samples\pySketch\*.pyo";
264
265
266 '''
267
268
269 #----------------------------------------------------------------------
270
271
272 IFS_Template = r"""
273 program Setup;
274 var
275 PythonDir : String;
276 InstallDir : String;
277
278
279 function InitializeSetup(): Boolean;
280 begin
281 if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
282 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
283 '', PythonDir) then begin
284
285 if not RegQueryStringValue(HKEY_CURRENT_USER,
286 'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
287 '', PythonDir) then begin
288
289 MsgBox('No installation of Python %(PYTHONVER)s found in registry.' + #13 +
290 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
291 mbConfirmation, MB_OK);
292 PythonDir := 'C:\Put a directory on PYTHONPATH here\';
293 end;
294 end;
295 InstallDir := PythonDir;
296 %(IF22)s
297 Result := true;
298 end;
299
300
301 function GetPythonDir(Default: String): String;
302 begin
303 Result := PythonDir;
304 end;
305
306 function GetInstallDir(Default: String): String;
307 begin
308 Result := InstallDir;
309 end;
310
311
312
313 function NextButtonClick(CurPage: Integer): Boolean;
314 var
315 FileName: string;
316 ResultCode: Integer;
317 begin
318 Result := True;
319 if CurPage <> wpSelectDir then Exit;
320 FileName := WizardDirValue() + '\wxPython\unins000.exe';
321 if FileExists(FileName) then begin
322 ResultCode := MsgBox('A prior wxPython installation was found in this directory. It' + #13 +
323 'is recommended that it be uninstalled first.' + #13#13 +
324 'Should I do it?',
325 mbConfirmation, MB_YESNO);
326 if ResultCode = IDYES then begin
327 InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
328
329 end;
330 end;
331 end;
332
333
334 begin
335 end.
336
337 """
338
339 #----------------------------------------------------------------------
340
341 def find_DLLs():
342
343 WXDLL = PYTHONVER = None
344
345 proc = os.popen(r"dumpbin /imports wxPython\wxc.pyd", "r")
346 lines = proc.readlines()
347 proc.close()
348 for line in lines:
349 if line[:6] == " wx":
350 WXDLL = line.strip()
351
352 if line[:10] == " python":
353 PYTHONVER = line[10] + '.' + line[11]
354
355 if WXDLL and PYTHONVER:
356 return WXDLL, PYTHONVER
357
358
359 #----------------------------------------------------------------------
360
361 locale_template = 'Source: "%s"; DestDir: "{app}\%s"; Components: core'
362
363 def build_locale_string():
364 stringlst = []
365
366 def walk_helper(lst, dirname, files):
367 for f in files:
368 filename = os.path.join(dirname, f)
369 if not os.path.isdir(filename):
370 lst.append( locale_template % (filename, dirname) )
371
372 os.path.walk('wxPython\\locale', walk_helper, stringlst)
373 return '\n'.join(stringlst)
374
375
376 #----------------------------------------------------------------------
377
378 def main():
379
380 verglob = {}
381 execfile("wxPython/__version__.py", verglob)
382
383 VERSION = verglob["ver"]
384 SHORTVER = VERSION[:3]
385
386 WXDLL, PYTHONVER = find_DLLs()
387
388 PYVER = "Py" + PYTHONVER[0] + PYTHONVER[2]
389 WXDIR = os.environ["WXWIN"]
390 WXPYDIR = os.path.join(WXDIR, "wxPython")
391 SYSDIR = r"C:\WINNT\SYSTEM32"
392 ISSFILE = "__wxPython.iss"
393 IFSFILE = "__wxPython.ifs"
394 LOCALE = build_locale_string()
395
396 if PYTHONVER >= "2.2":
397 IF22 = r"InstallDir := InstallDir + '\Lib\site-packages';"
398 else:
399 IF22 = ""
400
401 # Starting with 2.3.3 the hybrid build is the release build too, so
402 # no need to label it that way.
403 ##if WXDLL.find("h") != -1:
404 ## PYVER = PYVER + "-hybrid"
405
406 MSLU=''
407 if len(sys.argv) > 1 and sys.argv[1] == "UNICODE=1":
408 MSLU=r'Source: "%(WXDIR)s\lib\unicows.dll"; DestDir: "{code:GetPythonDir}"; Components: core' % vars()
409
410 f = open(ISSFILE, "w")
411 f.write(ISS_Template % vars())
412 f.close()
413
414 f = open(IFSFILE, "w")
415 f.write(IFS_Template % vars())
416 f.close()
417
418 os.system(ISCC % (os.environ['TOOLS'], ISSFILE))
419
420 if not KEEP_TEMPS:
421 time.sleep(1)
422 os.remove(ISSFILE)
423 os.remove(IFSFILE)
424
425
426 #----------------------------------------------------------------------
427
428 if __name__ == "__main__":
429 main()
430
431
432
433 #----------------------------------------------------------------------
434
435