From: Roger B. <ro...@ro...> - 2003-12-09 07:02:22
|
>> resourcedirectory=os.path.abspath(os.path.join(sys.path[0]), >> 'resources')) I have committed that change into BitPim 0.7 (HEAD) as well as the 0.6 branch. I did confirm it also works on Windows and Linux. > I made the changes outlined above in guihelper.py and bpaudio.py, the > only places I found them. bpaudio was duplicating guihelper so I redirected the call. It wouldn't have actually made any difference in the real world as bpaudio depends on a Windows binary from Qualcomm (who won't make it available on other platforms or as source). > Also, here is the macbuild.py script I used (stealing enough from > distbuild.py to make it work): I like to integrate it into makedist.py as that already deals with the platform issues. > myapp.includePackages.append("sha") What does that do? It should automatically pick up the usage of the sha module. > for file in glob.glob(os.path.join(packageroot, 'com_*.py')): > myapp.resources.append(file) Why do those end up as resources? Wouldn't they be part of includePackages? > myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.dylib") > myapp.libs.append("/usr/local/lib/libwx_mac-2.4.0.rsrc") > myapp.libs.append("/usr/local/lib/libwx_mac_gl-2.4.0.dylib") Is there anyway to automate finding those libraries? Also how do you direct where output goes. For Linux and Windows, your cwd needs to be the top of the bitpim tree and you run makedist.py. The output goes to a directory named dist. I would prefer to do the same thing for the Mac. > There is, undoubtedly, a cleaner way, and this could likely be > integrated into distbuild.py. I'd be quite happy to put in something nasty, and then work on cleaning it up. > I'm sure that > makes perfect sense to someone used to tuples. :^) You will be assimilated :-) I would also appreciate a directory listing of the results. > The downside is that since this bundles the libwx_mac_* and wxPython > shared libraries as well as the bitpim stuff, it weights in at just > over 16MB. But it *IS* a drag-n-drop install application. I very much like your last statement. BTW does it include the Python interpretter as well? Below is what it looks like on Windows and Linux. Windows: Note that Windows also includes a seperate binary for audio format conversion which is 1.3MB. 5,343,710 bitpim-0.7-test1-setup.exe 09/09/2003 03:18 PM 437 bitpim.css 12/08/2003 10:16 PM 908,469 bitpim.exe 08/20/2003 01:26 PM 655 bitpim.exe.manifest 10/01/2003 12:40 PM 61,440 calendarc.pyd 10/02/2003 08:03 PM 45,116 datetime.pyd 10/01/2003 12:40 PM 286,720 gizmosc.pyd 10/01/2003 12:40 PM 299,008 gridc.pyd 10/01/2003 12:40 PM 36,864 helpc.pyd 10/01/2003 12:40 PM 196,608 htmlc.pyd 10/02/2003 08:03 PM 45,114 parser.pyd 10/02/2003 08:02 PM 974,908 python23.dll 09/02/2003 11:01 AM 86,084 PyWinTypes23.dll 12/08/2003 10:16 PM <DIR> resources 10/02/2003 08:04 PM 20,538 select.pyd 09/02/2003 11:01 AM 61,497 win32api.pyd 09/02/2003 11:01 AM 28,731 win32event.pyd 09/02/2003 11:01 AM 73,786 win32file.pyd 10/01/2003 12:40 PM 2,240,512 wxc.pyd 10/01/2003 10:43 AM 3,239,936 wxmsw24h.dll 10/02/2003 08:04 PM 61,496 zlib.pyd 12/08/2003 09:03 PM 137,934 _libusb.dll 10/02/2003 08:02 PM 49,211 _socket.pyd 10/02/2003 08:03 PM 57,400 _sre.pyd 10/02/2003 08:03 PM 495,616 _ssl.pyd 10/02/2003 08:04 PM 36,864 _winreg.pyd The actual .py source files are compiled to .pyo, stuck in a zip and placed in bitpim.exe which invokes the interpretter. Expanded, the main directory adds up to 9.4MB with resources adding another 2MB. Linux: 5,066,014 bitpim-0.7_test1-0.i386.rpm -r-xr-xr-x 1 root root 57186 Feb 24 2003 binascii.so -rw-r--r-- 1 root root 432 Dec 8 22:35 bitpim.css -rwxr-xr-x 1 root root 4790871 Dec 8 22:35 bp -r-xr-xr-x 1 root root 57901 Feb 24 2003 cStringIO.so -r-xr-xr-x 1 root root 48588 Feb 24 2003 fcntlmodule.so -rwxr-xr-x 1 root root 21468 Feb 24 2003 _hotshot.so -rwxr-xr-x 1 root root 6038316 Dec 8 22:36 libwx_gtkd-2.4.so -r-xr-xr-x 1 root root 58568 Feb 24 2003 _localemodule.so -r-xr-xr-x 1 root root 51701 Feb 24 2003 mathmodule.so -rwxr-xr-x 1 root root 872408 Dec 8 20:39 native.usb._libusb.so -r-xr-xr-x 1 root root 55633 Feb 24 2003 operator.so -r-xr-xr-x 1 root root 95610 Feb 24 2003 parsermodule.so -rwxr-xr-x 1 root root 39664 Feb 24 2003 pcre.so -r-xr-xr-x 1 root root 40272 Feb 24 2003 pwdmodule.so -r-xr-xr-x 1 root root 64366 Feb 24 2003 readline.so drwxr-xr-x 2 root root 4096 Dec 8 22:42 resources -r-xr-xr-x 1 root root 51305 Feb 24 2003 selectmodule.so -r-xr-xr-x 1 root root 48847 Feb 24 2003 shamodule.so -r-xr-xr-x 1 root root 156636 Feb 24 2003 _socketmodule.so -rwxr-xr-x 1 root root 22344 Feb 24 2003 strop.so -r-xr-xr-x 1 root root 68162 Feb 24 2003 structmodule.so -r-xr-xr-x 1 root root 52464 Feb 24 2003 termios.so -r-xr-xr-x 1 root root 54559 Feb 24 2003 timemodule.so -r-xr-xr-x 1 root root 40105 Feb 24 2003 _weakref.so -rwxr-xr-x 1 root root 49484 Dec 8 22:36 wxPython.calendarc.so -rwxr-xr-x 1 root root 396488 Dec 8 22:36 wxPython.gizmosc.so -rwxr-xr-x 1 root root 308272 Dec 8 22:36 wxPython.gridc.so -rwxr-xr-x 1 root root 25468 Dec 8 22:36 wxPython.helpc.so -rwxr-xr-x 1 root root 198808 Dec 8 22:36 wxPython.htmlc.so -rwxr-xr-x 1 root root 2367852 Dec 8 22:36 wxPython.wxc.so -r-xr-xr-x 1 root root 57454 Feb 24 2003 zlibmodule.so The is what gets installed. Total size including the resources subdirectory is 16.4MB. The 'bp' executable contains the Python interpretter with the .py files compiled to .pyo and stuck on the end. Roger |