Add initial build files
This commit is contained in:
parent
be994d9ccf
commit
89afb3ac9d
6 changed files with 59 additions and 0 deletions
44
buildPy2App.py
Normal file
44
buildPy2App.py
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
from setuptools import setup
|
||||
from glob import glob
|
||||
from datetime import datetime
|
||||
|
||||
module_name = "project"
|
||||
name = "Project"
|
||||
version = ""
|
||||
main_file = "main.py"
|
||||
|
||||
# Overrides the above
|
||||
exec(open("info.py").read())
|
||||
|
||||
|
||||
APP = [f'{module_name}/{main_file}']
|
||||
DATA_FILES = [
|
||||
('resources', glob(module_name + '/resources/*.png') + glob(module_name + '/resources/*.rtf') + glob(module_name + '/resources/*.txt')),
|
||||
]
|
||||
OPTIONS = {
|
||||
'iconfile': module_name + '/resources/icon.icns',
|
||||
'extra_scripts': 'info.py',
|
||||
'includes': {'PySide6.QtCore', 'PySide6.QtUiTools', 'PySide6.QtGui', 'PySide6.QtWidgets', 'certifi', 'cffi', 'pem'},
|
||||
'excludes': {'tkinter'},
|
||||
'qt_plugins': [
|
||||
'platforms/libqcocoa.dylib',
|
||||
'platforms/libqminimal.dylib',
|
||||
'platforms/libqoffscreen.dylib',
|
||||
'styles/libqmacstyle.dylib'
|
||||
],
|
||||
'plist': {
|
||||
'CFBundleName': name,
|
||||
'CFBundleShortVersionString': version,
|
||||
'CFBundleIdentifier': f'pl.{module_name}.{name}',
|
||||
'LSMinimumSystemVersion': '10.12.0',
|
||||
'NSHumanReadableCopyright': f'Copyright © {datetime.now().year} {name} All Rights Reserved',
|
||||
}
|
||||
}
|
||||
|
||||
setup(
|
||||
app=APP,
|
||||
name=name,
|
||||
data_files=DATA_FILES,
|
||||
options={'py2app': OPTIONS},
|
||||
setup_requires=['py2app'],
|
||||
)
|
||||
3
info.cfg
Normal file
3
info.cfg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version="0.1.0"
|
||||
name="Project"
|
||||
module_name="project"
|
||||
6
info.py
Normal file
6
info.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
version="0.1.0"
|
||||
name="Project"
|
||||
module_name="project"
|
||||
company_name="Project Company"
|
||||
bundle_identifier="com.projectcompany.project.Project"
|
||||
main_file="main.py"
|
||||
5
project/__init__.py
Normal file
5
project/__init__.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from .. import info
|
||||
|
||||
version = info.version
|
||||
name = info.name
|
||||
module_name = info.module_name
|
||||
BIN
project/resources/icon.icns
Normal file
BIN
project/resources/icon.icns
Normal file
Binary file not shown.
1
requirements.txt
Normal file
1
requirements.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
pyside6==6.4.0.1
|
||||
Loading…
Add table
Add a link
Reference in a new issue