Discussion:
[Bitpim-devel] guihelper.py in two places? (and py2app)
Steven Palm
2004-10-07 03:21:54 UTC
Permalink
Hi Roger,

I'm sure there is a good reason for having a guihelper.py in the main
bitpim tree and also in the bitfling module... But there are a LOT of
common bits in them, couldn't they somehow be made to be one? :-)

I'm switching the Macintosh builds over to use "py2app", a new build
system from Bob Ippolito. It is the new up-and-coming replacement for
the old crufty bundlebuilder routines.

Right now, it leaves sys.path[0] in a different state than it used to
be. Bob said this will likely be fixed, but for now I have to do a
slight change in guihelper.py for the Mac:

if IsMac():
p=os.getcwd()
else:
p=sys.path[0]

I just realized that it had to be done separately for bitpim and for
bitfling, which is why I asked the first question.

The downside to using py2app is that it bloats the size of the
executable up considerably from what bundlebuilder had created. This is
partially because the app is now truly standalone, requiring no Python
install on the user's machine (at least that's the claim) to bootstrap
itself. So the old disk image was about 9MB and the new is 13MB, but I
think it's a better solution, and in the long run bundlebuilder will
die and py2app will be "it".
Roger Binns
2004-10-07 05:44:38 UTC
Permalink
Post by Steven Palm
I'm sure there is a good reason for having a guihelper.py in the main
bitpim tree and also in the bitfling module... But there are a LOT of
common bits in them, couldn't they somehow be made to be one? :-)
There *was* a good reason, but not any more. I originally intended
for BitFling to be a totally separate program. If you look in the
CVS attic you can even see that it had its own resources directory
with its own help etc.

I soon found that I needed copies of various files from the main
program starting with guihelper but continuing on from there
(eg common for formatting exceptions). Eventually I realised my
folly and integrated it back into BitPim.

Feel free to hack the duplicate guihelper out if you also fix
any code issues :-)
Post by Steven Palm
The downside to using py2app is that it bloats the size of the
executable up considerably from what bundlebuilder had created.
The uncompressed sizes are quite interesting as well. Windows
comes in at 30MB, although that includes 1.3MB of CHM help that
isn't included on other platforms. Linux is only 23MB. The
installers are 6.8MB and 7.5MB respectively. (That size difference
is because the Windows installer uses the LZMA/7zip compression
engine and Linux uses gzip).

Roger

Loading...