diff --git a/build.py b/build.py deleted file mode 100644 index 8bce8ab..0000000 --- a/build.py +++ /dev/null @@ -1,66 +0,0 @@ -import subprocess as SP -from glob import glob -import os -import shutil -import pkg_resources as pkg -from contextlib import contextmanager - -@contextmanager -def in_dir(name,remove=False): - pwd=os.getcwd() - if os.path.isdir(name): - shutil.rmtree(name) - os.makedirs(name) - os.chdir(name) - yield - os.chdir(pwd) - if remove: - shutil.rmtree(name) - -SP.check_call(["pip", "install", "PyQt5"]) - -ui_path = os.path.dirname(os.path.abspath(__file__)) -for root, folders, files in os.walk(ui_path): - for file in files: - file = os.path.join(root, file) - outfile, ext = os.path.splitext(file) - if ext == ".ui": - outfile = outfile + ".py" - print(os.path.basename(file), "->", os.path.basename(outfile)) - SP.check_call(["pyuic5", "--from-imports", "-o", outfile, file]) - -SP.check_call(["pip", "install", ".[dev]"]) -main_py=os.path.abspath("ed_lrr_gui\__main__.py") -with in_dir("exe"): - with in_dir("pyinstaller"): - SP.check_call( - [ - "pyinstaller", - "--clean", - "--noupx", - "-c", - '--key="ED_LRR_GUI"', - "--name", - "ED_LRR", - main_py, - ] - ) - with in_dir("nuitka"): - SP.check_call( - [ - "python", - "-m", - "nuitka", - "--plugin-enable=multiprocessing", - "--plugin-enable=qt-plugins", - "--standalone", - "--follow-imports", - main_py, - ] - ) - - -# with in_dir("installer"): -# shutil.rmtree("Output") -# SP.check_call(["iscc", "/QP", "ED_LRR.iss"]) - diff --git a/build_gui.py b/build_gui.py index 6327ad2..82a1d86 100644 --- a/build_gui.py +++ b/build_gui.py @@ -10,4 +10,5 @@ for root, folders, files in os.walk(ui_path): outfile, ext = os.path.splitext(file) if ext == ".ui": outfile = outfile + ".py" + print(file,"->",outfile) SP.check_call(["pyuic5", "--from-imports", "-o", outfile, file])