A huge glob of changes in the 2.4 branch merged over to HEAD

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-10-02 00:58:06 +00:00
parent e3c0dc265f
commit 8b9a4190f7
180 changed files with 68512 additions and 1307 deletions

View File

@@ -50,7 +50,17 @@ Clear as mud? Good. Let's get started.
You may want to use --enable-debug instead of --enable-optimise if
you need to run though a debugger and want full debugging symbols.
if you want to use the image and zlib libraries included with
SOLARIS NOTE: The --enable-rpath option may cause problems when
using wxGTK on Solaris when compiling wxPython in step 4 below.
The woraround is to not use --enable-rpath flag for configure, but
in that case all wxPython applications must have the
LD_LIBRARY_PATH set to include $WXPREF/lib, or you can use the
'crle' program to modify the runtime linking environment. If this
is the only installation of wxGTK on the system then you can use a
system library path for WXPREF and not have to worry about it at
all.
If you want to use the image and zlib libraries included with
wxWindows instead of those already installed on your system, (for
example, to reduce dependencies on 3rd party libraries) then you
can add these flags to the configure command:
@@ -61,8 +71,8 @@ Clear as mud? Good. Let's get started.
--with-zlib=builtin \
If you would like to use GTK 2.x and unicode, then add the
following flags. Please note that this is still beta-level
quality, but does look and work quite nice for the most part:
following flags. Please note that this is still considered beta,
but does look and work quite nice for the most part:
--enable-gtk2 \
--enable-unicode \
@@ -99,7 +109,7 @@ Clear as mud? Good. Let's get started.
setup.py command line to disable the building of the glcanvas
module.
If you would like to install to someplace besides the Python
If you would like to install to some place besides the Python
site-packages directory (such as to your home directory) then you
can add "--root=<path>" after the "install" command. To use
wxPython like this you'll need to ensure that the directory
@@ -116,6 +126,12 @@ Clear as mud? Good. Let's get started.
python demo.py
SOLARIS NOTE: If you get unresolved symbol errors when importing
wxPython and you are running on Solaris and building with gcc, then
you may be able to work around the problem by uncommenting a bit of
code in setup.py and building again. Look for 'SunOS' in setup.py
and uncomment the block containing it. The problem is that Sun's ld
does not automatically add libgcc to the link step.
7. That's all, except for the having fun part!

View File

@@ -139,11 +139,13 @@ if [ -z "$skipconfig" ]; then
--enable-precomp=no \
--enable-geometry \
--enable-optimise \
--enable-debug_flag \
--with-libjpeg=builtin \
--with-libpng=builtin \
--with-libtiff=builtin \
--with-zlib=builtin
# --with-zlib=builtin
# --enable-debug_flag
fi

View File

@@ -1,5 +0,0 @@
Welcome!
This program will install wxPython 2.4.1.1 for MacPython-OSX 2.3.
Build date: Fri Jun 13 10:07:30 PDT 2003

View File

@@ -1,18 +0,0 @@
#!/bin/sh -e
# Compile the .py files in the wxPython pacakge
/usr/local/bin/python $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython
/usr/local/bin/python -O $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython
# and in the demo
/usr/local/bin/python $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/../compileall.py /Applications/wxPythonOSX-2.4.1.1/demo
# Make the demo/data dir writable
chmod a+w /Applications/wxPythonOSX-2.4.1.1/demo/data
# and the wxPython pacakge should be group writable
chgrp -R admin $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython
chgrp -R admin /Applications/wxPythonOSX-2.4.1.1
chmod -R g+w $2/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/wxPython
chmod -R g+w /Applications/wxPythonOSX-2.4.1.1
exit 0

View File

@@ -1,3 +1,16 @@
# -*- coding: iso-8859-1 -*-
#----------------------------------------------------------------------
# Name: make_installer.py
# Purpose: A script to create the wxPython windows installer
#
# Author: Robin Dunn
#
# Created: 30-April-2001
# RCS-ID: $Id$
# Copyright: (c) 2003 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
"""
This script will generate a setup script for InnoSetup and then run it
to make the installer executable. If all goes right the proper versions
@@ -25,7 +38,7 @@ AppCopyright = Copyright
DefaultDirName = {code:GetInstallDir|c:\DoNotInstallHere}
DefaultGroupName = wxPython %(SHORTVER)s for Python %(PYTHONVER)s
AlwaysCreateUninstallIcon = yes
AdminPrivilegesRequired = yes
AdminPrivilegesRequired = no
OutputDir = dist
WizardStyle = modern
UninstallStyle = modern
@@ -45,7 +58,7 @@ AppPublisherURL = http://wxPython.org/
LicenseFile = licence\licence.txt
CodeFile = %(IFSFILE)s
;; WizardDebug = yes
;;WizardDebug = yes
;;------------------------------------------------------------
@@ -64,9 +77,12 @@ Name: samples; Description: "Sample applications"; Types: full
;;------------------------------------------------------------
[Files]
Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Components: core
Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: sharedfile uninsneveruninstall restartreplace; Check: IsSysInstall; Components: core
Source: "%(SYSDIR)s\MSVCRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
Source: "%(SYSDIR)s\MSVCIRT.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
Source: "%(SYSDIR)s\MSVCP60.dll"; DestDir: "{code:GetPythonDir}"; CopyMode: alwaysskipifsameorolder; Flags: uninsneveruninstall; Check: IsNotSysInstall; Components: core
Source: "%(WXDIR)s\lib\%(WXDLL)s"; DestDir: "{app}\wxPython"; Components: core
%(MSLU)s
@@ -136,7 +152,7 @@ Source: "demo\data\*.py"; DestDir: "{app}\wxPython\demo\data";
Source: "demo\data\*.png"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.bmp"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.i"; DestDir: "{app}\wxPython\demo\data"; Components: demo
;;Source: "demo\data\*.h"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.dat"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.txt"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.wav"; DestDir: "{app}\wxPython\demo\data"; Components: demo
Source: "demo\data\*.wdr"; DestDir: "{app}\wxPython\demo\data"; Components: demo
@@ -330,12 +346,17 @@ Type: files; Name: "{app}\wx\tools\XRCed\*.pyo";
IFS_Template = r"""
program Setup;
var
PythonDir : String;
PythonDir : String;
InstallDir : String;
sysInstall : Boolean;
function InitializeSetup(): Boolean;
begin
(* -------------------------------------------------------------- *)
(* Figure out what to use as a default installation dir *)
if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath',
'', PythonDir) then begin
@@ -352,15 +373,62 @@ begin
end;
InstallDir := PythonDir;
%(IF22)s
(* -------------------------------------------------------------- *)
(* And now where to put the system DLLs *)
sysInstall := False;
(* Check if Python has a regkey in HKLM, if so it installed the DLLs in the SYSTEM dir *)
if RegValueExists(HKEY_LOCAL_MACHINE,
'Software\Python\PythonCore\%(PYTHONVER)s\InstallPath', '') then begin
sysInstall := True;
end;
(* If so, ensure that the user can write to HKLM *)
if sysInstall and not RegWriteStringValue(HKEY_LOCAL_MACHINE,
'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
'', '%(VERSION)s') then begin
(* if not then revert to installing to the Python dir *)
sysInstall := False;
(* and put the regkey in HKCU *)
RegWriteStringValue(HKEY_CURRENT_USER,
'Software\Python\PythonCore\%(PYTHONVER)s\Modules\wxPython',
'', '%(VERSION)s');
end;
Result := true;
end;
function IsSysInstall(): Boolean;
begin
Result := sysInstall;
end;
function IsNotSysInstall(): Boolean;
begin
Result := not sysInstall;
end;
function GetDLLDir(Default: String): String;
begin
if sysInstall then begin
Result := Default;
end else begin
Result := PythonDir;
end;
end;
function GetPythonDir(Default: String): String;
begin
Result := PythonDir;
end;
function GetInstallDir(Default: String): String;
begin
Result := InstallDir;
@@ -430,6 +498,14 @@ def build_locale_string():
os.path.walk('wxPython\\locale', walk_helper, stringlst)
return '\n'.join(stringlst)
def get_system_dir():
for p in [r"C:\WINNT\SYSTEM32",
r"C:\WINDOWS\SYSTEM32",
]:
if os.path.exists(p):
return p
raise IOError, "System dir not found"
#----------------------------------------------------------------------
@@ -446,7 +522,7 @@ def main():
PYVER = "Py" + PYTHONVER[0] + PYTHONVER[2]
WXDIR = os.environ["WXWIN"]
WXPYDIR = os.path.join(WXDIR, "wxPython")
SYSDIR = r"C:\WINNT\SYSTEM32"
SYSDIR = get_system_dir()
ISSFILE = "__wxPython.iss"
IFSFILE = "__wxPython.ifs"
LOCALE = build_locale_string()

29
wxPython/distrib/makesrpm Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
#----------------------------------------------------------------------
if [ ! -d wxPython -o ! -e distrib/makerpm ]; then
echo "Please run this script from the root wxPython directory."
exit 1
fi
#----------------------------------------------------------------------
# Check parameters
function useage {
echo "Usage: $0 wx_version "
echo " wx_version String to use for version in filenames, etc."
}
if [ $# -lt 1 ]; then
useage
exit 1
fi
ver=$1
distrib/makerpm $ver 2.2 skipclean srpm
distrib/makerpm $ver 2.3 skipclean skipcopy skiptar srpm
distrib/makerpm $ver 2.2 skipclean skipcopy skiptar srpm gtk2
distrib/makerpm $ver 2.3 skipclean skipcopy skiptar srpm gtk2

View File

@@ -8,8 +8,8 @@
%define version @VERSION@
%define ver2 @VER2@
%define release 1
%define wxpref %{pref}/lib/wxPython-%{version}
%define wxprefbase %{pref}/lib/wxPython
%define wxpref %{wxprefbase}-%{version}
%define name wxPython%{port}-py%{pyver}
@@ -188,7 +188,7 @@ cd $WXDIR/wxPython
#
# TODO: Should this be dependent on %{builtin_libs} or something like it?
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT%{pref}/bin
for s in \
helpviewer \
img2png \
@@ -200,25 +200,30 @@ for s in \
pywrap \
pyshell \
xrced; do
cp scripts/$s $RPM_BUILD_ROOT/%{pref}/bin
cp scripts/$s $RPM_BUILD_ROOT%{pref}/bin
done
# Install wxrc
cp $WXDIR/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT/%{pref}/bin
cp $WXDIR/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT%{pref}/bin
# link specific name to generic name
ln -s wxPython-%{version} $RPM_BUILD_ROOT%{wxprefbase}
# Copy icons and make menu entries
#-- This only works for Mandrake. Is there a cross-distro way to do it?
##mkdir -p $RPM_BUILD_ROOT/%{_iconsdir}
##mkdir -p $RPM_BUILD_ROOT/%{_miconsdir}
##mkdir -p $RPM_BUILD_ROOT/%{_menudir}
##install -p -m 644 $WXDIR/wxPython/wxPython/py/PyCrust_32.png $RPM_BUILD_ROOT/%{_iconsdir}/PyCrust.png
##install -p -m 644 $WXDIR/wxPython/wxPython/py/PyCrust_16.png $RPM_BUILD_ROOT/%{_miconsdir}/PyCrust.png
##install -p -m 644 $WXDIR/wxPython/wxPython/tools/XRCed/XRCed_32.png $RPM_BUILD_ROOT/%{_iconsdir}/XRCed.png
##install -p -m 644 $WXDIR/wxPython/wxPython/tools/XRCed/XRCed_16.png $RPM_BUILD_ROOT/%{_miconsdir}/XRCed.png
##mkdir -p $RPM_BUILD_ROOT%{_iconsdir}
##mkdir -p $RPM_BUILD_ROOT%{_miconsdir}
##mkdir -p $RPM_BUILD_ROOT%{_menudir}
##install -p -m 644 $WXDIR/wxPython/wxPython/py/PyCrust_32.png $RPM_BUILD_ROOT%{_iconsdir}/PyCrust.png
##install -p -m 644 $WXDIR/wxPython/wxPython/py/PyCrust_16.png $RPM_BUILD_ROOT%{_miconsdir}/PyCrust.png
##install -p -m 644 $WXDIR/wxPython/wxPython/tools/XRCed/XRCed_32.png $RPM_BUILD_ROOT%{_iconsdir}/XRCed.png
##install -p -m 644 $WXDIR/wxPython/wxPython/tools/XRCed/XRCed_16.png $RPM_BUILD_ROOT%{_miconsdir}/XRCed.png
##
##cat > $RPM_BUILD_ROOT/%{_menudir}/%{name} <<EOF
##cat > $RPM_BUILD_ROOT%{_menudir}/%{name} <<EOF
##?package(%{name}): command="%_bindir/pyshell" needs="X11" \
##icon="PyCrust.png" section="Applications/Development" \
##title="PyShell" longtitle="Python Shell"
@@ -253,6 +258,7 @@ $GFL $RPM_BUILD_ROOT %{pref}/lib >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{pref}/lib/python%{pyver} >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{pref}/share >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxpref} >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxprefbase} >> FILELIST
$GFL $RPM_BUILD_ROOT %{wxpref}/lib >> FILELIST
$GFL $RPM_BUILD_ROOT "%{wxpref}/lib/libwx*" >> FILELIST
$GFL -r $RPM_BUILD_ROOT %{wxpref}/share >> FILELIST
@@ -274,11 +280,10 @@ $GFL $RPM_BUILD_ROOT %{wxpref}/bin/wx-config >> DEVELLIST
##%{clean_menus}
%post
%pre
if [ -e %{wxprefbase} ]; then
rm %{wxprefbase}
rm -r %{wxprefbase}
fi
ln -s %{wxpref} %{wxprefbase}
%postun
if [ -e %{wxprefbase} ]; then

View File

@@ -21,9 +21,6 @@ import os, sys, glob
wxmodule_template = """
\"\"\"Renamer stub: provides a way to drop the wx prefix from wxPython objects.\"\"\"
__cvsid__ = \"\x24Id: \x24\"
__revision__ = \"\x24Revision: \x24\"[11:-2]
from wx import _rename
from wxPython%(prefix)s import %(suffix)s
_rename(globals(), %(suffix)s.__dict__, modulename='%(name)s')
@@ -31,6 +28,11 @@ del %(suffix)s
del _rename
"""
call_main = """
if __name__ == '__main__':
main()
"""
wxPython_dir = "../wxPython"
subpackage_list = ['.',
@@ -50,6 +52,9 @@ skip_modules = [ '__init__', '__version__',
]
add_call_main = ['py/PyAlaCarte.py', 'py/PyAlaMode.py', 'py/PyCrust.py',
'py/PyFilling.py', 'py/PyShell.py', 'py/PyWrap.py'
]
@@ -104,6 +109,8 @@ for subdir in subpackage_list:
content = wxmodule_template % globals()
f = open(fname, 'w')
f.write(content)
if fname in add_call_main:
f.write(call_main)
f.close()
print fname + ' created'