cx_Freeze 6.5から、Macアプリ内のInfo.plistに属性を追加できるようになりました!
https://cx-freeze.readthedocs.io/en/latest/releasenotes.html#version-6-5-january-2021
・Implemented a “plist_items” option on bdist_mac command (PR #827)
Ritenaディスプレイ対応属性の追加、またはダークモードに対応しないようになど設定したい時は、楽です。
以前だと、大体下記の2つの方法:
・bdist_mac完了後手動でInfo.plistを弄る
・事前にInfo.plistを用意して、'bdist_mac'に{'custom_info_plist': 'path/of/Info.plist'}追加
v6.5からの書き方:
bdist_mac_options = {
# A list of key-value pairs (type: List[Tuple[str,str]])
"plist_items": [("NSHighResolutionCapable", True), # retina対応
("NSRequiresAquaSystemAppearance", True)] # ダークモード非対応
}
setup(name="app_name",
version="version",
description="description",
author="author",
options={"build_exe": {'includes': [],
'excludes': [],
'packages': [],
'include_files': []},
'bdist_mac': bdist_mac_options},
executables=["target setting"])