diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d044161..ae8ad27 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -83,7 +83,7 @@ jobs: uses: actions/upload-artifact@v7.0.1 with: name: packages-arch - path: "packages/linux/nightly/****.pkg.tar.zst" + path: packages/linux/nightly/****.pkg.tar.zst # --- JOB 4 : Publish the Nightly Release --- release: @@ -106,14 +106,14 @@ jobs: name: Nightly Release body: " > [!NOTE]\n - > The nightly prebuild is only avaiable for GNU/Linux and Windows. + > The nightly prebuild is only avaiable for GNU/Linux and Windows. \n \n > [!NOTE]\n > For NixOS/Nixpkg you need to build it yourself by downloading the source files - and then run `./nix-helper install` + and then run `./nix-helper install` \n \n Experimental Build (Nightly) generated by GitHub Action. The nighy build are experimental nuitka compilation from the nighly branch. - Package for GNU/Linux and Installer for Windows is coming late. + Package for GNU/Linux and Installer for Windows is coming late. \n \n Now includes installers." files: | diff --git a/.gitignore b/.gitignore index eaae5bf..fb8f802 100644 --- a/.gitignore +++ b/.gitignore @@ -321,10 +321,14 @@ default.lce_inst # pacman packages/**/src/ -packages/**/pkg +packages/**/pkg/ packages/**/lce-qt-launcher-*/ packages/**/lce-qt-launcher-**-**-any.pkg.tar.zst -#Nix +# Nix -result \ No newline at end of file +result + +# FreeBSD + +freebsd-ports/distinfo \ No newline at end of file diff --git a/assets/styles/minecraft.qss b/assets/styles/minecraft.qss index 598bd82..0310ffe 100644 --- a/assets/styles/minecraft.qss +++ b/assets/styles/minecraft.qss @@ -1,15 +1,20 @@ -/* -DISABLED DUE TO A ISSUE -{ +/* + +DISABLED. UNTIL UI READY FOR IT + +* { font-family : Miracode; -} */ + font-size : 10px; +} + +*/ + QLabel:disabled { color : gray; opacity : 100; } - QPushButton { border-image : url(":/assets/button.png"); color : white; diff --git a/bsd-helper.sh b/bsd-helper.sh index dc64580..0da8e8c 100755 --- a/bsd-helper.sh +++ b/bsd-helper.sh @@ -1,9 +1,11 @@ #!/usr/bin/env sh -if $1 = "install"; then - -uv venv --system-site-packages -source .venv/bin/activate.fish -uv sync --system-certs - +if [ "$1" = "create-venv" ]; then + uv venv --system-site-packages + source .venv/bin/activate.sh + uv sync --system-certs +fi + +if [ "$1" = "sync" ]; then + uv sync --system-certs fi diff --git a/default.nix b/default.nix index 5f55fc7..392acf4 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,7 @@ pkgs.python3Packages.buildPythonApplication rec { pname = "lce-qt-launcher"; - version = "0.2026.5.10"; + version = "0.2026.5.11"; format = "pyproject"; src = ./.; diff --git a/freebsd-ports/Makefile b/freebsd-ports/Makefile index e41e78f..c04ca5c 100644 --- a/freebsd-ports/Makefile +++ b/freebsd-ports/Makefile @@ -22,7 +22,7 @@ RUN_DEPENDS= bash:shells/bash \ ${PYTHON_PKGNAMEPREFIX}requests>0:devel/py-requests@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}platformdirs>0:devel/py-platformdirs@${PY_FLAVOR} -USES= python qt:6 shebangfix +USES= python qt:6 shebangfix desktop-file-utils shared-mime-info USE_GITHUB= yes GH_ACCOUNT= xgui4 GH_PROJECT= LCE-Qt-Launcher @@ -33,4 +33,31 @@ SHEBANG_FILES= scripts/*.sh USE_PYTHON= autoplist pep517 USE_QT= tools:build +post-install: + @${MKDIR} ${STAGEDIR}${ETCDIR} + @${MKDIR} ${STAGEDIR}${DESKTOPDIR} + @${MKDIR} ${STAGEDIR}${PREFIX}/share/mime/packages + @${MKDIR} ${STAGEDIR}${PREFIX}/share/metainfo + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/apps + @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/mimetypes + @${MKDIR} ${STAGEDIR}${DOCSDIR} + + ${INSTALL_DATA} ${WRKSRC}/data/lce_qt_launcher.ini \ + ${STAGEDIR}${PREFIX}/etc/lce_qt_launcher.ini.sample + + ${INSTALL_DATA} ${WRKSRC}/packages/io.github.xgui4.lce_qt_launcher.desktop \ + ${STAGEDIR}${DESKTOPDIR}/io.github.xgui4.lce_qt_launcher.desktop + ${INSTALL_DATA} ${WRKSRC}/packages/lce_inst-mime.xml \ + ${STAGEDIR}${PREFIX}/share/mime/packages/io.github.xgui4.lce_qt_launcher.xml + + ${INSTALL_DATA} ${WRKSRC}/packages/io.github.xgui4.lce_qt_launcher.metainfo.xml \ + ${STAGEDIR}${PREFIX}/share/metainfo/ + ${INSTALL_DATA} ${WRKSRC}/assets/io.github.xgui4.lce_qt_launcher.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/apps/ + ${INSTALL_DATA} ${WRKSRC}/assets/lce_inst.png \ + ${STAGEDIR}${PREFIX}/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png + + ${INSTALL_DATA} ${WRKSRC}/readme.md ${WRKSRC}/code-of-conduct.md \ + ${STAGEDIR}${DOCSDIR}/ + .include diff --git a/freebsd-ports/distinfo b/freebsd-ports/distinfo deleted file mode 100644 index 9c072bc..0000000 --- a/freebsd-ports/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1778472337 -SHA256 (xgui4-LCE-Qt-Launcher-26.5.11b0-nightly_GH0.tar.gz) = d94ac9c5a0488d4401e3f6801208d3ea98a2475f423e178a7d1588366d294682 -SIZE (xgui4-LCE-Qt-Launcher-26.5.11b0-nightly_GH0.tar.gz) = 1068055 diff --git a/freebsd-ports/install b/freebsd-ports/install new file mode 100644 index 0000000..4672650 --- /dev/null +++ b/freebsd-ports/install @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +make makesum + +make install \ No newline at end of file diff --git a/lisezmoi.md b/lisezmoi.md index 9b20b6e..053329c 100644 --- a/lisezmoi.md +++ b/lisezmoi.md @@ -140,12 +140,12 @@ Sur cette page [GitHub Release](https://github.com/xgui4/LCE-Qt-Launcher/release Plateforme testée avec implémentation en cours de developement - NixOS +- FreeBSD ### Plateformes prises en charge partiellement Plateformes non testées, mais avec implémentation -- FreeBSD - Flatpak ### Systèmes d'exploitation non pris en charge diff --git a/packages/windows/windows-setup-nigthly-preview.iss b/packages/windows/windows-setup-nigthly-preview.iss index 90a9fd1..43f5eca 100644 --- a/packages/windows/windows-setup-nigthly-preview.iss +++ b/packages/windows/windows-setup-nigthly-preview.iss @@ -3,7 +3,7 @@ ; Non-commercial use only #define MyAppName "LCE Qt Launcher (Nightly)" -#define MyAppVersion "2026.5.10" +#define MyAppVersion "2026.5.11" #define MyAppPublisher "Xgui4" #define MyAppURL "https://github.com/xgui4/lce-qt-launcher" #define MyAppExeName "main.exe" diff --git a/packages/windows/windows-setup-nigthly.iss b/packages/windows/windows-setup-nigthly.iss index f2775d2..b439bee 100644 --- a/packages/windows/windows-setup-nigthly.iss +++ b/packages/windows/windows-setup-nigthly.iss @@ -3,7 +3,7 @@ ; Non-commercial use only #define MyAppName "LCE Qt Launcher (Nightly)" -#define MyAppVersion "2026.5.10" +#define MyAppVersion "2026.5.11" #define MyAppPublisher "Xgui4" #define MyAppURL "https://github.com/xgui4/lce-qt-launcher" #define MyAppExeName "main.exe" diff --git a/pyproject.toml b/pyproject.toml index e4196d5..0705aa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "hatchling.build" [project] name = "LCE-Qt-Launcher" -version = "26.5.10a0" +version = "26.5.11a0" description = "This is a custom Free/Libre Minecraft LCE Launcher written in Python and Qt. (Nightly Build)" requires-python = ">3.10, <3.13" license = "GPL-3.0-or-later" diff --git a/readme.md b/readme.md index c2fe5b6..2f6f078 100644 --- a/readme.md +++ b/readme.md @@ -143,12 +143,12 @@ In this [GitHub Release](https://github.com/xgui4/LCE-Qt-Launcher/releases/tag/n Plattform tested with work in progress implemation - NixOS +- FreeBSD ### Partly Supported Platform Platform not tested yet, but with implementation -- FreeBSD - Flatpak ### Unsupported OS diff --git a/shell.nix b/shell.nix index 8a3aef1..499d4b8 100644 --- a/shell.nix +++ b/shell.nix @@ -21,7 +21,7 @@ let in pkgs.mkShell rec { pname = "lce-qt-launcher"; - version = "0.2026.5.10"; + version = "0.2026.5.11"; format = "pyproject"; src = ./.; diff --git a/src/form.ui b/src/form.ui index b3d8b2e..392cde3 100644 --- a/src/form.ui +++ b/src/form.ui @@ -6,15 +6,10 @@ 0 0 - 1044 - 1044 + 1214 + 842 - - - Monocraft - - Minecraft LCE QT Launcher @@ -36,7 +31,7 @@ - Qt::ActionsContextMenu + Qt::ContextMenuPolicy::ActionsContextMenu @@ -57,19 +52,19 @@ - Qt::NoFocus + Qt::FocusPolicy::NoFocus - Qt::LeftToRight + Qt::LayoutDirection::LeftToRight false - QTabWidget::North + QTabWidget::TabPosition::North - QTabWidget::Rounded + QTabWidget::TabShape::Rounded 0 @@ -119,34 +114,7 @@ - - - - true - - - Add Steam Integration Link - - - - - - - - - - - Monocraft - 75 - true - - - - Progress - - - - + true @@ -159,84 +127,20 @@ - - - - - 16777215 - 16777215 - + + + + + Monocraft + true + - - - - :/assets/minecraft_lce_title.png - - - false - - - 0 + Progress - - - - true - - - - - - Play On Steam - - - - - - - - - - false - - - Open Instances Editor - - - false - - - false - - - false - - - - - - - Play - - - - - - - - - - Update - - - - - - - + @@ -248,7 +152,6 @@ Monocraft 14 - 75 true @@ -257,6 +160,29 @@ + + + + true + + + + Monocraft + true + + + + Instance Name + + + + + + + true + + + @@ -268,7 +194,6 @@ Monocraft - 75 true @@ -292,7 +217,6 @@ Monocraft - 75 true @@ -316,7 +240,6 @@ Monocraft - 75 true @@ -343,7 +266,6 @@ Monocraft - 75 true @@ -373,7 +295,6 @@ Monocraft - 75 true @@ -395,7 +316,7 @@ - + @@ -411,7 +332,7 @@ - + Save Instances Config @@ -421,27 +342,22 @@ - - + + - true - - - - Monocraft - 75 - true - + false - Instance Name + Open Instances Editor - - - - - - true + + false + + + false + + + false @@ -451,81 +367,7 @@ - - - - - Monocraft - 14 - 75 - true - - - - Default (MCLCE) - Vanilla Client - - - - - - - Change Instance Icon - - - - - - - - - - - 0 - 0 - - - - Installation Progress Bar - - - The percentage of the installation - - - 0 - - - install progress bar - - - - - - - true - - - - Monocraft - 75 - true - - - - Steam Link : - - - - - - - false - - - - - - - + @@ -540,7 +382,150 @@ :/assets/minecraft.png - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + Qt::AlignmentFlag::AlignRight|Qt::AlignmentFlag::AlignTrailing|Qt::AlignmentFlag::AlignVCenter + + + + + + + true + + + Add Steam Integration Link + + + + + + + + + + Play + + + + + + + + + + + 16777215 + 16777215 + + + + + + + :/assets/minecraft_lce_title.png + + + true + + + 0 + + + + + + + + Monocraft + 14 + true + + + + Default (MCLCE) - Vanilla Client + + + + + + + false + + + None + + + + + + + Update + + + + + + + + + + true + + + + Monocraft + true + + + + Steam Link : + + + + + + + true + + + + + + Play On Steam + + + + + + + + + + + 0 + 0 + + + + Installation Progress Bar + + + The percentage of the installation + + + install progress bar + + + 0 + + + + + + + Change Instance Icon + + + @@ -566,13 +551,12 @@ Monocraft 24 - 75 true false - QFrame::NoFrame + QFrame::Shape::NoFrame @@ -581,10 +565,10 @@ - QListView::Fixed + QListView::ResizeMode::Fixed - Qt::AlignCenter + Qt::AlignmentFlag::AlignCenter @@ -606,8 +590,8 @@ - - + + https://lce-hub.github.io/piston/ @@ -630,8 +614,8 @@ - - + + https://github.com/MCLCE/MinecraftConsoles/commits @@ -650,8 +634,8 @@ 0 0 - 1044 - 22 + 1214 + 35 @@ -763,7 +747,7 @@ Quit the app - QAction::QuitRole + QAction::MenuRole::QuitRole @@ -777,7 +761,7 @@ Update The App - QAction::ApplicationSpecificRole + QAction::MenuRole::ApplicationSpecificRole @@ -788,7 +772,7 @@ About LCE Qt Launcher - QAction::AboutRole + QAction::MenuRole::AboutRole @@ -799,7 +783,7 @@ About Qt - QAction::AboutQtRole + QAction::MenuRole::AboutQtRole @@ -810,7 +794,7 @@ System Information - QAction::ApplicationSpecificRole + QAction::MenuRole::ApplicationSpecificRole @@ -1131,6 +1115,7 @@ + diff --git a/src/lce_qt_launcher/__init__.py b/src/lce_qt_launcher/__init__.py index 33334f2..59a9eaf 100644 --- a/src/lce_qt_launcher/__init__.py +++ b/src/lce_qt_launcher/__init__.py @@ -1,7 +1,7 @@ from enum import StrEnum FALLBACK_APP_NAME = "LCE Qt Launcher" -FALLBACK_VERSION_NUMBER = "2026.5.10b0" +FALLBACK_VERSION_NUMBER = "2026.5.11b0" FALLBACK_LICENSE = "GPLv3" FALLBACK_LICENSE_LINK = "https://www.gnu.org/licenses/gpl-3.0" FALLBACK_GIT_REPO_URL = "https://github.com/xgui4/LCE-QT-Launcher" diff --git a/src/lce_qt_launcher/build_info.py b/src/lce_qt_launcher/build_info.py index ebdab92..220457e 100644 --- a/src/lce_qt_launcher/build_info.py +++ b/src/lce_qt_launcher/build_info.py @@ -43,10 +43,12 @@ class BuildInfo: if license_metadata: self.license = license_metadata - except PackageNotFoundError: - term_service.print_error(f"Package not found! More info : {PackageNotFoundError.msg}") - except RuntimeError: - term_service.print_error(f"Metadata not found! More info : {RuntimeError.args}") + except PackageNotFoundError as e: + term_service.print_error(f"Package not found! More info : {e.msg}") + except RuntimeError as e: + term_service.print_error(f"Metadata not found! More info : {e}") + except KeyError as e: + term_service.print_error(f"Metadata not found! More info : {e}") self.qt_version : str = qVersion() self.authors : str = AUTHORS diff --git a/src/lce_qt_launcher/main.py b/src/lce_qt_launcher/main.py index f8575e9..a3f3d93 100755 --- a/src/lce_qt_launcher/main.py +++ b/src/lce_qt_launcher/main.py @@ -103,15 +103,14 @@ def main() -> None: os.environ["QTWEBENGINE_DISABLE_SANDBOX"] = "1" app = App(appContext.theme, appContext, sys.argv) - _ = app.setStyle("Fusion") - _ = app.aboutToQuit.connect(about_to_quit_event) + app.setStyle("Fusion") # pyright: ignore[reportUnusedCallResult] + app.aboutToQuit.connect(about_to_quit_event) # pyright: ignore[reportUnusedCallResult] font_id = QFontDatabase.addApplicationFont(":/fonts/miracode.ttf") if font_id == -1: print("Error: Font could not be loaded.") else: - # 2. Get the font family name (the name defined inside the file) family = QFontDatabase.applicationFontFamilies(font_id)[0] app.setFont(family) diff --git a/src/lce_qt_launcher/managers/instance_manager.py b/src/lce_qt_launcher/managers/instance_manager.py index 3c77304..b87e531 100644 --- a/src/lce_qt_launcher/managers/instance_manager.py +++ b/src/lce_qt_launcher/managers/instance_manager.py @@ -2,6 +2,8 @@ from __future__ import annotations from typing import TYPE_CHECKING +from PySide6.QtWidgets import QMessageBox + if TYPE_CHECKING: from lce_qt_launcher.app_context import AppContext @@ -200,6 +202,7 @@ class Instance(QObject): self.news_feed = inst_dict.get("news_feed", _DEFAULT_NEWS_FEED) self.version = inst_dict.get("version", _DEFAULT_VERSION) self.steam_link = inst_dict.get("steam_link", "N/A") + def get_download_url(self) -> str: """_summary_ Get the download URL of a Instance @@ -264,15 +267,25 @@ class InstanceManager: from lce_qt_launcher.managers.downloader import Downloader self._downloader: Downloader = Downloader(appContext) self._build_info: BuildInfo = build_info + def play(self) -> str: """_summary_ Launch an Instance Returns: str: _description_ error message or status and exit codes """ + return_code :int = 0 try: client_path : str = os.path.join(self.instance.installation_path, self.instance.exe_name) - game_process = subprocess.run([client_path, "-name", self.instance.username]) + try : + game_process_temp = subprocess.run([client_path, "-name", self.instance.username]) + return_code = game_process_temp.returncode + except subprocess.SubprocessError as e: + if os.name == "posix": + game_process_temp = subprocess.run(["wine", client_path, "-name", self.instance.username]) + return_code = game_process_temp.returncode + else: + QMessageBox.critical(None, "Instance Error", e) except TimeoutExpired as err: term_service.print_error(f"process of lauching instance {self.instance.name} Failed. Reason : Timeout Expired.\n traceback : {err.with_traceback}") return f"process of lauching instance {self.instance.name} Failed. Reason : Timeout Expired.\n traceback : {err.with_traceback}" @@ -280,7 +293,8 @@ class InstanceManager: term_service.print_error(f"Cannot launch {self.instance.name}. Reason : Permission Denied.\n traceback : {err.with_traceback}") return f"Cannot launch {self.instance.name}. Reason : Permission Denied.\n traceback : {err.with_traceback}" else: - return f"Client closed with code {game_process.returncode}" + return f"Client closed with code {return_code}" + def install_instance(self) -> QNetworkReply: """_summary_ Install the selected Instance diff --git a/src/lce_qt_launcher/views/launcher.py b/src/lce_qt_launcher/views/launcher.py index 5f0090b..94cf647 100644 --- a/src/lce_qt_launcher/views/launcher.py +++ b/src/lce_qt_launcher/views/launcher.py @@ -197,7 +197,7 @@ class LauncherView(QMainWindow): inst_dict: dict[str, str] = json.load(instance) # pyright: ignore[reportAny] instanceManager.instance.load_inst_from_dict(inst_dict) instanceManager.instance.display() - self.ui.instanceNameLabel.setText(instanceManager.instance.name) + self.ui.instanceNameInputBox.setText(instanceManager.instance.name) self.image_label = instanceManager.instance.image self.news_feed = instanceManager.instance.news_feed self.instance_name = instanceManager.instance.name @@ -390,7 +390,7 @@ class LauncherView(QMainWindow): instance = Instance() instance.load_inst_from_dict(data) features.load_instance_from_instance(instanceManager, instance) - self.ui.instanceNameLabel.setText(instanceManager.instance.name) + self.ui.instanceNameInputBox.setText(instanceManager.instance.name) self.image_label = instanceManager.instance.image self.news_feed = instanceManager.instance.news_feed self.instance_name = instanceManager.instance.name diff --git a/uv.lock b/uv.lock index 1a8494d..3e6eb30 100644 --- a/uv.lock +++ b/uv.lock @@ -465,7 +465,7 @@ wheels = [ [[package]] name = "lce-qt-launcher" -version = "26.5.10a0" +version = "26.5.11a0" source = { editable = "." } dependencies = [ { name = "hatch" }, @@ -486,7 +486,7 @@ requires-dist = [ { name = "platformdirs" }, { name = "pyside6", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'", specifier = ">=6.11.0" }, { name = "requests", specifier = ">=2.33.1" }, - { name = "rich", specifier = ">=14.3.3" }, + { name = "rich", specifier = ">=15.0.0" }, { name = "vdf", specifier = "<=3.4" }, ] @@ -712,15 +712,15 @@ wheels = [ [[package]] name = "rich" -version = "14.3.3" +version = "15.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown-it-py" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b3/c6/f3b320c27991c46f43ee9d856302c70dc2d0fb2dba4842ff739d5f46b393/rich-14.3.3.tar.gz", hash = "sha256:b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b", size = 230582, upload-time = "2026-02-19T17:23:12.474Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/14/25/b208c5683343959b670dc001595f2f3737e051da617f66c31f7c4fa93abc/rich-14.3.3-py3-none-any.whl", hash = "sha256:793431c1f8619afa7d3b52b2cdec859562b950ea0d4b6b505397612db8d5362d", size = 310458, upload-time = "2026-02-19T17:23:13.732Z" }, + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, ] [[package]]