1
0
Fork 0
mirror of synced 2024-05-19 12:02:54 +12:00

Update version and freeze.py

This commit is contained in:
Dummerle 2021-09-02 23:38:11 +02:00
parent 718bfa0278
commit 9733a61f41
2 changed files with 73 additions and 28 deletions

View file

@ -1,37 +1,82 @@
import sys
from cx_Freeze import setup, Executable
from rare import __version__
# Dependencies are automatically detected, but it might need fine tuning.
# "packages": ["os"] is used as example only
requirements = [
"requests",
"PIL",
"setuptools",
"wheel",
# Packages to include
python_packages = [
"PyQt5",
"qtawesome",
"psutil",
"pypresence",
'requests',
'PIL',
'qtawesome',
'psutil',
'pypresence',
'win32com'
]
bdist_msi_options = {
'add_to_path': False,
'initial_target_dir': r'[ProgramFilesFolder]\%s' % "Rare",
}
build_exe_options = {"includes": requirements, "excludes": ["tkinter", "setuptools"]}
# Modules to include
python_modules = []
base = "Win32GUI"
base = None
name = None
build_options = {}
build_exe_options = {}
shortcutName = None
shortcutDir = None
bdist_msi_options = None
src_files = []
external_so_files = []
setup(
name="Rare",
version=__version__,
description="A GUI for Legendary",
options={"build_exe": build_exe_options},
shortcutName="Rare",
shortcutDir="DesktopFolder",
executables=[Executable("rare/Rare.py", # no __main__.py, for gh release
base=base, icon="rare/resources/images/Rare.ico")]
)
if sys.platform == 'win32':
base = 'Win32GUI'
name = 'Rare.exe'
shortcut_table = [
('DesktopShortcut', # Shortcut
'DesktopFolder', # Directory
'Rare', # Name
'TARGETDIR', # Component
'[TARGETDIR]' + name, # Target
None, # Arguments
'A gui for Legendary.', # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # Working Directory
)]
msi_data = {"Shortcut": shortcut_table}
bdist_msi_options = {'data': msi_data, "all_users": False}
build_options["bdist_msi"] = bdist_msi_options
else:
name = 'Rare'
src_files += [
'LICENSE',
'README.md',
'rare/resources/images/Rare.ico',
]
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options["packages"] = python_packages
build_exe_options["include_files"] = src_files + external_so_files
build_exe_options["includes"] = python_modules
build_exe_options["excludes"] = ["setuptools", "tkinter", "pkg_resources"]
# Set options
build_options["build_exe"] = build_exe_options
setup(name='Rare',
version=__version__,
description='A gui for Legendary.',
options=build_options,
executables=[
Executable('rare/Rare.py',
targetName=name,
icon='rare/resources/images/Rare.ico',
base=base,
shortcutName=shortcutName,
shortcutDir=shortcutDir,
),
],
)

View file

@ -1,6 +1,6 @@
import os
__version__ = "1.6.0"
__version__ = "1.6.2"
resources_path = os.path.join(os.path.dirname(__file__), "resources")
languages_path = os.path.join(os.path.dirname(__file__), "languages")