From 5ac62d7d4e3fad2136c96d71ef3002aa4648e9db Mon Sep 17 00:00:00 2001 From: Pratyush Kumar Date: Thu, 30 Nov 2023 08:27:13 +0530 Subject: [PATCH] updated installer --- setup.py | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f067017..9a90a1b 100644 --- a/setup.py +++ b/setup.py @@ -8,19 +8,48 @@ import cx_Freeze +base = None +if cx_Freeze.sys.platform == "win32": + base = "Win32GUI" + executables = [ cx_Freeze.Executable( - script="main.py", icon="icon.ico", target_name="The Eighth Run" + script="main.py", icon="icon.ico", target_name="The Eighth Run", base=base ), ] +build_exe_options = {"packages": ["pygame"], "include_files": ["assets"]} + bdist_dmg_options = {"applications_shortcut": True, "volume_label": "The Eighth Run"} +shortcut_table = [ + ( + "DesktopShortcut", + "DesktopFolder", + "The Eighth Run", + "TARGETDIR", + "[TARGETDIR]The Eighth Run.exe", + None, + None, + None, + None, + None, + None, + "TARGETDIR", + ) +] +msi_data = {"Shortcut": shortcut_table} +bdist_msi_options = {"data": msi_data} + cx_Freeze.setup( name="The Eighth Run", version="1.0", description="A game made for the GitHub Game Off 2023", author="Pratyush Kumar", - options={"build_exe": {"packages": ["pygame"], "include_files": ["assets"]}}, + options={ + "build_exe": build_exe_options, + "bdist_dmg": bdist_dmg_options, + "bdist_msi": bdist_msi_options, + }, executables=executables, )