From 6eb816c4d37b37d57adc015a6c1b70b93ab4c0f5 Mon Sep 17 00:00:00 2001 From: nix Date: Tue, 31 Dec 2024 13:32:04 +0000 Subject: [PATCH] Actualizar picobuildWindows.py --- picobuildWindows.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/picobuildWindows.py b/picobuildWindows.py index 35c196a..ffbb091 100644 --- a/picobuildWindows.py +++ b/picobuildWindows.py @@ -2,6 +2,7 @@ import os import shutil import requests import zipfile +import subprocess def create_folder(folder_name): if not os.path.exists(folder_name): @@ -94,5 +95,30 @@ def main(): os.rmdir(hsu_dest_path) print(f"Removed folder: {hsu_dest_path}") + +def compile_with_pyinstaller(): + command = [ + "pyinstaller", + "--onefile", + "--add-data", ".:.", + "--console", + "--icon=icon.png", + "--distpath", "build", + "2hsu.py" + ] + subprocess.run(command, check=True) + print("Compilation complete.") + +def rename_progress_folder(): + # Check if the "progress" folder exists + if os.path.exists('progress'): + # Rename it to "picodulce" + os.rename('progress', 'picodulce') + print("Folder 'progress' has been renamed to 'picodulce'.") + else: + print("The 'progress' folder does not exist.") + if __name__ == "__main__": main() + rename_progress_folder() + compile_with_pyinstaller() \ No newline at end of file