[+] Window support
This commit is contained in:
parent
6b9094abf5
commit
b33b067e75
@ -16,6 +16,9 @@ def get_pyinstaller_cmd():
|
|||||||
splash_str = ""
|
splash_str = ""
|
||||||
uac_admin = ""
|
uac_admin = ""
|
||||||
dwt = ""
|
dwt = ""
|
||||||
|
windows_mode = "--console"
|
||||||
|
if windowed:
|
||||||
|
windows_mode = "--windowed"
|
||||||
add_data = [f'--add-data {path_fix + d}' for d in data]
|
add_data = [f'--add-data {path_fix + d}' for d in data]
|
||||||
if splash:
|
if splash:
|
||||||
splash_str = f' --splash {path_fix + splash} '
|
splash_str = f' --splash {path_fix + splash} '
|
||||||
@ -26,7 +29,7 @@ def get_pyinstaller_cmd():
|
|||||||
if admin:
|
if admin:
|
||||||
uac_admin = " --uac-admin "
|
uac_admin = " --uac-admin "
|
||||||
pyinstaller_cmd = \
|
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'--icon {path_fix + icon} --version-file {path_fix + metadata_path_txt}'
|
||||||
f'{splash_str}{add_data}{dwt}{uac_admin}'
|
f'{splash_str}{add_data}{dwt}{uac_admin}'
|
||||||
f'--workpath {workpath} --distpath {distpath} --specpath {specpath} '
|
f'--workpath {workpath} --distpath {distpath} --specpath {specpath} '
|
||||||
|
@ -18,6 +18,8 @@ icon = "" # Читается из metadata
|
|||||||
splash = "" # Читается из metadata
|
splash = "" # Читается из metadata
|
||||||
data = []
|
data = []
|
||||||
|
|
||||||
|
windowed = False
|
||||||
|
|
||||||
path_fix = os.path.abspath(os.path.dirname(__file__)) + "/../../"
|
path_fix = os.path.abspath(os.path.dirname(__file__)) + "/../../"
|
||||||
|
|
||||||
contents_directory= "."
|
contents_directory= "."
|
||||||
|
2
main.py
2
main.py
@ -16,6 +16,8 @@ if "ctk" in build_args:
|
|||||||
config.data.append("./.venv/Lib/site-packages/customtkinter;customtkinter/") # Папка с библиотекой customtkinter
|
config.data.append("./.venv/Lib/site-packages/customtkinter;customtkinter/") # Папка с библиотекой customtkinter
|
||||||
if "res" in build_args:
|
if "res" in build_args:
|
||||||
config.data.append("./src/resources;resources/") # Папка с ресурсами для UI и т.д.
|
config.data.append("./src/resources;resources/") # Папка с ресурсами для UI и т.д.
|
||||||
|
if "w" in build_args:
|
||||||
|
config.windowed = True
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if mode == "build":
|
if mode == "build":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user