Files
LCE-Qt-Launcher/hatch_build.py
xgui4 48870ecbbd Refactor instance UI and update version to 0.0.20b7 and worksflow fixes
- Renamed QComboBox in instance.ui to versionsComboBox for clarity.
- Updated fallback version in __init__.py to 0.0.20b7.
- Improved docstrings and comments in app.py and other files for better readability.
- Added path expansion functionality in app_context.py to handle user           python -m pyproject-appimage
preferences.
- Refactored user preference methods in pref.py to use camelCase for consistency.
- Enhanced instance management and downloader logic in instance_manager.py and downloader.py.
- Fixed various formatting issues across multiple files for better code style adherence.
- Updated the lock file to reflect the new version 0.0.20a7.
- Fixed multiples workflows
2026-06-01 15:40:55 -04:00

41 lines
1.3 KiB
Python

import subprocess
import os
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomBuildHook(BuildHookInterface): # pyright: ignore[reportMissingTypeArgument]
def clean(self, versions) -> None: # pyright: ignore[reportMissingParameterType]
if os.name == "posix":
_ = subprocess.run("./scripts/clean.sh", check=True)
if os.name == "nt":
_ = subprocess.run(
[
"powershell",
"-ExecutionPolicy",
"Bypass",
"-File",
"scripts\\clean.ps1",
],
check=True,
shell=True,
)
return super().clean(versions)
def initialize(self, version, build_data) -> None: # pyright: ignore[reportMissingParameterType]
if os.name == "posix":
_ = subprocess.run("./scripts/build.sh", check=True)
if os.name == "nt":
_ = subprocess.run(
[
"powershell",
"-ExecutionPolicy",
"Bypass",
"-File",
"scripts\\build.ps1",
],
check=True,
shell=True,
)
return super().initialize(version, build_data)