How to force py2app to run app in 32-bit mode

后端 未结 5 1200
我在风中等你
我在风中等你 2021-01-06 10:24

I am trying to build an app bundle with py2app on Mac OS X 10.6. The app uses some libraries which are only compiled for 32-bit, so when the app is run there is an ImportErr

5条回答
  •  太阳男子
    2021-01-06 10:29

    If you want to run only in 32 bit mode, then you don't need the 64 bit architecture. So you can just strip out all the non-i386 architectures from your resulting application bundle using the ditto utility.

    Example:

    ditto --rsrc --arch i386 YourApplication.app YourApplicationStripped.app
    

    Your application bundle will be smaller and will run as a 32 bit application for sure, even on 64 bit Intel systems.

    Manual: http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ditto.1.html

    Or just run in a terminal: man ditto

提交回复
热议问题