[!] Fix windowed mode

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

View File

@ -17,8 +17,8 @@ def get_pyinstaller_cmd():
uac_admin = ""
dwt = ""
windows_mode = "--console"
if windowed:
windows_mode = "--windowed"
if windowed[0]:
windows_mode = "-w"
add_data = [f'--add-data {path_fix + d}' for d in data]
if splash:
splash_str = f' --splash {path_fix + splash} '

View File

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

View File

@ -1,8 +1,6 @@
import sys
from dist_scripts import config
from dist_scripts import build
from dist_scripts import patchers
mode = "build"
build_args = ""
@ -17,7 +15,10 @@ if "ctk" in build_args:
if "res" in build_args:
config.data.append("./src/resources;resources/") # Папка с ресурсами для UI и т.д.
if "w" in build_args:
config.windowed = True
config.windowed[0] = True
from dist_scripts import build
from dist_scripts import patchers
if __name__ == '__main__':
if mode == "build":