76 lines
2.8 KiB
Python
76 lines
2.8 KiB
Python
from cx_Freeze import setup, Executable
|
|
import sys
|
|
|
|
base = None
|
|
if sys.platform == 'win32':
|
|
base = "Win32GUI"
|
|
|
|
shortcut_table = [
|
|
("DesktopShortcut", # Shortcut
|
|
"DesktopFolder", # Directory_
|
|
"Tetri5", # Name
|
|
"TARGETDIR", # Component_
|
|
"[TARGETDIR]main.exe", # Target
|
|
None, # Arguments
|
|
None, # Description
|
|
None, # Hotkey
|
|
None, # Icon
|
|
None, # IconIndex
|
|
None, # ShowCmd
|
|
'TARGETDIR' # WkDir
|
|
)
|
|
]
|
|
|
|
msi_data = {"Shortcut": shortcut_table}
|
|
bdist_msi_options = {'data': msi_data}
|
|
|
|
setup(
|
|
name="Tetri5",
|
|
version="1.0.0",
|
|
description="A full featured tetris game using python's pygame library. https://github.com/gio101046/tetri5",
|
|
options={
|
|
"bdist_msi": bdist_msi_options,
|
|
"build_exe": {
|
|
"packages": [
|
|
"pygame",
|
|
"typing",
|
|
"types",
|
|
"copy",
|
|
"yaml",
|
|
"random",
|
|
"sys",
|
|
"asyncio",
|
|
"websockets",
|
|
"json",
|
|
"queue",
|
|
"uuid",
|
|
"threading",
|
|
"tetri5.entity",
|
|
"tetri5.game",
|
|
"tetri5.modal",
|
|
"tetri5.online",
|
|
"tetri5.scene",
|
|
"tetri5.util"
|
|
],
|
|
"include_files": [
|
|
("config.yaml", "config.yaml"),
|
|
("resource/image/press-start-2p-font.bmp", "resource/image/press-start-2p-font.bmp"),
|
|
("resource/image/tetris_icon.png", "resource/image/tetris_icon.png"),
|
|
("resource/image/title_screen.png", "resource/image/title_screen.png"),
|
|
("resource/sound/four_lines_complete.ogg", "resource/sound/four_lines_complete.ogg"),
|
|
("resource/sound/game_over.ogg", "resource/sound/game_over.ogg"),
|
|
("resource/sound/level_up.ogg", "resource/sound/level_up.ogg"),
|
|
("resource/sound/line_complete.ogg", "resource/sound/line_complete.ogg"),
|
|
("resource/sound/option_change.wav", "resource/sound/option_change.wav"),
|
|
("resource/sound/piece_rotate.ogg", "resource/sound/piece_rotate.ogg"),
|
|
("resource/sound/piece_set.ogg", "resource/sound/piece_set.ogg"),
|
|
("resource/sound/theme_music_multi.ogg", "resource/sound/theme_music_multi.ogg"),
|
|
("resource/sound/theme_music_single.ogg", "resource/sound/theme_music_single.ogg"),
|
|
("resource/sound/you_win.ogg", "resource/sound/you_win.ogg")
|
|
]
|
|
}
|
|
},
|
|
executables=[Executable("main.py", base=base)]
|
|
)
|
|
|