Skip to content

Commit

Permalink
[DevTools] Fix make.py build in win32
Browse files Browse the repository at this point in the history
  • Loading branch information
melianmiko committed Oct 9, 2024
1 parent 5b6713e commit b1d5727
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
DO_BUILD = "build" in TASK

# Ensure environment
if sys.platform == "win32" and TASK != "build":
if sys.platform == "win32" and DO_INSTALL:
print("-- Can't install under Windows, use pyinstaller")
raise SystemExit(1)
if os.environ.get("VIRTUAL_ENV", None) is not None:
Expand All @@ -69,7 +69,7 @@
PYTHON_LIBS_DIR.mkdir(exist_ok=True, parents=True)
break

if PYTHON_LIBS_DIR is None:
if PYTHON_LIBS_DIR is None and sys.platform != "win32":
print("-- Error: Can't find python packages location, provide them manually")
raise SystemExit(1)

Expand All @@ -82,7 +82,7 @@
# Compile Qt Designer layouts
print("Compile Qt Designer files")
DESIGNER_DIR = PROJECT_ROOT / "openfreebuds_qt" / "designer"
result = subprocess.run(["env", "poetry", "run", "pyuic6", DESIGNER_DIR])
result = subprocess.run(["poetry", "run", "pyuic6", DESIGNER_DIR])
if result.returncode != 0:
print("Failed, old pyuic? Will try single file mode...")
for ui_file in DESIGNER_DIR.iterdir():
Expand All @@ -99,7 +99,7 @@
# Compile Qt translations
L_RELEASE_EXEC = None
for option in QT_L_RELEASE_PATH_OPTIONS:
if Path(option).exists():
if shutil.which(option) is not None:
L_RELEASE_EXEC = option
break

Expand Down

0 comments on commit b1d5727

Please sign in to comment.