Skip to content

Commit

Permalink
Using py script instead of some shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed Apr 20, 2024
1 parent ee30e73 commit dd09f3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ def zip_folder(folder_path):
PyInstaller.__main__.run(['-F', 'port.py', '--exclude-module=numpy'])

if os.name == 'nt':
if os.path.exists(local + os.sep + "dist" + os.sep + "run.exe"):
shutil.move(local + os.sep + "dist" + os.sep + "run.exe", local)
if os.path.exists(local + os.sep + "dist" + os.sep + "port.exe"):
shutil.move(local + os.sep + "dist" + os.sep + "port.exe", local)
if os.path.exists(local + os.sep + "bin" + os.sep + "Linux"):
shutil.rmtree(local + os.sep + "bin" + os.sep + "Linux")
if os.path.exists(local + os.sep + "bin" + os.sep + "Android"):
shutil.rmtree(local + os.sep + "bin" + os.sep + "Android")
if os.path.exists(local + os.sep + "bin" + os.sep + "Darwin"):
shutil.rmtree(local + os.sep + "bin" + os.sep + "Darwin")
elif os.name == 'posix':
if os.path.exists(local + os.sep + "dist" + os.sep + "run"):
shutil.move(local + os.sep + "dist" + os.sep + "run", local)
if os.path.exists(local + os.sep + "dist" + os.sep + "port"):
shutil.move(local + os.sep + "dist" + os.sep + "port", local)
if os.path.exists(local + os.sep + "bin" + os.sep + "Windows"):
shutil.rmtree(local + os.sep + "bin" + os.sep + "Windows")
for i in os.listdir(local + os.sep + "bin" + os.sep + "Linux"):
Expand Down

0 comments on commit dd09f3a

Please sign in to comment.