From 55f3fe9d479a99337d4181f1812fc52ed339cb84 Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Mon, 16 Aug 2004 15:11:18 +0000
Subject: [PATCH] Add BundleBuilder script

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 wxPython/samples/doodle/buildapp.py | 33 +++++++++++++++++++++++++++++
 wxPython/samples/doodle/doodle.py   |  2 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 wxPython/samples/doodle/buildapp.py

diff --git a/wxPython/samples/doodle/buildapp.py b/wxPython/samples/doodle/buildapp.py
new file mode 100644
index 0000000000..b25012bef0
--- /dev/null
+++ b/wxPython/samples/doodle/buildapp.py
@@ -0,0 +1,33 @@
+# This will build an Application Bundle of the superdoodle sample
+# application for OSX.  Run like this:
+#
+#       pythonw buildapp.py build
+#
+
+import os, glob
+from bundlebuilder import buildapp
+
+
+# See below.  Set to wherever your wxMac dynlibs are installed.
+# (Probably /usr/local/wxPython-2.5.2.?/lib)
+wxLibs = "/opt/wx/2.5/lib/libwx*2.5.2.[dr]*"
+
+
+buildapp(
+    name = "SuperDoodle",
+    mainprogram = "superdoodle.py",
+
+    # This tells bundlebuilder to include Python and everything else
+    # that it needs to run the app
+    standalone = 1,
+
+    # Bunndlebuilder isn't yet able to find the shared libs that may be
+    # needed by extension modules, so we have to help it out.
+    libs = glob.glob(wxLibs),
+
+    # Some modules will not be found automatically, so we ned to help
+    includeModules = ["cStringIO"],
+    
+    verbosity = 1
+    )
+
diff --git a/wxPython/samples/doodle/doodle.py b/wxPython/samples/doodle/doodle.py
index 5c4c641fae..47e01d9e6d 100644
--- a/wxPython/samples/doodle/doodle.py
+++ b/wxPython/samples/doodle/doodle.py
@@ -71,7 +71,7 @@ class DoodleWindow(wx.Window):
     def InitBuffer(self):
         """Initialize the bitmap used for buffering the display."""
         size = self.GetClientSize()
-        self.buffer = wx.EmptyBitmap(size.width, size.height)
+        self.buffer = wx.EmptyBitmap(max(1,size.width), max(1,size.height))
         dc = wx.BufferedDC(None, self.buffer)
         dc.SetBackground(wx.Brush(self.GetBackgroundColour()))
         dc.Clear()
-- 
2.45.2