From 81457c860f47ec21c755dcbf4cbc955a3c66c6f7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 28 May 2004 19:13:42 +0000 Subject: [PATCH] Add cx_Freeze and Installer examples git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27485 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/distrib/make_installer.py | 3 ++- wxPython/samples/doodle/README.txt | 20 ++++++++++++++------ wxPython/samples/doodle/cxfreeze.bat | 16 ++++++++++++++++ wxPython/samples/doodle/installer.bat | 12 ++++++++++++ wxPython/samples/doodle/setup.py | 4 ++-- 5 files changed, 46 insertions(+), 9 deletions(-) create mode 100755 wxPython/samples/doodle/cxfreeze.bat create mode 100755 wxPython/samples/doodle/installer.bat diff --git a/wxPython/distrib/make_installer.py b/wxPython/distrib/make_installer.py index 2623911e91..740c5632ae 100644 --- a/wxPython/distrib/make_installer.py +++ b/wxPython/distrib/make_installer.py @@ -196,10 +196,11 @@ Source: "scripts\pyshell"; DestDir: "{code:GetPythonDir}\Script Source: "scripts\pycrust"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core Source: "scripts\pywrap"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core -Source: "%(WXDIR)s\lib\vc_dll\wxrc.exe"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core +Source: "%(WXDIR)s\lib\vc_dll\wxrc.exe"; DestDir: "{code:GetPythonDir}\Scripts"; Components: core Source: "samples\doodle\*.py"; DestDir: "{app}\wx\samples\doodle"; Components: samples Source: "samples\doodle\*.txt"; DestDir: "{app}\wx\samples\doodle"; Components: samples +Source: "samples\doodle\*.bat"; DestDir: "{app}\wx\samples\doodle"; Components: samples Source: "samples\doodle\sample.ddl"; DestDir: "{app}\wx\samples\doodle"; Components: samples Source: "samples\doodle\superdoodle.iss"; DestDir: "{app}\wx\samples\doodle"; Components: samples diff --git a/wxPython/samples/doodle/README.txt b/wxPython/samples/doodle/README.txt index f4c80c50e7..49f0ff6e7b 100644 --- a/wxPython/samples/doodle/README.txt +++ b/wxPython/samples/doodle/README.txt @@ -19,13 +19,21 @@ and much more. this command to build the .exe and collect the other needed files: - python setup.py py2exe -w + python setup.py py2exe - superdoodle.iss An InnoSetup script to build a self-installer of - the superdoodle standalone executable. You can - get InnoSetup from http://www.jrsoftware.org/. - You may have to edit this file to make it work - for your environment and python installation. + superdoodle.iss NOTE: This .iss file needs updating! + An InnoSetup script to build a self-installer of + the superdoodle standalone executable created + with py2exe. You can get InnoSetup from + http://www.jrsoftware.org/. You may have to edit + this file to make it work for your environment + and python installation. + + cxfreeze.bat An example of creating an executable with the + cx_Freeze utility, downloadable from + http://starship.python.net/crew/atuining/cx_Freeze/ + installer.bat An example of creating an executable with Gordon + McMillan's Installer utility. diff --git a/wxPython/samples/doodle/cxfreeze.bat b/wxPython/samples/doodle/cxfreeze.bat new file mode 100755 index 0000000000..13d59f6bdb --- /dev/null +++ b/wxPython/samples/doodle/cxfreeze.bat @@ -0,0 +1,16 @@ + +rem This script is an example of how to use cx_Freeze on a wxPython +rem app to produce an executable. + +setlocal +set CXDIR=c:\tools\cx_Freeze-2.2 +rem set CXBASE=ConsoleBase.exe +set CXBASE=Win32GUIBase.exe + +mkdir cxdist +%CXDIR%\FreezePython.exe --base-binary %CXDIR%\%CXBASE% --install-dir cxdist superdoodle.py + +rem NOTE: Only the python DLL is copied to cxdist, you'll still need +rem to copy the wxWidgets DLLs and any others that are needed... + +endlocal diff --git a/wxPython/samples/doodle/installer.bat b/wxPython/samples/doodle/installer.bat new file mode 100755 index 0000000000..7e7adf8678 --- /dev/null +++ b/wxPython/samples/doodle/installer.bat @@ -0,0 +1,12 @@ + +rem This script is an example of how to use the McMillan Installer +rem on a wxPython app to produce an executable. + +setlocal + +set INSTDIR=c:\tools\Installer + +python %INSTDIR%\Makespec.py --onedir --noconsole superdoodle.py +python %INSTDIR%\Build.py superdoodle.spec + +endlocal diff --git a/wxPython/samples/doodle/setup.py b/wxPython/samples/doodle/setup.py index 2e72fd0dfd..020789a894 100644 --- a/wxPython/samples/doodle/setup.py +++ b/wxPython/samples/doodle/setup.py @@ -11,7 +11,7 @@ from distutils.core import setup import py2exe setup( name = "superdoodle", - #console = ["superdoodle.py", "doodle.py"] - windows = ["superdoodle.py", "doodle.py"] + #console = ["superdoodle.py"] + windows = ["superdoodle.py"] #, "doodle.py"] ) -- 2.45.2