简体   繁体   中英

.app bundle, using pyinstaller, doesn't run on other Mac

I'm having some trouble getting an .app bundle, made with pyinstaller, to run on another person's Mac.

Both computers running macOS 10.13.2 and Python 3.6.

On my Mac is runs just as it does when I run the .py file.

On the other person's Mac, the icon pops up in his tray for a few moments and bounces once or twice and then disappears. It never appears in the force quit window when that is kept open while trying to open the app.

Here is the spec file:

# -*- mode: python -*-

block_cipher = None


a = Analysis(['Shadowmaster.py'],
             pathex=['/Users/jacob/Dropbox/Games/Shadowrun/Python/Shadowmaster'],
             binaries=[],
             datas=[],
             hiddenimports=['sys', 'webbrowser', 'random', 'decimal', 'collections', 'tkinter', 'tracback'],
             hookspath=[],
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='Shadowmaster',
          debug=False,
          strip=False,
          upx=True,
          console=False , icon='icon.icns')
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='Shadowmaster')
app = BUNDLE(coll,
             name='Shadowmaster.app',
             icon='icon.icns',
             bundle_identifier=None,
             info_plist={'CFBundleDisplayName': 'Shadowmaster',
                         'CFBundleName': 'Shadowmaster',
                         'CFBundleIdentifier': 'Shadowmaster',
                         'CFBundleExecutable': 'MacOS/Shadowmaster',
                         'CFBundleIconFile': 'icon.icns',
                         'CFBundleInfoDictionaryVersion': '6.0',
                         'CFBundlePackageType': 'APPL',
                         'CFBundleShortVersionString': '0.0.6',
                         'LSBackgroundOnly': '0',
                         'NSHighResolutionCapable': 'True'})

The program is thousands of lines, but here are the imports, which I suspect could be the reason:

import sys
from webbrowser import open_new as open_browser
from random import SystemRandom
from time import sleep
import decimal
from collections import OrderedDict
import tkinter as tk
import tkinter.ttk as ttk
import traceback
import tkinter.messagebox

Any suggestions?

原来需要安装ActiveTCL 8.5的其他人。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM