Compare commits

..

1 Commits

Author SHA1 Message Date
Bryan Petty
c4118e401e This commit was manufactured by cvs2svn to create tag 'WX_2_5_3'.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_5_3@29775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-10 22:43:06 +00:00
158 changed files with 2693 additions and 12650 deletions

4
configure vendored
View File

@@ -1654,7 +1654,7 @@ test -n "$target_alias" &&
wx_major_version_number=2
wx_minor_version_number=5
wx_release_number=3
wx_subrelease_number=1
wx_subrelease_number=0
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
WX_VERSION=$WX_RELEASE.$wx_release_number
@@ -39781,8 +39781,6 @@ fi
BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.4"

View File

@@ -56,7 +56,7 @@ dnl libwx_$(TOOLKIT)-$(WX_RELEASE).so.$(WX_CURRENT).$(WX_REVISION).$(WX_AGE)
wx_major_version_number=2
wx_minor_version_number=5
wx_release_number=3
wx_subrelease_number=1
wx_subrelease_number=0
WX_RELEASE=$wx_major_version_number.$wx_minor_version_number
WX_VERSION=$WX_RELEASE.$wx_release_number

View File

@@ -3109,26 +3109,36 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
// Utility functions used within wxSTC
#ifndef SWIG
#if wxUSE_UNICODE
wxString stc2wx(const char* str);
wxString stc2wx(const char* str, size_t len);
const wxWX2MBbuf wx2stc(const wxString& str);
#else // not UNICODE
inline wxString stc2wx(const char* str) {
#if wxUSE_UNICODE
return wxString(str, wxConvUTF8);
#else
return wxString(str);
#endif
}
#if wxUSE_UNICODE
wxString stc2wx(const char* str, size_t len);
#else
inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
}
#endif
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mb_str(wxConvUTF8);
}
#else
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mbc_str();
}
#endif
#endif
#endif // UNICODE
#endif // SWIG
//----------------------------------------------------------------------
#endif

View File

@@ -299,9 +299,7 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
wxSize clientSize = GetClientSize();
wxRect itemRect;
wxTreeItemId h, lastH;
for (h=GetFirstVisibleItem();
h.IsOk();
h=GetNextVisible(h))
for(h=GetFirstVisibleItem();h;h=GetNextVisible(h))
{
if (GetBoundingRect(h, itemRect))
{
@@ -309,8 +307,6 @@ void wxRemotelyScrolledTreeCtrl::OnPaint(wxPaintEvent& event)
dc.DrawLine(0, cy, clientSize.x, cy);
lastH = h;
}
if (! IsVisible(h))
break;
}
if (lastH.IsOk() && GetBoundingRect(lastH, itemRect))
{
@@ -512,9 +508,7 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
wxSize clientSize = GetClientSize();
wxRect itemRect;
wxTreeItemId h, lastH;
for (h=m_treeCtrl->GetFirstVisibleItem();
h.IsOk();
h=m_treeCtrl->GetNextVisible(h))
for(h=m_treeCtrl->GetFirstVisibleItem();h;h=m_treeCtrl->GetNextVisible(h))
{
if (m_treeCtrl->GetBoundingRect(h, itemRect))
{
@@ -527,8 +521,6 @@ void wxTreeCompanionWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
DrawItem(dc, h, drawItemRect);
dc.DrawLine(0, cy, clientSize.x, cy);
}
if (! m_treeCtrl->IsVisible(h))
break;
}
if (lastH.IsOk() && m_treeCtrl->GetBoundingRect(lastH, itemRect))
{

View File

@@ -1249,47 +1249,25 @@ double ElapsedTime::Duration(bool reset) {
//----------------------------------------------------------------------
#if wxUSE_UNICODE
#include "UniConversion.h"
// Convert using Scintilla's functions instead of wx's, Scintilla's are more
// forgiving and won't assert...
wxString stc2wx(const char* str, size_t len)
{
// note: we assume that str is of length len not including the terminating null.
if (!len)
return wxEmptyString;
else if (str[len-1] == 0)
// It's already terminated correctly.
return wxString(str, wxConvUTF8, len);
size_t wclen = UCS2Length(str, len);
wxWCharBuffer buffer(wclen+1);
char *buffer=new char[len+1];
strncpy(buffer, str, len);
buffer[len]=0;
size_t actualLen = UCS2FromUTF8(str, len, buffer.data(), wclen+1);
return wxString(buffer.data(), actualLen);
wxString cstr(buffer, wxConvUTF8, len);
delete[] buffer;
return cstr;
}
wxString stc2wx(const char* str)
{
return stc2wx(str, strlen(str));
}
const wxWX2MBbuf wx2stc(const wxString& str)
{
const wchar_t* wcstr = str.c_str();
size_t wclen = str.length();
size_t len = UTF8Length(wcstr, wclen);
wxCharBuffer buffer(len+1);
UTF8FromUCS2(wcstr, wclen, buffer.data(), len);
// TODO check NULL termination!!
return buffer;
}
#endif

View File

@@ -463,26 +463,36 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
// Utility functions used within wxSTC
#ifndef SWIG
#if wxUSE_UNICODE
wxString stc2wx(const char* str);
wxString stc2wx(const char* str, size_t len);
const wxWX2MBbuf wx2stc(const wxString& str);
#else // not UNICODE
inline wxString stc2wx(const char* str) {
#if wxUSE_UNICODE
return wxString(str, wxConvUTF8);
#else
return wxString(str);
#endif
}
#if wxUSE_UNICODE
wxString stc2wx(const char* str, size_t len);
#else
inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
}
#endif
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mb_str(wxConvUTF8);
}
#else
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mbc_str();
}
#endif
#endif
#endif // UNICODE
#endif // SWIG
//----------------------------------------------------------------------
#endif

View File

@@ -518,14 +518,5 @@
# define wxUSE_WXDIB 1
#endif
/*
We need AvailabilityMacros.h for ifdefing out things that don't exist on
OSX 10.2 and lower
FIXME: We need a better way to detect for 10.3 then including a system header
*/
#ifdef __DARWIN__
#include <AvailabilityMacros.h>
#endif
#endif /* _WX_PLATFORM_H_ */

View File

@@ -3109,26 +3109,36 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
// Utility functions used within wxSTC
#ifndef SWIG
#if wxUSE_UNICODE
wxString stc2wx(const char* str);
wxString stc2wx(const char* str, size_t len);
const wxWX2MBbuf wx2stc(const wxString& str);
#else // not UNICODE
inline wxString stc2wx(const char* str) {
#if wxUSE_UNICODE
return wxString(str, wxConvUTF8);
#else
return wxString(str);
#endif
}
#if wxUSE_UNICODE
wxString stc2wx(const char* str, size_t len);
#else
inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
}
#endif
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mb_str(wxConvUTF8);
}
#else
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mbc_str();
}
#endif
#endif
#endif // UNICODE
#endif // SWIG
//----------------------------------------------------------------------
#endif

View File

@@ -22,7 +22,7 @@
#define wxMAJOR_VERSION 2
#define wxMINOR_VERSION 5
#define wxRELEASE_NUMBER 3
#define wxSUBRELEASE_NUMBER 1
#define wxSUBRELEASE_NUMBER 0
#define wxVERSION_STRING _T("wxWidgets 2.5.3")
/* nothing to update below this line when updating the version */

View File

@@ -1168,11 +1168,16 @@ wxDateTime& wxDateTime::Set(const struct tm& tm)
// less than timezone - try to make it work for this case
if ( tm2.tm_year == 70 && tm2.tm_mon == 0 && tm2.tm_mday == 1 )
{
return Set((time_t)(
GetTimeZone() +
tm2.tm_hour * MIN_PER_HOUR * SEC_PER_MIN +
tm2.tm_min * SEC_PER_MIN +
tm2.tm_sec));
// add timezone to make sure that date is in range
tm2.tm_sec -= GetTimeZone();
timet = mktime(&tm2);
if ( timet != (time_t)-1 )
{
timet += GetTimeZone();
return Set(timet);
}
}
wxFAIL_MSG( _T("mktime() failed") );
@@ -1257,10 +1262,7 @@ wxDateTime& wxDateTime::Set(wxDateTime_t day,
(void)Set(tm);
// and finally adjust milliseconds
if (IsValid())
SetMillisecond(millisec);
return *this;
return SetMillisecond(millisec);
}
else
{

View File

@@ -316,10 +316,6 @@ void wxDCBase::DoDrawSpline( wxList *points )
double x1, y1, x2, y2;
wxList::compatibility_iterator node = points->GetFirst();
if (node == NULL)
// empty list
return;
p = (wxPoint *)node->GetData();
x1 = p->x;

View File

@@ -170,19 +170,17 @@ void wxMDIParentFrame::OnInternalIdle()
/* need to set the menubar of the child */
wxMDIChildFrame *active_child_frame = GetActiveChild();
if (active_child_frame != NULL)
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
if (menu_bar)
{
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
if (menu_bar)
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow(active_child_frame);
}
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow(active_child_frame);
}
m_justInserted = false;
return;
}

View File

@@ -170,19 +170,17 @@ void wxMDIParentFrame::OnInternalIdle()
/* need to set the menubar of the child */
wxMDIChildFrame *active_child_frame = GetActiveChild();
if (active_child_frame != NULL)
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
if (menu_bar)
{
wxMenuBar *menu_bar = active_child_frame->m_menuBar;
if (menu_bar)
{
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow(active_child_frame);
}
menu_bar->m_width = m_width;
menu_bar->m_height = wxMENU_HEIGHT;
gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
menu_bar->m_widget,
0, 0, m_width, wxMENU_HEIGHT );
menu_bar->SetInvokingWindow(active_child_frame);
}
m_justInserted = false;
return;
}

View File

@@ -0,0 +1,201 @@
/* -------------------------------------------------------------------------
* Project: GSocket (Generic Socket) for WX
* Name: gsockosx.c
* Purpose: GSocket: Mac OS X mach-o part
* CVSID: $Id$
* Mac code by Brian Victor, February 2002. Email comments to bhv1@psu.edu
* ------------------------------------------------------------------------- */
#include "wx/setup.h"
#if wxUSE_SOCKETS
#include <stdlib.h>
#include "wx/gsocket.h"
#include "wx/unix/gsockunx.h"
#include <CoreFoundation/CoreFoundation.h>
#define ALL_CALLBACK_TYPES (kCFSocketReadCallBack | kCFSocketWriteCallBack | kCFSocketConnectCallBack)
struct MacGSocketData
{
CFSocketRef socket;
CFRunLoopSourceRef source;
};
// Sockets must use the event loop on the main thread
// We will store the main loop's reference when Initialize is called
static CFRunLoopRef s_mainRunLoop = NULL;
void Mac_Socket_Callback(CFSocketRef s, CFSocketCallBackType callbackType,
CFDataRef address, const void* data, void* info)
{
GSocket* socket = (GSocket*)info;
struct MacGSocketData* macdata;
macdata = (struct MacGSocketData*)socket->m_gui_dependent;
if (!macdata) return;
switch (callbackType)
{
case kCFSocketConnectCallBack:
assert(!socket->m_server);
socket->Detected_Write();
break;
case kCFSocketReadCallBack:
socket->Detected_Read();
break;
case kCFSocketWriteCallBack:
socket->Detected_Write();
break;
default:
break; /* We shouldn't get here. */
}
}
struct MacGSocketData* _GSocket_Get_Mac_Socket(GSocket *socket)
{
/* If socket is already created, returns a pointer to the data */
/* Otherwise, creates socket and returns the pointer */
CFSocketContext cont;
struct MacGSocketData* data = (struct MacGSocketData*)socket->m_gui_dependent;
if (data && data->source) return data;
/* CFSocket has not been created, create it: */
if (socket->m_fd < 0 || !data) return NULL;
cont.version = 0; cont.retain = NULL;
cont.release = NULL; cont.copyDescription = NULL;
cont.info = socket;
CFSocketRef cf = CFSocketCreateWithNative(NULL, socket->m_fd,
ALL_CALLBACK_TYPES, Mac_Socket_Callback, &cont);
CFRunLoopSourceRef source = CFSocketCreateRunLoopSource(NULL, cf, 0);
assert(source);
socket->m_gui_dependent = (char*)data;
/* Keep the source and the socket around. */
data->source = source;
data->socket = cf;
return data;
}
bool GSocketGUIFunctionsTableConcrete::CanUseEventLoop()
{ return true; }
bool GSocketGUIFunctionsTableConcrete::OnInit(void)
{
// No need to store the main loop again
if (s_mainRunLoop != NULL)
return true;
// Get the loop for the main thread so our events will actually fire.
// The common socket.cpp code will assert if initialize is called from a
// secondary thread, otherwise Mac would have the same problems as MSW
s_mainRunLoop = CFRunLoopGetCurrent();
CFRetain(s_mainRunLoop);
return true;
}
void GSocketGUIFunctionsTableConcrete::OnExit(void)
{
// Release the reference count, and set the reference back to NULL
CFRelease(s_mainRunLoop);
s_mainRunLoop = NULL;
}
bool GSocketGUIFunctionsTableConcrete::Init_Socket(GSocket *socket)
{
struct MacGSocketData *data = (struct MacGSocketData *)malloc(sizeof(struct MacGSocketData));
if (data)
{
socket->m_gui_dependent = (char*)data;
data->socket = NULL;
data->source = NULL;
return 1;
}
return 0;
}
void GSocketGUIFunctionsTableConcrete::Destroy_Socket(GSocket *socket)
{
struct MacGSocketData *data = (struct MacGSocketData*)(socket->m_gui_dependent);
if (data)
{
CFRelease(data->socket);
free(data);
}
}
void GSocketGUIFunctionsTableConcrete::Install_Callback(GSocket *socket, GSocketEvent event)
{
int c;
struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
if (!data) return;
switch (event)
{
case GSOCK_CONNECTION:
if(socket->m_server)
c = kCFSocketReadCallBack;
else
c = kCFSocketConnectCallBack;
break;
case GSOCK_LOST:
case GSOCK_INPUT:
c = kCFSocketReadCallBack;
break;
case GSOCK_OUTPUT:
c = kCFSocketWriteCallBack;
break;
default:
c = 0;
}
CFSocketEnableCallBacks(data->socket, c);
}
void GSocketGUIFunctionsTableConcrete::Uninstall_Callback(GSocket *socket, GSocketEvent event)
{
int c;
struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
if (!data) return;
switch (event)
{
case GSOCK_CONNECTION:
if(socket->m_server)
c = kCFSocketReadCallBack;
else
c = kCFSocketConnectCallBack;
break;
case GSOCK_LOST:
case GSOCK_INPUT:
c = kCFSocketReadCallBack;
break;
case GSOCK_OUTPUT:
c = kCFSocketWriteCallBack;
break;
default:
c = 0;
}
CFSocketDisableCallBacks(data->socket, c);
}
void GSocketGUIFunctionsTableConcrete::Enable_Events(GSocket *socket)
{
struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
if (!data) return;
CFRunLoopAddSource(s_mainRunLoop, data->source, kCFRunLoopCommonModes);
}
void GSocketGUIFunctionsTableConcrete::Disable_Events(GSocket *socket)
{
struct MacGSocketData* data = _GSocket_Get_Mac_Socket(socket);
if (!data) return;
/* CFSocketInvalidate does CFRunLoopRemoveSource anyway */
CFRunLoopRemoveSource(s_mainRunLoop, data->source, kCFRunLoopCommonModes);
CFSocketInvalidate(data->socket);
}
#endif // wxUSE_SOCKETS

View File

@@ -254,15 +254,6 @@ WXLRESULT wxComboBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
UnpackCtlColor(wParam, lParam, &nCtlColor, &hdc, &hwnd);
return (WXLRESULT)OnCtlColor(hdc, hwnd, nCtlColor, nMsg, wParam, lParam);
case CB_SETCURSEL:
// Selection was set with SetSelection. Update the value too.
if (wParam < 0 || wParam > GetCount())
m_value = wxEmptyString;
else
m_value = GetString(wParam);
break;
}
return wxChoice::MSWWindowProc(nMsg, wParam, lParam);

View File

@@ -1249,47 +1249,25 @@ double ElapsedTime::Duration(bool reset) {
//----------------------------------------------------------------------
#if wxUSE_UNICODE
#include "UniConversion.h"
// Convert using Scintilla's functions instead of wx's, Scintilla's are more
// forgiving and won't assert...
wxString stc2wx(const char* str, size_t len)
{
// note: we assume that str is of length len not including the terminating null.
if (!len)
return wxEmptyString;
else if (str[len-1] == 0)
// It's already terminated correctly.
return wxString(str, wxConvUTF8, len);
size_t wclen = UCS2Length(str, len);
wxWCharBuffer buffer(wclen+1);
char *buffer=new char[len+1];
strncpy(buffer, str, len);
buffer[len]=0;
size_t actualLen = UCS2FromUTF8(str, len, buffer.data(), wclen+1);
return wxString(buffer.data(), actualLen);
wxString cstr(buffer, wxConvUTF8, len);
delete[] buffer;
return cstr;
}
wxString stc2wx(const char* str)
{
return stc2wx(str, strlen(str));
}
const wxWX2MBbuf wx2stc(const wxString& str)
{
const wchar_t* wcstr = str.c_str();
size_t wclen = str.length();
size_t len = UTF8Length(wcstr, wclen);
wxCharBuffer buffer(len+1);
UTF8FromUCS2(wcstr, wclen, buffer.data(), len);
// TODO check NULL termination!!
return buffer;
}
#endif

View File

@@ -463,26 +463,36 @@ typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
// Utility functions used within wxSTC
#ifndef SWIG
#if wxUSE_UNICODE
wxString stc2wx(const char* str);
wxString stc2wx(const char* str, size_t len);
const wxWX2MBbuf wx2stc(const wxString& str);
#else // not UNICODE
inline wxString stc2wx(const char* str) {
#if wxUSE_UNICODE
return wxString(str, wxConvUTF8);
#else
return wxString(str);
#endif
}
#if wxUSE_UNICODE
wxString stc2wx(const char* str, size_t len);
#else
inline wxString stc2wx(const char* str, size_t len) {
return wxString(str, len);
}
#endif
#if wxUSE_UNICODE
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mb_str(wxConvUTF8);
}
#else
inline const wxWX2MBbuf wx2stc(const wxString& str) {
return str.mbc_str();
}
#endif
#endif
#endif // UNICODE
#endif // SWIG
//----------------------------------------------------------------------
#endif

View File

@@ -39,8 +39,8 @@ import distutils.command.clean
VER_MAJOR = 2 # The first three must match wxWidgets
VER_MINOR = 5
VER_RELEASE = 3
VER_SUBREL = 1 # wxPython release num for x.y.z release of wxWidgets
VER_FLAGS = "" # release flags, such as prerelease num, unicode, etc.
VER_SUBREL = 0 # wxPython release num for x.y.z release of wxWidgets
VER_FLAGS = "p" # release flags, such as prerelease num, unicode, etc.
DESCRIPTION = "Cross platform GUI toolkit for Python"
AUTHOR = "Robin Dunn"
@@ -135,10 +135,9 @@ INSTALL_MULTIVERSION = 1 # Install the packages such that multiple versions
FLAVOUR = "" # Optional flavour string to be appended to VERSION
# in MULTIVERSION installs
EP_ADD_OPTS = 1 # When doing MULTIVERSION installs the wx port and
EP_ADD_OPTS = 0 # When doing MULTIVERSION installs the wx port and
# ansi/unicode settings can optionally be added to the
# subdir path used in site-packages
# subdir path used in site-packages
WX_CONFIG = None # Usually you shouldn't need to touch this, but you can set
# it to pass an alternate version of wx-config or alternate
@@ -568,8 +567,8 @@ def getExtraPath(shortVer=True, addOpts=False):
ep = "wx-%d.%d" % (VER_MAJOR, VER_MINOR)
# plus release if minor is odd
if VER_MINOR % 2 == 1:
ep += ".%d" % VER_RELEASE
#if VER_MINOR % 2 == 1:
# ep += ".%d" % VER_RELEASE
else:
# long version, full version
@@ -606,7 +605,7 @@ if debug:
if FINAL:
HYBRID = 0
if UNICODE and WXPORT not in ['msw', 'gtk2', 'mac']:
if UNICODE and WXPORT not in ['msw', 'gtk2']:
raise SystemExit, "UNICODE mode not currently supported on this WXPORT: "+WXPORT

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,6 @@ cellpadding="0" border="1">
<tr>
<td align="center">
<h1>wxPython %s</h1>
(%s)<br>
Running on Python %s<br>
</td>
</tr>
@@ -30,7 +29,7 @@ sit back and enjoy. Be sure to take a peek at the source code for each
demo item so you can learn how to use the classes yourself.</p>
<p><b>wxPython</b> is brought to you by <b>Robin Dunn</b> and<br>
<b>Total Control Software,</b> Copyright (c) 1997-2004.</p>
<b>Total Control Software,</b> Copyright (c) 1997-2003.</p>
<p>
<font size="-1">Please see <i>license.txt</i> for licensing information.</font>
@@ -50,10 +49,7 @@ demo item so you can learn how to use the classes yourself.</p>
if "gtk2" in wx.PlatformInfo:
html.SetStandardFonts()
py_version = sys.version.split()[0]
html.SetPage(self.text % (wx.VERSION_STRING,
", ".join(wx.PlatformInfo[1:]),
py_version
))
html.SetPage(self.text % (wx.VERSION_STRING, py_version))
btn = html.FindWindowById(wx.ID_OK)
ir = html.GetInternalRepresentation()
html.SetSize( (ir.GetWidth()+25, ir.GetHeight()+25) )

View File

@@ -68,10 +68,10 @@ def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'This demo only works on Microsoft Windows.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(frame, 'This demo only works on MSW.',
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
overview = """\

View File

@@ -191,10 +191,10 @@ def runTest(frame, nb, log):
win = TestPanel(nb, log, frame)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'This demo only works on Microsoft Windows.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(frame, 'This demo only works on Windows.',
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()

View File

@@ -67,10 +67,10 @@ def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'This demo only works on Microsoft Windows.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(frame, 'This demo only works on MSW.',
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
overview = """\

View File

@@ -92,10 +92,8 @@ class SimpleView(wx.Panel):
def runTest(frame, nb, log):
if wx.Platform == "__WXMAC__":
from Main import MessagePanel
win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...',
'Sorry', wx.ICON_WARNING)
return win
wx.MessageBox("This demo currently fails on the Mac. The problem is being looked into...", "Sorry")
return
if 1:
win = gizmos.DynamicSashWindow(nb, -1, style = wx.CLIP_CHILDREN

View File

@@ -93,7 +93,7 @@ class TestPanel(wx.Panel):
if wx.Platform == "__WXMAC__":
dlg = wx.MessageDialog(
self, 'FloatBar does not work well on this platform.',
'Sorry', wx.OK | wx.ICON_WARNING
'Sorry', wx.OK | wx.ICON_INFORMATION
)
dlg.ShowModal()
dlg.Destroy()

View File

@@ -53,7 +53,7 @@ class ButtonPanel(wx.Panel):
if not haveGLCanvas:
dlg = wx.MessageDialog(self,
'The GLCanvas class has not been included with this build of wxPython!',
'Sorry', wx.OK | wx.ICON_WARNING)
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
@@ -61,7 +61,7 @@ class ButtonPanel(wx.Panel):
dlg = wx.MessageDialog(self,
'The OpenGL package was not found. You can get it at\n'
'http://PyOpenGL.sourceforge.net/',
'Sorry', wx.OK | wx.ICON_WARNING)
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()

View File

@@ -12,10 +12,7 @@ static text is positioned at (0,0) and it spans 7 columns.
class TestFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "wx.GridBagSizer")
p = wx.Panel(self, -1, style = wx.TAB_TRAVERSAL
| wx.CLIP_CHILDREN
| wx.FULL_REPAINT_ON_RESIZE
)
p = wx.Panel(self, -1)
p.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown)
gbs = self.gbs = wx.GridBagSizer(5, 5)

View File

@@ -14,7 +14,7 @@ class SimpleGrid(gridlib.Grid): ##, mixins.GridAutoEditMixin):
self.Bind(wx.EVT_IDLE, self.OnIdle)
self.CreateGrid(25, 25)#, gridlib.Grid.SelectRows)
self.CreateGrid(25, 25) #, wxGrid.wxGridSelectRows)
##self.EnableEditing(False)
# simple cell formatting

View File

@@ -994,10 +994,12 @@ def runTest(frame, nb, log):
win = JoystickDemoPanel(nb, log)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'wx.Joystick is not available on this platform.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(
frame, 'wx.Joystick is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
dlg.ShowModal()
dlg.Destroy()
#----------------------------------------------------------------------------

View File

@@ -40,8 +40,7 @@ class AnchorsDemoFrame(wx.Frame):
self.mainPanel = wx.Panel(
size=(320, 160), parent=self,
id=ID_ANCHORSDEMOFRAMEMAINPANEL, name='panel1',
style=wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN
| wx.FULL_REPAINT_ON_RESIZE,
style=wx.TAB_TRAVERSAL | wx.CLIP_CHILDREN,
pos=(0, 0)
)

View File

@@ -114,7 +114,7 @@ class TestListCtrlPanel(wx.Panel, listmix.ColumnSorterMixin):
self.PopulateList()
# Now that the list exists we can init the other base class,
# see wx/lib/mixins/listctrl.py
# see wxPython/lib/mixins/listctrl.py
self.itemDataMap = musicdata
listmix.ColumnSorterMixin.__init__(self, 3)
#self.SortListItems(0, True)
@@ -190,11 +190,11 @@ class TestListCtrlPanel(wx.Panel, listmix.ColumnSorterMixin):
self.currentItem = 0
# Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py
# Used by the ColumnSorterMixin, see wxPython/lib/mixins/listctrl.py
def GetListCtrl(self):
return self.list
# Used by the ColumnSorterMixin, see wx/lib/mixins/listctrl.py
# Used by the ColumnSorterMixin, see wxPython/lib/mixins/listctrl.py
def GetSortImages(self):
return (self.sm_dn, self.sm_up)

View File

@@ -1,141 +0,0 @@
#----------------------------------------------------------------------------
# Name: ListCtrl_edit.py
# Purpose: Testing editing a ListCtrl
#
# Author: Pim van Heuven
#
# Created: 2004/10/15
# Copyright: (c) Pim Van Heuven
# Licence: wxWindows license
#----------------------------------------------------------------------------
import sys
import wx
import wx.lib.mixins.listctrl as listmix
#---------------------------------------------------------------------------
listctrldata = {
1 : ("Hey!", "You can edit", "me!"),
2 : ("Try changing the contents", "by", "clicking"),
3 : ("in", "a", "cell"),
4 : ("See how the length columns", "change", "?"),
5 : ("You can use", "TAB,", "cursor down,"),
6 : ("and cursor up", "to", "navigate"),
}
#---------------------------------------------------------------------------
class TestListCtrl(wx.ListCtrl,
listmix.ListCtrlAutoWidthMixin,
listmix.TextEditMixin):
def __init__(self, parent, ID, pos=wx.DefaultPosition,
size=wx.DefaultSize, style=0):
wx.ListCtrl.__init__(self, parent, ID, pos, size, style)
listmix.ListCtrlAutoWidthMixin.__init__(self)
self.Populate()
listmix.TextEditMixin.__init__(self)
def Populate(self):
# for normal, simple columns, you can add them like this:
self.InsertColumn(0, "Column 1")
self.InsertColumn(1, "Column 2")
self.InsertColumn(2, "Column 3")
self.InsertColumn(3, "Len 1", wx.LIST_FORMAT_RIGHT)
self.InsertColumn(4, "Len 2", wx.LIST_FORMAT_RIGHT)
self.InsertColumn(5, "Len 3", wx.LIST_FORMAT_RIGHT)
items = listctrldata.items()
for key, data in items:
index = self.InsertStringItem(sys.maxint, data[0])
self.SetStringItem(index, 0, data[0])
self.SetStringItem(index, 1, data[1])
self.SetStringItem(index, 2, data[2])
self.SetItemData(index, key)
self.SetColumnWidth(0, wx.LIST_AUTOSIZE)
self.SetColumnWidth(1, wx.LIST_AUTOSIZE)
self.SetColumnWidth(2, 100)
self.currentItem = 0
def SetStringItem(self, index, col, data):
if col in range(3):
wx.ListCtrl.SetStringItem(self, index, col, data)
wx.ListCtrl.SetStringItem(self, index, 3+col, str(len(data)))
else:
try:
datalen = int(data)
except:
return
wx.ListCtrl.SetStringItem(self, index, col, data)
data = self.GetItem(index, col-3).GetText()
wx.ListCtrl.SetStringItem(self, index, col-3, data[0:datalen])
class TestListCtrlPanel(wx.Panel):
def __init__(self, parent, log):
wx.Panel.__init__(self, parent, -1, style=wx.WANTS_CHARS)
self.log = log
tID = wx.NewId()
self.list = TestListCtrl(self, tID,
style=wx.LC_REPORT
| wx.BORDER_NONE
| wx.LC_SORT_ASCENDING
)
self.Bind(wx.EVT_SIZE, self.OnSize)
def OnSize(self, event):
w,h = self.GetClientSizeTuple()
self.list.SetDimensions(0, 0, w, h)
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestListCtrlPanel(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
<html>
<body>
This demo demonstrates direct editing of all cells of a ListCtrl. To
enable it just include the <b>TextEditMixin</b>. The ListCtrl can be
navigated with the TAB and up/down cursor keys.
<p>Another facet of this demo is that the remaining space of the
ListCtrls is divided over the first three columns. This is achieved
with the extended syntax of <b>ListCtrlAutoWidthMixin</b>:
<code>listmix.ListCtrlAutoWidthMixin.__init__(self, startcol, endcol)</code>
(Look at the general ListCtrl demo for more information about the
ListCtrlAutoWidthMixin)
<p>Finally, the ListCtrl is automatically scrolled, if needed, when
TAB is pressed consecutively (Windows only).
</body>
</html>
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:])

View File

@@ -36,7 +36,7 @@ class TestLB(wx.Listbook):
# make an image list using the BlomXX images
il = wx.ImageList(32, 32)
for x in range(1, 16):
for x in range(1, 15):
f = getattr(images, 'getBlom%02dBitmap' % x)
bmp = f()
il.Add(bmp)

View File

@@ -50,7 +50,6 @@ _treeList = [
'StockButtons',
'Ticker',
'Choicebook',
'ListCtrl_edit',
]),
# managed windows == things with a (optional) caption you can close
@@ -99,7 +98,6 @@ _treeList = [
'ListBox',
'ListCtrl',
'ListCtrl_virtual',
'ListCtrl_edit',
'Listbook',
'Menu',
'Notebook',
@@ -265,60 +263,6 @@ class MyTP(wx.PyTipProvider):
def GetTip(self):
return "This is my tip"
#---------------------------------------------------------------------------
# A class to be used to simply display a message in the demo pane
# rather than running the sample itself.
class MessagePanel(wx.Panel):
def __init__(self, parent, message, caption='', flags=0):
wx.Panel.__init__(self, parent)
# Make widgets
if flags:
artid = None
if flags & wx.ICON_EXCLAMATION:
artid = wx.ART_WARNING
elif flags & wx.ICON_ERROR:
artid = wx.ART_ERROR
elif flags & wx.ICON_QUESTION:
artid = wx.ART_QUESTION
elif flags & wx.ICON_INFORMATION:
artid = wx.ART_INFORMATION
if artid is not None:
bmp = wx.ArtProvider.GetBitmap(artid, wx.ART_MESSAGE_BOX, (32,32))
icon = wx.StaticBitmap(self, -1, bmp)
else:
icon = (32,32) # make a spacer instead
if caption:
caption = wx.StaticText(self, -1, caption)
caption.SetFont(wx.Font(28, wx.SWISS, wx.NORMAL, wx.BOLD))
message = wx.StaticText(self, -1, message)
# add to sizers for layout
tbox = wx.BoxSizer(wx.VERTICAL)
if caption:
tbox.Add(caption)
tbox.Add((10,10))
tbox.Add(message)
hbox = wx.BoxSizer(wx.HORIZONTAL)
hbox.Add((10,10), 1)
hbox.Add(icon)
hbox.Add((10,10))
hbox.Add(tbox)
hbox.Add((10,10), 1)
box = wx.BoxSizer(wx.VERTICAL)
box.Add((10,10), 1)
box.Add(hbox, 0, wx.EXPAND)
box.Add((10,10), 2)
self.SetSizer(box)
#---------------------------------------------------------------------------
# A class to be used to display source code in the demo. Try using the
@@ -1015,9 +959,8 @@ class DemoTaskBarIcon(wx.TaskBarIcon):
self.frame = frame
# Set the image
icon = self.MakeIcon(images.getWXPdemoImage())
icon = self.MakeIcon(images.getMondrianImage())
self.SetIcon(icon, "wxPython Demo")
self.imgidx = 1
# bind some events
self.Bind(wx.EVT_TASKBAR_LEFT_DCLICK, self.OnTaskBarActivate)
@@ -1049,10 +992,10 @@ class DemoTaskBarIcon(wx.TaskBarIcon):
icon size...
"""
if "wxMSW" in wx.PlatformInfo:
img = img.Scale(16, 16)
img.Scale(16, 16)
elif "wxGTK" in wx.PlatformInfo:
img = img.Scale(22, 22)
# wxMac can be any size upto 128x128, so leave the source img alone....
img.Scale(20, 20)
# wxMac can be any size upto 128.128....
icon = wx.IconFromBitmap(img.ConvertToBitmap() )
return icon
@@ -1070,17 +1013,8 @@ class DemoTaskBarIcon(wx.TaskBarIcon):
def OnTaskBarChange(self, evt):
names = [ "WXPdemo", "WXP", "Mondrian", "Test2m",
"Blom08m", "Blom10m", "Blom15m" ]
name = names[self.imgidx]
getFunc = getattr(images, "get%sImage" % name)
self.imgidx += 1
if self.imgidx >= len(names):
self.imgidx = 0
icon = self.MakeIcon(getFunc())
self.SetIcon(icon, "This is a new icon: " + name)
icon = self.MakeIcon(images.getBlom10MaskedImage())
self.SetIcon(icon, "This is a new icon")
def OnTaskBarRemove(self, evt):
@@ -1095,8 +1029,6 @@ class wxPythonDemo(wx.Frame):
wx.Frame.__init__(self, parent, -1, title, size = (950, 720),
style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
self.SetMinSize((640,480))
self.loaded = False
self.cwd = os.getcwd()
self.curOverview = ""
@@ -1105,7 +1037,7 @@ class wxPythonDemo(wx.Frame):
self.shell = None
self.firstTime = True
icon = images.getWXPdemoIcon()
icon = images.getMondrianIcon()
self.SetIcon(icon)
self.tbicon = DemoTaskBarIcon(self)
@@ -1144,7 +1076,7 @@ class wxPythonDemo(wx.Frame):
item = menu.Append(-1, 'E&xit\tAlt-X', 'Get the heck outta here!')
self.Bind(wx.EVT_MENU, self.OnFileExit, item)
wx.App.SetMacExitMenuItemId(item.GetId())
wx.App_SetMacExitMenuItemId(item.GetId())
self.mainmenu.Append(menu, '&File')
# Make a Demo menu
@@ -1184,7 +1116,7 @@ class wxPythonDemo(wx.Frame):
'An interactive interpreter window with the demo app and frame objects in the namesapce')
menu.AppendSeparator()
helpItem = menu.Append(-1, '&About\tCtrl-H', 'wxPython RULES!!!')
wx.App.SetMacAboutMenuItemId(helpItem.GetId())
wx.App_SetMacAboutMenuItemId(helpItem.GetId())
self.Bind(wx.EVT_MENU, self.OnOpenShellWindow, shellItem)
self.Bind(wx.EVT_MENU, self.OnHelpAbout, helpItem)
@@ -1277,8 +1209,8 @@ class wxPythonDemo(wx.Frame):
splitter2.SplitHorizontally(self.nb, self.log, -160)
splitter.SplitVertically(self.tree, splitter2, 200)
splitter.SetMinimumPaneSize(120)
splitter2.SetMinimumPaneSize(60)
splitter.SetMinimumPaneSize(20)
splitter2.SetMinimumPaneSize(20)
# Make the splitter on the right expand the top window when resized
def SplitterOnSize(evt):

View File

@@ -324,10 +324,7 @@ def runTest( frame, nb, log ):
#----------------------------------------------------------------------
import wx.lib.masked.numctrl as mnum
overview = """<html>
<PRE><FONT SIZE=-1>
""" + mnum.__doc__ + """
</FONT></PRE>"""
overview = mnum.__doc__
if __name__ == '__main__':
import sys,os

View File

@@ -69,10 +69,9 @@ class TestPanel(wx.Panel):
def runTest(frame, nb, log):
if wx.Platform == "__WXMAC__":
from Main import MessagePanel
win = MessagePanel(nb, 'This demo currently fails on the Mac.',
'Sorry', wx.ICON_WARNING)
return win
wx.MessageBox("This demo currently fails on the Mac.",
"Sorry")
return
else:
win = TestPanel(nb, log)
return win

View File

@@ -196,10 +196,12 @@ def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'wx.PopupWindow is not available on this platform.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(
frame, 'wx.PopupWindow is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
dlg.ShowModal()
dlg.Destroy()
#---------------------------------------------------------------------------

View File

@@ -41,7 +41,6 @@ class TestPanel(wx.Panel):
self.log.write("before Play...\n")
sound.Play(wx.SOUND_ASYNC)
self.sound = sound # save a reference (This shoudln't be needed, but there seems to be a bug...)
wx.YieldIfNeeded()
self.log.write("...after Play\n")
except NotImplementedError, v:
@@ -55,11 +54,11 @@ class TestPanel(wx.Panel):
style=wx.OPEN)
if dlg.ShowModal() == wx.ID_OK:
try:
#sound = wx.Sound(dlg.GetPath(), wx.SOUND_SYNC)
#sound = wx.Sound(dlg.GetPath())
#sound.Play()
# another way to do it.
wx.Sound.PlaySound(dlg.GetPath(), wx.SOUND_SYNC)
wx.Sound.PlaySound(dlg.GetPath())
except NotImplementedError, v:
wx.MessageBox(str(v), "Exception Message")

View File

@@ -17,12 +17,9 @@ class TestPanel(wx.Panel):
self.text = wx.TextCtrl(self, -1, "1", (30, 50), (60, -1))
h = self.text.GetSize().height
w = self.text.GetSize().width + self.text.GetPosition().x + 2
w = self.text.GetSize().width + self.text.GetPosition().x
self.spin = wx.SpinButton(self, -1,
(w, 50),
(h*2/3, h),
wx.SP_VERTICAL)
self.spin = wx.SpinButton(self, -1, (w + 6, 50), (h/2, h), wx.SP_VERTICAL)
self.spin.SetRange(1, 100)
self.spin.SetValue(1)

View File

@@ -122,10 +122,8 @@ class TestPanel(wx.Panel):
def runTest(frame, nb, log):
if wx.Platform == "__WXMAC__":
from Main import MessagePanel
win = MessagePanel(nb, 'This demo currently fails on the Mac. The problem is being looked into...',
'Sorry', wx.ICON_WARNING)
return win
wx.MessageBox("This demo currently fails on the Mac. The problem is being looked into...", "Sorry")
return
win = TestPanel(nb, log)
return win

View File

@@ -185,7 +185,6 @@ def runTest(frame, nb, log):
ed.GotoPos(ed.GetLength())
ed.AddText("\n\nwx.StyledTextCtrl can also do Unicode:\n")
uniline = ed.GetCurrentLine()
unitext, l = decode('\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd - '
'\xd0\xbb\xd1\x83\xd1\x87\xd1\x88\xd0\xb8\xd0\xb9 '
'\xd1\x8f\xd0\xb7\xd1\x8b\xd0\xba \xd0\xbf\xd1\x80\xd0\xbe\xd0\xb3\xd1\x80\xd0\xb0\xd0\xbc\xd0\xbc\xd0\xb8\xd1\x80\xd0\xbe\xd0\xb2\xd0\xb0\xd0\xbd\xd0\xb8\xd1\x8f!\n\n')
@@ -269,12 +268,6 @@ def runTest(frame, nb, log):
print "GetTextRange(25, 35): ", repr(ed.GetTextRange(25, 35))
print "FindText(0, max, 'indicators'): ",
print ed.FindText(0, ed.GetTextLength(), "indicators")
if wx.USE_UNICODE:
end = ed.GetLength()
start = ed.PositionFromLine(uniline)
print "GetTextRange(%d, %d): " % (start, end),
print repr(ed.GetTextRange(start, end))
wx.CallAfter(ed.GotoPos, 0)
return p

View File

@@ -161,8 +161,13 @@ class TestPanel(wx.Panel):
#----------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
if wx.Platform == "__WXMAC__":
wx.MessageBox("This demo currently fails on the Mac.",
"Sorry")
return
else:
win = TestPanel(nb, log)
return win
#----------------------------------------------------------------------

View File

@@ -21,12 +21,11 @@ class TestPanel( scrolled.ScrolledPanel ):
text1 = wx.StaticText( self, -1, "12-hour format:")
self.time12 = masked.TimeCtrl( self, -1, name="12 hour control" )
h = self.time12.GetSize().height
spin1 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,h), wx.SP_VERTICAL )
spin1 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,20), 0 )
self.time12.BindSpinButton( spin1 )
text2 = wx.StaticText( self, -1, "24-hour format:")
spin2 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,h), wx.SP_VERTICAL )
spin2 = wx.SpinButton( self, -1, wx.DefaultPosition, (-1,20), 0 )
self.time24 = masked.TimeCtrl(
self, -1, name="24 hour control", fmt24hr=True,
spinButton = spin2
@@ -227,10 +226,7 @@ def runTest( frame, nb, log ):
#----------------------------------------------------------------------
import wx.lib.masked.timectrl as timectl
overview = """<html>
<PRE><FONT SIZE=-1>
""" + timectl.__doc__ + """
</FONT></PRE>"""
overview = timectl.__doc__
if __name__ == '__main__':
import sys,os

View File

@@ -34,10 +34,10 @@ def runTest(frame, nb, log):
win = TestPanel(nb, log)
return win
else:
from Main import MessagePanel
win = MessagePanel(nb, 'wx.ToggleButton is not available on this platform.',
'Sorry', wx.ICON_WARNING)
return win
dlg = wx.MessageDialog(frame, 'wx.ToggleButton is not available on this platform.',
'Sorry', wx.OK | wx.ICON_INFORMATION)
dlg.ShowModal()
dlg.Destroy()
#----------------------------------------------------------------------

View File

@@ -2,99 +2,123 @@
import sys
import wx
from xml.parsers import expat
py2 = sys.version[0] == '2'
try:
if py2:
from xml.parsers import expat
parsermodule = expat
else:
from xml.parsers import pyexpat
parsermodule = pyexpat
haveXML = True
except ImportError:
haveXML = False
#----------------------------------------------------------------------
class XMLTree(wx.TreeCtrl):
def __init__(self, parent, ID):
wx.TreeCtrl.__init__(self, parent, ID)
self._root = self.AddRoot("Root")
self.nodeStack = [self._root]
if not haveXML:
def runTest(frame, nb, log):
dlg = wx.MessageDialog(
frame, 'This demo requires the XML package. '
'See http://www.python.org/sigs/xml-sig/',
'Sorry', wx.OK | wx.ICON_INFORMATION
)
# Trees need an image list to do DnD...
self.il = wx.ImageList(16,16)
self.SetImageList(self.il)
dlg.ShowModal()
dlg.Destroy()
# event handlers for DnD
self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.OnBeginDrag)
self.Bind(wx.EVT_TREE_END_DRAG, self.OnEndDrag)
else:
class XMLTree(wx.TreeCtrl):
def __init__(self, parent, ID):
wx.TreeCtrl.__init__(self, parent, ID)
self._root = self.AddRoot("Root")
self.nodeStack = [self._root]
# Trees need an image list to do DnD...
self.il = wx.ImageList(16,16)
self.SetImageList(self.il)
# event handlers for DnD
self.Bind(wx.EVT_TREE_BEGIN_DRAG, self.OnBeginDrag)
self.Bind(wx.EVT_TREE_END_DRAG, self.OnEndDrag)
def OnBeginDrag(self, event):
item = event.GetItem()
def OnBeginDrag(self, event):
item = event.GetItem()
if item != self.GetRootItem():
self.draggingItem = item
event.Allow() # if DnD of this item is okay Allow it.
if item != self.GetRootItem():
self.draggingItem = item
event.Allow() # if DnD of this item is okay Allow it.
def IsDescendant(self, firstItem, secondItem):
"Recursive check if firstItem is a descendant of a secondItem."
if firstItem == self._root:
return False
parentItem = self.GetItemParent(firstItem)
if parentItem == secondItem:
return True
else:
return self.IsDescendant(parentItem, secondItem)
def IsDescendant(self, firstItem, secondItem):
"Recursive check if firstItem is a descendant of a secondItem."
if firstItem == self._root:
return False
parentItem = self.GetItemParent(firstItem)
if parentItem == secondItem:
return True
else:
return self.IsDescendant(parentItem, secondItem)
def OnEndDrag(self, evt):
itemSrc = self.draggingItem
itemDst = evt.GetItem()
self.draggingItem = None
def OnEndDrag(self, evt):
itemSrc = self.draggingItem
itemDst = evt.GetItem()
self.draggingItem = None
if not itemDst.IsOk():
print "Can't drag to here..."
return
if not itemDst.IsOk():
print "Can't drag to here..."
return
if self.IsDescendant(itemDst, itemSrc):
print "Can't move item to its descendant"
return
if self.IsDescendant(itemDst, itemSrc):
print "Can't move item to its descendant"
return
# For this simple example just take the text of the source item
# and append it to the destination item. In real life you would
# possibly want to copy subtrees...
text = self.GetItemText(itemSrc)
self.AppendItem(itemDst, text)
self.Delete(itemSrc)
# For this simple example just take the text of the source item
# and append it to the destination item. In real life you would
# possibly want to copy subtrees...
text = self.GetItemText(itemSrc)
self.AppendItem(itemDst, text)
self.Delete(itemSrc)
# Define a handler for start element events
def StartElement(self, name, attrs ):
if py2:
name = name.encode()
id = self.AppendItem(self.nodeStack[-1], name)
self.nodeStack.append(id)
def EndElement(self, name ):
self.nodeStack = self.nodeStack[:-1]
def CharacterData(self, data ):
if data.strip():
# Define a handler for start element events
def StartElement(self, name, attrs ):
if py2:
data = data.encode()
name = name.encode()
self.AppendItem(self.nodeStack[-1], data)
id = self.AppendItem(self.nodeStack[-1], name)
self.nodeStack.append(id)
def EndElement(self, name ):
self.nodeStack = self.nodeStack[:-1]
def CharacterData(self, data ):
if data.strip():
if py2:
data = data.encode()
self.AppendItem(self.nodeStack[-1], data)
def LoadTree(self, filename):
# Create a parser
Parser = expat.ParserCreate()
def LoadTree(self, filename):
# Create a parser
Parser = parsermodule.ParserCreate()
# Tell the parser what the start element handler is
Parser.StartElementHandler = self.StartElement
Parser.EndElementHandler = self.EndElement
Parser.CharacterDataHandler = self.CharacterData
# Tell the parser what the start element handler is
Parser.StartElementHandler = self.StartElement
Parser.EndElementHandler = self.EndElement
Parser.CharacterDataHandler = self.CharacterData
# Parse the XML File
ParserStatus = Parser.Parse(open(filename,'r').read(), 1)
# Parse the XML File
ParserStatus = Parser.Parse(open(filename,'r').read(), 1)
def runTest(frame, nb, log):
win = XMLTree(nb, -1)
win.LoadTree("paper.xml")
return win
def runTest(frame, nb, log):
win = XMLTree(nb, -1)
win.LoadTree("paper.xml")
return win
#----------------------------------------------------------------------

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -31,7 +31,7 @@ Sonar tracking software Miscellaneous See Web site http://www.desertstar.com Dem
Name Research software Platform Location Availability Description
DisCo Research software N/A http://www.cs.tut.fi/laitos/DisCo/tool.fm.html N/A A tool for specification of reactive systems.
CAFE Research software N/A cafe.htm N/A Cellular Analysis of Fire and Extinction
CODA Research software See Web site http://www.ozemail.com.au/~mbedward/coda/coda.html See Web site CODA assists in the design of networks of nature reserves or protected areas. It has been used for major reserve planning studies, as a teaching resource and for research into conservation planning methods.
CODA Research software See Web site http://www.ozemail.com.au/~mbedward/coda/coda.html See Web site CODA assists in the design of networks of nature reserves or protected areas. It has been used for major reserve planning studies, as a teaching resource and for research into conservation planning methods.<EFBFBD>
EGRESS Research software N/A http://www.aiai.ed.ac.uk/~jimd/Egress2/projInfo_contents.html N/A An evacuation decision model.
ACT Research software N/A none.htm N/A A general process and tracker and automator being built at NASA.
Rectangular nesting program Research software N/A http://www.elec-eng.leeds.ac.uk/een5mpd/research.html N/A Optimized layout of rectangles on a page.

View File

@@ -22,7 +22,6 @@ command_lines = [
"-a -u -n TestMask bmp_source/testmask.bmp images.py",
"-a -u -n Test2 bmp_source/test2.bmp images.py",
"-a -u -n Test2m -m #0000FF bmp_source/test2.bmp images.py",
"-a -u -n Robin bmp_source/robin.jpg images.py",
"-a -u -n Bulb1 bmp_source/lb1.bmp images.py",
@@ -79,16 +78,9 @@ command_lines = [
"-a -u -n Blom13 bmp_source/toblom13.png images.py",
"-a -u -n Blom14 bmp_source/toblom14.png images.py",
"-a -u -n Blom15 bmp_source/toblom15.png images.py",
"-a -u -n Blom08m -m #FFFFFF bmp_source/toblom08.png images.py",
"-a -u -n Blom10m -m #FFFFFF bmp_source/toblom10.png images.py",
"-a -u -n Blom15m -m #FFFFFF bmp_source/toblom15.png images.py",
"-a -u -n Blom10Masked -m #FFFFFF bmp_source/toblom10.png images.py",
"-a -u -n FloatCanvas bmp_source/floatcanvas.png images.py",
"-a -u -i -n WXP bmp_source/wxp.ico images.py",
"-a -u -i -n WXPdemo bmp_source/wxpdemo.ico images.py",
" -u -c bmp_source/001.png throbImages.py",
"-a -u -c bmp_source/002.png throbImages.py",

View File

@@ -2169,114 +2169,6 @@ def getTest2Image():
stream = cStringIO.StringIO(getTest2Data())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getTest2mData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00@\x00\x00\x00@\x08\x06\x00\
\x00\x00\xaaiq\xde\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\tzI\
DATx\x9c\xe5\x9bMl\x1b\xc7\x15\xc7\x7f\xb3\xcb%%\x91\xa2$\xca\xfa\x8a-Uv\x12\
I\x90\x12\xb7\xaa\x93\x1a\xa8Q4n\xe04(\xec\xc0\xb9\x14\x01|\xef\xd6E\xe1K\
\xd0\x9b\x83"@r\nzL\x04\x19\x01zI\x80\xdc\x1a\xc4A\x114@\x9d\x1c\x9cC\x11[\
\x01\x92\xc8j\xe2\x1a\xf2Ge\xc9RdK\xa2DY\xe4r{x\\qI-\x97\xcb/Y@\xff\x00\xb1+\
r\xc9\x99\xf7\x7f\xffy3\xf3\xdeH)M\xe7\xff\x19\xa1F7\x90\x1d\xb7\xecZ\xbe\
\xafM\xe9\xaa^}\xf1\x82r+ hgKu\xaaVc\xabm\xb7\x16TE\xc06\xbe,\xfa\xfb\x99:\
\xf4(\x00\xeaI\xc46\x01U\x19\xaf~W\xf8\x9e}!\x7f\xbf\x0bd\xd4\x83\x88\xca\tp\
\xbc^l|1\x1c2<\x88\xb0lH\xdbru#:\x15\xa8\x07;\xa0\xe9\xd5\x13\x11\x9c\x80\
\xa0\x86\x17\xc3\xa5\x8a\xf5q\xb0\x80\xa4\x05\xcb\x16\xacg\x85\x84\x9f\xcf\
\xc8\xe7_\xa8\x97\xb6\x9f\xd5\xd1\x88\x12"A\x84\x18\x06:\n\x1d\x85\x81\x86\
\x8eV\xf8\xfb9\x92\xabQD0\x02\xbc\xe4^\x0c\xc7P\xd7s\x16Y6\xb1X%M\x9f\xfd^\
\xa0\x0e\xbd\xa6\xc6\x010\xd0\xe8 B?1\x12D\x88\xa0\x13%D\'M\xc41hB\xcf\x13\
\xe1"\xa1\x14J\x91S\x9e\x80r\xc6\x970\\\xb7\xdf\xf5\xefQ@\x9cSc\xc4r\x06w\
\x10a\x90V\xfa\x89\xd2CK\x9e\x08\xfb\xdd\xc01\xa7\x98\x08\x7f\x02\x82z>\xf7L\
=\r/\xc6\xcbj\x90(!zi\xa1\x9f(\x87\x88\x17\x10\x11\xb5\xffZ\x15\t\xf5[\x08\
\xd9\x17h\xe4\x9a\xf2o\xf6,\x00\xa7\xd4\x00\xf3lp\x9b\xf5m"\x06\x88\xf1c$\
\xb0\x1a\x15F\x01\xa54\xbd6\xef?"\x9cR\x03\xb4\x11\xa6\x97\x16\x06\x89\xf1G\
\xfb\x0b\xe6\x0eC\x97\x11\x8c\x04G\x05Z\xb9\x07\xf7*.\xda\xb7\xb8G\x8a\x7f\
\xf3\x80+,\x010\xbd\t\x8biQBPx\x13\xb0\xc7\xbd\xef\xe0\x1f\xf6\x7f\xd9 \xc3<\
\x1b\x00|\xb9\x11\x9c\x04G\xf5\xd5\xc5\x00\x0f\xe3-\x0b\xd2i\xc8fA\xd3\xc00@\
o`Pp\xda\xbb\xb8>\xc7o\xa2}\x00L\xa7\xf2\x9f\x8f\x12l8TN\x80\x87\xf1\xe94\
\xdc\xbf\x0f\x8b\x8b\xb0\xb9\t\xd1(\xf4\xf4@[\x9b\x90Qod\xb3\xb0\xba\n\x0b\
\x0b\xb0\xbe\x0eo\x7fs\x17\x80\x85\x0cP!\t\x95\x11Pd\xbcR\x93\xdb\xf7\x9f\
\x7fn2=-\x1d;p\x00\x8e\x1c\x81\xe6fhj\xaa\xa8\x05_\xb8\xdb\x9b\x991\xb9z\x15\
\xee\xdc\x81x\x1c~\xf8\x016,\xb8\x07\x15\x91\x10\x9c\x00\x1f\xe3\x01\xa6\xa7\
\xe1\xca\x15Q@&\x03O>)\x9e*\x86#]\xcb\xf2nF\xd7\x83\r\x9f\x91\x91I\xde|\xd3\
\xe4\xda\xb5<\xc9\x93\xff\x82?\x1c\x85\xc5\x8c\x0c\x07\x05\xe8\nB\n\xf6\x85@\
\xf3 !\x18\x01\x01\x02\xde\xbd{\xb0\xb4\x04\xb6\r\xa9\x94\x18i\xbb\x02\x91e\
\t9\xab\xab\xe2\xad\xf5\xf5\x9d$\xe8\xba\x0c\x9f\xceN\xf1jS\x93?\x11\xa9\x14\
\xac\xadA2)\xed\xaf\xad\xc1\xdf\x17\xe0T\xaf\x900\xb3\tQ\r\x12\xba\\\xa3\x1e\
\xbfU\xb7\x85\x90\x9fW\x8b\xd5R\x8c\xf3\xe7M@<\xdf\xd1\x01\x83\x8300\x00}}\
\xf2\xb7a\x94\xfe\xae\xa32\xa7}\xdb\x86\xac\r[\xc0R\x06f\xb7\xe0G[\xd0m@\xb3\
\xb6S\x05\xe5\t\xa8a\xba\x8b\xc5\xfc\rw\xf0\xc6\x1b\xf2\xdc\xe9\xd3&\xd1(\
\xdc\xbc)$\x8c\x8d\xc1\xf00tu\xf9\x93P\x8cKkp\xbc\x15\x1efa>\r7\x1eB\x7f\x18\
\xe2\x1e*hXN\xf0\xd8\xb1`\xc6\xbb\xf1\xe1\x87\x93\x9c8a\xb2\xb2\x92\x1f&\x00\
\xa1\x10\xec\xdbWy\x1f,`\xc5\x82\xdbi\xb8\xbd\x05=\x1e*\xf0\x9f\xa4\xaa\xf4\
\xbe\xe3\xd1j\xf0\xe9\xa7\x93\xa4R0?\x0f33\xf0\xed\xb7p\xf7\xae\x8c\xf7JpiM\
\x86\x82[\x05\x0biH\xe5\x86L\xc1R\xb8\xd1\x99W7N\x9f69s\xc6\xf4}\xc60dL/-\
\xc1\xec,\xdc\xba%\xc1\xb3\x1a\x14\xab`5+\xc48(\xad\x80\x1a\xc6\xbe\x13\xd4\
\xdc\x98\x980y\xfdu\x93\xf1q8z\x14>\xfa\xc8dj\xca\x9b\x88O>\x99\xc40`kK\x94p\
\xe3\x86,z*\x85[\x05\x0bi\xb8\xb9\x05\xcb\x19\xd8r\x11\xd0\xb0\x18p\xf9\xb2\
\xc9\xe1\xc3\x10\x89\xe4W\x89\xc9\xa4|\xe6\x9e\xea\xd2i\x13\xc3\xd89d\xda\
\xdbay\x19VV\xe0\xf6myU\x0b\x0bHf\xc5\xf8d\x16\xdc\xcb\x93m\x054&\xe7.r\xee\
\xec\x84\xc7\x1f\x87\xa7\x9e\x92\xd7\x13O@w\xb7\x10\x11\n\x81m\xefT\xc2\x07\
\x1fL\xa2\xeb\xf0\xf0\xa1x\xff\xe6\xcd\xea\xfb\x91\xb5!c\xc3fN\r\x19?\x05hS\
\xba\xca\x92\xb1e\x1dU\x1f\xe8zu\x1b#\x87\x80dR\xd4P\x0b,;\x9f\x8cMZ`g\xb7l\
\xa5\x85UA\x0c\xc8\xab`\xd7bb\xc3qiM\xae\x19\x1b\xee[pg\x0b\xf6\x7f\xfd\r\
\xb2T\xda\xe3\t\x11\xcb\x12\x15\xc4b\x90H\xd4\xf8[\xe4\xe3\x00$q"\xc1\x9e \
\xc0k\xa9\xfc\xca+&\x99\x8c\xc4\x88\x8e\x0e\xd9a\xd6\x82l\xae\x10\xf3\xe7\
\xbb\xe7\x11:$\x10<r\x02J\xed\x13\x1e<\x90u~8,\x04tu5\xa6\xfdGJ\x80\xdf&)\
\x9d\x96\x19$\x91\x80\xde^!\xa1V\\\\9\xb5\xe3\xbd\x86\x9f\x0f\xf0B\xb9\xdd\
\xe1\xf3\xcf\x9b\x18\x86x}x\x18FF\xaa\xdb\x0b8\xf8,\xf9\\\xc9\xcfv\x9d\x80r\
\xc6\xbf\xf0\x82I8,\x06\x8f\x8cHfix\xb8>\n\xf0\xc2\xae\x12P\xce\xf8\x17_4io\
\x87\xc7\x1e\x83\x83\x07\xab\xdf\x0eW\x82]#\xc0\xcfx\xb7\xe4\x87\x86d\xb5x\
\xf0`\xb0\x84Hph\x80\x0e\x18\xb9\xab\xacuv\x85\x80\xa0\xc6\x8f\x8e\x8a\xe4GF\
$\xf8\x95K\x89U\x06\x1d\x88\x01\x89\xdcU\xe2\xbf\'\x01\x9a\xae\xab\xacU\xd9\
\x89\x91\xe6fY\xb08\xf7\x86!{\x01?\x9c<i\xa2\x94\xec\x15\x9c\xf1>:\x1a\\\xf2\
A\xdaT\xea\xb9\xdc]\x08\xe8\x00\x0e\xe4\xae\xe1\xedw\xeb\x82\xc1\xc1\xc2\xfb\
x<_\x13\xb0ms\x87\n\xdez\xcb\xe4\xce\x1d\xd9-\xf6\xf7W7\xde\xfd\xda\xdc\x89B\
\x05(-\xac\xa0\xe8\x90\x94\x1bA\x15\x90\xcd\xca\xa2en.\xbfaI$$\x90\xb5\xb7\
\x17vH\xa9I66L\xe6\xe6\xe0\xfb\xefe\x97\x17\x8fK\x02\xf4\xc0\x01\xf9^\x10\
\xe3-K\xda\x9a\x9b\x93\xed\xb2\xb3Z\xec\xed\xddY\x8c9\xde\n\x9f%\x7f\x05\xc4\
\x81q\xe0\xd7\xc0\xd3(-^\x9f\xe2\xa8R"\xbfx\\\xb6\xb7\xd1\xa8\xdc77\xef\x94\
\xe3\xd6\x96\xc9\xea\xaat\xda\xb2D\xbe\x9d\x9d\xb25\xae$\xd89\xb5\x05\xdb\
\x96\xf6\xfa\xfa`\xff~hm\xf5V\xc0\x89\xd6\x7f\xe25\xfe\xc1g\x08\x04\x89\x03\
\x8e\xac\x17\x16Lfg\xe1\xbb\xef\xe4\xfd\xa1!\t`\x91\x88\x90P,\xffw\xde1\x99\
\x9f\x97\xce\x1e:$\x04x\x15Q\xfc\xda\xbb~]\xda\xb3m\xc9/D"B\xba\x1b\xc7[%\
\x01\x1a\xd1\xe0\xd5\x9e\xf7\xf8\xcb\xc2os$\x84\xcb\x13\x10\xb43\x00==\x93LL\
\x98|\xf5\x95\xfc\x9d\xc9\xc8BF\x94\xb0s\x06\xb8zU\xf2}N\xe0\x1a\x19)O@\xa9\
\xf6\x9c\xe1\x00\xf9\xec\xb1[\x05:\xd0\xa6C\xbf\x01\xd0\x0f\xc4\xb7\xc7?\xf8\
\x0c\x01{\xc2\xb2+9~\xb6\xbc,\xaf\xc5\xc5|\x95\xa6\x94QKK\xf2y*%d\x05\xf1~1\
\xce\x9e\x9d\xdc\x8e\x03\xd7\xaf\xcb\xeb\xfe}\x19\x1aP\xe8\xfd^\x03\x0eE`\
\xee\xf08P(\x13_\x05\xd8\x13\xc1\xa7\xc2DB\x02\xd0\xe6\xa6x\xc2\xaf*\xecHu\
\xdf>\x91\x7f\xa9\xb1[\x0emm2\x04t\xdd{\xcau{\xdf)\x8c\xb8\xbd\x0f%\x08p\x1b\
^*\x16\x14Om\xa3\xa3ru\xaa\xc3\xa5\xa6\xa4\xf7\xdf\x97x\x91\xc9\x88\xf1\xa3\
\xa3BD8\xbc\xf3Y\xbf\xf6\x9cj\xf4\xf2\xb2\x90?4\x94\x0f\xa4^\xdew\x8a"\xc5(\
\x1b\x03\xfcT\xe0$3\x9d\xf3\x01\x9d\x9d\xf9\xf3\x01\xdd\xddb\x94\xf3L6+\xd1\
\x7faA\x82\x96m\xcb,\xd0\xd5%\x1d\x0f\xa2\x00\xaf\xf6R)Q\x94\xfbw4\x05\xe1\\\
Ex0\x0c\x039\xef{U\x87=\xd7\x01^F\xdbeN\xcc\x049!R\\\x1a\x0fZ\n\xaf\xa4\xbd\
\xe7\xe3b|W\x08\xc6\x9a\xe1gQ\x18k\xca\x97\xc7\x8b\xb3\xdf\x81g\x01u\xc1\x9f\
\x84 \x99\xdfj\xb3\xc3A\x7f\xcbm\xfch3\x1ci\x81\xe1\x08t\x948\x1b\x00\x15.\
\x84\xd4\xa3?\x17U\x12\xc5\xc6?\xd3\x02\xa3M\xe5\x8f\xc8T\x1c{\xf7"\tA\x8d\
\xf7*\xfeT\xb5\x14\xdeK$T\xeby\x07U\xef\x05\xf6\x02\tJ\x9d\xa0%7\xd5\x8dUa<\
\xd4\xb8\x19z\x94$(u\x12\xe8\xe6\xe3\x95W9\xd2"\xd1\xde\xcf\xf8R\xb5\xcf\xda\
w\x83\x17v\x97\x88S\xed\xa0\xd4\x19`\x18x\x16\xf8%\xbf\x88\xc9TW\x89\xe7\x1d\
\xd4-!\xa2.\x00Y\xb0\x7f_\xaf_,\xc4\xcb\x1dr\xd2k\xb8\t>^y\x168\x84lnz\xf8\
\xc9\xb5$\x99\x9f\xc6\xa8\xa6\xbe\x1dx!T\x11\xeaH\xc4\xb9n\x88\xe9\xd0\xa4d>\
\x1f\x0c\xc3K\xff\x99\x02z\x90$G\x13J\x8b(\xbf\xffx\xf1+\xfd\x97\xcc\x08\xd5\
L\x02H\xfd1\rl\x82\xfd\xa7`_yM\x8e\xfdb\xe4\x0c\xee\x0f\xcb9\xbf\x88&\nxzz\
\x0e\xb7\xe1\x05\xcd\x95 \xc1\x8f\x80\xc6f\x855 \x02\x18\xa0\xdeF\x089\xb7\
\x82Tg\x97\x81u\xa4PY\x88\xcb\xc3\xc7\xd0U\xfe\x90\xe3\xfe\xafW\x90\xbd\x9d\
\xa4\xb5\x8b\r\xf7\xedB\x99\x83\x1f\x8dU@)\x98\x19D\x1a%NVn\xa3r\x83\x8bUP5\
\x01\xd0\x18\x12\xd4\xd9\xdd9\x91\x96\x1d\xb7\xec \xc7~v\xb5:\xbc[\xc6C\xf03\
O\xbe\x04\xd4\xb3\xc3\xbbi|%\xf8\x1fg\xd4\x81\xf3?2\x98\xba\x00\x00\x00\x00I\
END\xaeB`\x82'
def getTest2mBitmap():
return BitmapFromImage(getTest2mImage())
def getTest2mImage():
stream = cStringIO.StringIO(getTest2mData())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getRobinData():
return \
@@ -5996,39 +5888,7 @@ def getBlom15Image():
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getBlom08mData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01\
\xd0IDATx\x9c\xb5W\xed\x15\x83 \x0cL\xd4\x8d\xca\n]\xa5\xcc\x84\xab\xb8\x02\
\x8e\xa4\xe9\x8f\n\r_1X\x9b\xf7x\x15\x8b\xb93\xb9D@\x1cF\xd0\x1a\xed\x1b\x9d\
\xad\xc1aD\xb5C\x00\x98z\x80\xe9\x14\x1e\x00q\xa3\x1e\x12(E\xa0\x078u\xaa\
\x8fD\x93\x00\xed\x1b\xf5\x02\xe7$\x92y\x83\xd0\xf0\x0f\xf0\xe8\x87\xd8h\xe8\
\'\x89\xc0\xd5\x90k\xad\x96\x9a\xe9n`\xc4>?\xd3]\xe1\x0e9\xef\xf5U\xd5\xc0U\
\xe0+/\xf23\x01]o\x10\x08\xe00"_ -\xbeb\xb9&\xf2j\x98\x00>\xcaD\xfch\x81HGB\
\x1bn\xee\xaf\xe6;\xb6\xe2\x1a\t\xf2\xaep\xb8\xae\xeb\xf1fsBDR\xbfD6\xf9\x16\
p\x12-{<\x1e\x1f\xa7\xde\xc1\xba\xaeM"\xear\xc4a,\x06\x00P\x18\xde\xbd\xaa\
\xd7\x00@\xe4]\x1c\xf1\x1e\xc9\x03\x00(\xc1\xaa\x81\xe7s\x0e\xd2"J\xde%\x04\
\xb5\x04\xc4\xcf1\xed\x1b\xd5t\xc0\xa2\x87A\xd5h\xec\xf79\xd27&\xd5~\xe0\xcc\
8I4\xb6P=\xd7Gn?7\xa2\xdc\xbc{\x15\xe0\x88)\x11\xde\x0b\xc4\x08\xe00"\x1a{\
\xf9KQ\x8b@\xde\x0b\n\x02!\xaf\xe17\x94\x1b\x00\x80\xb1s\nP\xd1H(SN"\'\x94\
\xe0\x89;\xa2\x8a\x00\x13\xb15\x04\x8a\xc6\x8a\xe2\xe3\xfb\x82n\x11JU\x11\
\xcc\xbb\x17 \xce\xaa.yK\x15\xe4f\xec\x9c\xe4?\x0f=\xdf\x15\xfd\x85\x00@]p\
\xb5\x8d\xa9\xba\x0c\xd1X@c\xa3 \xa5uR\xdd\x97DO\xce\x05\x9a\x9cs\xf0\xf8,\
\xcb\xb9tN\xb8%\x05\x11x9n<\xf5\x1b\x1b1\x02\x00\xbar\xe4\xc0M\xa0F\x04TG\
\xb3\xaa-\xec:\x07\xce\xfe\x93\x8eiM\x11F\xf0\xc3Yt\xb2T\xc0\xf9\x9c_\x1fs\
\xe9E\xe4*X\xbe\xbf\xb4oT\x84:\x80?\xb3\xf5\x1d\xf6\x06\xb5\xbfg\x05\x93\xe5\
\x9f7\x00\x00\x00\x00IEND\xaeB`\x82'
def getBlom08mBitmap():
return BitmapFromImage(getBlom08mImage())
def getBlom08mImage():
stream = cStringIO.StringIO(getBlom08mData())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getBlom10mData():
def getBlom10MaskedData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01iID\
@@ -6048,42 +5908,11 @@ ATx\x9c\xbd\x97Q\xb2\xc3 \x08EA\xdf\x92XS]S\xb2&\xb7\x94\xd8/:\x84J@M\x1f3\
\x08\x00{&|\xfd\xa0\xaa\x8c\xe5\xdb\xb1\x06\x89\x86\x9c\xacw\x10o\xea\r\xf9&\
G\x80\r\xe3\x00\x00\x00\x00IEND\xaeB`\x82'
def getBlom10mBitmap():
return BitmapFromImage(getBlom10mImage())
def getBlom10MaskedBitmap():
return BitmapFromImage(getBlom10MaskedImage())
def getBlom10mImage():
stream = cStringIO.StringIO(getBlom10mData())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getBlom15mData():
return \
"\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01\
\xadIDATx\x9c\xbdV\xd1m\xc40\x08\xc5I'\xe9\n\xe7\x99\xe2\x99\xb8\x99\xc8\x08\
\x1d%\xa1\x1f-\x11qm\xc0\xd6]\x91N\xba\x04\x02\x0fx\xc6\xa4\xb4\xac0*|\x1e\
\xac\x9f\xd3\xb2&\xfd^\x9e#\xf21\x13\x94\x88n\xba\x9c3\xeb\xf79g\x0e\x83H\
\xcb\xea\xfe\x00\x80\x11\x91\x11\x91\x89\x88\x01\xc0\xfc!\xe2\xf5\xdf\xf5\
\xef\xb5\xa0.\xf7\x8cX\xd5X\xde\x1d\xdc\xf3c\x02x\xa5\xf4@t\x01\xbc*{O\xdeV\
\x01&\x04&\xbc\xbfk$\x15:\x86\xe2(\xe5\x12\xb6\x8dJx\x0e\xcc8\x8fH\xb3\x05\
\xff\xd5\x7f\x80@\x05t\xd6\xfb\xbeC.\xcf\x90c\xc2\r\x1e\x8f\x87k\xd7\x1cD\
\xba\x02\x1a@\x8b\x03\x16?Z\xbaz(\xf5\x8fa\xd5\xef\x08\x01k\xd1\xdf\xf4\xf83\
DB/HK\xf6}7\xf5]\x00)\x17\x97\xf5\xba\xcf\x16\x10&\xec\xea\xcdA\xe4e\xa7If\
\x81\x15?\xadK\xa9\t r\x97\x13n\x9e\xc9\xbdB\x1d\x9f\xe1Q\xac\x03\xd6\xa5\
\x97\x0c{6\x96\x98\xfb\x00\x9f\x07{\xa5\x95\xa0V\xb0\x94K\xb7\x02\xa1\x85\
\xa4\x07B2\xf7@N/$u\xa0Q}dv\xb8\x00\x04\xbd\xe5,-k\xaa\xf5\x16\xf3\x87\x00XN\
\xe4\xce\xbf\xd6\xf1\x1aD\xe04\r-$\xbd*\x08\x07\xbe\x1c\xbbi\x00|\x1e\xfc\
\xb3i\x1b6\x84\xf0\xa9\xc8\x88\xc8\xa1k}x%\x9b%\xe44\x00\x9d\x85Ta\x84\xf5^\
\x15\xcc\xdb\x90\xcf\x83\xb7\x8d\xe0\xf9\xcc\xa1`5P\xedgx\x14\xd7\xc8KI\x7f\
\x9c_\xa7\xe0\xb7\xf7\x88|\xe9\xc5~\xdb\xe8\xe2C\xab\x1a\xdd\x9dP>l\x89\x04\
\xba\xcez\xa0\xef\x1a\x88\t\xa0\xc5\xf8\xfaYW#\xe5\xd2\xcc\xbc\xf5\x9d\x00\
\xd1 \xbe\x01\xda\x18*\xbd\xb7\xee\xad%\x00\x00\x00\x00IEND\xaeB`\x82"
def getBlom15mBitmap():
return BitmapFromImage(getBlom15mImage())
def getBlom15mImage():
stream = cStringIO.StringIO(getBlom15mData())
def getBlom10MaskedImage():
stream = cStringIO.StringIO(getBlom10MaskedData())
return ImageFromStream(stream)
#----------------------------------------------------------------------
@@ -7875,75 +7704,3 @@ def getFloatCanvasImage():
stream = cStringIO.StringIO(getFloatCanvasData())
return ImageFromStream(stream)
#----------------------------------------------------------------------
def getWXPData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01\
\xd2IDATx\x9c\xadW[\x0e\xc4 \x08\x1c\x9a=X=\xb9{3\xf6Cq\x01\xf1\xd1\xc7$M\
\xad\xad\xcc\x08\x8a\x94\x000\x16`f\x10\xd1\xea\xb3[\xf8`\xa0\x80\x00\xe4\\\
\xdbD\xad\r\x00)\x15QOAD \x00\x9d\xa9\xd9\\E\xc8\x1b"\x88\xa8x \x82\xd8&\xb2\
\n\x89`\xbc\xf1\x14C\x01\x85\x8c!\xfe(m`\xee\x9f\xeb8^\xb5\xf6\xb6\x00f2m\
\xfd\x0c\xe0\x95\x9d\xd1\t\x10\x93D\xffxK[\xc7_\xef\x10\xb9\xee\xe0\xa3I\xb5\
a,\xfa\xa2wwD\x10j\x1a\xb8\xb3\xb2\xd3Y,\xf8\xb1\xd1\x16-\xe2\xfa\r\x7f\\%O\
\xa7\xbd\x83\x0b\xa1F\t\xdb\x9e7\xda\x1a\xd0F\xbcAC\xe8\xdaO\xd1\x04h/\x98\
\xb4\xeb\x89\t[\xa9`\xd7\x0b\x87\x18\xf6\xae\rg,\xf6\x18\xc8_\xd5\xf7 #\x97\
\xe1+\x03j"9;Ajl\x13U\xa1\x17\xe3\xc8\x1b\x87&\x10\x03\xe6\xae\xc7i\xa1j\x8c\
\'\x1e\x81\x99\xcd\xd5\xe6\xe0\xcf\xfb(\xeb\xfb\x99\xb71\x17<\x10m\xcd.\x13z\
\xf2\x9cK\xa7\'\xf7\xa43\xf2\x19\xcci\xd8\xc8\xeb"K\'\xd0vdUdb\xca\xe5\xfdn\
\x08"\xb4\x10\xa0\x86\x80\xfad\xd5\x11\xb7\xa2\xe4\x8c\xc9G\x990\xea3\x15Q\
\xb4N\xf5\xa0U\xccG\xe43\x01\x07\xe3/!Z\xa5\xf2\xe1\xf7k\xeb\xc2+\xe43\xd8\
\x10\x84\x07\x08\x96\xb3\xde!\xf7\x1e\x10\xdb\x7f\x01\xc1\x00\x9f\x92g\xe4\
\x1a\x11\x91\xee\x17\xdb)-jB\x9d\x8eg\xe4\xfe4\xd5\xa4Q\xbd\xa0\xfb\xc2\x92\
\xcc/\xb6\xa1\xc0\x80\\\x13\xf8w9\x07b\x11\x84\xe0\x8a\xfb\xefB\xc26\x0c\xc1\
\x9bg~[#j\xbfK*\xdf.\xcbG\x82VBS\x02 \xde$t\xa9\xfc\xd2.\xe8?\xaa\xf7\xd1\
\xcf%\x14\xf9 ;N~\xcd\xe2\xd3\xaeUE\xb0\xbfo\x1d6\xeb\xcc\x87\xf5\xccs\xfc\
\x00\x9b/\x1b?\x06U\xaa\xa2\x00\x00\x00\x00IEND\xaeB`\x82'
def getWXPBitmap():
return BitmapFromImage(getWXPImage())
def getWXPImage():
stream = cStringIO.StringIO(getWXPData())
return ImageFromStream(stream)
def getWXPIcon():
icon = EmptyIcon()
icon.CopyFromBitmap(getWXPBitmap())
return icon
#----------------------------------------------------------------------
def getWXPdemoData():
return \
'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\
\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\x08d\x88\x00\x00\x01\
\x94IDATx\x9c\xb5WAn\xc4 \x0c\xf4@\x7f\xd2>\xa5y5}J\xbe\x92\xb8\x87\r\xac\
\x01c\x02dGZiE\x103L\x06\x9b\x00\xce\x93\x05>\x0f\x8e\xff\xe1<\xcc\xc9\x13\
\xf8\xea\x913\'~\x02\xc0O\x8bh\n(\xc9\x89\x88\x98\x99\x00d\x83\xab\x82T\x01\
\x99\xed@"\x97B\xc4\xf3%W\\I\xcc\xe7\xc1\x14\xc4\x18s"\x04@\x9a+R\xf0(\x92\
\x03%1\x05\x9d0\n\x89\xe4\xab0C\x18E\x94x\x828\x02p\xbe\xde\xbd\x85\xad\xca\
\x00Qx\x8d\xcfd\xc1\xf5\xa7\x14\xb8\\\x89\xbf$<\xd0T\x16\x10\x0b\xd1\x90\x0b\
-L\xb80\xee\x80\x85\t\x17\x92\x008\x0f\xda\x88h3f[\xcf&\x91\x9d\x028\x8f\xfd\
<\xf8\xbbE\xb4\xfa\x8a\x14@6\xa3\xfd<\xf8\xc7x\x87\x99\xbd\x96\x18\x91\x85^3\
K\x0e\xf4\xc8\xcb\x05x\xbb\x166\x84TUu;\xaa\xb2=\x1dB8\x8f\x94\x1bcN\x96+%\
\xa4\x8e\xe8\xbd\xfb}0\xc1\xaf\x8e\xa9<\x10D=\xa1\xe8]H\xee\x92\xe3O\x99Tf!\
\xd4\xe3\xcf\xd6\x01\x03-\x17\x86\x05\xc4\x96]Z\xcf\xbf\xca\xe4Va\x12\xe3\
\xb7\x05hw\x85Qh.\xd8\xedX\x90\x7f\xa2\x08\x11\xddp\xe0\x93\xe4]\x01#\xe4\
\xea)\x90\xeb\xcc\x08P1\xd3\x90B;C\xe6\xb5\xbc\xda\xbd8\xbf\xc0\xfb$X\xbb\
\x97"4,\xd7\x01\x93\xbc\xe5V\xb6\x91F%l\xbe\x7fQ\xd7\xbb\xb8\x88\xca\x0c\xc8\
\x86t\xeb\x18f\x18\xb8\xbc\xa6]\x1a]\xd6\xec\x05\xc3GPX~\xf7n\xd8mF\xc9\xbe\
\x96\x90\t\xd2!\x01\x95\x90r\x81\xc5\x8f\xd3\x7f\xa5\x8a\t\xa7n\x17\xec.\x00\
\x00\x00\x00IEND\xaeB`\x82'
def getWXPdemoBitmap():
return BitmapFromImage(getWXPdemoImage())
def getWXPdemoImage():
stream = cStringIO.StringIO(getWXPdemoData())
return ImageFromStream(stream)
def getWXPdemoIcon():
icon = EmptyIcon()
icon.CopyFromBitmap(getWXPdemoBitmap())
return icon

View File

@@ -1,5 +1,5 @@
README for wxPython-src-2.5.*.tar.gz
====================================
README for wxPythonSrc-2.5.*.tar.gz
===================================
This archive contains the source code and other files for both

View File

@@ -1,5 +1,5 @@
wxPython-docs
-------------
wxPythonDocs
------------
The wxWidgets docs can now be viewed on non-Win32 platforms with a
nice viewer modeled after the MS HTMLHelp viewer. Simply execute the

View File

@@ -1,31 +0,0 @@
wxPython win32 README
---------------------
The self-installer pacakge you have just installed contains the Python
extension modules, python modules and pakcages needed to run wxPython
applications. If you selected the "Make this install be the default
wxPython" option in the installer then this version will be the one
that is imported when apps do "import wx". See the following wiki
page for more information about managing multiple installs:
http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
In addition to the wxPython modules, several tools scripts (such as
XRCed and PyShell) and batch file launchers have been installed to
Python's Scripts directory. (For example, c:\Python23\Scripts.) IF
you have multiple versions of wxPython installed these tool scripts
will use whichever is the default install. If you would like to
control which version is used then follow the directions at the wiki
page for using wxversion.
This installer does *not* include the wxPython documentation, the
wxPython demo and other sample applications are provided as part of
wxPython. Those are available in a separate installer named
wxPython2.5-win32-docs-demos-*.exe which should also be located from
wherever you downloaded this package from. The Docs and Demos
installer will also create Start Menu shortcuts for the tool scripts
mentioned above.

View File

@@ -1,8 +1,8 @@
The collection of scripts in this directory are an attempt to fully
automate the build of the wxPython source and binary packages on all
build platforms. It does this through creative use of ssh and scp
commands to the remote build machines, so this will likely only work
in my somewhat unique environment.
build platforms. It does this through creative use of shared folders
on network drives, and ssh commands to the remote machines. So this
will likly only work in my somewhat unique environment.
The goal here is to be able to start a build on one machine and have
it take care of all the steps, including moving the source tarball to
@@ -12,7 +12,7 @@ may be copied to a public server for others to play with.
Types of builds:
dryrun
dry-run
Nothing extra is done with the build, this is just for
my own testing.
@@ -21,17 +21,14 @@ Types of builds:
datestamp, and if the build is successful the results
are copied to a daily build folder on starship.
release
release-cantidate
The results are uploaded to the previews foler on
starship if the build is successful.
The master script in this folder is build-all (written in Python)
which will setup and control the whole process. The other scripts
(using bash) are launched from build-all either to do specific tasks
locally, or to run on each individual build machine to manage the
build process there, usually by calling out to other scripts that
already exist. The build-all script uses the taskrunner.py and
subprocess Python modules.
The master script in this folder is "make-all" which will setup and
control the whole process. The other scripts are what are run on each
build machine, most of which will also call out to other scripts that
already exist, etc.

View File

@@ -1,256 +1,410 @@
#!/usr/bin/python
#----------------------------------------------------------------------
# Name: build-all.py
# Purpose: Master build script for building all the installers and
# such on all the build machines in my lab, and then
# distributing the results as needed.
#
# This will replace the build-all bash script and is
# needed because the needs of the build have outgrown
# what I can do with bash.
#
# Author: Robin Dunn
#
# Created: 05-Nov-2004
# RCS-ID: $Id$
# Copyright: (c) 2004 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
#!/bin/bash
# ---------------------------------------------------------------------------
# Master build script for building all the installers and such on all the
# build machines in my lab, and then distributing the results as needed.
# ---------------------------------------------------------------------------
import sys
import os
import time
from taskrunner import Job, Task, TaskRunner
set -o errexit
#set -o xtrace
#----------------------------------------------------------------------
# Configuration items
class Config:
def write(self, filename="config", outfile=None):
if outfile is None:
f = file(filename, "w")
else:
f = outfile
for k, v in self.__dict__.items():
f.write('%s="%s"\n' % (k, v))
config = Config()
# ---------------------------------------------------------------------------
# Some control variables...
# the local spot that we put everything when done, before possibly copying
# to remote hosts
config.STAGING_DIR = "./BUILD"
STAGING_DIR=./BUILD
# host name of the machine to use for windows builds
config.WIN_HOST = "beast"
WIN_HOST=beast
# Where is the build dir from the remote machine's perspective?
config.WIN_BUILD = "/c/BUILD"
WIN_BUILD=/c/BUILD
# Just like the above
config.OSX_HOST_panther = "bigmac"
config.OSX_HOST_jaguar = "whopper"
config.OSX_BUILD = "/BUILD"
OSX_HOST_panther=bigmac
OSX_HOST_jaguar=whopper
OSX_BUILD=/tmp/BUILD
# Alsmost the same... See below for hosts and other info
config.LINUX_BUILD = "/tmp/BUILD"
LINUX_BUILD=/tmp/BUILD
# Upload server locations
config.UPLOAD_HOST = "starship.python.net"
config.UPLOAD_DAILY_ROOT = "/home/crew/robind/public_html/wxPython/daily"
config.UPLOAD_PREVIEW_ROOT = "/home/crew/robind/public_html/wxPython/preview"
# defaults for build options
config.KIND = "dryrun"
config.PYVER = "2.3"
config.skipsource = "no"
config.onlysource = "no"
config.skipdocs = "no"
config.skipwin = "no"
config.skiposx = "no"
config.skiplinux = "no"
config.skipclean = "no"
config.skipupload = "no"
config.skipnewdocs = "no"
UPLOAD_HOST=starship.python.net
UPLOAD_DAILY_ROOT=/home/crew/robind/public_html/wxPython/daily
UPLOAD_PREVIEW_ROOT=/home/crew/robind/public_html/wxPython/preview
#----------------------------------------------------------------------
# Define all the build tasks
class Job(Job):
LOGBASE = "./tmp"
# ---------------------------------------------------------------------------
# functions
CFGFILE = "./tmp/config"
function usage {
echo ""
echo "Usage: $0 [command flags...]"
echo ""
echo "build types:"
echo " dryrun Do the build, but don't copy anywhere (default)"
echo " daily Do a daily build, copy to starship"
echo " release Do a normal release build, copy to starship"
echo ""
echo "optional command flags:"
echo " 2.2 Build for Python 2.2 (default=off)"
echo " 2.3 Build for Python 2.3 (default=on)"
echo " all Build for all supported Python versions"
echo ""
echo " skipsource Don't build the source archives, use the ones"
echo " already in the staging dir."
echo " onlysource Exit after building the source archives"
echo " skipwin Don't do the remote Windows build"
echo " skiposx Don't do the remote OSX build"
echo " skiplinux Don't do the remote Linux build"
echo " skipclean Don't do the cleanup step on the remote builds"
echo ""
# Things that need to be done before any of the builds
initialTask = Task([ Job("", ["distrib/all/build-setup", CFGFILE]),
Job("", ["distrib/all/build-docs", CFGFILE]),
Job("", ["distrib/all/build-sources", CFGFILE]),
])
}
# Build tasks. Anything that can be done in parallel (depends greatly
# on the nature of the build machine configurations...) is a separate
# task.
windowsTask = Task( Job("beast", ["distrib/all/build-windows", CFGFILE]) )
# ---------------------------------------------------------------------------
jaguarTask = Task( Job(config.OSX_HOST_jaguar,
["distrib/all/build-osx", CFGFILE, config.OSX_HOST_jaguar, "jaguar"]) )
pantherTask = Task( Job(config.OSX_HOST_panther,
["distrib/all/build-osx", CFGFILE, config.OSX_HOST_panther, "panther"]) )
rpmTask = Task([ Job("co-rh9", ["distrib/all/build-rpm", CFGFILE, "beast", "co-rh9", "rh9", "config"]),
Job("co-fc2", ["distrib/all/build-rpm", CFGFILE, "beast", "co-fc2", "fc2", "2.3"]),
Job("co-mdk92", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk92", "mdk92", "2.3"]),
Job("co-mdk101", ["distrib/all/build-rpm", CFGFILE, "beast", "co-mdk101","mdk101","2.3"]),
])
buildTasks = [ windowsTask,
jaguarTask,
pantherTask,
rpmTask,
]
# Finalization. This is for things that must wait until all the
# builds are done, such as copying the installers someplace, sending
# emails, etc.
finalizationTask = Task( Job("", ["distrib/all/build-finalize", CFGFILE]) )
# Make sure we are running in the right directory. TODO: make this
# test more robust. Currenly we just test for the presence of
# 'wxPython' and 'wx' subdirs.
if [ ! -d wxPython -o ! -d wx ]; then
echo "Please run this script from the root wxPython directory."
exit 1
fi
#----------------------------------------------------------------------
def usage():
print ""
print "Usage: build-all [command flags...]"
print ""
print "build types:"
print " dryrun Do the build, but don't copy anywhere (default)"
print " daily Do a daily build, copy to starship"
print " release Do a normal release (cantidate) build, copy to starship"
print ""
print "optional command flags:"
print " 2.2 Build for Python 2.2 (default=off)"
print " 2.3 Build for Python 2.3 (default=on)"
print " all Build for all supported Python versions"
print ""
print " skipsource Don't build the source archives, use the ones"
print " already in the staging dir."
print " onlysource Exit after building the source and docs archives"
print " skipdocs Don't rebuild the docs"
print " skipwin Don't do the remote Windows build"
print " skiposx Don't do the remote OSX build"
print " skiplinux Don't do the remote Linux build"
print " skipclean Don't do the cleanup step on the remote builds"
print " skipupload Don't upload the builds to starship"
print ""
# Set defaults and check the command line options
KIND=dryrun
PYVER=2.3
skipsource=no
onlysource=no
skipwin=no
skiposx=no
skiplinux=no
skipclean=no
for flag in $*; do
case $flag in
dryrun) KIND=dryrun ;;
daily) KIND=daily ;;
release) KIND=release ;;
2.2) PYVER=2.2 ;;
2.3) PYVER=2.3 ;;
all) PYVER="2.2 2.3" ;;
skipsource) skipsource=yes ;;
onlysource) onlysource=yes ;;
skipwin) skipwin=yes ;;
skiposx) skiposx=yes ;;
skiplinux) skiplinux=yes ;;
skipclean) skipclean=yes ;;
help) usage; exit 1 ;;
*) echo "Unknown flag \"$flag\""
usage
exit 1
esac
done
# ensure the staging area exists
if [ ! -d $STAGING_DIR ]; then
mkdir -p $STAGING_DIR
fi
# Figure out the wxPython version number, possibly adjusted for being a daily build
if [ $KIND = daily ]; then
DAILY=`date +%Y%m%d` # should it include the hour too? 2-digit year?
echo $DAILY > DAILY_BUILD
fi
VERSION=`python -c "import setup;print setup.VERSION"`
#echo VERSION=$VERSION
#exit 0
echo "Getting started at " `date`
# ---------------------------------------------------------------------------
# Make the sources and other basic stuff.
if [ $skipsource != yes -o $onlysource = yes ]; then
# clean out the local dist dir
rm -f dist/*
# Regenerate the reST docs
echo "Regenerating the reST docs..."
cd docs
for x in *.txt; do
docutils-html $x `basename $x .txt`.html
done
cd -
# build the doc and demo tarballs
distrib/makedemo
distrib/makedocs
# build the new docs too
docs/bin/everything
# make the source tarball
distrib/makerpm 2.3 skipclean skiprpm gtk2
# make the source RPMs
for ver in $PYVER; do
distrib/makerpm $ver skipclean skipcopy skiptar srpm
distrib/makerpm $ver skipclean skipcopy skiptar srpm gtk2
done
# Copy everything to the staging dir
echo "Moving stuff to $STAGING_DIR..."
rm -f dist/*.spec
mv dist/* $STAGING_DIR
for doc in CHANGES BUILD INSTALL MigrationGuide default; do
cp docs/$doc.* $STAGING_DIR
done
# cleanup
echo "Cleaning up..."
rm -f dist/*
rm -rf _build_rpm
fi
if [ $KIND = daily ]; then
rm DAILY_BUILD
fi
if [ $onlysource = yes ]; then
exit 0
fi
# ---------------------------------------------------------------------------
# Windows build
if [ $skipwin != yes ]; then
echo "-=-=- Starting Windows build..."
echo "Copying source file and build script..."
scp $STAGING_DIR/wxPythonSrc-$VERSION.tar.gz \
distrib/all/build-windows \
$WIN_HOST:$WIN_BUILD
echo "Running build script on $WIN_HOST..."
wxdir=$WIN_BUILD/wxPythonSrc-$VERSION
cmd=./build-windows
ssh $WIN_HOST "cd $WIN_BUILD && $cmd $wxdir $WIN_BUILD $skipclean $VERSION $PYVER && rm $cmd"
#----------------------------------------------------------------------
def main(args):
# Make sure we are running in the right directory. TODO: make
# this test more robust. Currenly we just test for the presence
# of 'wxPython' and 'wx' subdirs.
if not os.path.isdir("wxPython") or not os.path.isdir("wx"):
print "Please run this script from the root wxPython directory."
sys.exit(1)
# Check command line flags
for flag in args:
if flag in ["dryrun", "daily", "release"]:
config.KIND = flag
elif flag in ["2.2", "2.3"]:
config.PYVER = flag
elif flag == "all":
config.PYVER = "2.2 2.3"
elif flag == "skipsource":
config.skipsource = "yes"
elif flag == "onlysource":
config.onlysource = "yes"
elif flag == "skipdocs":
config.skipdocs = "yes"
elif flag == "skipnewdocs":
config.skipnewdocs = "yes"
elif flag == "skipwin":
config.skipwin = "yes"
elif flag == "skiposx":
config.skiposx = "yes"
elif flag == "skiplinux":
config.skiplinux = "yes"
elif flag == "skipclean":
config.skipclean = "yes"
elif flag == "skipupload":
config.skipupload = "yes"
else:
print 'Unknown flag: "%s"' % flag
usage()
sys.exit(2)
echo "Fetching the results..."
scp $WIN_HOST:$WIN_BUILD/wxPythonWIN32* $STAGING_DIR
ssh $WIN_HOST "rm $WIN_BUILD/wxPythonWIN32*"
fi
# ensure the staging area exists
if not os.path.exists(config.STAGING_DIR):
os.makedirs(config.STAGING_DIR)
# ---------------------------------------------------------------------------
# OSX build
# Figure out the wxPython version number, possibly adjusted for being a daily build
if config.KIND == "daily":
t = time.localtime()
config.DAILY = time.strftime("%Y%m%d") # should it include the hour too? 2-digit year?
file("DAILY_BUILD", "w").write(config.DAILY)
sys.path.append('.')
import setup
config.VERSION = setup.VERSION
function DoOSXBuild {
local host=$1
local flavor=$2
# write the config file where the build scripts can find it
config.write(CFGFILE)
print "Build getting started at: ", time.ctime()
# test if the target machine is online
if ping -q -c1 -w1 $host > /dev/null; then
echo "-----------------------------------------------------------------"
echo " The $host machine is online, OSX-$flavor build continuing..."
echo "-----------------------------------------------------------------"
else
echo "-----------------------------------------------------------------"
echo "The $host machine is offline, skipping the OSX-$flavor build."
echo "-----------------------------------------------------------------"
return 0
fi
echo "-=-=- Starting OSX-$flavor build on $host..."
echo "Copying source files and build script..."
ssh root@$host "mkdir -p $OSX_BUILD && rm -rf $OSX_BUILD/* || true"
scp $STAGING_DIR/wxPythonSrc-$VERSION.tar.gz \
$STAGING_DIR/wxPythonDocs-$VERSION.tar.gz \
$STAGING_DIR/wxPythonDemo-$VERSION.tar.gz \
distrib/all/build-osx \
root@$host:$OSX_BUILD
echo "Running build script on $host..."
wxdir=$OSX_BUILD/wxPythonSrc-$VERSION
cmd=./build-osx
ssh root@$host "cd $OSX_BUILD && $cmd $wxdir $OSX_BUILD $skipclean $VERSION $flavor $PYVER && rm $cmd"
echo "Fetching the results..."
scp "root@$host:$OSX_BUILD/wxPythonOSX*" $STAGING_DIR
ssh root@$host "rm $OSX_BUILD/wxPythonOSX*"
}
# Run the first task, which will create the docs and sources tarballs
tr = TaskRunner(initialTask)
rc = tr.run()
if [ $skiposx != yes ]; then
# cleanup the DAILY_BUILD file
if config.KIND == "daily":
os.unlink("DAILY_BUILD")
DoOSXBuild $OSX_HOST_panther panther
DoOSXBuild $OSX_HOST_jaguar jaguar
# Quit now?
if rc != 0 or config.onlysource == "yes":
sys.exit(rc)
fi
# Run the main build tasks
tr = TaskRunner(buildTasks)
rc = tr.run()
if rc != 0:
sys.exit(rc)
# ---------------------------------------------------------------------------
# Linux build
# The remote Linux builds are different than those above. The source
# RPMs were already built in the source step, and so building the
# binary RPMs is a very simple followup step. But then add to that
# the fact that we need to build on more than one distro...
# when all the builds are done, run the finalization task
tr = TaskRunner(finalizationTask)
rc = tr.run()
if rc != 0:
sys.exit(rc)
function DoLinuxBuild {
local host=$1
local reltag=$2
shift;shift
local pyver=$@
# test if the target machine is online
if ping -q -c1 -w1 $host > /dev/null; then
echo "-----------------------------------------------------------------"
echo " The $host machine is online, build continuing..."
echo "-----------------------------------------------------------------"
else
echo "-----------------------------------------------------------------"
echo "The $host machine is offline, skipping the binary RPM build."
echo "-----------------------------------------------------------------"
return 0
fi
echo "Copying source files and build script..."
ssh root@$host "mkdir -p $LINUX_BUILD && rm -rf $LINUX_BUILD/*"
scp $STAGING_DIR/wxPython*.src.rpm \
distrib/all/build-linux \
root@$host:$LINUX_BUILD
echo "Running build script on $host..."
cmd=./build-linux
ssh root@$host "cd $LINUX_BUILD && ./build-linux $reltag $skipclean $VERSION $pyver"
print "Build finished at: ", time.ctime()
sys.exit(0)
echo "Fetching the results..."
scp "root@$host:$LINUX_BUILD/wxPythonGTK*.i[0-9]86.rpm" $STAGING_DIR
ssh root@$host "rm $LINUX_BUILD/wxPythonGTK*.i[0-9]86.rpm"
}
if [ $skiplinux != yes ]; then
DoLinuxBuild co-rh9 RH9 $PYVER
DoLinuxBuild co-fc2 FC2 2.3
fi
# ---------------------------------------------------------------------------
# Final disposition of build results...
chmod a+r $STAGING_DIR/*
if [ $KIND = dryrun ]; then
# we're done
echo "Finished at " `date`
exit 0
fi
if __name__ == "__main__":
main(sys.argv[1:])
if [ $KIND = daily ]; then
destdir=$UPLOAD_DAILY_ROOT/$DAILY
echo "Copying to the starship at $destdir..."
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir
ssh $UPLOAD_HOST "cd $destdir && ls -al"
echo "Cleaning up staging dir..."
rm $STAGING_DIR/*
rmdir $STAGING_DIR
# TODO: something to remove old builds from starship, keeping
# only N days worth
# Send email to wxPython-dev
DATE=`date`
TO=wxPython-dev@lists.wxwidgets.org
cat <<EOF | /usr/sbin/sendmail $TO
From: R'bot <rbot@wxpython.org>
To: $TO
Subject: $DAILY test build uploaded
Date: $DATE
Hi,
A new test build of wxPython has been uploaded to starship.
Version: $VERSION
URL: http://starship.python.net/crew/robind/wxPython/daily/$DAILY
Changes: http://starship.python.net/crew/robind/wxPython/daily/$DAILY/CHANGES.html
Have fun!
R'bot
EOF
echo "Finished at " `date`
exit 0
fi
if [ $KIND = release ]; then
echo "Copying to the local file server..."
destdir=/stuff/Development/wxPython/dist/$VERSION
mkdir -p $destdir
cp $STAGING_DIR/* $destdir
echo "Copying to the starship..."
destdir=$UPLOAD_PREVIEW_ROOT/$VERSION
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir
echo "Cleaning up staging dir..."
rm $STAGING_DIR/*
rmdir $STAGING_DIR
# Send email to wxPython-dev
DATE=`date`
TO=wxPython-dev@lists.wxwidgets.org
cat <<EOF | /usr/sbin/sendmail $TO
From: R'bot <rbot@wxpython.org>
To: $TO
Subject: $VERSION release candidate build uploaded
Date: $DATE
Hi,
A new RC build of wxPython has been uploaded to starship.
Version: $VERSION
URL: http://starship.python.net/crew/robind/wxPython/preview/$VERSION
Changes: http://starship.python.net/crew/robind/wxPython/preview/$VERSION/CHANGES.html
Have fun!
R'bot
EOF
echo "Finished at " `date`
exit 0
fi
# ---------------------------------------------------------------------------

View File

@@ -1,36 +0,0 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
# read the config variables from the file given on the command line
. $1
if [ $skipdocs != yes ]; then
# Regenerate the reST docs
echo "Regenerating the reST docs..."
cd docs
for x in *.txt; do
docutils-html $x `basename $x .txt`.html
done
cd -
for doc in CHANGES BUILD INSTALL MigrationGuide default; do
cp docs/$doc.* $STAGING_DIR
done
# build the doc and demo tarballs
distrib/makedemo
distrib/makedocs
mv dist/wxPython-docs-$VERSION.tar.gz $STAGING_DIR
mv dist/wxPython-demo-$VERSION.tar.gz $STAGING_DIR
# build the new docs too
if [ $skipnewdocs != yes ]; then
docs/bin/everything
mv dist/wxPython-newdocs-$VERSION.tar.gz $STAGING_DIR
fi
fi
#----------------------------------------------------------------------

View File

@@ -1,115 +0,0 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
# read the config variables from the file given on the command line
. $1
chmod a+r $STAGING_DIR/*
if [ $KIND = dryrun ]; then
# we're done leave the files in the staging dir and quit
echo "Not uploading dryrun."
exit 0
fi
if [ $KIND = daily ]; then
echo "Copying to the local file server..."
destdir=/stuff/temp/$VERSION
mkdir -p $destdir
cp $STAGING_DIR/* $destdir
if [ $skipupload != yes ]; then
destdir=$UPLOAD_DAILY_ROOT/$DAILY
echo "Copying to the starship at $destdir..."
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir
ssh $UPLOAD_HOST "cd $destdir && ls -al"
# TODO: something to remove old builds from starship, keeping
# only N days worth
# Send email to wxPython-dev
DATE=`date`
TO=wxPython-dev@lists.wxwidgets.org
cat <<EOF | /usr/sbin/sendmail $TO
From: R'bot <rbot@wxpython.org>
To: $TO
Subject: $DAILY test build uploaded
Date: $DATE
Hi,
A new test build of wxPython has been uploaded to starship.
Version: $VERSION
URL: http://starship.python.net/crew/robind/wxPython/daily/$DAILY
Changes: http://starship.python.net/crew/robind/wxPython/daily/$DAILY/CHANGES.html
Have fun!
R'bot
EOF
fi
echo "Cleaning up staging dir..."
rm $STAGING_DIR/*
rmdir $STAGING_DIR
exit 0
fi
if [ $KIND = release ]; then
echo "Copying to the local file server..."
destdir=/stuff/Development/wxPython/dist/$VERSION
mkdir -p $destdir
cp $STAGING_DIR/* $destdir
if [ $skipupload != yes ]; then
echo "Copying to the starship..."
destdir=$UPLOAD_PREVIEW_ROOT/$VERSION
ssh $UPLOAD_HOST "mkdir -p $destdir"
scp $STAGING_DIR/* $UPLOAD_HOST:/$destdir
# Send email to wxPython-dev
DATE=`date`
TO=wxPython-dev@lists.wxwidgets.org
cat <<EOF | /usr/sbin/sendmail $TO
From: R'bot <rbot@wxpython.org>
To: $TO
Subject: $VERSION release candidate build uploaded
Date: $DATE
Hi,
A new RC build of wxPython has been uploaded to starship.
Version: $VERSION
URL: http://starship.python.net/crew/robind/wxPython/preview/$VERSION
Changes: http://starship.python.net/crew/robind/wxPython/preview/$VERSION/CHANGES.html
Have fun!
R'bot
EOF
fi
echo "Cleaning up staging dir..."
rm $STAGING_DIR/*
rmdir $STAGING_DIR
exit 0
fi

View File

@@ -31,65 +31,52 @@ PYVER=$@
rpmtop=_rpm_top
if which rpmbuild > /dev/null 2>&1; then
RPMBUILD=rpmbuild
else
RPMBUILD=rpm
fi
function DoRPMBuild {
# $1 : python version
# $2 : port
# $3 : unicode
echo "*** Setting up RPM build dirs"
for dir in SPECS BUILD RPMS SRPMS tmp; do
if [ ! -d $rpmtop/$dir ]; then
mkdir -p $rpmtop/$dir
fi
done
if [ ! -e $rpmtop/SOURCES ]; then
ln -s $PWD $rpmtop/SOURCES
fi
echo "-=-=-=-=-=-=-=-=-=-=-"
echo $1 $2 $3
echo "-=-=-=-=-=-=-=-=-=-=-"
$RPMBUILD --define "_topdir $PWD/$rpmtop" \
rpmbuild --define "_topdir $PWD/$rpmtop" \
--define "_tmppath $PWD/$rpmtop/tmp" \
--define "release ${RELEASE}_py$1" \
--define "pyver $1" \
--define "port $2" \
--define "unicode $3" \
-bb wxPython.spec
--define "release $RELEASE" \
$@
if [ $? != 0 ]; then
return $?
fi
echo "*** Moving RPMs to ."
find $rpmtop -name "*.rpm"
mv -f `find $rpmtop -name "*.rpm"` .
echo "*** Cleaning up $rpmtop"
rm -rf $rpmtop
}
echo "*** Setting up RPM build dirs"
for dir in SPECS BUILD RPMS SOURCES SRPMS tmp; do
if [ ! -d $rpmtop/$dir ]; then
mkdir -p $rpmtop/$dir
fi
done
cp wxPython-src-$VERSION.tar.gz $rpmtop/SOURCES
echo "******************** PYVER = " $PYVER
for ver in $PYVER; do
echo "Building the RPMs for Python $ver..."
DoRPMBuild $ver gtk 0
DoRPMBuild $ver gtk2 1
DoRPMBuild $ver gtk2 0
for port in GTK GTK2; do
rpm2cpio wxPython$port-py$ver-$VERSION-1.src.rpm | \
cpio --extract -R root.
DoRPMBuild -ba wxPython$port.spec
done
done
echo "*** Moving RPMs to ."
find $rpmtop -name "*.rpm"
mv -f `find $rpmtop -name "*.rpm"` .
if [ $SKIPCLEAN != yes ]; then
echo "*** Cleaning up $rpmtop"
rm -rf $rpmtop
echo "Cleaning up..."
for ver in $PYVER; do
rm wxPythonGTK-py$ver-$VERSION-*.src.rpm
rm wxPythonGTK2-py$ver-$VERSION-*.src.rpm
done
rm *.spec *.tar.gz
fi

View File

@@ -1,40 +1,65 @@
#!/bin/bash
#----------------------------------------------------------------------
# ---------------------------------------------------------------------------
# Build wxWidgets and wxPython on a OSX box. This is normally
# called from build-all but it should be able to be used standalone too...
#
# The command line must have the following parameters:
#
# 1. the path to the base of the wx source tree
# 2. the path of where to put the resulting installers
# 3. skipclean flag (yes|no)
# 4. the VERSION
# 5. the FLAVOR (panther or jaguar)
# *. the remaining args are the versions of Python to build for
#
# ---------------------------------------------------------------------------
set -o errexit
#set -o xtrace
# read the config variables from the file given on the command line
. $1
echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
host=$2
flavor=$3
if [ $skiposx != yes ]; then
# test if the target machine is online
if ping -q -c1 -w1 $host > /dev/null; then
echo " The $host machine is online, OSX-$flavor build continuing..."
else
echo "The $host machine is **OFFLINE**, skipping the OSX-$flavor build."
exit 0
fi
echo "Copying source files and build script..."
ssh root@$host "mkdir -p $OSX_BUILD && rm -rf $OSX_BUILD/* || true"
scp $STAGING_DIR/wxPython-src-$VERSION.tar.gz \
$STAGING_DIR/wxPython-docs-$VERSION.tar.gz \
$STAGING_DIR/wxPython-demo-$VERSION.tar.gz \
distrib/all/do-build-osx \
root@$host:$OSX_BUILD
echo "Running build script on $host..."
wxdir=$OSX_BUILD/wxPython-src-$VERSION
cmd=./do-build-osx
ssh root@$host "cd $OSX_BUILD && $cmd $wxdir $OSX_BUILD $skipclean $VERSION $flavor $PYVER && rm $cmd"
echo "Fetching the results..."
scp "root@$host:$OSX_BUILD/wxPython*-osx*" $STAGING_DIR
ssh root@$host "rm $OSX_BUILD/wxPython*-osx*"
if [ $# -lt 6 ]; then
echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION FLAVOR PYVER..."
exit 1
fi
WXDIR=$1
DESTDIR=$2
SKIPCLEAN=$3
VERSION=$4
FLAVOR=$5
shift;shift;shift;shift;shift
PYVER=$@
export PATH=/sw/bin:/usr/local/bin:$PATH
# untar the source
echo "Unarchiving wxPythonSrc-$VERSION.tar.gz"
cd $DESTDIR
tar xzf wxPythonSrc-$VERSION.tar.gz
rm wxPythonSrc-$VERSION.tar.gz
echo "Invoking wxPythonOSX build script..."
cd $WXDIR/wxPython
export TARBALLDIR=$DESTDIR
mkdir -p dist
distrib/mac/wxPythonOSX/build $FLAVOR inplace skipclean
echo "Copying installers to $DESTDIR..."
cp dist/*.dmg $DESTDIR
cd $DESTDIR
if [ $SKIPCLEAN != yes ]; then
echo "Cleaning up..."
rm -r $WXDIR || true
rm wxPythonDocs-$VERSION.tar.gz
rm wxPythonDemo-$VERSION.tar.gz
fi
echo "-=-=-=- Goodbye! -=-=-=-"

View File

@@ -1,98 +0,0 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
# read the config variables from the file given on the command line
. $1
coHost=$2
host=$3
reltag=$4
shift;shift;shift;shift
pyver=$@
if [ $pyver = config ]; then
pyver=$PYVER
fi
function TestOnline {
local host=$1
local message=$2
if ping -q -c1 -w1 $host > /dev/null; then
return 0
else
return 1
fi
}
if [ $skiplinux != yes ]; then
startedCoHost=no
hostAvailable=no
# test if the target machine is online
if TestOnline $host; then
hostAvailable=yes
else
# Attempt to start the host via it's coLinux host, if there is one
if [ $coHost != none ]; then
if TestOnline $coHost; then
echo "Attempting to start $host via coLinux on $coHost..."
ssh $coHost "/c/coLinux/VMs/$host.bat -d > /dev/null 2>&1 &"
# Give it time to boot and be ready for conenctions,
# and then test with ssh, limiting retries.
for x in `seq 12`; do
sleep 5
echo "checking..."
if ssh root@$host "true" >/dev/null 2>&1; then
# success! the host is ready so we can break out of the loop
break;
fi
done
# test if the host is ready
if TestOnline $host; then
echo "coLinux start of $host on $coHost successful."
startedCoHost=yes
hostAvailable=yes
fi
else
echo "The $coHost machine is offline, unable to start coLinux for $host"
fi
fi
fi
if [ $hostAvailable = yes ]; then
echo "The $host machine is online, build continuing..."
else
echo "The $host machine is **OFFLINE**, skipping the binary RPM build."
exit 0
fi
echo "Copying source files and build script..."
ssh root@$host "mkdir -p $LINUX_BUILD && rm -rf $LINUX_BUILD/*"
scp $STAGING_DIR/wxPython-src* $STAGING_DIR/wxPython.spec\
distrib/all/do-build-rpm \
root@$host:$LINUX_BUILD
echo "Running build script on $host..."
cmd=./do-build-rpm
ssh root@$host "cd $LINUX_BUILD && $cmd $reltag $skipclean $VERSION $pyver"
echo "Fetching the results..."
scp "root@$host:$LINUX_BUILD/wxPython*.i[0-9]86.rpm" $STAGING_DIR
ssh root@$host "rm $LINUX_BUILD/wxPython*.i[0-9]86.rpm"
if [ $startedCoHost = yes ]; then
echo "Halting $host on $coHost..."
ssh root@$host "/sbin/halt"
sleep 10
fi
fi

View File

@@ -1,12 +0,0 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
# read the config variables from the file given on the command line
. $1
# clean out the local dist dir
rm -f dist/*

View File

@@ -1,18 +0,0 @@
#!/bin/bash
#----------------------------------------------------------------------
set -o errexit
# read the config variables from the file given on the command line
. $1
if [ $skipsource != yes -o $onlysource = yes ]; then
# make the source tarball and srpm
distrib/makerpm 2.3 srpm
# Copy everything to the staging dir
echo "Moving stuff to $STAGING_DIR..."
mv dist/* $STAGING_DIR
fi

View File

@@ -1,32 +1,128 @@
#!/bin/bash
#----------------------------------------------------------------------
# ---------------------------------------------------------------------------
# Build wxWidgets and wxPython on a Windows box. This is normally called
# from build-all but it should be able to be used standalone too...
#
# The command line must have the following parameters:
#
# 1. the path to the base of the wx source tree
# 2. the path of where to put the resulting installers
# 3. skipclean flag (yes|no)
# 4. the VERSION
# 5. the remaining args are the versions of Python to build for
#
# ---------------------------------------------------------------------------
set -o errexit
#set -o xtrace
# read the config variables from the file given on the command line
. $1
echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
if [ $# -lt 5 ]; then
echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..."
exit 1
fi
WXDIR=$1
DESTDIR=$2
SKIPCLEAN=$3
VERSION=$4
shift;shift;shift;shift
PYVER=$@
if [ $skipwin != yes ]; then
# test if the target machine is online
if ping -q -c1 -w1 $WIN_HOST > /dev/null; then
echo " The $WIN_HOST machine is online, Windows build continuing..."
else
echo "The $WIN_HOST machine is **OFFLINE**, skipping the Windows build."
return 0
fi
# WXDIR is the cygwin path, WXWIN is the DOS path
WXWIN_OLD=$WXWIN
WXWIN=`cygpath -m $WXDIR`
export WXWIN
echo "Copying source file and build script..."
scp $STAGING_DIR/wxPython-src-$VERSION.tar.gz \
distrib/all/do-build-windows \
$WIN_HOST:$WIN_BUILD
echo "Running build script on $WIN_HOST..."
wxdir=$WIN_BUILD/wxPython-src-$VERSION
cmd=./do-build-windows
ssh $WIN_HOST "cd $WIN_BUILD && $cmd $wxdir $WIN_BUILD $skipclean $VERSION $PYVER && rm $cmd"
echo "Fetching the results..."
scp "$WIN_HOST:$WIN_BUILD/wxPython*-win32*" $STAGING_DIR
ssh $WIN_HOST "rm $WIN_BUILD/wxPython*-win32*"
fi
# # Fix the PATH. (Why is this needed??)
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH
# export PATH
# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
# echo $PATH
# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
# exit 0
# untar the source
echo "Unarchiving wxPythonSrc-$VERSION.tar.gz"
cd $DESTDIR
tar xzf wxPythonSrc-$VERSION.tar.gz
rm wxPythonSrc-$VERSION.tar.gz
# Fix line endings
echo "Converting wxPython line endings to CRLF..."
cd $WXDIR
names=`find wxPython -name "*.py" -o -name "*.txt" -o -name "*.htm*" -o -name "*.css" -o -name "*.h" -o -name "*.cpp" -o -name "*.c" -o -name "*.xml" `
unix2dos -D $names
# change to the right spot in the source tree and copy our build scripts
echo "Setting up for the build..."
cd $WXDIR/build/msw
cp $WXDIR/wxPython/distrib/msw/.m* .
# replace some settings in setup0.h and write to setup.h
cat > .my.sedexpr <<EOF
s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g
s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g
s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g
s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g
s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g
s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g
s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g
s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g
EOF
cat $WXDIR/include/wx/msw/setup0.h | sed -f .my.sedexpr > $WXDIR/include/wx/msw/setup.h
rm .my.sedexpr
echo "Building the wx DLLs..."
.make hybrid
.make hybrid-uni
echo "Building the wx tools..."
.make_tools
# cheat and just copy the .CHM files from the regular project dir
# TODO: Copy over the wxPythonDocs fle and run hhc on the contents of that.
mkdir -p $WXDIR/docs/htmlhelp
cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp
echo "Building wxPython and installers..."
cd $WXDIR/wxPython
mkdir -p dist
for ver in $PYVER; do
echo $ver
b $ver d USE_SWIG=0
b $ver h USE_SWIG=0
b $ver r USE_SWIG=0
b $ver d UNICODE=1 USE_SWIG=0
b $ver h UNICODE=1 USE_SWIG=0
b $ver r UNICODE=1 USE_SWIG=0
done
echo "Building the developer package..."
WXWIN=`cygpath -w $WXDIR`
export WXWIN
4nt /c distrib/makedev.bat $VERSION
echo "Copying installers to $DESTDIR..."
mv dist/wxPythonWIN32* $DESTDIR
cd $DESTDIR
if [ $SKIPCLEAN != yes ]; then
echo "Cleaning up..."
rm -r $WXDIR || true
fi
echo "-=-=-=- Goodbye! -=-=-=-"

View File

@@ -1,71 +0,0 @@
#!/bin/bash
# ---------------------------------------------------------------------------
# Build wxWidgets and wxPython on a OSX box. This is normally
# called from build-all but it should be able to be used standalone too...
#
# The command line must have the following parameters:
#
# 1. the path to the base of the wx source tree
# 2. the path of where to put the resulting installers
# 3. skipclean flag (yes|no)
# 4. the VERSION
# 5. the KIND (panther or jaguar)
# *. the remaining args are the versions of Python to build for
#
# ---------------------------------------------------------------------------
set -o errexit
#set -o xtrace
echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
if [ $# -lt 6 ]; then
echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION KIND PYVER..."
exit 1
fi
WXDIR=$1
DESTDIR=$2
SKIPCLEAN=$3
VERSION=$4
KIND=$5
shift;shift;shift;shift;shift
PYVER=$@
#export PATH=/sw/bin:/usr/local/bin:$PATH
export PATH=/sw/bin:/sw/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin:.:/usr/X11R6/bin
echo "PATH =" $PATH
echo "which gcc = " `which gcc`
#exit 0
# untar the source
echo "Unarchiving wxPython-src-$VERSION.tar.gz"
cd $DESTDIR
tar xzf wxPython-src-$VERSION.tar.gz
rm wxPython-src-$VERSION.tar.gz
echo "Invoking wxPythonOSX build script..."
cd $WXDIR/wxPython
export TARBALLDIR=$DESTDIR
mkdir -p dist
if [ $KIND = panther ]; then
distrib/mac/wxPythonOSX/build $KIND inplace unicode
fi
distrib/mac/wxPythonOSX/build $KIND inplace
echo "Copying installers to $DESTDIR..."
cp dist/*.dmg $DESTDIR
cd $DESTDIR
if [ $SKIPCLEAN != yes ]; then
echo "Cleaning up..."
rm -r $WXDIR || true
rm wxPython-docs-$VERSION.tar.gz
rm wxPython-demo-$VERSION.tar.gz
fi
echo "-=-=-=- Goodbye! -=-=-=-"

View File

@@ -1,128 +0,0 @@
#!/bin/bash
# ---------------------------------------------------------------------------
# Build wxWidgets and wxPython on a Windows box. This is normally called
# from build-all but it should be able to be used standalone too...
#
# The command line must have the following parameters:
#
# 1. the path to the base of the wx source tree
# 2. the path of where to put the resulting installers
# 3. skipclean flag (yes|no)
# 4. the VERSION
# 5. the remaining args are the versions of Python to build for
#
# ---------------------------------------------------------------------------
set -o errexit
#set -o xtrace
echo "-=-=-=- Hello from $HOSTNAME -=-=-=-"
if [ $# -lt 5 ]; then
echo "Usage: $0 WXDIR DESTDIR SKIPCLEAN VERSION PYVER..."
exit 1
fi
WXDIR=$1
DESTDIR=$2
SKIPCLEAN=$3
VERSION=$4
shift;shift;shift;shift
PYVER=$@
# WXDIR is the cygwin path, WXWIN is the DOS path
WXWIN_OLD=$WXWIN
WXWIN=`cygpath -w $WXDIR`
export WXWIN
# # Fix the PATH. (Why is this needed??)
# PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/robind/bin:.:$WXDIR/lib/vc_dll:$PATH
# export PATH
# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
# echo $PATH
# echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
# exit 0
# untar the source
echo "Unarchiving wxPython-src-$VERSION.tar.gz"
cd $DESTDIR
tar xzf wxPython-src-$VERSION.tar.gz
rm wxPython-src-$VERSION.tar.gz
# Fix line endings
echo "Converting wxPython line endings to CRLF..."
cd $WXDIR
names=`find wxPython -name "*.py" -o -name "*.txt" -o -name "*.htm*" -o -name "*.css" -o -name "*.xml" `
unix2dos -D $names
# change to the right spot in the source tree and copy our build scripts
echo "Setting up for the build..."
cd $WXDIR/build/msw
cp $WXDIR/wxPython/distrib/msw/.m* .
# replace some settings in setup0.h and write to setup.h
cat > .my.sedexpr <<EOF
s/wxDIALOG_UNIT_COMPATIBILITY *1/wxDIALOG_UNIT_COMPATIBILITY 0/g
s/wxUSE_DEBUG_CONTEXT *0/wxUSE_DEBUG_CONTEXT 1/g
s/wxUSE_MEMORY_TRACING *0/wxUSE_MEMORY_TRACING 1/g
s/wxUSE_DIALUP_MANAGER *1/wxUSE_DIALUP_MANAGER 0/g
s/wxUSE_GLCANVAS *0/wxUSE_GLCANVAS 1/g
s/wxUSE_POSTSCRIPT *0/wxUSE_POSTSCRIPT 1/g
s/wxUSE_AFM_FOR_POSTSCRIPT *1/wxUSE_AFM_FOR_POSTSCRIPT 0/g
s/wxUSE_DISPLAY *0/wxUSE_DISPLAY 1/g
EOF
cat $WXDIR/include/wx/msw/setup0.h | sed -f .my.sedexpr > $WXDIR/include/wx/msw/setup.h
rm .my.sedexpr
echo "Building the wx DLLs..."
.make hybrid
.make hybrid-uni
#echo "Building the wx tools..."
#.make_tools
# cheat and just copy the .CHM files from the regular project dir
# TODO: Copy over the wxPython-docs fle and run hhc on the contents of that.
mkdir -p $WXDIR/docs/htmlhelp
cp `cygpath $WXWIN_OLD/docs/htmlhelp`/*.chm $WXDIR/docs/htmlhelp
echo "Building wxPython and installers..."
cd $WXDIR/wxPython
mkdir -p dist
for ver in $PYVER; do
echo $ver
b $ver d USE_SWIG=0
b $ver h USE_SWIG=0 EP_ADD_OPTS=1
b $ver r USE_SWIG=0
b $ver d UNICODE=1 USE_SWIG=0
b $ver h UNICODE=1 USE_SWIG=0 EP_ADD_OPTS=1
b $ver r UNICODE=1 USE_SWIG=0
done
echo "Building the developer package..."
WXWIN=`cygpath -w $WXDIR`
export WXWIN
4nt /c distrib/makedev.bat $VERSION
echo "Copying installers to $DESTDIR..."
mv dist/wxPython* $DESTDIR
cd $DESTDIR
if [ $SKIPCLEAN != yes ]; then
echo "Cleaning up..."
rm -r $WXDIR || true
fi
echo "-=-=-=- Goodbye! -=-=-=-"

View File

@@ -1,4 +0,0 @@
#!/bin/bash
distrib/all/build-all dryrun $* 2>&1 | tee tmp/dryrun.log

File diff suppressed because it is too large Load Diff

View File

@@ -1,232 +0,0 @@
#----------------------------------------------------------------------
# Name: taskrunner.py
# Purpose: Classes that can manage running of external processes,
# either consecutively, simultaneously, or both, and can
# log the output of those jobs
#
# Author: Robin Dunn
#
# Created: 05-Nov-2004
# RCS-ID: $Id$
# Copyright: (c) 2004 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
import sys
import os
import signal
import select
import fcntl
from subprocess import Popen, PIPE, STDOUT
__all__ = ["Job", "Task", "TaskRunner"]
#----------------------------------------------------------------------
class Job(object):
"""
Each Job is a monitor wrapped around an externally executing
process. It handles starting the process, polling if it is still
running, reading and logging it's output, and killing it if
needed.
"""
LOGBASE="."
def __init__(self, label, args):
self.label = label
self.args = args
self.proc = None
if self.label:
self.log = file("%s/%s.log" % (self.LOGBASE, label), "w", 0)
def start(self):
self.proc = Popen(self.args, # the command and args to execute
stdout=PIPE, stderr=STDOUT,
bufsize=0, # line-buffered
)
# put the file in non-blocking mode
#flags = fcntl.fcntl (self.proc.stdout, fcntl.F_GETFL, 0)
#flags = flags | os.O_NONBLOCK
#fcntl.fcntl (self.proc.stdout, fcntl.F_SETFL, flags)
def stop(self):
if self.proc is not None and self.proc.returncode is None:
os.kill(self.proc.pid, signal.SIGTERM)
self.logLines()
def fileno(self):
if self.proc is not None:
return self.proc.stdout.fileno()
else:
return -1
def logLines(self):
if self.proc is not None:
while self.linesAvailable():
line = self.proc.stdout.readline()
if not line: break
if self.label:
self.log.write(line)
line = "** %s: %s" % (self.label, line)
sys.stdout.write(line)
def linesAvailable(self):
if self.proc is None:
return False
ind, outd, err = select.select([self], [], [], 0)
if ind:
return True
else:
return False
def finished(self):
if self.proc is None:# or self.linesAvailable():
return False
return self.proc.poll() is not None
def wait(self):
if self.proc is None: return None
return self.proc.wait()
def poll(self):
if self.proc is None: return None
return self.proc.poll()
def returnCode(self):
if self.proc is None: return None
return self.proc.returncode
#----------------------------------------------------------------------
class Task(object):
"""
This class helps manage the running of a Task, which is a simply a
sequence of one or more Jobs, where subesquent jobs are not
started until prior ones are completed.
"""
def __init__(self, jobs=[]):
if type(jobs) != list:
jobs = [jobs]
self.jobs = jobs[:]
self.active = 0
def append(self, job):
self.jobs.append(job)
def activeJob(self):
if self.active > len(self.jobs)-1:
return None
else:
return self.jobs[self.active]
def next(self):
self.active += 1
if self.active < len(self.jobs):
self.jobs[self.active].start()
#----------------------------------------------------------------------
class TaskRunner(object):
"""
Manages the running of multiple tasks.
"""
def __init__(self, tasks=[]):
if type(tasks) != list:
tasks = [tasks]
self.tasks = tasks[:]
def append(self, task):
self.tasks.append(task)
def run(self):
# start all the active jobs
for task in self.tasks:
task.activeJob().start()
try:
# loop, getting output from the jobs, etc.
while True:
# get all active Jobs
jobs = [t.activeJob() for t in self.tasks if t.activeJob()]
if not jobs:
break
# wait for a job to have output ready, then log it
input, output, err = select.select(jobs, [], [], 1)
for job in input:
job.logLines()
# check for finished jobs
for task in self.tasks:
job = task.activeJob()
if job and job.finished():
if job.returnCode() != 0:
rc = job.returnCode()
print "JOB RETURNED FAILURE CODE! (%d)" % rc
self.stopAllJobs()
return rc
else:
task.next()
except KeyboardInterrupt:
print "STOPPING JOBS..."
self.stopAllJobs()
return 1
except:
print "Unknown exception..."
self.stopAllJobs()
raise
return 0
def stopAllJobs(self):
for task in self.tasks:
job = task.activeJob()
if job:
job.stop()
#----------------------------------------------------------------------
if __name__ == "__main__":
j1 = Job("label1", ["./tmp/job-1.py", "TEST-1"])
j2 = Job("label2", ["./tmp/job-2.sh", "TEST-2"])
t1 = Task()
t1.append(j1)
t1.append(j2)
j3 = Job("task2a", ["./tmp/job-1.py", "TASK-2a"])
j4 = Job("task2b", ["./tmp/job-2.sh", "TASK-2b"])
t2 = Task()
t2.append(j4)
t2.append(j3)
t3 = Task([Job("error", ["./tmp/job-3.sh", "TASK-3"])])
tr = TaskRunner()
tr.append(t1)
tr.append(t2)
tr.append(t3)
for task in tr.tasks:
for job in task.jobs:
print job.label
print tr.run()

View File

@@ -1,238 +0,0 @@
#!/usr/bin/env python
"""
This script will search for installed versions of wxPython on OSX and
allow the user to choose one to uninstall. It then will use the
metadata stored about the installed package to remove all the files
associated with that install.
Only the files installed by the main Installer Package will be
removed. This includes the Python modules and the wxWidgets shared
libraries. If you also installed the demo or docs by dragging them out
of the disk image, then you will need to drag them to the Trash
yourself.
"""
import sys, os, glob
from fnmatch import fnmatchcase
import cPickle, urllib
RCPTDIR = "/Library/Receipts"
RSRCDIR = "Contents/Resources"
# Only completly clean out dirs that have one of these as a prefix.
# We do this because the file list returned from lsbom will include /,
# /usr, /usr/local, etc.
PREFIXES = [ '/Library/Python/2.3/',
'/Library/Python/2.4/',
'/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-pacakges/',
'/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pacakges/',
'/usr/local/lib/',
]
# The files that match one of the items in this list will only be
# removed if the last installation of wxPython on the system is being
# uninstalled.
COMMON_FILES = [ '/usr/local/bin/*',
'wx.pth',
'wxversion.py',
]
class AccessError(Exception):
pass
class ReceiptError(Exception):
pass
class InstalledReceipt(object):
def __init__(self, rcptPath):
self.rcptPath = rcptPath
self.rsrcPath = os.path.join(rcptPath, RSRCDIR)
bf = glob.glob(os.path.join(self.rsrcPath, "*.bom"))
if bf:
self.bomFile = bf[0]
else:
print "WARNING: Unable to find %s/*.bom" % self.rsrcPath
raise ReceiptError
self.findMetaData()
def findMetaData(self):
# TODO: Make this be able to also look at Info.plist files
infoFiles = glob.glob(os.path.join(self.rsrcPath, "*.info"))
if infoFiles:
# there should be only one
infoFile = infoFiles[0]
self.mdata = {}
for line in open(infoFile, "r").readlines():
line = line.strip()
if line and line[0] != '#':
ls = line.split()
self.mdata[ls[0]] = line[len(ls[0])+1:]
else:
print "WARNING: Unable to find %s/*.info" % self.rsrcPath
raise ReceiptError
def getFileList(self):
p = os.popen("lsbom -s %s" % self.bomFile, "r")
data = p.read()
data.strip()
data = filter(lambda s: s!='' and s!='.', data.split('\n'))
loc = self.mdata['DefaultLocation']
return [loc+item for item in data]
def walkFiles(self, handleFile, handleDir):
dirs = []
names = self.getFileList()
# the plain files
for name in names:
name = os.path.abspath(name)
if os.path.isdir(name):
dirs.append(name)
else:
handleFile(name)
# the directories
dirs.reverse()
for dir in dirs:
for prefix in PREFIXES:
if dir.startswith(prefix):
handleDir(dir)
break
# Finally, remove the Receipts package, bottom-up
for dirpath, dirname, filenames in os.walk(self.rcptPath, False):
for name in filenames:
name = os.path.join(dirpath, name)
handleFile(name)
handleDir(dirpath)
def testCommon(self, name):
for cmn in COMMON_FILES:
if fnmatchcase(name, cmn) or fnmatchcase(os.path.basename(name), cmn):
return True
return False
def showFiles(self):
def show(name):
if os.path.exists(name):
if not self.lastInstall and self.testCommon(name):
return
print "Will remove:", name
self.walkFiles(show, show)
def testUninstallAccess(self):
def testFile(name):
if os.path.exists(name):
if not self.lastInstall and self.testCommon(name):
return
if not os.access(name, os.W_OK):
raise AccessError(name)
self.walkFiles(testFile, testFile)
def doUninstall(self):
def removeFile(name):
if os.path.exists(name):
if not self.lastInstall and self.testCommon(name):
return
print "Removing:", name
os.unlink(name)
def removeDir(name):
print "Removing:", name
if os.path.exists(name):
hasFiles = os.listdir(name)
if hasFiles: # perhaps some stale symlinks, or .pyc files
for file in hasFiles:
os.unlink(os.path.join(name, file))
os.rmdir(name)
try:
self.testUninstallAccess()
except AccessError, e:
print "UNABLE TO UNINSTALL!\nNo permission to remove: ", e.args[0]
sys.exit()
self.walkFiles(removeFile, removeDir)
def findInstalled():
installed = []
for name in glob.glob(os.path.join(RCPTDIR, "wxPython*")):
try:
ir = InstalledReceipt(name)
installed.append(ir)
except ReceiptError:
pass # just skip it...
return installed
# Just in case a Python < 2.3 is used to run this
try:
enumerate
except NameError:
def enumerate(sequence):
return zip(range(len(sequence)), sequence)
def main():
if len(sys.argv) > 1 and sys.argv[1] == "-doit":
inst = cPickle.loads(urllib.unquote(sys.argv[2]))
inst.doUninstall()
sys.exit()
print __doc__
installed = findInstalled()
if not installed:
print "*** No wxPython installations found! ***"
raw_input("Press RETURN...")
sys.exit()
for i, inst in enumerate(installed):
print " %d. %s \t%s" % (i+1, inst.mdata["Title"], inst.mdata["Version"])
print
ans = raw_input("Enter the number of the install to examine or 'Q' to quit: ")
if ans in ['Q', 'q']:
sys.exit()
inst = installed[int(ans) - 1]
inst.lastInstall = len(installed) == 1
while True:
print
print """
Title: %(Title)s
Version: %(Version)s
Description: %(Description)s
""" % inst.mdata
ans = raw_input("(U)ninstall, (S)how what will be removed, or (Q)uit? [u,s,q] ")
if ans in ['Q', 'q']:
sys.exit()
elif ans in ['S', 's']:
inst.showFiles()
elif ans in ['U', 'u']:
print
print "Launching uninstaller with sudo, please enter your password if prompted:"
os.system("sudo %s -doit %s" %
(sys.argv[0],
urllib.quote(cPickle.dumps(inst))))
sys.exit()
if __name__ == '__main__':
main()

View File

@@ -31,7 +31,6 @@ function usage {
echo " skiptar Don't unpack the tarball"
echo " inplace Don't use the tarball, build from the CVS tree instead"
echo " (The Docs and Demo tarballs are still required for a full build.)"
echo " unicode Make a unicode build"
echo " skipconfig Don't run configure"
echo " skipbuild Don't build wxWidgets or wxPython"
echo " skipinstall Don't do the installation step"
@@ -62,7 +61,6 @@ skipinstall=no
skipdmg=no
skipclean=no
inplace=no
unicode=no
for flag in $*; do
case ${flag} in
@@ -73,7 +71,6 @@ for flag in $*; do
skipdmg) skipdmg=yes ;;
skipclean) skipclean=yes ;;
inplace) inplace=yes; skiptar=yes ;;
unicode) unicode=yes ;;
*) echo "Unknown flag \"${flag}\""
usage
@@ -87,21 +84,7 @@ PYVER=`$PYTHON -c "import sys; print sys.version[:3]"`
PYPREFIX=`$PYTHON -c "import sys; print sys.exec_prefix"`
PYLIB=$PYPREFIX/lib/python$PYVER
SITEPACKAGES=$PYLIB/site-packages
SHORTVER=`echo $VERSION | cut -c 1,2,3`
if [ $unicode == yes ]; then
CHARTYPE=unicode
UNICODEOPT=--enable-unicode
PYUNICODEOPT=1
else
CHARTYPE=ansi
UNICODEOPT=--disable-unicode
PYUNICODEOPT=0
fi
#if [ "$HOSTNAME" = "bigmac.alldunn.com" ]; then
# MAKEJOBS="--jobs=2"
#fi
if [ -z "$TARBALLDIR" ]; then
@@ -110,28 +93,28 @@ if [ -z "$TARBALLDIR" ]; then
# TARBALLDIR before invoking this script...
TARBALLDIR=/stuff/Development/wxPython/dist/$VERSION
fi
TARBALL=$TARBALLDIR/wxPython-src-$VERSION.tar.gz
TARBALL=$TARBALLDIR/wxPythonSrc-$VERSION.tar.gz
if [ ! -e $TARBALLDIR/wxPython-demo-$VERSION.tar.gz ]; then
if [ ! -e $TARBALLDIR/wxPythonDemo-$VERSION.tar.gz ]; then
echo "-------------------------------------------------------"
echo " WARNING: Demo tarball not found, will skip building "
echo " the Demo app bundle and etc."
echo " $TARBALLDIR/wxPython-demo-$VERSION.tar.gz"
echo " $TARBALLDIR/wxPythonDemo-$VERSION.tar.gz"
echo "-------------------------------------------------------"
fi
if [ ! -e $TARBALLDIR/wxPython-docs-$VERSION.tar.gz ]; then
if [ ! -e $TARBALLDIR/wxPythonDocs-$VERSION.tar.gz ]; then
echo "-------------------------------------------------------"
echo " WARNING: Docs tarball not found, will skip building "
echo " the the wxDocsViewer app bundle and etc."
echo " $TARBALLDIR/wxPython-docs-$VERSION.tar.gz"
echo " $TARBALLDIR/wxPythonDocs-$VERSION.tar.gz"
echo "-------------------------------------------------------"
fi
PREFIX=/usr/local/lib/wxPython-$CHARTYPE-$VERSION
PREFIX=/usr/local/lib/wxPython-$VERSION
BINPREFIX=/usr/local/bin
WXROOT=`dirname $PWD`
@@ -139,17 +122,12 @@ PROGDIR="`dirname \"$0\"`"
TMPDIR=$PWD/_build_dmg
BUILDROOT=$TMPDIR/build
INSTALLROOT=$TMPDIR/install-root
INSTALLAPPS=$TMPDIR/install-apps
INSTALLROOT=$TMPDIR/install
INSTALLDEVEL=$TMPDIR/install-devel
DMGDIR=$TMPDIR/dmg
DMGROOT=$DMGDIR/root
DMGAPPS=$DMGDIR/apps
RESOURCEDIR=$PROGDIR/resources
DESTDIR=$PWD/dist
SRCROOT=$BUILDROOT/wxPython-src-$VERSION
SRCROOT=$BUILDROOT/wxPythonSrc-$VERSION
#----------------------------------------------------------------------
@@ -157,12 +135,11 @@ SRCROOT=$BUILDROOT/wxPython-src-$VERSION
mkdir -p $BUILDROOT
mkdir -p $INSTALLROOT
mkdir -p $INSTALLAPPS
#mkdir -p $INSTALLDEVEL
rm -rf $DMGDIR
mkdir -p $DMGROOT
mkdir -p $DMGAPPS/Docs
mkdir -p $DMGAPPS/Samples
mkdir -p $DMGDIR/root/Apps
mkdir -p $DMGDIR/root/Docs
mkdir -p $DMGDIR/root/Samples
pushd $BUILDROOT
@@ -178,26 +155,21 @@ fi
if [ $inplace = no ]; then
# make a build dir and cd to it.
cd wxPython-src-$VERSION
cd wxPythonSrc-$VERSION
WXDIR=`pwd`
mkdir -p $WXDIR/bld
cd $WXDIR/bld
WXBLD=$WXDIR/bld
else
# If building "inplace" then our build dir will be off of the
# WXROOT like normal, adjust the variables to find things that
# way.
WXBLD=$WXROOT/build-$CHARTYPE
mkdir -p $WXBLD
cd $WXBLD
WXDIR=..
# If building "inplace" then our build dir will be BUILDROOT,
# adjust the variables to find things that way.
WXDIR=$WXROOT
SRCROOT=$WXROOT
WXBLD=$BUILDROOT
fi
echo "Using wx root dir: $WXROOT"
echo "Using build dir: $WXBLD"
echo "Using source tree: $WXDIR"
echo "Using build dir: $WXBLD"
#----------------------------------------------------------------------
@@ -212,11 +184,14 @@ if [ $skipconfig != yes ]; then
--enable-sound \
--enable-display \
--enable-geometry \
--enable-debug_flag \
--enable-precomp=no \
--enable-optimise \
$UNICODEOPT
--enable-debug_flag
## --enable-optimise \
## --with-libjpeg=builtin \
## --with-libpng=builtin \
## --with-libtiff=builtin \
## --with-zlib=builtin \
fi
@@ -224,32 +199,26 @@ fi
if [ $skipbuild != yes ]; then
# Make wxWidgets and some contribs
# For some reason Rez and DeRez have started locking up if run as
# root, figure out why, but in the meantime...
if [ "$UID" = "0" ]; then
chmod a+w lib
if [ "$CHARTYPE" = "ansi" ]; then
su robind -c "make lib/libwx_macd-2.5.3.r"
else
su robind -c "make lib/libwx_macud-2.5.3.r"
fi
fi
make $MAKEJOBS
make $MAKEJOBS -C contrib/src/gizmos
make $MAKEJOBS -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0"
make $MAKEJOBS -C contrib/src/stc
make
make -C contrib/src/gizmos
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0"
make -C contrib/src/stc
make -C contrib/src/xrc
# Build wxPython
cd $WXROOT/wxPython
cd $WXDIR/wxPython
$PYTHON setup.py \
UNICODE=$PYUNICODEOPT \
NO_SCRIPTS=1 \
EP_ADD_OPTS=1 \
WX_CONFIG="$WXBLD/wx-config --inplace" \
BUILD_BASE=$WXBLD/wxPython \
build
# Build wxrc (XRC resource tool)
cd $WXBLD/contrib/utils/wxrc
make
strip wxrc
fi
#----------------------------------------------------------------------
@@ -261,19 +230,13 @@ if [ $skipinstall != yes ]; then
make -C contrib/src/gizmos prefix=$INSTALLROOT$PREFIX install
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" prefix=$INSTALLROOT/$PREFIX install
make -C contrib/src/stc prefix=$INSTALLROOT$PREFIX install
make -C contrib/src/xrc prefix=$INSTALLROOT$PREFIX install
# relink wx-config with a relative link
cd $INSTALLROOT$PREFIX/bin
rm wx-config
ln -s ../lib/wx/config/* wx-config
# and wxPython
cd $WXROOT/wxPython
cd $WXDIR/wxPython
$PYTHON setup.py \
UNICODE=$PYUNICODEOPT \
NO_SCRIPTS=1 \
EP_ADD_OPTS=1 \
WX_CONFIG="$INSTALLROOT/$PREFIX/bin/wx-config --prefix=$INSTALLROOT/$PREFIX" \
BUILD_BASE=$WXBLD/wxPython \
install \
@@ -293,17 +256,16 @@ if [ $skipinstall != yes ]; then
SITEPACKAGES=/Library/Python/$PYVER
fi
# install wxPython's tool scripts
mkdir -p $INSTALLROOT$BINPREFIX
cd $WXROOT/wxPython/scripts
cd $WXDIR/wxPython/scripts
python$PYVER CreateMacScripts.py $INSTALLROOT $BINPREFIX
# Remove the .pyc/.pyo files they just take up space and can be recreated
# during the install.
pushd $WXROOT/wxPython
$PYTHON $PROGDIR/../zappycfiles.py $INSTALLROOT > /dev/null
popd
# Install wxrc
cp $WXBLD/contrib/utils/wxrc/wxrc $INSTALLROOT$BINPREFIX
# Set premissions for files in $INSTALLROOT
if [ "$UID" = "0" ]; then
@@ -312,11 +274,6 @@ if [ $skipinstall != yes ]; then
fi
fi
if [ "$KIND" = "panther" ]; then
SITEPACKAGES=/Library/Python/$PYVER
fi
PKGDIR=`cat $INSTALLROOT$SITEPACKAGES/wx.pth`
popd
#----------------------------------------------------------------------
@@ -324,28 +281,22 @@ popd
# Make the Installer packages and disk image
if [ $skipdmg != yes ]; then
#-----------------------------------------------
# The main runtime installer package
# Remove the .pyc/.pyo files they just take up space and can be recreated
# during the install.
$PYTHON $PROGDIR/../zappycfiles.py $INSTALLROOT > /dev/null
# Make the welcome message
case $KIND in
panther) W_MSG="the Panther (OS X 10.3.x) version of" ;;
jaguar) W_MSG="the Jaguar (OS X 10.2.x) version of" ;;
esac
cat > $RESOURCEDIR/Welcome.txt <<EOF
Welcome!
This Installer package will install the wxPython $CHARTYPE runtime $VERSION for $W_MSG MacPython-OSX $PYVER. This includes:
This program will install wxPython $VERSION for $W_MSG MacPython-OSX $PYVER.
* The wxPython packages and modules
* The wxWidgets shared libraries and headers
* Some command line tool scripts, installed to /usr/local/bin.
You must install onto your current boot disk, eventhough the installer does not enforce this, otherwise things will not work.
You can install more than one version of the wxPython runtime if you desire. The most recently installed version will be the default wxPython, but you can choose another by setting the PYTHONPATH or by using the wxversion module. See http://wiki.wxpython.org/index.cgi/MultiVersionInstalls for more details.
You must install onto your current boot disk, even though the installer does not enforce this, otherwise things will not work.
Build date: `date`
EOF
@@ -356,7 +307,6 @@ EOF
# Cleanup any old install of the wxPython package
rm -rf \$2$SITEPACKAGES/wxPython
rm -rf \$2$SITEPACKAGES/wx
rm -rf \$2$SITEPACKAGES/$PKGDIR
exit 0
EOF
chmod +x $RESOURCEDIR/preflight
@@ -365,110 +315,64 @@ EOF
cat > $RESOURCEDIR/postflight <<EOF
#!/bin/sh -e
# Compile the .py files in the wxPython pacakge
$PYTHON \$2$PYLIB/compileall.py \$2$SITEPACKAGES/$PKGDIR
$PYTHON -O \$2$PYLIB/compileall.py \$2$SITEPACKAGES/$PKGDIR
$PYTHON \$2$PYLIB/compileall.py \$2$SITEPACKAGES/wxPython
$PYTHON \$2$PYLIB/compileall.py \$2$SITEPACKAGES/wx
$PYTHON -O \$2$PYLIB/compileall.py \$2$SITEPACKAGES/wxPython
$PYTHON -O \$2$PYLIB/compileall.py \$2$SITEPACKAGES/wx
# and all of the wxPython pacakge should be group writable
chgrp -R admin \$2$SITEPACKAGES/$PKGDIR
chmod -R g+w \$2$SITEPACKAGES/$PKGDIR
chgrp -R admin \$2$SITEPACKAGES/wxPython
chmod -R g+w \$2$SITEPACKAGES/wxPython
chgrp -R admin \$2$SITEPACKAGES/wx
chmod -R g+w \$2$SITEPACKAGES/wx
exit 0
EOF
chmod +x $RESOURCEDIR/postflight
# Build the main Installer Package...
rm -rf wxPython${SHORTVER}-osx-$CHARTYPE-$KIND.pkg
rm -rf wxPythonOSX-$KIND.pkg
python $PROGDIR/../buildpkg.py \
--Title=wxPython${SHORTVER}-osx-$CHARTYPE-$KIND \
--Title=wxPythonOSX-$KIND \
--Version=$VERSION \
--Description="wxPython $CHARTYPE runtime $VERSION for $W_MSG MacPython-OSX $PYVER" \
--Description="wxPython $VERSION for $W_MSG MacPython-OSX $PYVER" \
--NeedsAuthorization="YES" \
--Relocatable="NO" \
--InstallOnly="YES" \
$INSTALLROOT \
$RESOURCEDIR
mv wxPython${SHORTVER}-osx-$CHARTYPE-$KIND.pkg $DMGROOT
rm $RESOURCEDIR/postflight
rm $RESOURCEDIR/preflight
rm $RESOURCEDIR/Welcome.txt
mv wxPythonOSX-$KIND.pkg $DMGDIR/root
#-----------------------------------------------
# Make a README to go on the disk image
cat > "$DMGROOT/README 1st.txt" <<EOF
# Make a README.txt to go on the disk image
cat > "$DMGDIR/root/README 1st.txt" <<EOF
Welcome to wxPython!
This disk image contains the following items:
On this disk image you will find the installer for wxPython $VERSION for $W_MSG MacPython-OSX $PYVER. MacPython-OSX is not included.
wxPython${SHORTVER}-osx-$CHARTYPE-$VERSION-$KIND
wxPython-$KIND.pkg The installer package. It contains the wxPython
extension modules, wxMac dynamic libraries and
headers, and some scripts for the command-line
tools.
This Installer contains the wxPython runtime, compiled on a
$KIND OS X system, using the $CHARTYPE build of the wxWidgets
library. It includes the Python modules and extension
modules, as well as the wxWidgets libraries.
It is possible to have more than one version of the runtime
installed at once if you wish. The most recently installed
version will be the default wxPython, but you can choose
another by setting the PYTHONPATH or by using the wxversion
module. For more details see:
http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
Everything else here is optional and you can drag them out of the disk
image and drop them wherever you want. You do need to install the above
package before you can use any of the items below.
uninstall_wxPython.py
Apps/wxPython Demo An application bundle version of the demo.
(This has it's own copy of the sources within
the bundle.)
A simple tool to help you manage your installed versions of
wxPython. It will allow you to choose from the currently
installed wxPython packages and to select one for
uninstallation. It is a text-mode tool so you can either run
it from a Terminal command line, or you can open it with
PythonLauncher and let it create a Terminal to run it in.
NOTE: If you have versions prior to 2.5.3.1 installed, please
do run this uninstall tool to remove the older version.
EOF
cp $PROGDIR/../uninstall_wxPython.py $DMGROOT
#-----------------------------------------------
# Make a disk image to hold these files
dmgname=wxPython${SHORTVER}-osx-$CHARTYPE-$VERSION-$KIND-py$PYVER
$PROGDIR/../makedmg $DMGROOT $DMGDIR $dmgname
echo Moving $DMGDIR/$dmgname.dmg to $DESTDIR
mv $DMGDIR/$dmgname.dmg $DESTDIR
#---------------------------------------------------------------------------
# Now create app bundles for the demo, docs, and tools and make another
# disk image to hold it all.
#---------------------------------------------------------------------------
cat > "$DMGAPPS/README 1st.txt" <<EOF
Welcome to wxPython!
On this disk image you will find Demo, Tools, Docs, and etc. for
wxPython $VERSION. Everything here is optional and you can drag them
out of the disk image and drop them wherever you want. You will need
to have an installed wxPython runtime to be able to use any of them.
wxPython Demo An application bundle version of the demo.
(This has it's own copy of the demo sources
within the bundle.)
XRCed An application for editing wxPython resource
Apps/XRCed An application for editing wxPython resource
files (XRC files.)
PyCrust An application that provides an interactive
Apps/PyCrust An application that provides an interactive
Python shell and also namespace inspectors.
@@ -495,29 +399,29 @@ EOF
# wxDocs
if [ ! -e $TARBALLDIR/wxPython-docs-$VERSION.tar.gz ]; then
cat > "$DMGAPPS/Docs/Build ERROR.txt" <<EOF
if [ ! -e $TARBALLDIR/wxPythonDocs-$VERSION.tar.gz ]; then
cat > "$DMGDIR/root/Docs/Build ERROR.txt" <<EOF
The wxPython-docs tarball was not found when building this disk image!
The wxPythonDocs tarball was not found when building this disk image!
EOF
else
pushd $BUILDROOT
tar xzvf $TARBALLDIR/wxPython-docs-$VERSION.tar.gz
tar xzvf $TARBALLDIR/wxPythonDocs-$VERSION.tar.gz
popd
# Make an app to launch viewdocs.py
$PYTHONW $PROGDIR/../buildapp.py \
--builddir=$DMGAPPS/Docs \
--builddir=$DMGDIR/root/Docs \
--name=wxDocsViewer \
--mainprogram=$BUILDROOT/wxPython-$VERSION/docs/viewdocs.py \
--iconfile=$PROGDIR/Info.icns \
build
cp $BUILDROOT/wxPython-$VERSION/docs/*.zip $DMGAPPS/Docs/wxDocsViewer.app/Contents/Resources
cp $BUILDROOT/wxPython-$VERSION/docs/*.zip $DMGDIR/root/Docs/wxDocsViewer.app/Contents/Resources
cat > "$DMGAPPS/Docs/README 1st.txt" <<EOF
cat > "$DMGDIR/root/Docs/README 1st.txt" <<EOF
The wxDocsViewer application needs to be copied to your Desktop (or
someplace else you have write access to) before you can run it, so it
@@ -528,7 +432,7 @@ EOF
fi
# license files, docs, etc.
pushd $DMGAPPS/Docs
pushd $DMGDIR/root/Docs
cp -pR $SRCROOT/wxPython/licence .
cp -pR $SRCROOT/wxPython/docs .
rm -rf docs/bin
@@ -537,19 +441,19 @@ EOF
popd
if [ ! -e $TARBALLDIR/wxPython-demo-$VERSION.tar.gz ]; then
cat > "$DMGAPPS/Samples/Build ERROR.txt" <<EOF
if [ ! -e $TARBALLDIR/wxPythonDemo-$VERSION.tar.gz ]; then
cat > "$DMGDIR/root/Samples/Build ERROR.txt" <<EOF
The wxPython-demo tarball was not found when building this disk image!
The wxPythonDemo tarball was not found when building this disk image!
EOF
cp "$DMGAPPS/Samples/Build ERROR.txt" $DMGAPPS
cp "$DMGDIR/root/Samples/Build ERROR.txt" $DMGDIR/root/Apps
else
# Copy the demo and samples to the disk image from the tarball
pushd $DMGAPPS/Samples
tar xzvf $TARBALLDIR/wxPython-demo-$VERSION.tar.gz
pushd $DMGDIR/root/Samples
tar xzvf $TARBALLDIR/wxPythonDemo-$VERSION.tar.gz
mv wxPython-$VERSION/* .
rm -rf wxPython-$VERSION
rm demo/b demo/.setup.sh
@@ -558,36 +462,34 @@ EOF
# Make an app bundle to run the demo
$PYTHONW $PROGDIR/../buildapp.py \
--builddir=$DMGAPPS \
--builddir=$DMGDIR/root/Apps \
--name="wxPython Demo" \
--mainprogram=$DMGAPPS/Samples/demo/demo.pyw \
--mainprogram=$DMGDIR/root/Samples/demo/demo.pyw \
--iconfile=$PROGDIR/RunDemo.icns \
build
cp -pR $DMGAPPS/Samples/demo/* "$DMGAPPS/wxPython Demo.app/Contents/Resources"
cp -pR $DMGDIR/root/Samples/demo/* "$DMGDIR/root/Apps/wxPython Demo.app/Contents/Resources"
fi
# Make an app bundle to launch PyCrust
$PYTHONW $PROGDIR/../buildapp.py \
--builddir=$DMGAPPS \
--builddir=$DMGDIR/root/Apps \
--name=PyCrust \
--mainprogram=$INSTALLROOT$BINPREFIX/pycrust.py \
--iconfile=$PROGDIR/PieShell.icns \
build
## TODO: PyAlaMode needs tweaked to be able to run from a bundle. It
## needs to know to ignore command line parameters and etc...
# # and PyAlaMode
# $PYTHONW $PROGDIR/../buildapp.py \
# --builddir=$DMGAPPS \
# --name=PyAlaMode \
# --mainprogram=$INSTALLROOT$BINPREFIX/pyalamode.py \
# --iconfile=$PROGDIR/PieShell.icns \
# build
# # and PyAlaMode
# $PYTHONW $PROGDIR/../buildapp.py \
# --builddir=$DMGDIR/root \
# --name=PyAlaMode \
# --mainprogram=$INSTALLROOT$BINPREFIX/pyalamode.py \
# --iconfile=$PROGDIR/PieShell.icns \
# build
# Make an app to launch XRCed
$PYTHONW $PROGDIR/../buildapp.py \
--builddir=$DMGAPPS \
--builddir=$DMGDIR/root/Apps \
--name=XRCed \
--mainprogram=$INSTALLROOT$BINPREFIX/xrced.py \
--iconfile=$PROGDIR/XRCed.icns \
@@ -595,12 +497,11 @@ EOF
# and then finally make a disk image containing everything
dmgname=wxPython${SHORTVER}-osx-docs-demos-$VERSION-$KIND
$PROGDIR/../makedmg $DMGAPPS $DMGDIR $dmgname
# and then finally make a disk image containing the packages and etc.
$PROGDIR/../makedmg $DMGDIR/root $DMGDIR wxPythonOSX-$VERSION-$KIND-Py$PYVER
echo Moving $DMGDIR/$dmgname.dmg to $DESTDIR
mv $DMGDIR/$dmgname.dmg $DESTDIR
echo Moving $DMGDIR/wxPythonOSX-$VERSION-$KIND-Py$PYVER.dmg to $DESTDIR
mv $DMGDIR/wxPythonOSX-$VERSION-$KIND-Py$PYVER.dmg $DESTDIR
fi

View File

@@ -155,7 +155,7 @@ Source: "scripts\pywxrc"; DestDir: "{code:GetPythonDir}\Script
Source: "scripts\xrced"; DestDir: "{code:GetPythonDir}\Scripts"; Flags: sharedfile; Components: core
Source: "distrib\README.win32.txt"; DestDir: "{app}\%(PKGDIR)s\docs"; Flags: isreadme; Components: core
Source: "docs\README.txt"; DestDir: "{app}\%(PKGDIR)s\docs"; Flags: isreadme; Components: core
Source: "licence\*.txt"; DestDir: "{app}\%(PKGDIR)s\docs\licence"; Components: core
@@ -285,7 +285,7 @@ begin
'Should I do it?',
mbConfirmation, MB_YESNO);
if ResultCode = IDYES then begin
InstExec(FileName, '/SILENT', WizardDirValue(), True, False, SW_SHOWNORMAL, ResultCode);
InstExec(FileName, '/SILENT', WizardDirValue()+'\wxPython', True, False, SW_SHOWNORMAL, ResultCode);
end;
end;
@@ -315,11 +315,11 @@ end.
ISS_DocDemo_Template = r'''
[Setup]
AppName = wxPython%(SHORTVER)s-docs-demos
AppName = wxPython%(SHORTVER)s-DocsDemo
AppVerName = wxPython Docs and Demos %(VERSION)s
OutputBaseFilename = wxPython%(SHORTVER)s-win32-docs-demos-%(VERSION)s
OutputBaseFilename = wxPython%(SHORTVER)s-DocsDemo-%(VERSION)s
AppCopyright = Copyright <20> 2004 Total Control Software
DefaultDirName = {pf}\wxPython%(SHORTVER)s Docs and Demos
DefaultDirName = {pf}\wxPython%(SHORTVER)s Docs Demos and Tools
DefaultGroupName = wxPython%(SHORTVER)s Docs Demos and Tools
AlwaysCreateUninstallIcon = yes
AdminPrivilegesRequired = no

View File

@@ -66,9 +66,9 @@ rem del /sxzy @del-dirs
rm del-files
rm del-dirs
rem *** bundle it all up TODO: don't hard-code the 2.5
tar cvf ../dist/wxPython2.5-win32-devel-%1.tar wxPython-%1
gzip -9 ../dist/wxPython2.5-win32-devel-%1.tar
rem *** bundle it all up
tar cvf ../dist/wxPython-win32-devel-%1.tar wxPython-%1
gzip -9 ../dist/wxPython-win32-devel-%1.tar
rem *** cleanup
cd ..

View File

@@ -26,23 +26,27 @@ pythonbin=/usr/bin/python
port=GTK
lcport=gtk
unicode=0
tarname=wxPython-src
srpmonly=0
tarname=wxPythonSrc
rpmflag=-ba
#----------------------------------------------------------------------
# Check parameters
function usage {
echo "Usage: $0 py_version [command flags...]"
echo " py_version which python version to use."
echo " py_version String to append to $pythonbin (which python"
echo " version to use.)"
echo ""
echo "command flags:"
echo " skipcopy Don't copy the files for the tarball from the workspace"
echo " skiptar Don't build the tarball"
echo " skiprpm Don't build the RPM"
echo " skipclean Don't do the cleanup at the end"
echo " gtk2 Build using wxGTK2 and Unicode"
echo " x11 Build using wxX11"
echo " speconly Do nothing but write the RPM spec file"
echo " srpm Only make the SRPM"
# echo " smp Add SMP=2 to the envivonment to speed wxGTK build"
}
if [ $# -lt 1 ]; then
@@ -64,14 +68,17 @@ fi
function makespec {
echo "*** Writing ${distdir}/wxPython.spec"
echo "*** Writing ${distdir}/wxPython${port}.spec"
cat ${spectemplate} \
| sed s:@PYTHON@:${python}:g \
| sed s:@PYVER@:${pyver}:g \
| sed s:@PORT@:${port}:g \
| sed s:@LCPORT@:${lcport}:g \
| sed s:@TARNAME@:${tarname}:g \
| sed s:@VERSION@:${version}:g \
| sed s:@VER2@:${ver2}:g \
> ${distdir}/wxPython.spec
| sed s:@UNICODE@:${unicode}:g \
> ${distdir}/wxPython${port}.spec
}
@@ -82,8 +89,11 @@ for flag in $*; do
skipclean) skipclean=1 ;;
skiptar) skiptar=1; skipcopy=1 ;;
skiprpm) skiprpm=1 ;;
gtk2) unicode=1; port=GTK2; lcport=gtk2 ;;
x11) port=X11; lcport=x11 ;;
smp) export SMP=2 ;;
speconly) makespec; exit 0 ;;
srpm) srpmonly=1; ;;
srpm) rpmflag=-bs; ;;
*) echo "Unknown flag \"${flag}\""
usage
@@ -134,7 +144,7 @@ if [ -z "${skipcopy}" ]; then
# copy root dir contents
cp -pf --link ${wxdir}/* ${tarver} > /dev/null 2>&1
# copy all top dirs except CVS, build, demos, samples, utils, and wxPython
# copy all top dirs except CVS, build, demos, utils, samples, and wxPython
for d in art build contrib debian distrib docs include lib locale misc patches src; do
if [ -e ${wxdir}/$d ]; then
cp -Rpf --link ${wxdir}/$d ${tarver} #> /dev/null 2>&1
@@ -167,16 +177,13 @@ if [ -z "${skipcopy}" ]; then
cleanup CVS
cleanup CVSROOT
rm BuildCVS.txt
rm -f ChangeLog
rm *.spec
rm -rf distrib/msw/tmake
rm -rf docs/html
rm -rf docs/latex
rm -rf contrib/docs
rm -rf contrib/samples
rm locale/*.mo
cleanup ".#*"
cleanup "#*#"
cleanup "*~"
cleanup "*.orig"
cleanup "*.rej"
@@ -184,13 +191,6 @@ if [ -z "${skipcopy}" ]; then
cleanup core
cleanup "core.[0-9]*"
# ports that are not supported yet
cleanup cocoa
cleanup mgl
cleanup motif
cleanup os2
cleanup x11
rm -f wxPython/wx/* > /dev/null 2>&1
popd > /dev/null
@@ -205,7 +205,7 @@ fi
# TODO? Output all combinations of spec files to put in the tar file??
makespec
cp ${distdir}/wxPython.spec ${builddir}/${tarver}/wxPython.spec
cp ${distdir}/wxPython${port}.spec ${builddir}/${tarver}/wxPython${port}.spec
#----------------------------------------------------------------------
@@ -237,44 +237,17 @@ fi
if [ -z "${skiprpm}" ]; then
echo "*** Building RPMs..."
cp ${distdir}/${tarver}.tar.gz ${rpmtop}/SOURCES
if [ "${srpmonly}" = "1" ]; then
rpmbuild -bs \
--define "_topdir ${rpmtop}" \
--define "_tmppath ${builddir}" \
--define "pyver ${pyver}" \
${distdir}/wxPython.spec
if [ "$?" != "0" ]; then
echo "*** RPM failure, exiting."
exit 1
fi
else
rpmbuild -ba \
--define "_topdir ${rpmtop}" \
--define "_tmppath ${builddir}" \
--define "port gtk" --define "unicode 0" \
--define "pyver ${pyver}" \
${distdir}/wxPython.spec
if [ "$?" != "0" ]; then
echo "*** RPM failure, exiting."
exit 1
fi
rpmbuild -ba \
--define "_topdir ${rpmtop}" \
--define "_tmppath ${builddir}" \
--define "port gtk2" --define "unicode 1" \
--define "pyver ${pyver}" \
${distdir}/wxPython.spec
if [ "$?" != "0" ]; then
echo "*** RPM failure, exiting."
exit 1
fi
rpmbuild ${rpmflag} \
--define "_topdir ${rpmtop}" \
--define "_tmppath ${builddir}" \
${distdir}/wxPython${port}.spec
if [ "$?" != "0" ]; then
echo "*** RPM failure, exiting."
exit 1
else
echo "*** Moving RPMs to ${distdir}"
mv -f `find ${rpmtop} -name "wxPython*.rpm"` ${distdir}
fi
echo "*** Moving RPMs to ${distdir}"
mv -f `find ${rpmtop} -name "wxPython*.rpm"` ${distdir}
fi
#----------------------------------------------------------------------

View File

@@ -21,36 +21,36 @@ test :
# debug
$(DIR)\vc_dll\mswd\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\mswd\wx mkdir $(DIR)\vc_dll\mswd\wx
-if not exist $(DIR)\vc_dll\mswd\wx mkdir /s $(DIR)\vc_dll\mswd\wx
cat $(SRC) > $@
# hybrid
$(DIR)\vc_dll\mswh\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\mswh\wx mkdir $(DIR)\vc_dll\mswh\wx
-if not exist $(DIR)\vc_dll\mswh\wx mkdir /s $(DIR)\vc_dll\mswh\wx
cat $(SRC) | $(HYB_SEDCMD) > $@
# release
$(DIR)\vc_dll\msw\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\msw\wx mkdir $(DIR)\vc_dll\msw\wx
-if not exist $(DIR)\vc_dll\msw\wx mkdir /s $(DIR)\vc_dll\msw\wx
cat $(SRC) > $@
$(DIR)\vc_lib\msw\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_lib\msw\wx mkdir $(DIR)\vc_lib\msw\wx
-if not exist $(DIR)\vc_lib\msw\wx mkdir /s $(DIR)\vc_lib\msw\wx
cat $(SRC) > $@
# debug-uni
$(DIR)\vc_dll\mswud\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\mswud\wx mkdir $(DIR)\vc_dll\mswud\wx
-if not exist $(DIR)\vc_dll\mswud\wx mkdir /s $(DIR)\vc_dll\mswud\wx
cat $(SRC) | $(UNI_SEDCMD) > $@
# hybrid-uni
$(DIR)\vc_dll\mswuh\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\mswuh\wx mkdir $(DIR)\vc_dll\mswuh\wx
-if not exist $(DIR)\vc_dll\mswuh\wx mkdir /s $(DIR)\vc_dll\mswuh\wx
cat $(SRC) | $(UNI_SEDCMD) | $(HYB_SEDCMD) > $@
# release-uni
$(DIR)\vc_dll\mswu\wx\setup.h : $(SRC) .makesetup.mk
-if not exist $(DIR)\vc_dll\mswu\wx mkdir $(DIR)\vc_dll\mswu\wx
-if not exist $(DIR)\vc_dll\mswu\wx mkdir /s $(DIR)\vc_dll\mswu\wx
cat $(SRC) | $(UNI_SEDCMD) > $@

View File

@@ -1,97 +1,53 @@
#----------------------------------------------------------------------
# Name: wxPython.spec
# Purpose: RPM Build and packaging instructions
#
# Author: Robin Dunn
#
# RCS-ID: $Id$
# Copyright: (c) 2004 by Total Control Software
# Licence: wxWindows license
#----------------------------------------------------------------------
%define pref %{_prefix}
%define python @PYTHON@
%define pyver @PYVER@
%define port @PORT@
%define lcport @LCPORT@
%define unicode @UNICODE@
%define tarname @TARNAME@
%define version @VERSION@
%define ver2 @VER2@
%define wxprefbase %{pref}/lib/wxPython
%define wxpref %{wxprefbase}-%{version}
%define name wxPython%{port}-py%{pyver}
# The following values can be set on the rpmbuild command line with
# --define 'name VALUE' If no value is set on the command line then
# the default value set here will be used instead.
# Which version of Python to build with. Used to assemble python
# binary name so use '2.2', '2.3', etc.
%if %{?pyver:0}%{!?pyver:1}
%define pyver 2.3
%endif
# Which wxWidgets port to build and use. Current acceptable values
# are 'gtk' and 'gtk2'.
%if %{?port:0}%{!?port:1}
%define port gtk2
%endif
# Build in unicode mode? Can only be used if port is gtk2, acceptable
# values are '0' and '1'
%if %{?unicode:0}%{!?unicode:1}
%define unicode 1
# Allow the release tag to be specified on the rpmbuild command
# line with --define 'release SOMETHING' If no such definition is
# used then the release number is 1.
%if %{?release:0}%{!?release:1}
%define release 1
%endif
# Should the builtin image and etc. libs be used, or system libs?
# Distro specific RPMs should probably set this to 0, generic ones
# should use 1.
# NOTE: I'm trying 0 for this next release to see if I can get rid of
# this...
%if %{?builtin_libs:0}%{!?builtin_libs:1}
%define builtin_libs 0
%endif
# should use 1
%define builtin_libs 1
# Should --enable-debug_flag be used in release builds? Using it
# defines __WXDEBUG__ and gives us runtime diagnostics that are turned
# into Python exceptions. (So turning it on is a very helpful thing
# IMO and is recommended.) The code is still compiled with
# optimization flags and and without debug info and such when this
# option is used, it simply turns on some extra code.
%if %{?debug_flag:0}%{!?debug_flag:1}
# into Python exceptions starting with 2.3.4. (So turning it on is a
# very helpful thing IMO and is recommended.) The code is still
# compiled with optimization flags and such when this option is used,
# it simply turns on some extra code.
%define debug_flag 1
%endif
# Used to set the Release tag below. I normally use it to define what
# distro the RPM was build on and also include the version of Python
# it was built with.
%if %{?release:0}%{!?release:1}
%define release 1_py%{pyver}
%endif
# build the name of the real wx-config from the port, flags, etc.
%define dbgflg %(if [ "%{debug_flag}" = "1" ]; then echo d; fi)
%define uniflg %(if [ "%{unicode}" = "1" ]; then echo u; fi)
%define DBGFLG %(if [ "%{debug_flag}" = "1" ]; then echo D; fi)
%define UNIFLG %(if [ "%{unicode}" = "1" ]; then echo U; fi)
%define wxconfigname %{wxpref}/bin/wx%{lcport}%{uniflg}%{dbgflg}-%{ver2}-config
#----------------------------------------------------------------------
# Other variables used below
%define pref %{_prefix}
%define python /usr/bin/python%{pyver}
%define tarname @TARNAME@
%define version @VERSION@
%define ver2 @VER2@
%define chartype %(if [ "%{unicode}" = "1" ]; then echo unicode; else echo ansi; fi)
%define gtktype %(if [ "%{port}" = "gtk2" ]; then echo 2; fi)
%define using_gtk1 %(if [ "%{port}" = "gtk" ]; then echo 1; else echo 0; fi)
%define wxprefbase %{pref}/lib/wxPython
%define wxpref %{wxprefbase}-%{version}-%{port}-%{chartype}
%define pkgname wxPython
# turn off the generation of debuginfo rpm (RH9) ??
# turn off the generation of debuginfo rpm (RH9)
%define debug_package %{nil}
#----------------------------------------------------------------------
# Package definition
#----------------------------------------------------------------------
Name: %{pkgname}%{ver2}
Summary: Cross platform GUI toolkit for Python
#----------------------------------------------------------------
Summary: Cross platform GUI toolkit for Python using wx%{port}
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{tarname}-%{version}.tar.gz
@@ -99,105 +55,72 @@ License: wx Library Licence, Version 3
URL: http://wxPython.org/
Packager: Robin Dunn <robin@alldunn.com>
Group: Development/Python
BuildRoot: %{_tmppath}/%{pkgname}-buildroot
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{pref}
%description
Cross platform GUI toolkit for Python
Provides: wxPython = %{version}
Provides: wxPython%{port} = %{version}
# Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so
# Provides: libwx_%{lcport}%{uniflg}%{dbgflg}-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2})
# Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so
# Provides: libwx_%{lcport}%{uniflg}%{dbgflg}_gl-%{ver2}.so(WX%{port}%{UNIFLG}%{DBGFLG}_%{ver2})
# old wxPython packages
Obsoletes: wxPython wxPython%{port}
%package -n %{pkgname}%{ver2}-%{port}-%{chartype}
Summary: Cross platform GUI toolkit for Python
Group: Development/Python
Requires: %{pkgname}-common
Obsoletes: wxPythonGTK%{gtktype}-py%{pyver}
Provides: wxPython
%description
wxPython is a GUI toolkit for Python that is a wrapper around the
wxWidgets C++ GUI library. wxPython provides a large variety of
window types and controls, all implemented with a native look and feel
(and native runtime speed) on the platforms it is supported on.
This package is implemented using the %{port} port of wxWidgets, and
includes the wx%{port} shared libs and etc.
%description -n %{pkgname}%{ver2}-%{port}-%{chartype}
wxPython is a GUI toolkit for the Python programming language. It
allows Python programmers to create programs with a robust, highly
functional graphical user interface, simply and easily. It is
implemented as a Python extension module (native code) that wraps the
popular wxWidgets cross platform GUI library, which is written in C++.
wxPython is a cross-platform toolkit. The same program will usually
run on multiple platforms without modification. Currently supported
platforms are 32-bit Microsoft Windows, most Unix or unix-like
systems, and Macintosh OS X.
This package contains the wxPython runtime files built for the
wxWidgets %{port} port with %{chartype} character type.
%package -n %{pkgname}-common-%{port}-%{chartype}
Summary: Common files for needed by all wxPython runtimes
Group: Development/Python
Provides: %{pkgname}-common
# They obsolete each other so any of them can be installed over another
# without conflicts
Obsoletes: %{pkgname}-common-gtk-ansi
Obsoletes: %{pkgname}-common-gtk2-ansi
Obsoletes: %{pkgname}-common-gtk2-unicode
%description -n %{pkgname}-common-%{port}-%{chartype}
This package contains the common files needed by any version of the
wxPython runtime. This pacakge also installs a wx.pth file which will
determine which of the installed runtimes is the default version of
wxPython that is imported automatically with a bare "import wx".
%package -n %{pkgname}%{ver2}-devel-%{port}-%{chartype}
Summary: wxPython development files
%package -n wxPython%{port}-devel
Summary: wxPython%{port} development files
Group: Development/Libraries
Requires: %{pkgname}%{ver2}-%{port}-%{chartype} = %{version}
Requires: wxPython%{port} = %{version}
%description -n %{pkgname}%{ver2}-devel-%{port}-%{chartype}
%description -n wxPython%{port}-devel
This packages contains the headers and etc. for building apps or
Python extension modules that use the same wxWidgets shared libraries
Python extension modules that use the same wx%{port} shared libraries
that wxPython uses.
#----------------------------------------------------------------------
#----------------------------------------------------------------
%prep
%setup -q -n %{tarname}-%{version}
#----------------------------------------------------------------------
#----------------------------------------------------------------
%build
WXDIR=`pwd`
# Configure and build wxWidgets
mkdir bld
cd bld
../configure --with-gtk \
# Configure, trying to reduce external dependencies
../configure --with-%{lcport} \
--prefix=%{wxpref} \
--enable-monolithic \
--disable-soname \
--disable-monolithic \
--enable-rpath=%{wxpref}/lib \
--with-opengl \
%if %{unicode}
--enable-gtk2 \
--enable-unicode \
%else
--disable-gtk2 \
%endif
--enable-geometry \
--enable-optimise \
--enable-sound --with-sdl \
--enable-display \
%if %{using_gtk1}
--disable-gtk2 \
%else
--enable-gtk2 \
%endif
%if %{unicode}
--enable-unicode \
%endif
%if %{debug_flag}
--enable-debug_flag \
%endif
@@ -209,56 +132,56 @@ cd bld
%endif
# Build wxWidgets and some contrib libs
make
make -C contrib/src/gizmos
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0"
make -C contrib/src/stc
make -C contrib/src/xrc
# Build wxPython
# Now build wxPython
cd $WXDIR/wxPython
%{python} setup.py \
WXPORT=%{port} \
UNICODE=%{unicode} \
EP_ADD_OPTS=1 \
NO_SCRIPTS=1 \
WXPORT=%{lcport} \
UNICODE=%{unicode} \
WX_CONFIG="$WXDIR/bld/wx-config --inplace" \
build
# Build wxrc (XRC resource tool)
cd $WXDIR/bld/contrib/utils/wxrc
make
strip wxrc
#----------------------------------------------------------------------
#----------------------------------------------------------------
%install
WXDIR=`pwd`
# Install wxGTK and contribs
cd bld
# Install wxWidgets and the contribs
make prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/gizmos prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/stc prefix=$RPM_BUILD_ROOT%{wxpref} install
make -C contrib/src/xrc prefix=$RPM_BUILD_ROOT%{wxpref} install
# Install wxPython for wxGTK
# install wxPython
cd $WXDIR/wxPython
%{python} setup.py \
WXPORT=%{port} \
UNICODE=%{unicode} \
EP_ADD_OPTS=1 \
NO_SCRIPTS=1 \
WXPORT=%{lcport} \
UNICODE=%{unicode} \
WX_CONFIG="$RPM_BUILD_ROOT%{wxpref}/bin/wx-config --prefix=$RPM_BUILD_ROOT%{wxpref}" \
install \
--root=$RPM_BUILD_ROOT
# remove the wx-config symlink, we'll redo it when installing the -devel package
rm $RPM_BUILD_ROOT%{wxpref}/bin/wx-config
# make sure that debug info is stripped
strip $RPM_BUILD_ROOT%{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}/wx/*.so
cd $WXDIR/wxPython
# Since I want this RPM to be as generic as possible I won't let
@@ -266,8 +189,10 @@ strip $RPM_BUILD_ROOT%{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{por
# the #! line to use the real python pathname. Since some distros
# install python 2.2 as python2 and others as python I can't let
# distutils do that otherwise the dependencies will be fouled up.
# Copy them manually instead, leaving the #!/usr/bin/env line intact.
cd $WXDIR/wxPython
# Copy them manually instead, leaving the #!/bin/env line intact.
# TODO: Should this be dependent on %{builtin_libs} or something like
# it?
mkdir -p $RPM_BUILD_ROOT%{pref}/bin
for s in \
helpviewer \
@@ -279,14 +204,16 @@ for s in \
pycrust \
pywrap \
pyshell \
pywxrc \
xrced; do
cp scripts/$s $RPM_BUILD_ROOT%{pref}/bin
done
# Install wxrc
cp $WXDIR/bld/contrib/utils/wxrc/wxrc $RPM_BUILD_ROOT%{pref}/bin
# install KDE & GNOME menu items
# install KDE & GNOME menus
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applnk/Development
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
for d in distrib/*.desktop; do
@@ -304,31 +231,31 @@ install -m 644 wx/tools/XRCed/XRCed_16.png $RPM_BUILD_ROOT%{_datadir}/icons/hico
install -m 644 wx/tools/XRCed/XRCed_32.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps/XRCed.png
install -m 644 wx/tools/XRCed/XRCed_32.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/XRCed.png
# install Mandrake menu items
# install Mandrake menu
mkdir -p $RPM_BUILD_ROOT%{_libdir}/menu
cat > $RPM_BUILD_ROOT%{_libdir}/menu/%{pkgname} <<EOF
?package(%{pkgname}): \\
cat > $RPM_BUILD_ROOT%{_libdir}/menu/%{name} <<EOF
?package(%{name}): \\
command="%{_bindir}/pyshell" \\
needs="X11" \\
icon="PyCrust.png" \\
section="Applications/Development/Tools" \\
title="PyShell" \\
longtitle="GUI Python Shell"
?package(%{pkgname}): \\
?package(%{name}): \\
command="%{_bindir}/pycrust" \\
needs="X11" \\
icon="PyCrust.png" \\
section="Applications/Development/Tools" \\
title="PyCrust" \\
longtitle="GUI Python Shell with Filling"
?package(%{pkgname}): \\
?package(%{name}): \\
command="%{_bindir}/pyalamode" \\
needs="X11" \\
icon="PyCrust.png" \\
section="Applications/Development/Tools" \\
title="PyAlaMode" \\
longtitle="GUI Python Shell with Filling and editor windows"
?package(%{pkgname}): \\
?package(%{name}): \\
command="%{_bindir}/xrced" \\
needs="X11" \\
icon="XRCed.png" \\
@@ -338,82 +265,62 @@ cat > $RPM_BUILD_ROOT%{_libdir}/menu/%{pkgname} <<EOF
EOF
#----------------------------------------------------------------------
#----------------------------------------------------------------
%post -n %{pkgname}%{ver2}-%{port}-%{chartype}
%pre
if [ -e %{wxprefbase} ]; then
# in case there are old dirs from an old install
rm -r %{wxprefbase}
fi
%post
if [ ! -e %{wxprefbase} ]; then
ln -s %{pkgname}-%{version}-%{port}-%{chartype} %{wxprefbase}
ln -s wxPython-%{version} %{wxprefbase}
fi
%preun -n %{pkgname}%{ver2}-%{port}-%{chartype}
if [ -L %{wxprefbase} ]; then
if [ `readlink %{wxprefbase}` == %{pkgname}-%{version}-%{port}-%{chartype} ]; then
rm -f %{wxprefbase}
fi
fi
%post -n %{pkgname}-common-%{port}-%{chartype}
# This is done on Mandrake to update its menus:
if [ -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
%postun -n %{pkgname}-common-%{port}-%{chartype}
%postun
rm -f %{wxprefbase}
# This is done on Mandrake to update its menus:
if [ "$1" = "0" -a -x /usr/bin/update-menus ]; then /usr/bin/update-menus || true ; fi
%post -n %{pkgname}%{ver2}-devel-%{port}-%{chartype}
cd %{wxpref}/bin
ln -s ../lib/wx/config/%{port}-%{chartype}* wx-config
%preun -n %{pkgname}%{ver2}-devel-%{port}-%{chartype}
rm %{wxpref}/bin/wx-config
#----------------------------------------------------------------------
#----------------------------------------------------------------
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
#----------------------------------------------------------------------
#----------------------------------------------------------------
%files -n %{pkgname}%{ver2}-%{port}-%{chartype}
%files
%defattr(-,root,root)
%doc docs/preamble.txt docs/licence.txt docs/lgpl.txt docs/readme.txt docs/changes.txt
%doc wxPython/docs/*
%dir %{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}
%{pref}/lib*/python%{pyver}/site-packages/wx-%{ver2}*-%{port}-%{chartype}/*
%{_bindir}/*
%{pref}/lib*/python%{pyver}/site-packages/*
%dir %{wxpref}
%dir %{wxpref}/lib
%{wxpref}/lib/libwx_gtk*
%{wxpref}/lib/libwx*
%{wxpref}/share
%files -n %{pkgname}-common-%{port}-%{chartype}
%defattr(-,root,root)
%{pref}/lib*/python%{pyver}/site-packages/wxversion.*
%{pref}/lib*/python%{pyver}/site-packages/wx.pth
%{_bindir}/*
%{_datadir}/applnk/Development/*
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/pixmaps/*
%{_libdir}/menu/*
##%{wxprefbase}
%files -n %{pkgname}%{ver2}-devel-%{port}-%{chartype}
%files -n wxPython%{port}-devel
%defattr(-,root,root)
%{wxpref}/include
%{wxpref}/lib/wx
%dir %{wxpref}/bin
%{wxconfigname}
%{wxpref}/bin/wx-config
%{wxpref}/bin/wx-config-%{ver2}
#----------------------------------------------------------------------
#----------------------------------------------------------------
# end of file

View File

@@ -14,7 +14,7 @@
development and testing, and is meant to help other people that want
to do the same thing. I'll assume that you are using either a CVS
snapshot from <a class="reference" href="http://wxWidgets.org/snapshots/">http://wxWidgets.org/snapshots/</a>, a checkout from CVS, or
one of the released wxPython-src-2.5.* tarballs. I'll also assume that
one of the released wxPythonSrc-2.5.* tarballs. I'll also assume that
you know your way around your system, the compiler, etc. and most
importantly, that you know what you are doing! ;-)</p>
<p>If you want to also install the version of wxPython you build to be in
@@ -25,29 +25,29 @@ you only use the instructions in this <a class="reference" href="BUILD.html">BUI
will end up with a separate installation of wxPython and you can
switch back and forth between this and the release version that you
may already have installed.</p>
<p>If you want to make changes to any of the <tt class="literal"><span class="pre">*.i</span></tt> files, (SWIG
interface definition files,) or to regenerate the extension sources or
renamer modules, then you will need an up to date version of SWIG,
plus some patches. Get the sources for version 1.3.22, and then apply
the patches in wxPython/SWIG and then build SWIG like normal. See the
README.txt in the wxPython/SWIG dir for details about each patch and
also info about those that may already have been applied to the SWIG
sources. If you install this build of SWIG to a location that is not
on the PATH (so it doesn't interfere with an existing SWIG install for
example) then you can set a setup.py command-line variable named SWIG
to be the full path name of the executable and the wxPython build will
use it. See below for an example.</p>
<p>If you want to make changes to any of the <tt class="literal"><span class="pre">*.i</span></tt> files, (SWIG interface
definition files,) or to regenerate the extension sources or renamer
modules, then you will need an up to date version of SWIG. Either get
and build the current CVS version, or version 1.3.20, and then apply
the patches in wxPython/SWIG. See the README.txt in that dir for
details about each patch and also info about those that may already
have been applied to the SWIG sources. If you install this build of
SWIG to a location that is not on the PATH (so it doesn't interfere
with an existing SWIG install for example) then you can set a setup.py
command-line variable named SWIG to be the full path name of the
executable and the wxPython build will use it. See below for an
example.</p>
<p>In the text below I'll use WXDIR with environment variable syntax
(either $WXDIR or %WXDIR%) to refer to the top level directory where
(either $WXDIR or %WXDIR%) to refer to the top level directory were
your wxWidgerts and wxPython sources are located. It will equate to
whereever you checked out the wxWidgets module from CVS, or untarred
the wxPython-src tarball to. You can either substitute the $WXDIR text
the wxPythonSrc tarball to. You can either substitute the $WXDIR text
below with your actual dir, or set the value in the environment and
use it just like you see it below.</p>
<p>If you run into what appears to be compatibility issues between
wxWidgets and wxPython while building wxPython, be sure you are using
the wxWidgets sources included with the wxPython-src tarball or the
CVS snapshot, and not a previously installed version or a version
the wxWidgets sources included with the wxPythonSrc tarball or the CVS
snapshot, and not a previously installed version or a version
installed from one of the standard wxWidgets installers. With the
&quot;unstable&quot; releases (have a odd-numbered minor release value, where
the APIs are allowed to change) there are often significant
@@ -81,28 +81,23 @@ cd bld
</pre>
<p>On OS X of course you'll want to use --with-mac instead of
--with-gtk.</p>
<p><strong>NOTE</strong>: Due to a recent change there is currently a dependency
problem in the multilib builds of wxWidgets on OSX, so I have
switched to using a monolithic build. That means that all of the
core wxWidgets code is placed in in one shared library instead of
several. wxPython can be used with either mode, so use whatever
suits you on Linux and etc. but use monolithic on OSX. To switch
<p><strong>NOTE</strong>: Due to a recent change there is a dependency problem in the
multilib builds of wxWidgets on OSX, so I have switched to a
monolithic build on that platform. (IOW, all of the core code in
one shared library instead of several.) I would also expect other
unix builds to do just fine with a monolithic library, but I havn't
tested it in a while so your mileage may vary. Anyway, to switch
to the monolithic build of wxWidgets just add this configure flag:</p>
<pre class="literal-block">
--enable-monolithic \
</pre>
<p>By default GTK2 will be selected if its development pacakge is
installed on your build system. To force the use of GTK 1.2.x
instead add this flag:</p>
<p>By default GTK2 will be selected if it is on your build system. To
force the use of GTK 1.2.x add this flag:</p>
<pre class="literal-block">
--disable-gtk2 \
</pre>
<p>To make the wxWidgets build be unicode enabled (strongly
recommended if you are building with GTK2) then add the following.
When wxPython is unicode enabled then all strings that are passed
to wx functions and methods will first be converted to unicode
objects, and any 'strings' returned from wx functions and methods
will actually be unicode objects.:</p>
<p>To make the wxWidgets build be Unicode enabled (strongly
recommended if you are building with GTK2) then add:</p>
<pre class="literal-block">
--enable-unicode \
</pre>
@@ -136,7 +131,8 @@ dir I don't lose my scripts too.) This is what it looks like:</p>
make $* \
&amp;&amp; make -C contrib/src/gizmos $* \
&amp;&amp; make -C contrib/src/ogl CXXFLAGS=&quot;-DwxUSE_DEPRECATED=0&quot; $* \
&amp;&amp; make -C contrib/src/stc $*
&amp;&amp; make -C contrib/src/stc $* \
&amp;&amp; make -C contrib/src/xrc $*
</pre>
<p>So you just use .make as if it where make, but don't forget to set
the execute bit on .make first!:</p>
@@ -182,7 +178,7 @@ WX_CONFIG=/opt/wx/2.5/bin/wx-config
GTK2. If you built wxWidgets to use GTK 1.2.x then you should add
this flag to the command-line:</p>
<pre class="literal-block">
WXPORT=gtk
WXPORT=gtk2
</pre>
<p>If you would like to do a Unicode enabled build (all strings sent
to or retruned from wx functions are Unicode objects) and your
@@ -239,7 +235,7 @@ compilers) can also be used but I've never done the work to make that
happen. If you want to try that then first you'll want to find out if
there are any tricks that have to be done to make Python extension
modules using that compiler, and then make a few changes to setup.py
to accommodate that. (And send the patches to me.) If you plan on
to accomodate that. (And send the patches to me.) If you plan on
using VisualStudio.Net (a.k.a. MSVC 7.1) keep in mind that you'll also
have to build Python and any other extension modules that you use with
that compiler because a different version of the C runtime library is
@@ -255,12 +251,6 @@ or python23_d.dll. If you don't need to trace through the C/C++ parts
of the code with the debugger then building the normal (or hybrid)
version is fine, and you can use the regular python executables with
it.</p>
<p>Starting with 2.5.3.0 wxPython can be built for either the monlithic
or the multi-lib wxWidgets builds. (Monolithic means that all the
core wxWidgets code is in one DLL, and multi-lib means that the core
code is divided into multiple DLLs.) To select which one to use
specify the MONOLITHIC flag for both the wxWidgets build and the
wxPython build as shown below, setting it to either 0 or 1.</p>
<p>Just like the unix versions I also use some scripts to help me build
wxWidgets, but I use some non-standard stuff to do it. So if you have
bash (cygwin or probably MSYS too) or 4NT plus unix-like cat and sed
@@ -353,7 +343,7 @@ clean up the build:</p>
executing nmake with a bunch of extra command line parameters.
The base set are:</p>
<pre class="literal-block">
-f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=1 USE_OPENGL=1
-f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=0 USE_OPENGL=1
</pre>
<p>If doing a debug build then add:</p>
<pre class="literal-block">
@@ -373,6 +363,7 @@ same command from the following directories in order to build the
contrib libraries:</p>
<pre class="literal-block">
%WXDIR%\contrib\build\gizmos
%WXDIR%\contrib\build\xrc
%WXDIR%\contrib\build\stc
%WXDIR%\contrib\build\ogl
@@ -394,11 +385,10 @@ version the rest of the time. If you ever do want to install the
development version please refer to INSTALL.txt.</p>
<p>Change to the %WXDIR%\wxPython dir and run the this command,
making sure that you use the version of python that you want to
build for (if you have more than one on your system) and to match
the MONOLITHIC flag with how you built wxWidgets:</p>
build for (if you have more than one on your system):</p>
<pre class="literal-block">
cd %WXDIR%\wxPython
python setup.py build_ext --inplace MONOLITHIC=1
python setup.py build_ext --inplace
</pre>
<p>If you are wanting to have the source files regenerated with swig,
then you need to turn on the USE_SWIG flag and optionally tell it

View File

@@ -5,7 +5,7 @@ This file describes how I build wxWidgets and wxPython while doing
development and testing, and is meant to help other people that want
to do the same thing. I'll assume that you are using either a CVS
snapshot from http://wxWidgets.org/snapshots/, a checkout from CVS, or
one of the released wxPython-src-2.5.* tarballs. I'll also assume that
one of the released wxPythonSrc-2.5.* tarballs. I'll also assume that
you know your way around your system, the compiler, etc. and most
importantly, that you know what you are doing! ;-)
@@ -21,31 +21,31 @@ may already have installed.
.. _INSTALL: INSTALL.html
.. _BUILD: BUILD.html
If you want to make changes to any of the ``*.i`` files, (SWIG
interface definition files,) or to regenerate the extension sources or
renamer modules, then you will need an up to date version of SWIG,
plus some patches. Get the sources for version 1.3.22, and then apply
the patches in wxPython/SWIG and then build SWIG like normal. See the
README.txt in the wxPython/SWIG dir for details about each patch and
also info about those that may already have been applied to the SWIG
sources. If you install this build of SWIG to a location that is not
on the PATH (so it doesn't interfere with an existing SWIG install for
example) then you can set a setup.py command-line variable named SWIG
to be the full path name of the executable and the wxPython build will
use it. See below for an example.
If you want to make changes to any of the ``*.i`` files, (SWIG interface
definition files,) or to regenerate the extension sources or renamer
modules, then you will need an up to date version of SWIG. Either get
and build the current CVS version, or version 1.3.20, and then apply
the patches in wxPython/SWIG. See the README.txt in that dir for
details about each patch and also info about those that may already
have been applied to the SWIG sources. If you install this build of
SWIG to a location that is not on the PATH (so it doesn't interfere
with an existing SWIG install for example) then you can set a setup.py
command-line variable named SWIG to be the full path name of the
executable and the wxPython build will use it. See below for an
example.
In the text below I'll use WXDIR with environment variable syntax
(either $WXDIR or %WXDIR%) to refer to the top level directory where
(either $WXDIR or %WXDIR%) to refer to the top level directory were
your wxWidgerts and wxPython sources are located. It will equate to
whereever you checked out the wxWidgets module from CVS, or untarred
the wxPython-src tarball to. You can either substitute the $WXDIR text
the wxPythonSrc tarball to. You can either substitute the $WXDIR text
below with your actual dir, or set the value in the environment and
use it just like you see it below.
If you run into what appears to be compatibility issues between
wxWidgets and wxPython while building wxPython, be sure you are using
the wxWidgets sources included with the wxPython-src tarball or the
CVS snapshot, and not a previously installed version or a version
the wxWidgets sources included with the wxPythonSrc tarball or the CVS
snapshot, and not a previously installed version or a version
installed from one of the standard wxWidgets installers. With the
"unstable" releases (have a odd-numbered minor release value, where
the APIs are allowed to change) there are often significant
@@ -86,28 +86,23 @@ place, then do the same for wxPython.
On OS X of course you'll want to use --with-mac instead of
--with-gtk.
**NOTE**: Due to a recent change there is currently a dependency
problem in the multilib builds of wxWidgets on OSX, so I have
switched to using a monolithic build. That means that all of the
core wxWidgets code is placed in in one shared library instead of
several. wxPython can be used with either mode, so use whatever
suits you on Linux and etc. but use monolithic on OSX. To switch
**NOTE**: Due to a recent change there is a dependency problem in the
multilib builds of wxWidgets on OSX, so I have switched to a
monolithic build on that platform. (IOW, all of the core code in
one shared library instead of several.) I would also expect other
unix builds to do just fine with a monolithic library, but I havn't
tested it in a while so your mileage may vary. Anyway, to switch
to the monolithic build of wxWidgets just add this configure flag::
--enable-monolithic \
By default GTK2 will be selected if its development pacakge is
installed on your build system. To force the use of GTK 1.2.x
instead add this flag::
By default GTK2 will be selected if it is on your build system. To
force the use of GTK 1.2.x add this flag::
--disable-gtk2 \
To make the wxWidgets build be unicode enabled (strongly
recommended if you are building with GTK2) then add the following.
When wxPython is unicode enabled then all strings that are passed
to wx functions and methods will first be converted to unicode
objects, and any 'strings' returned from wx functions and methods
will actually be unicode objects.::
To make the wxWidgets build be Unicode enabled (strongly
recommended if you are building with GTK2) then add::
--enable-unicode \
@@ -142,7 +137,8 @@ place, then do the same for wxPython.
make $* \
&& make -C contrib/src/gizmos $* \
&& make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" $* \
&& make -C contrib/src/stc $*
&& make -C contrib/src/stc $* \
&& make -C contrib/src/xrc $*
So you just use .make as if it where make, but don't forget to set
the execute bit on .make first!::
@@ -254,7 +250,7 @@ compilers) can also be used but I've never done the work to make that
happen. If you want to try that then first you'll want to find out if
there are any tricks that have to be done to make Python extension
modules using that compiler, and then make a few changes to setup.py
to accommodate that. (And send the patches to me.) If you plan on
to accomodate that. (And send the patches to me.) If you plan on
using VisualStudio.Net (a.k.a. MSVC 7.1) keep in mind that you'll also
have to build Python and any other extension modules that you use with
that compiler because a different version of the C runtime library is
@@ -272,13 +268,6 @@ of the code with the debugger then building the normal (or hybrid)
version is fine, and you can use the regular python executables with
it.
Starting with 2.5.3.0 wxPython can be built for either the monlithic
or the multi-lib wxWidgets builds. (Monolithic means that all the
core wxWidgets code is in one DLL, and multi-lib means that the core
code is divided into multiple DLLs.) To select which one to use
specify the MONOLITHIC flag for both the wxWidgets build and the
wxPython build as shown below, setting it to either 0 or 1.
Just like the unix versions I also use some scripts to help me build
wxWidgets, but I use some non-standard stuff to do it. So if you have
bash (cygwin or probably MSYS too) or 4NT plus unix-like cat and sed
@@ -372,7 +361,7 @@ accordingly if you are using the bash shell.
executing nmake with a bunch of extra command line parameters.
The base set are::
-f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=1 USE_OPENGL=1
-f makefile.vc OFFICIAL_BUILD=1 SHARED=1 MONOLITHIC=0 USE_OPENGL=1
If doing a debug build then add::
@@ -392,6 +381,7 @@ accordingly if you are using the bash shell.
contrib libraries::
%WXDIR%\contrib\build\gizmos
%WXDIR%\contrib\build\xrc
%WXDIR%\contrib\build\stc
%WXDIR%\contrib\build\ogl
@@ -414,11 +404,10 @@ accordingly if you are using the bash shell.
Change to the %WXDIR%\\wxPython dir and run the this command,
making sure that you use the version of python that you want to
build for (if you have more than one on your system) and to match
the MONOLITHIC flag with how you built wxWidgets::
build for (if you have more than one on your system)::
cd %WXDIR%\wxPython
python setup.py build_ext --inplace MONOLITHIC=1
python setup.py build_ext --inplace
If you are wanting to have the source files regenerated with swig,
then you need to turn on the USE_SWIG flag and optionally tell it

View File

@@ -11,161 +11,7 @@
<div class="document" id="recent-changes-for-wxpython">
<h1 class="title">Recent Changes for wxPython</h1>
<div class="section" id="id1">
<h1><a name="id1">2.5.3.1</a></h1>
<p>wxMac focus and border refreshes corrected.</p>
<p>Updated internal PNG library.</p>
<p>wxMac fix for metal appearance on wx.ToolBar.</p>
<p>wx.grid.Grid fix allowing DoGetBestSize to be called before CreateGrid
(which means that a min size doesn't need to be specified.)</p>
<p>wxMac fix for not sending a native click to a control if it is not
enabled (does an enable itself)</p>
<p>Added wx.lib.ogl.DrawnShape, and fixed various little bugs in the new
OGL.</p>
<p>Added support to XRC and XRCed for the 3-state checkbox flags and also
for wx.ToggleButton. Updated the generic window styles supported by
XRCed.</p>
<p>It is now possible to create &quot;stock&quot; buttons. Basically this means
that you only have to provide one of the stock IDs (and either an
empty label or a label that matches the stock label) when creating the
button and wxWidgets will choose the stock label to go with it
automatically. Additionally on the platforms that have a native
concept of a stock button (currently only GTK2) then the native stock
button will be used. For example, the following will result in a
button with &quot;Cancel&quot; as the label and an accelerator on the &quot;C&quot;, and
if run on wxGTK2 then there will also be an image of a red X:</p>
<pre class="literal-block">
b = wx.Button(parent, wx.ID_CANCEL)
</pre>
<p>Added wx.lib.ticker.Ticker class from Chris Mellon.</p>
<p>Fix some incorrect clipping regions in wxSTC on wxGTK.</p>
<p>Added wrapper for wx.grid.Grid.GetOrCreateCellAttr.</p>
<p>Removed my copy of distutils from the wxPython source tree. Now that
I am no longer doing builds on Python 2.1 the newest distutils is no
longer needed. (There is still one small bug in Python 2.2 distutils
on win32, but it is easily worked around.) This sovles the problem of
incorrect builds on some systems where the system installed distutils
has been patched to behave slightly differently, for example SuSE on
x86_64 or Chandler's build.</p>
<p>Updated to SWIG 1.3.22 (plus my patch.) See wxPython/SWIG/README.txt
in the source tree if you need to use SWIG when building your own copy
of wxPython, or other extension modules that need to integrate with
the wxPython modules.</p>
<p>Added wx.Frame.RequestUserAttention which, if the platform suports it,
will do something (such as flash the task bar item) to suggest to the
user that they should look at that window.</p>
<p>&quot;Fixed&quot; wx.grid.Grid.SetDefaultEditor and SetDefaultRenderer by making
them register the editor or renderer for the &quot;string&quot; data type.</p>
<p>Added depth param to wx.Image.ConvertToBitmap.</p>
<p>Extended the wx.calendar.CalendarCtrl class with methods that get/set
a Python datetime or date object. (These will only work with Python
2.3+) The methods are PySetDate, PyGetDate, PySetLowerDateLimit,
PySetUpperDateLimit, PySetDateRange, PyGetLowerDateLimit, and
PyGetUpperDateLimit. Also, CalendarEvent was extended with PySetDate
and PyGetDate methods.</p>
<p>wxMSW: SetBackgroundColour on a wx.Choice or a wx.ComboBox will now
also set the colour of the dropdown.</p>
<p>wxMac: MessageDialog now supports wx.NO_DEFAULT style</p>
<p>wxMSW: added AssociateHandle and DissociateHandle to wx.Window</p>
<p>wxMac: fix for toolbar tooltips</p>
<p>wx.Sizer.Show (and Hide) now take an optional parameter specifying if
the item to be shown should be searched for recursivly in subsizers,
and return a boolean value indicating if the item was found.</p>
<p>wxMSW: fixed MaximizeEvent generation in wx.Frame</p>
<p>wxMSW: fixed sending duplicate EVT_COMBOBOX events</p>
<p>Smoother time estimation updates in wx.ProgressDialog (patch 992813)</p>
<p>Made wx.Listbook events more consistent with wx.Notebook ones (patch
1001271)</p>
<p>Fixed rounding errors in variable status bar panes widths computation
(patch 1030021)</p>
<p>Added possibility to specify printer bin (patch 910272)</p>
<p>wxMSW: fixed wx.ListCtrl's SetWindowStyleFlag() to not remove
WS_VISIBLE; also refresh the control automatically (closes bug
1019440)</p>
<p>Added wx.Choicebook, yet another notebook-like control.</p>
<p>wxMSW: Make radiobutton tab behaviour the same on MSW as in standard
MSW app, i.e. tab into the activated, not necessarily the first radio
button.</p>
<p>Added limited support for wxEventLoop (you can't derive from a
wx.PyEventLoop version yet...) Updated and moved the sample showing
how to replace the MainLoop to samples/mainloop/mainloop.py.</p>
<p>The C++ xrc lib has been moved out of contrib and into the core, so it
is always built by default. wxPython's build has also changed
accordingly and will build the xrc module as part of the core set of
modules built by default. If you were axplicitly using BUILD_XRC then
it will no longer be recognized as a build option, otherwise you
should notice no difference.</p>
<p>wxMac: Fixed radio toolbar buttons to correctly untoggle the others
when a new one is selected.</p>
<p>wxMac: Fixed GetLineLength and GetLineText for MLTE text controls</p>
<p>wxMac: wx.TaskBarIcon is implemented by allowing you to change the
app's icon on the Dock and also specifying a menu that should be
merged with the normal dock popup menu. See the MigrationGuide for
more details and a warning.</p>
<p>Added wx.TopLevelWindow.IsActive() which tells you if the frame or
dialog is or containts the active window with the keyboard focus.</p>
<p>Added ability to create a font based on pixel size rather than point
size via the FontFromPixelSize constructor.</p>
<p>Updated the Scintilla used by StyledTextCtrl to version 1.61</p>
<p>Improved image HitTest for TreeListCtrl.</p>
<p>Added wx.App.IsMainLoopRunning.</p>
<p>wxGTK: Make wxComboBox spit out a bit fewer surplus events when
holding down the mouse button.</p>
<p>wxGTK: Enable key based navigation through notebook tabs as in the
native control with Left and right keys. Support for vetoing.</p>
<p>FloatCanvas updates from Chris Barker</p>
<dl>
<dt>PyPlot updates from Gordon Williams:</dt>
<dd><ul class="first last simple">
<li>Added bar graph demo</li>
<li>Modified line end shape from round to square.</li>
<li>Removed FloatDCWrapper for conversion to ints and ints in
arguments</li>
<li>Imported modules given leading underscore to name.</li>
<li>Added Cursor Line Tracking and User Point Labels.</li>
<li>Demo for Cursor Line Tracking and Point Labels.</li>
<li>Size of plot preview frame adjusted to show page better.</li>
<li>Added helper functions PositionUserToScreen and
PositionScreenToUser in PlotCanvas.</li>
<li>Added functions GetClosestPoints (all curves) and GetClosestPoint
(only closest curve) can be in either user coords or screen
coords.</li>
</ul>
</dd>
<dt>MaskedEdit updates from Will Sadkin:</dt>
<dd><ul class="first last simple">
<li>Added '*' mask char that means &quot;all ansii chars&quot; (ords 32-255)</li>
<li>Added proper unicode support to masked controls and wx.tools.dbg</li>
<li>Fixed two reported missing import bugs introduced by package
creation</li>
<li>Converted masked package doc strings to reST format for better
epydoc support</li>
<li>lots of doc string improvements and function hiding to better
reflect package's public contents.</li>
</ul>
</dd>
</dl>
<p>Restructured the installer packages slightly to help facilitate having
multiple versions of wxPython installed at the same time. See the
Migrarion Guide for more information.</p>
<dl>
<dt>Applied patch from Pim Van Heuven that modifies 4 files:</dt>
<dd><ul class="first last simple">
<li>wxPython/demo/ListCtrl_edit.py (new demo)</li>
<li>wxPython/demo/Main.py (include new demo in demo app)</li>
<li>wxPython/wx/lib/mixins/listctrl.py (several improvements to
TextEditMixin)</li>
<li>wxPython/wx/lib/wxpTag.py (some small fixes)</li>
</ul>
</dd>
</dl>
<p>Added (thanks to Kevin Ollivier!) wrappers for wx.WebKitCtrl for the
OSX build. Other platforms will raise an exception if you try to use
it.</p>
<p>wxPython on OSX can now be built in Unicode mode, can support multiple
version installs, and comes with an uninstaller script.</p>
</div>
<div class="section" id="id2">
<h1><a name="id2">2.5.2.8</a></h1>
<h1><a name="id1">2.5.2.8</a></h1>
<p>Predominantly a bug-fix release.</p>
<blockquote>
<ul class="simple">
@@ -193,8 +39,8 @@ wxCheckListBox.</li>
</ul>
</blockquote>
</div>
<div class="section" id="id3">
<h1><a name="id3">2.5.2.7</a></h1>
<div class="section" id="id2">
<h1><a name="id2">2.5.2.7</a></h1>
<p>wx.ADJUST_MINSIZE is now the default behaviour for window items in
sizers. This means that the item's GetMinSize and/or GetBestSize will
be called when calculating layout and the return value from that will
@@ -287,8 +133,8 @@ in the PyShell:</p>
... wx.MilliSleep(10)
</pre>
</div>
<div class="section" id="id4">
<h1><a name="id4">2.5.1.5</a></h1>
<div class="section" id="id3">
<h1><a name="id3">2.5.1.5</a></h1>
<p>(See also the <a class="reference" href="MigrationGuide.html">MigrationGuide</a> file for details about some of the
big changes that have happened in this release and how you should
adapt your code.)</p>
@@ -369,8 +215,8 @@ migrating away from using activexwrapper as well. Please see the
MigrationGuide for more details on using the new module.</p>
<p>Floats are allowed again as function parameters where ints are expected.</p>
</div>
<div class="section" id="id6">
<h1><a name="id6">2.4.2.4</a></h1>
<div class="section" id="id5">
<h1><a name="id5">2.4.2.4</a></h1>
<p>Use wxSTC in the demo for displaying the soucre code of the samples.</p>
<p>Lots of bug fixes and such from the wxWindows folks.</p>
<p>Added wxPython.lib.newevent from Miki Tebeka. Its usage is
@@ -379,8 +225,8 @@ demonstrated in the Threads sample in the demo.</p>
<p>Added wxMaskedNumCtrl.</p>
<p>Added Chris Barker's FloatCanvas.</p>
</div>
<div class="section" id="id7">
<h1><a name="id7">2.4.1.2</a></h1>
<div class="section" id="id6">
<h1><a name="id6">2.4.1.2</a></h1>
<p>Added wxScrolledPanel from Will Sadkin</p>
<p>Added SetShape method to top level windows (e.g. wxFrame.)</p>
<p>Changed wxSWIG to not generate Python code using apply, (since it will
@@ -431,8 +277,8 @@ release,) SetItemMinSize can now take a wxSize (or 2-tuple) parameter,
and Spacers can be specified with a wxSize (or 2-tuple) parameter</p>
<p>Added wxCursorFromBits.</p>
</div>
<div class="section" id="id8">
<h1><a name="id8">2.4.0.7</a></h1>
<div class="section" id="id7">
<h1><a name="id7">2.4.0.7</a></h1>
<p>Gave up on generating a warning upon the use of the old true/false or
TRUE/FALSE values.</p>
<p>Fixed wxGenericTreeCtrl (used on wxGTK and wxMac for wxTreeCtrl) so
@@ -462,8 +308,8 @@ think I am testing in the future...</p>
<p>Updated pycolourchooser.</p>
<p>Updated to 0.9b of PyCrust.</p>
</div>
<div class="section" id="id9">
<h1><a name="id9">2.4.0.4</a></h1>
<div class="section" id="id8">
<h1><a name="id8">2.4.0.4</a></h1>
<p>Added missing wxRect methods</p>
<p>Add OOR support for wxApp objects too.</p>
<p>Added wxCursorFromImage, which works on wxMSW and wxGTK so far.</p>
@@ -519,25 +365,25 @@ doesn't have a standard place for them.</p>
<p>Fixed typemaps for wxGridCellCoordsArray.</p>
<p>Updated to the 0.9a version of PyCrust</p>
</div>
<div class="section" id="id10">
<h1><a name="id10">2.4.0.2</a></h1>
<div class="section" id="id9">
<h1><a name="id9">2.4.0.2</a></h1>
<p>Several bug fixes.</p>
<p>Added wxIntCtrl from Will Sadkin.</p>
<p>Added wxPyColourChooser by Michael Gilfix.</p>
</div>
<div class="section" id="id11">
<h1><a name="id11">2.4.0.1</a></h1>
<div class="section" id="id10">
<h1><a name="id10">2.4.0.1</a></h1>
<p>No major new features since 2.3.4.2, mostly bug fixes and minor
enhancements.</p>
<p>Added function wrappers for the common dialogs from Kevin Altis. See
wxPython/lib/dialogs.py for more details.</p>
</div>
<div class="section" id="id12">
<h1><a name="id12">2.3.4.2</a></h1>
<div class="section" id="id11">
<h1><a name="id11">2.3.4.2</a></h1>
<p>Various bug fixes.</p>
</div>
<div class="section" id="id13">
<h1><a name="id13">2.3.4.1</a></h1>
<div class="section" id="id12">
<h1><a name="id12">2.3.4.1</a></h1>
<p>Updated XRCed and wxTimeCtrl contribs.</p>
<p>Show a couple new wxGrid features in the demo.</p>
<p>Several bug fixes in wxWindows.</p>
@@ -591,8 +437,8 @@ windows when desired.</p>
HTMLHelp viewer does. Changed how the wxPythonDocs tarball is built
and added a script to launch the doc viewer.</p>
</div>
<div class="section" id="id14">
<h1><a name="id14">2.3.3.1</a></h1>
<div class="section" id="id13">
<h1><a name="id13">2.3.3.1</a></h1>
<p>Added wxSplashScreen.</p>
<p>Added wxGenericDirCtrl.</p>
<p>Added wxMultiChoiceDialog.</p>
@@ -734,15 +580,15 @@ example.</p>
<p>Added wxPython.lib.mixins.rubberband module from Robb Shecter.</p>
<p>Added wxTimeCtrl from Will Sadkin.</p>
</div>
<div class="section" id="id15">
<h1><a name="id15">2.3.2.1</a></h1>
<div class="section" id="id14">
<h1><a name="id14">2.3.2.1</a></h1>
<p>Changed (again) how the Python global interpreter lock is handled as
well as the Python thread state. This time it works on SMP machines
without barfing and is also still compatible with Python debuggers.</p>
<p>Added some patches from library contributors.</p>
</div>
<div class="section" id="id16">
<h1><a name="id16">2.3.2</a></h1>
<div class="section" id="id15">
<h1><a name="id15">2.3.2</a></h1>
<p>Added EVT_HELP, EVT_HELP_RANGE, EVT_DETAILED_HELP,
EVT_DETAILED_HELP_RANGE, EVT_CONTEXT_MENU, wxHelpEvent,
wxContextMenuEvent, wxContextHelp, wxContextHelpButton, wxTipWindow,
@@ -824,8 +670,8 @@ SendCommand method, but it is still quite powerful. See
wxPython/contrib/dllwidget and wxPython/demo/dllwidget for more
details.</p>
</div>
<div class="section" id="id17">
<h1><a name="id17">2.3.1</a></h1>
<div class="section" id="id16">
<h1><a name="id16">2.3.1</a></h1>
<p>Added EVT_GRID_EDITOR_CREATED and wxGridEditorCreatedEvent so the user
code can get access to the edit control when it is created, (to push
on a custom event handler for example.)</p>
@@ -838,8 +684,8 @@ subclass wxXmlResourceHandler, etc...</p>
<p>Fixed img2py to work correctly with Python 2.1.</p>
<p>Added enhanced wxVTKRenderWindow by Prabhu Ramachandran</p>
</div>
<div class="section" id="id18">
<h1><a name="id18">2.3.0</a></h1>
<div class="section" id="id17">
<h1><a name="id17">2.3.0</a></h1>
<p>Removed initial startup dependency on the OpenGL DLLs so only the
glcanvasc.pyd depends on them, (on wxMSW.)</p>
<p>Changed wxFont, wxPen, wxBrush to not implicitly use the
@@ -935,13 +781,13 @@ please send it to me for inclusion in this package.</p>
by having smaller functional apps to play with. They can be found in
wxPython/samples.</p>
</div>
<div class="section" id="id19">
<h1><a name="id19">2.2.6</a></h1>
<div class="section" id="id18">
<h1><a name="id18">2.2.6</a></h1>
<p>No changes happened in the Python wrappers for this release, only
changes and fixes in the wxWindows library.</p>
</div>
<div class="section" id="id20">
<h1><a name="id20">2.2.5</a></h1>
<div class="section" id="id19">
<h1><a name="id19">2.2.5</a></h1>
<p>New typemaps for wxString when compiling for Python 2.0 and beyond
that allow Unicode objects to be passed as well as String objects. If
a Unicode object is passed PyString_AsStringAndSize is used to convert
@@ -1184,7 +1030,7 @@ an EVT_SIZE handler that calls Layout().</p>
<p>Fixed deadlock problem that happened when using threads.</p>
<p>Added new HTML printing classes.</p>
<p>Added wxWindow.GetHandle</p>
<p>Apparently wxMouseEvent.Position has been deprecated in wxWindows as
<p>Apparently wxMouseEvent.Position has been depreciated in wxWindows as
it is no longer available by default. You can use GetPositionTuple
(returning a tuple with x,y) instead, or GetPosition (returning a
wxPoint.)</p>
@@ -1242,7 +1088,7 @@ pages. See the demo for an example.</p>
wxGTK. Added them back in since the methods exist now.</p>
<p>Wrapped the wxHtmlHelpController and related classes.</p>
<p>Wrapped the C++ versions of wxSizer and friends. The Python-only
versions are still in the library, but deprecated. (You will get a
versions are still in the library, but depreciated. (You will get a
warning message if you try to use them, but the warning can be
disabled.) The usage of the C++ versions is slightly different, and
the functionality of wxBorderSizer is now part of wxBoxSizer. I have
@@ -1381,7 +1227,7 @@ matches MSW's.</p>
<p>Added wxGrid.GetCells</p>
<p>Added wxSystemSettings static methods as functions with names like
wxSystemSettings_GetSystemColour.</p>
<p>Removed wxPyMenu since using menu callbacks have been deprecated in
<p>Removed wxPyMenu since using menu callbacks have been depreciated in
wxWindows. Use wxMenu and events instead.</p>
<dl>
<dt>Added alternate wxBitmap constructor (for MSW only) as</dt>

View File

@@ -1,7 +1,7 @@
Recent Changes for wxPython
=====================================================================
2.5.3.1
2.5.3.0
-------
wxMac focus and border refreshes corrected.
@@ -147,51 +147,6 @@ holding down the mouse button.
wxGTK: Enable key based navigation through notebook tabs as in the
native control with Left and right keys. Support for vetoing.
FloatCanvas updates from Chris Barker
PyPlot updates from Gordon Williams:
- Added bar graph demo
- Modified line end shape from round to square.
- Removed FloatDCWrapper for conversion to ints and ints in
arguments
- Imported modules given leading underscore to name.
- Added Cursor Line Tracking and User Point Labels.
- Demo for Cursor Line Tracking and Point Labels.
- Size of plot preview frame adjusted to show page better.
- Added helper functions PositionUserToScreen and
PositionScreenToUser in PlotCanvas.
- Added functions GetClosestPoints (all curves) and GetClosestPoint
(only closest curve) can be in either user coords or screen
coords.
MaskedEdit updates from Will Sadkin:
- Added '*' mask char that means "all ansii chars" (ords 32-255)
- Added proper unicode support to masked controls and wx.tools.dbg
- Fixed two reported missing import bugs introduced by package
creation
- Converted masked package doc strings to reST format for better
epydoc support
- lots of doc string improvements and function hiding to better
reflect package's public contents.
Restructured the installer packages slightly to help facilitate having
multiple versions of wxPython installed at the same time. See the
Migrarion Guide for more information.
Applied patch from Pim Van Heuven that modifies 4 files:
- wxPython/demo/ListCtrl_edit.py (new demo)
- wxPython/demo/Main.py (include new demo in demo app)
- wxPython/wx/lib/mixins/listctrl.py (several improvements to
TextEditMixin)
- wxPython/wx/lib/wxpTag.py (some small fixes)
Added (thanks to Kevin Ollivier!) wrappers for wx.WebKitCtrl for the
OSX build. Other platforms will raise an exception if you try to use
it.
wxPython on OSX can now be built in Unicode mode, can support multiple
version installs, and comes with an uninstaller script.
@@ -1585,7 +1540,7 @@ Added new HTML printing classes.
Added wxWindow.GetHandle
Apparently wxMouseEvent.Position has been deprecated in wxWindows as
Apparently wxMouseEvent.Position has been depreciated in wxWindows as
it is no longer available by default. You can use GetPositionTuple
(returning a tuple with x,y) instead, or GetPosition (returning a
wxPoint.)
@@ -1667,7 +1622,7 @@ wxGTK. Added them back in since the methods exist now.
Wrapped the wxHtmlHelpController and related classes.
Wrapped the C++ versions of wxSizer and friends. The Python-only
versions are still in the library, but deprecated. (You will get a
versions are still in the library, but depreciated. (You will get a
warning message if you try to use them, but the warning can be
disabled.) The usage of the C++ versions is slightly different, and
the functionality of wxBorderSizer is now part of wxBoxSizer. I have
@@ -1827,7 +1782,7 @@ Added wxGrid.GetCells
Added wxSystemSettings static methods as functions with names like
wxSystemSettings_GetSystemColour.
Removed wxPyMenu since using menu callbacks have been deprecated in
Removed wxPyMenu since using menu callbacks have been depreciated in
wxWindows. Use wxMenu and events instead.
Added alternate wxBitmap constructor (for MSW only) as

View File

@@ -65,11 +65,9 @@ all.</p>
</li>
<li><p class="first">In addition to building wxPython as described in BUILD.txt, you can
install it to Python's site-packages dir, as well as some scripts
into the same bin dir used by Python by using this command, plus
whatever WXPORT, UNICODE, etc. settings you used for the initial
build step:</p>
into the same bin dir used by Python by using this command:</p>
<pre class="literal-block">
python2.3 setup.py install
python2.3 setup.py install
</pre>
<p>If you would like to install to some place besides the prefix where
Python is installed, (such as to your home directory) then you can
@@ -107,9 +105,9 @@ machines be careful to install to /Library/Python/2.3. To
complicate things further, the Jaguar version, or a custom build
you do yourself will end up in /Library/Frameworks even on
Panther...</li>
<li>You need to use pythonw at the command line or the PythonLauncher
app to run wxPython apps, otherwise the app will not be able to
fully use the GUI display.</li>
<li>You need to use pythonw at the command line or PythonLauncher app
to run wxPython apps, otherwise the app will not be able to fully
use the GUI display.</li>
</ol>
</div>
<div class="section" id="installing-on-windows">

View File

@@ -112,9 +112,9 @@ instructions above, except for a few small, but important details:
you do yourself will end up in /Library/Frameworks even on
Panther...
3. You need to use pythonw at the command line or the PythonLauncher
app to run wxPython apps, otherwise the app will not be able to
fully use the GUI display.
3. You need to use pythonw at the command line or PythonLauncher app
to run wxPython apps, otherwise the app will not be able to fully
use the GUI display.

View File

@@ -358,7 +358,7 @@ class MyDialog(wx.Dialog):
<div class="section" id="sizers">
<h1><a name="sizers">Sizers</a></h1>
<p>The hack allowing the old &quot;option&quot; keyword parameter has been removed.
If you use keyword args with wx.Sizer Add, Insert, or Prepend methods
If you use keyword args with w.xSizer Add, Insert, or Prepend methods
then you will need to use the <tt class="literal"><span class="pre">proportion</span></tt> name instead of
<tt class="literal"><span class="pre">option</span></tt>. (The <tt class="literal"><span class="pre">proportion</span></tt> keyword was also allowed in 2.4.2.4.)</p>
<p>When adding a spacer to a sizer you now need to use a wx.Size or a
@@ -376,7 +376,7 @@ be used from XRC.</p>
<p>You should not use AddWindow, AddSizer, AddSpacer (and similar for
Insert, Prepend, and etc.) methods any longer. Just use Add and the
wrappers will figure out what to do. <strong>[Changed in 2.5.2.x]</strong>
AddWindow, AddSizer, AddSpacer and etc. will now issue a
AddWindow, AddSize, AddSpacer and etc. will now issue a
DeprecationWarning.</p>
<p><strong>[Changed in 2.5.2.x]</strong> The Sizers have had some fundamental internal
changes in the 2.5.2.x release intended to make them do more of the
@@ -393,7 +393,7 @@ flag then when layout was calculated the item's <tt class="literal"><span class=
would be used to reset the minimal size that the sizer used.</li>
</ul>
</blockquote>
<p>The main thrust of the new Sizer changes was to make behavior like
<p>The main thrust of the new Sizer changes was to make behaviour like
<tt class="literal"><span class="pre">wx.ADJUST_MINSIZE</span></tt> be the default, and also to push the tracking of
the minimal size to the window itself (since it knows its own needs)
instead of having the sizer take care of it. Consequently these
@@ -401,7 +401,7 @@ changes were made:</p>
<blockquote>
<ul class="simple">
<li>The <tt class="literal"><span class="pre">wx.FIXED_MINSIZE</span></tt> flag was added to allow for the old
behavior. When this flag is used the size a window has when
behaviour. When this flag is used the size a window has when
added to the sizer will be treated as its minimal size and it
will not be readjusted on each layout.</li>
<li>The min size stored in <tt class="literal"><span class="pre">wx.Window</span></tt> and settable with
@@ -603,7 +603,9 @@ mask and the rest would be made fully opaque.</p>
channel and will now only create a mask when all the pixels in the
image are either fully transparent or fully opaque. In addition, the
wx.DC.DrawBitmap and wx.DC.Blit methods are able to correctly blend
the pixels in the image with partially transparent alpha values.</p>
the pixels in the image with partially transparent alpha values.
(Currently only on MSW and Mac, if anybody knows how to do it for GTK
then please submit a patch!)</p>
<p>If you are using a PNG with an alpha channel but you need to have a
wx.Mask like you automatically got in 2.4 then you can do one of the
following:</p>
@@ -672,7 +674,7 @@ later into the main namespace via Python code.</p>
the &quot;internal&quot; module names have changed, but you shouldn't have been
using them anyway so it shouldn't bother you. ;-) In case you were
erroneously using them in 2.4, here are the internal extension modules
that no longer exist:</p>
no longer exist:</p>
<blockquote>
<ul class="simple">
<li>clip_dnd</li>
@@ -713,93 +715,8 @@ the objects in these modules only via the wx or wxPython.wx packages:</p>
<p>The help module no longer exists and the classes therein are now part
of the core module imported with wxPython.wx or the wx package.</p>
</div>
<div class="section" id="wx-taskbaricon">
<h1><a name="wx-taskbaricon">wx.TaskBarIcon</a></h1>
<p><strong>[Changed in 2.5.3.x]</strong></p>
<p>wx.TaskbarIcon now works on all three platforms, although for wxGTK it
depends on support from the Window Manager. On OS X the icon replaces
the application's icon on the dock and when you right click on it the
app's default popup menu is merged with the wx.TaskBarIcon's menu.
Because of how it is implemented on the Mac using the Dock most of the
TaskBarIcon events will _not_ be emitted on that platform, but since
98% of the time you simply want to display an icon and have a popup
menu it shouldn't be much of a problem. You can still use the other
events on the other platforms, you'll just want to be sure that you
can do everything you want via the menu too.</p>
<p>Since popping up a menu is the most common thing to do with a
TaskBarIcon the class has some new built in functionality to
facilitate that. To use the TaskBarIcon in this new way, simply
derive a new class from TaskBarIcon and implement a CreatePopupMenu
method that creates and returns the menu. That's all there is to it,
besides binding event handlers for the menu items of course. Take a
look at the DemoTaskBarIcon class in the demo/Main.py module for an
example.</p>
<p><strong>NOTE</strong>: Unfortunately due to being able to support virtualizing
CreatePopupMenu the C++ TaskBarIcon instance now holds a reference to
the Python instance, and so you will need to explicitly Destroy() your
TaskBarIcon instance when you are done with it. (Like you do with
wx.Dialogs.) If you don't destroy it then wxWidgets will assume that
you want the app to keep running with just the icon in the task bar
and the MainLoop will not exit.</p>
</div>
<div class="section" id="version-number-change">
<h1><a name="version-number-change">Version Number Change</a></h1>
<p><strong>[Changed in 2.5.3.x]</strong></p>
<p>Starting with 2.5.3.0 the Unicode versions of wxPython will no longer
have a 'u' appended to the fourth component of the version number.
Please check for the presence of &quot;unicode&quot; in the <cite>wx.PlatformInfo</cite>
tuple instead. (This tuple of strings has been available since the
first 2.5 version.) For example:</p>
<pre class="literal-block">
if &quot;unicode&quot; in wx.PlatformInfo:
# do whatever
...
</pre>
</div>
<div class="section" id="multi-version-installs">
<h1><a name="multi-version-installs">Multi-Version Installs</a></h1>
<p><strong>[Changed in 2.5.3.x]</strong></p>
<p>Starting with 2.5.3.0 the wx and wxPython package directories will be
installed in a subdirectory of the site-packages directory, instead of
directly in site-packages. This is done to help facilitate having
multiple versions of wxPython installed side-by-side. Why would you
want to do this? One possible scenario is you have an app that
requires wxPython 2.4 but you want to use the newest 2.5 to do your
own development with. Or perhaps you want to be able to test your app
with several different versions of wxPython to ensure compatibility.
Before everyone panics, rest asured that if you only install one
version of wxPython then you should notice no difference in how things
work.</p>
<p>In addition to installing wxPython into a &quot;versioned&quot; subdirectory of
site-packages, a file named <cite>wx.pth</cite> is optionally installed that will
contain the name of the versioned subdirectory. This will cause that
subdirectory to be automatically added to the sys.path and so doing an
&quot;import wx&quot; will find the package in the subdirectory like it would
have if it was still located directly in site-packages. I say
&quot;optionally&quot; above because that is how you can control which install
of wxPython is the default one. Which ever version installs the
wx.pth file will be the one that is imported with a plain &quot;import wx&quot;
statement. Of course you can always manipulate that by editing the
wx.pth file, or by setting PYTHONPATH in the environment, or by the
method described in the next paragraph.</p>
<p>Finally, a new module named wxversion.py is installed to the
site-packages directory. It can be used to manipulate the sys.path at
runtime so your applications can select which version of wxPython they
would like to to have imported. You use it like this:</p>
<pre class="literal-block">
import wxversion
wxversion.select(&quot;2.4&quot;)
import wx
</pre>
<p>Then even though a 2.5 version of wxPython may be the default the
application that does the above the first time that wx is imported
will actually get a 2.4 version. <strong>NOTE:</strong> There isn't actually a 2.4
version of wxPython that supports this, but there will be.</p>
<p>Please see this wiki page for more details, HowTo's and FAQ's:
<a class="reference" href="http://wiki.wxpython.org/index.cgi/MultiVersionInstalls">http://wiki.wxpython.org/index.cgi/MultiVersionInstalls</a></p>
</div>
<div class="section" id="miscellaneous-stuff">
<h1><a name="miscellaneous-stuff">Miscellaneous Stuff</a></h1>
<div class="section" id="other-stuff">
<h1><a name="other-stuff">Other Stuff</a></h1>
<p>wxPyDefaultPosition and wxPyDefaultSize are gone. Use the
wxDefaultPosition and wxDefaultSize objects instead.</p>
<p>Similarly, the wxSystemSettings backwards compatibiility aliases for
@@ -825,6 +742,15 @@ wxPyTypeCast at all.</p>
there are compatibility aliases for much of the above items.</p>
<p>The wxWave class has been renamed to wxSound, and now has a slightly
different API.</p>
<p>wx.TaskbarIcon works on wxGTK-based platforms (for some window
managers,) however you have to manage it a little bit more than you
did before. Basically, the app will treat it like a top-level frame
in that if the wx.TaskBarIcon still exists when all the frames are
closed then the app will still not exit. You need to ensure that the
wx.TaskBarIcon is destroyed when your last Frame is closed. For
wxPython apps it is usually enough if your main frame object holds the
only reference to the wx.TaskBarIcon, then when the frame is closed
Python reference counting takes care of the rest.</p>
<p>Before Python 2.3 it was possible to pass a floating point object as a
parameter to a function that expected an integer, and the
PyArg_ParseTuple family of functions would automatically convert to

View File

@@ -403,7 +403,7 @@ Sizers
------
The hack allowing the old "option" keyword parameter has been removed.
If you use keyword args with wx.Sizer Add, Insert, or Prepend methods
If you use keyword args with w.xSizer Add, Insert, or Prepend methods
then you will need to use the ``proportion`` name instead of
``option``. (The ``proportion`` keyword was also allowed in 2.4.2.4.)
@@ -441,14 +441,14 @@ First a bit about how things used to work:
flag then when layout was calculated the item's ``GetBestSize``
would be used to reset the minimal size that the sizer used.
The main thrust of the new Sizer changes was to make behavior like
The main thrust of the new Sizer changes was to make behaviour like
``wx.ADJUST_MINSIZE`` be the default, and also to push the tracking of
the minimal size to the window itself (since it knows its own needs)
instead of having the sizer take care of it. Consequently these
changes were made:
* The ``wx.FIXED_MINSIZE`` flag was added to allow for the old
behavior. When this flag is used the size a window has when
behaviour. When this flag is used the size a window has when
added to the sizer will be treated as its minimal size and it
will not be readjusted on each layout.
@@ -669,6 +669,8 @@ channel and will now only create a mask when all the pixels in the
image are either fully transparent or fully opaque. In addition, the
wx.DC.DrawBitmap and wx.DC.Blit methods are able to correctly blend
the pixels in the image with partially transparent alpha values.
(Currently only on MSW and Mac, if anybody knows how to do it for GTK
then please submit a patch!)
If you are using a PNG with an alpha channel but you need to have a
wx.Mask like you automatically got in 2.4 then you can do one of the
@@ -784,7 +786,6 @@ The help module no longer exists and the classes therein are now part
of the core module imported with wxPython.wx or the wx package.
wx.TaskBarIcon
--------------
@@ -820,76 +821,9 @@ and the MainLoop will not exit.
Version Number Change
---------------------
**[Changed in 2.5.3.x]**
Starting with 2.5.3.0 the Unicode versions of wxPython will no longer
have a 'u' appended to the fourth component of the version number.
Please check for the presence of "unicode" in the `wx.PlatformInfo`
tuple instead. (This tuple of strings has been available since the
first 2.5 version.) For example::
if "unicode" in wx.PlatformInfo:
# do whatever
...
Multi-Version Installs
----------------------
**[Changed in 2.5.3.x]**
Starting with 2.5.3.0 the wx and wxPython package directories will be
installed in a subdirectory of the site-packages directory, instead of
directly in site-packages. This is done to help facilitate having
multiple versions of wxPython installed side-by-side. Why would you
want to do this? One possible scenario is you have an app that
requires wxPython 2.4 but you want to use the newest 2.5 to do your
own development with. Or perhaps you want to be able to test your app
with several different versions of wxPython to ensure compatibility.
Before everyone panics, rest asured that if you only install one
version of wxPython then you should notice no difference in how things
work.
In addition to installing wxPython into a "versioned" subdirectory of
site-packages, a file named `wx.pth` is optionally installed that will
contain the name of the versioned subdirectory. This will cause that
subdirectory to be automatically added to the sys.path and so doing an
"import wx" will find the package in the subdirectory like it would
have if it was still located directly in site-packages. I say
"optionally" above because that is how you can control which install
of wxPython is the default one. Which ever version installs the
wx.pth file will be the one that is imported with a plain "import wx"
statement. Of course you can always manipulate that by editing the
wx.pth file, or by setting PYTHONPATH in the environment, or by the
method described in the next paragraph.
Finally, a new module named wxversion.py is installed to the
site-packages directory. It can be used to manipulate the sys.path at
runtime so your applications can select which version of wxPython they
would like to to have imported. You use it like this::
import wxversion
wxversion.select("2.4")
import wx
Then even though a 2.5 version of wxPython may be the default the
application that does the above the first time that wx is imported
will actually get a 2.4 version. **NOTE:** There isn't actually a 2.4
version of wxPython that supports this, but there will be.
Please see this wiki page for more details, HowTo's and FAQ's:
http://wiki.wxpython.org/index.cgi/MultiVersionInstalls
Miscellaneous Stuff
-------------------
Other Stuff
-----------
wxPyDefaultPosition and wxPyDefaultSize are gone. Use the
wxDefaultPosition and wxDefaultSize objects instead.

View File

@@ -3,7 +3,7 @@
b 23 gtk2 t
b 23 gtk2 BUILD_RENAMERS=0 PREP_ONLY=1 FULL_DOCS=1
##docs/bin/simplify.py
docs/bin/simplify.py
docs/bin/makeapidocs
b 23 gtk2 t
b 23 gtk2 BUILD_RENAMERS=0 PREP_ONLY=1

View File

@@ -169,8 +169,8 @@ wxPython, so there are lots of examples to look at and to play with.
Here is one of them, it is the <tt class="literal"><span class="pre">simple</span></tt> sample.</p>
<pre class="literal-block">
#----------------------------------------------------------------------
# A very simple wxPython example. Just a wx.Frame, wx.Panel,
# wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic
# A very simple wxPython example. Just a wxFrame, wxPanel,
# wxStaticText, wxButton, and a wxBoxSizer, but it shows the basic
# structure of any wxPython application.
#----------------------------------------------------------------------
@@ -244,14 +244,11 @@ class MyFrame(wx.Frame):
class MyApp(wx.App):
def OnInit(self):
frame = MyFrame(None, &quot;Simple wxPython App&quot;)
self.SetTopWindow(frame)
print &quot;Print statements go to this stdout window by default.&quot;
frame.Show(True)
self.SetTopWindow(frame)
return True
app = MyApp(redirect=True)
app = MyApp(True)
app.MainLoop()

View File

@@ -5724,7 +5724,7 @@ value as used by the parent. In addition, if the window overrides
ShouldInheritColours to return false, the colours will not be changed
no matter what and only the font might.
This rather complicated logic is necessary in order to accommodate the
This rather complicated logic is necessary in order to accomodate the
different usage scenarius. The most common one is when all default
attributes are used and in this case, nothing should be inherited as
in modern GUIs different controls use different fonts (and colours)

View File

@@ -181,7 +181,6 @@ class wxPyListCtrl;
class wxPyControl;
class wxPyPrintout;
class wxGenericDragImage;
class wxPyTaskBarIcon;
#ifdef __WXMAC__

View File

@@ -1,6 +1,6 @@
#----------------------------------------------------------------------
# A very simple wxPython example. Just a wx.Frame, wx.Panel,
# wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic
# A very simple wxPython example. Just a wxFrame, wxPanel,
# wxStaticText, wxButton, and a wxBoxSizer, but it shows the basic
# structure of any wxPython application.
#----------------------------------------------------------------------
@@ -76,7 +76,7 @@ class MyApp(wx.App):
frame = MyFrame(None, "Simple wxPython App")
self.SetTopWindow(frame)
print "Print statements go to this stdout window by default."
print "This is where print statements go."
frame.Show(True)
return True

View File

@@ -65,20 +65,6 @@ RELEASE_NUMBER = RELEASE_VERSION # for compatibility
CLEANUP.append('wx/__version__.py')
#----------------------------------------------------------------------
# patch distutils if it can't cope with the "classifiers" or
# "download_url" keywords
#----------------------------------------------------------------------
if sys.version < '2.2.3':
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None
depends = {}
else:
depends = {'depends' : depends}
#----------------------------------------------------------------------
# Define the CORE extension module
#----------------------------------------------------------------------
@@ -149,7 +135,7 @@ ext = Extension('_core_', ['src/helpers.cpp',
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -186,7 +172,7 @@ ext = Extension('_gdi_', ['src/drawlist.cpp'] + swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -222,7 +208,7 @@ ext = Extension('_windows_', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -264,7 +250,7 @@ ext = Extension('_controls_', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -302,7 +288,7 @@ ext = Extension('_misc_', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -321,7 +307,7 @@ ext = Extension('_calendar', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -335,7 +321,7 @@ ext = Extension('_grid', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -350,22 +336,7 @@ ext = Extension('_html', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
)
wxpExtensions.append(ext)
swig_sources = run_swig(['webkit.i'], 'src', GENDIR, PKGDIR,
USE_SWIG, swig_force, swig_args, swig_deps)
ext = Extension('_webkit', swig_sources,
include_dirs = includes,
define_macros = defines,
library_dirs = libdirs,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -380,7 +351,7 @@ ext = Extension('_wizard', swig_sources,
libraries = libs,
extra_compile_args = cflags,
extra_link_args = lflags,
**depends
depends = depends
)
wxpExtensions.append(ext)
@@ -656,6 +627,16 @@ if BUILD_DLLWIDGET:
#----------------------------------------------------------------------
# patch distutils if it can't cope with the "classifiers" or
# "download_url" keywords
#----------------------------------------------------------------------
if sys.version < '2.2.3':
from distutils.dist import DistributionMetadata
DistributionMetadata.classifiers = None
DistributionMetadata.download_url = None
#----------------------------------------------------------------------
# Tools, scripts data files, etc.

View File

@@ -124,7 +124,7 @@ optionally, client data associated with them.
class wxItemContainer
{
public:
// wxItemContainer() ** It's an ABC
// wxItemContainer() { m_clientDataItemsType = wxClientData_None; } ** It's an ABC
%extend {

View File

@@ -866,7 +866,7 @@ the item.", "");
"""
A convenience method for Show(item, False, recursive).
"""
return self.Show(item, False, recursive)
return self.Show(item, false, recursive)
}

View File

@@ -1,15 +0,0 @@
// A bunch of %rename directives generated by BuildRenamers in config.py
// in order to remove the wx prefix from all global scope names.
#ifndef BUILDING_RENAMERS
%rename(WebKitCtrl) wxWebKitCtrl;
%rename(WEBKIT_STATE_START) wxWEBKIT_STATE_START;
%rename(WEBKIT_STATE_NEGOTIATING) wxWEBKIT_STATE_NEGOTIATING;
%rename(WEBKIT_STATE_REDIRECTING) wxWEBKIT_STATE_REDIRECTING;
%rename(WEBKIT_STATE_TRANSFERRING) wxWEBKIT_STATE_TRANSFERRING;
%rename(WEBKIT_STATE_STOP) wxWEBKIT_STATE_STOP;
%rename(WEBKIT_STATE_FAILED) wxWEBKIT_STATE_FAILED;
%rename(WebKitStateChangedEvent) wxWebKitStateChangedEvent;
#endif

View File

@@ -1,4 +0,0 @@
# Other names that need to be reverse-renamed for the old namespace
EVT*

View File

@@ -1883,8 +1883,8 @@ value as used by the parent. In addition, if the window overrides
ShouldInheritColours to return false, the colours will not be changed
no matter what and only the font might.
This rather complicated logic is necessary in order to accommodate the
different usage scenarios. The most common one is when all default
This rather complicated logic is necessary in order to accomodate the
different usage scenarius. The most common one is when all default
attributes are used and in this case, nothing should be inherited as
in modern GUIs different controls use different fonts (and colours)
than their siblings so they can't inherit the same value from the

View File

@@ -793,20 +793,17 @@ public:
}
DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText);
DEC_PYCALLBACK_INT_LONG(OnGetItemImage);
DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr);
// use the virtual version to avoid a confusing assert in the base class
DEC_PYCALLBACK_INT_LONG_virtual(OnGetItemImage);
PYPRIVATE;
};
IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl);
IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText);
IMP_PYCALLBACK_INT_LONG(wxPyListCtrl, wxListCtrl, OnGetItemImage);
IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr);
IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage);
wxListItem *wxPyListCtrl_GetColumn(wxPyListCtrl *self,int col){
wxListItem item;

Some files were not shown because too many files have changed in this diff Show More