-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLow-Fuel_macos.spec
112 lines (103 loc) · 3.21 KB
/
Low-Fuel_macos.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- mode: python ; coding: utf-8 -*-
#from kivy.tools.packaging.pyinstaller_hooks import get_deps_all, hookspath, runtime_hooks, get_deps_minimal
from PyInstaller.utils.hooks import collect_data_files
import sys
datas = [('image/Logo_Bit-Scripts.png', 'image')]
datas += collect_data_files('kivy_garden')
block_cipher = None
version_python = f'{sys.version[0]}.{sys.version_info[1]}'
if version_python == '3.10':
kivy_garden = '/opt/homebrew/lib/python3.10/site-packages/kivy_garden/mapview'
pathex=['/opt/homebrew/lib/python3.10/site-packages/']
target_arch='arm64'
else :
if version_python == '3.9':
kivy_garden = '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_garden/mapview'
pathex=['/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/']
target_arch='x86_64'
name=f'Low-Fuel_{target_arch}.app'
datas = [
('image/Logo_Bit-Scripts.gif', 'image'),
('%s/icons/cluster.png' % kivy_garden,'kivy_garden/mapview/icons'),
('%s/icons/marker.png' % kivy_garden,'kivy_garden/mapview/icons')
]
datas += collect_data_files('kivy_garden', 'mapview')
a = Analysis(
[
'main.py',
'domain/data.py',
'domain/logic.py',
'domain/user.py',
'my_kivy/color_kivy.py',
'my_kivy/logic_uix.py',
'my_kivy/metier.py',
'my_kivy/my_widgets.py',
'my_kivy/ui_object.py',
'my_kivy/logic_uix.py',
'parsedata/parse_json.py',
],
pathex=pathex,
binaries=[],
datas=datas,
hiddenimports=['kivy_garden', 'mapview'],
hookspath=[],#hookspath(),
hooksconfig={},
runtime_hooks=[],#runtime_hooks(),
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
#**get_deps_all(),
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name='lowfuel',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
disable_windowed_traceback=True,
argv_emulation=False,
target_arch=target_arch,
codesign_identity=None,
entitlements_file=None,
icon=['image/petrol_pump.icns'],
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='lowfuel',
)
app = BUNDLE(
coll,
name=name,
icon='image/petrol_pump.icns',
bundle_identifier='com.lowfuel.bitscripts',
info_plist={
'NSPrincipalClass': 'NSApplication',
'NSAppleScriptEnabled': False,
'Privacy - Documents Folder Usage Description': "This application requests access to the user's Documents folder.",
'NSDocumentsFolderUsageDescription': "This application requests access to the user's Documents folder.",
'Application is background only': False,
'AllowCacheDelete': True,
'AllowPersonalCaching': True,
'CFBundleDocumentTypes': [
{
'CFBundleTypeIconFile': 'petrol_pump.icns',
'LSItemContentTypes': ['com.lowfuel.bitscripts'],
'LSHandlerRank': 'Owner'
}
]
},
)