[+] Window support

This commit is contained in:
Maxim Khomutov 2025-04-01 15:18:01 +03:00
parent 6b9094abf5
commit b33b067e75
3 changed files with 8 additions and 1 deletions

View File

@ -16,6 +16,9 @@ def get_pyinstaller_cmd():
splash_str = ""
uac_admin = ""
dwt = ""
windows_mode = "--console"
if windowed:
windows_mode = "--windowed"
add_data = [f'--add-data {path_fix + d}' for d in data]
if splash:
splash_str = f' --splash {path_fix + splash} '
@ -26,7 +29,7 @@ def get_pyinstaller_cmd():
if admin:
uac_admin = " --uac-admin "
pyinstaller_cmd = \
(f'pyinstaller --noconfirm --onedir --console --clean '
(f'pyinstaller --noconfirm --onedir {windows_mode} --clean '
f'--icon {path_fix + icon} --version-file {path_fix + metadata_path_txt}'
f'{splash_str}{add_data}{dwt}{uac_admin}'
f'--workpath {workpath} --distpath {distpath} --specpath {specpath} '

View File

@ -18,6 +18,8 @@ icon = "" # Читается из metadata
splash = "" # Читается из metadata
data = []
windowed = False
path_fix = os.path.abspath(os.path.dirname(__file__)) + "/../../"
contents_directory= "."

View File

@ -16,6 +16,8 @@ if "ctk" in build_args:
config.data.append("./.venv/Lib/site-packages/customtkinter;customtkinter/") # Папка с библиотекой customtkinter
if "res" in build_args:
config.data.append("./src/resources;resources/") # Папка с ресурсами для UI и т.д.
if "w" in build_args:
config.windowed = True
if __name__ == '__main__':
if mode == "build":