Actualizar picobuildWindows.py
This commit is contained in:
parent
86e9dc2451
commit
6eb816c4d3
@ -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()
|
Loading…
Reference in New Issue
Block a user