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