diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index be81f95..cb082b2 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -76,7 +76,7 @@ jobs: with: namcap: true updpkgsums : true - path : "packages/linux/nightly" + path : "packages/linux/nigthly" srcinfo: true - name: Upload Artifact @@ -108,8 +108,14 @@ jobs: > [!NOTE]\n > The nightly prebuild is only avaiable for GNU/Linux and Windows. \n + > [!NOTE]\n + > For NixOS/Nixpkg you need to build it yourself by downloading the source files + and then run `./nix-helper install` + \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. Now includes installers." + Package for GNU/Linux and Installer for Windows is coming late. + \n + Now includes installers." files: | ./artifacts/****.exe ./artifacts/****.zip diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 314e32d..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,62 +0,0 @@ -# Maintainer: Xgui4 -pkgname=lce-qt-launcher-git -pkgver=nightly -pkgrel=2 -pkgdesc="A custom Minecraft LCE Launcher written in Python and Qt with GNU/Linux support in mind. (Nigthly/Git Build)" -arch=('any') -url="https://github.com/xgui4/LCE-Qt-Launcher" -license=('GPL-3.0-or-later') -depends=( - 'python' - 'pyside6' - 'python-requests' - 'python-platformdirs' - 'python-vdf' - 'python-rich' -) -makedepends=( - 'git' - 'bash' - 'curl' - 'python-build' - 'python-installer' - 'python-hatchling' - 'python-wheel' - 'qt6-tools' -) -optdepends=( - 'wine: Allow to launch non-Linux-native Minecraft LCE ports' - 'steam: Allow for Steam integration' -) - -provides=("${pkgname%-git}" "${pkgname%-nightly}" "${pkgname%}") -conflicts=("${pkgname%-dev}" "${pkgname%-stable}" "${pkgname%}") -source=("${pkgname}::git+${url}.git#branch=nightly") -sha256sums=('SKIP') - -pkgver() { - cd "$pkgname" - # cutting off 'foo-' prefix that presents in the git tag - git describe --always --long --tags | sed 's/^foo-//;s/\([^-]*-g\)/r\1/;s/-/./g' -} - -build() { - cd "$pkgname" - rm -rf dist/ build/ - /usr/bin/python -m build --wheel --no-isolation -} - -package() { - cd "$pkgname" - /usr/bin/python -m installer --destdir="$pkgdir" dist/*.whl - install -d "$pkgdir/opt/lce_qt_launcher" - cp -r data assets "$pkgdir" - install -Dm644 "data/lce_qt_launcher.ini" "$pkgdir/etc/lce_qt_launcher.ini" - install -Dm644 "packages/io.github.xgui4.lce_qt_launcher.desktop" "$pkgdir/usr/share/applications/io.github.xgui4.lce_qt_launcher.desktop" - install -Dm644 "packages/lce_inst-mime.xml" "$pkgdir/usr/share/mime/packages/io.github.xgui4.lce_qt_launcher.gtk.metainfo.xml" - install -Dm644 "license.md" -t "$pkgdir/usr/share/licenses/$pkgname/" - install -Dm644 "readme.md" "code-of-conduct.md" -t "$pkgdir/usr/share/doc/$pkgname/" - install -Dm644 "packages/io.github.xgui4.lce_qt_launcher.metainfo.xml" "$pkgdir/usr/share/metainfo/io.github.xgui4.lce_qt_launcher.gtk.metainfo.xml" - install -Dm644 "assets/io.github.xgui4.lce_qt_launcher.png" "$pkgdir/usr/share/icons/hicolor/128x128/apps/io.github.xgui4.lce_qt_launcher.png" - install -Dm644 "assets/lce_inst.png" "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png" -} diff --git a/assets/lce_inst.ico b/assets/lce_inst.ico new file mode 100644 index 0000000..058ab91 Binary files /dev/null and b/assets/lce_inst.ico differ diff --git a/packages/linux/dev/PKGBUILD b/packages/linux/dev/PKGBUILD index 96f77da..144ac26 100644 --- a/packages/linux/dev/PKGBUILD +++ b/packages/linux/dev/PKGBUILD @@ -1,5 +1,5 @@ # Maintainer: Xgui4 -pkgname=lce-qt-launcher-beta +pkgname=lce-qt-launcher-de pkgver=049bcc6 pkgrel=1 pkgdesc="A custom Minecraft LCE Launcher written in Python and Qt with GNU/Linux support in mind. (Beta Build)" @@ -30,7 +30,8 @@ optdepends=( 'steamtinkerlaunch: For better Stream integration on Linux' ) -provides=("${pkgname%-dev}" "${pkgname%-beta}" "${pkgname%}") +replace=("${pkgname%-beta}") +provides=("${pkgname%-dev}" "${pkgname%}") conflicts=("${pkgname%-nightly}" "${pkgname%-dev}" "${pkgname%-beta}" "${pkgname%}") source=("${pkgname}::git+${url}.git#branch=beta") sha256sums=('SKIP') diff --git a/packages/linux/nigthly/PKGBUILD b/packages/linux/nigthly/PKGBUILD index 7693f41..4732c2f 100644 --- a/packages/linux/nigthly/PKGBUILD +++ b/packages/linux/nigthly/PKGBUILD @@ -29,7 +29,7 @@ optdepends=( 'steam: Allow for Steam integration' ) -provides=("${pkgname%-git}" "${pkgname%-nightly}" "${pkgname%}") +provides=("${pkgname%-nightly}" "${pkgname%}") conflicts=("${pkgname%-dev}" "${pkgname%-stable}" "${pkgname%}") source=("${pkgname}::git+${url}.git#branch=nightly") sha256sums=('SKIP') diff --git a/packages/windows/windows-setup-nigthly-preview.iss b/packages/windows/windows-setup-nigthly-preview.iss index bfe8a25..666edd2 100644 --- a/packages/windows/windows-setup-nigthly-preview.iss +++ b/packages/windows/windows-setup-nigthly-preview.iss @@ -50,12 +50,13 @@ Name: "french"; MessagesFile: "compiler:Languages\French.isl" [Files] ; NOTE: Use the "issigverify" flag or the "Hash" parameter to verify downloads Source: "https://github.com/xgui4/LCE-Qt-Launcher/releases/download/nightly/LCE-Qt-Launcher-Windows.zip"; DestDir: "{app}"; DestName: "LCE-Qt-Launcher-Windows.zip"; ExternalSize: "186646528"; Flags: ignoreversion external download extractarchive recursesubdirs createallsubdirs +Source: "../../assets/lce_inst.ico"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Registry] Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey -Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\../../assets/lce_inst.ico" Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" [Icons] diff --git a/packages/windows/windows-setup-nigthly.iss b/packages/windows/windows-setup-nigthly.iss index d776b84..08e8aa7 100644 --- a/packages/windows/windows-setup-nigthly.iss +++ b/packages/windows/windows-setup-nigthly.iss @@ -55,12 +55,13 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] ; NOTE: Use the "issigverify" flag or the "Hash" parameter to verify downloads Source: "https://github.com/xgui4/LCE-Qt-Launcher/releases/download/nightly/LCE-Qt-Launcher-Windows.zip"; DestDir: "{app}"; DestName: "LCE-Qt-Launcher-Windows.zip"; ExternalSize: "186646528"; Flags: ignoreversion external download extractarchive recursesubdirs createallsubdirs +Source: "../../assets/lce_inst.ico"; DestDir: "{app}"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files [Registry] Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey -Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" +Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\../../assets/lce_inst.ico" Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" [Icons] diff --git a/pyproject.toml b/pyproject.toml index 342cf0b..adddd67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,8 @@ build-backend = "hatchling.build" [project] name = "LCE-Qt-Launcher" -version = "0.0.2b0" -description = "This is a custom Free/Libre Minecraft LCE Launcher written in Python and Qt. (Beta Build)" +version = "26.5.9a0" +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" readme = "readme.md" diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..25791e4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,96 @@ +{ pkgs ? import {} }: + +let + myPython = pkgs.python3.withPackages (ps: with ps; [ + pyside6 + requests + shiboken6 + platformdirs + rich + ]); + + # Create standalone wrapper scripts + pyside-uic = pkgs.writeShellScriptBin "pyside6-uic" '' + exec ${pkgs.qt6.qtbase}/libexec/uic -g python "$@" + ''; + + pyside-rcc = pkgs.writeShellScriptBin "pyside6-rcc" '' + exec ${pkgs.qt6.qtbase}/libexec/rcc -g python "$@" + ''; + +in +pkgs.mkShell { + pname = "lce-qt-launcher"; + version = "0.2026.5.9"; + format = "pyproject"; + + src = ./.; + + buildInputs = with pkgs; [ + pyside-uic + pyside-rcc + monocraft + qt6.qtbase + qt6.qtwayland + libGL + ]; + + postPatch = '' + patchShebangs scripts/ + chmod +x scripts/*.sh + substituteInPlace scripts/build.sh \ + --replace-fail "/usr/lib/qt6/rcc" "${pkgs.qt6.qtbase}/libexec/rcc" \ + --replace-fail "/usr/lib/qt6/uic" "${pkgs.qt6.qtbase}/libexec/uic" + + # Remove the build-time dependencies Nix doesn't need + # (this prevents Hatchling from complaining they are missing) + sed -i '/"hatch<=/d' pyproject.toml + sed -i '/"Nuitka<=/d' pyproject.toml + sed -i '/"patchelf<=/d' pyproject.toml + ''; + + # Manual installation of non-Python assets (Desktop files, icons, etc.) + postInstall = '' + # Desktop Entry & Mime + install -Dm644 "packages/io.github.xgui4.lce_qt_launcher.desktop" "$out/share/applications/io.github.xgui4.lce_qt_launcher.desktop" + install -Dm644 "packages/lce_inst-mime.xml" "$out/share/mime/packages/io.github.xgui4.lce_qt_launcher.xml" + install -Dm644 "packages/io.github.xgui4.lce_qt_launcher.metainfo.xml" "$out/share/metainfo/io.github.xgui4.lce_qt_launcher.metainfo.xml" + + # Icons + install -Dm644 "assets/io.github.xgui4.lce_qt_launcher.png" "$out/share/icons/hicolor/128x128/apps/io.github.xgui4.lce_qt_launcher.png" + install -Dm644 "assets/lce_inst.png" "$out/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png" + + # Data/Assets (Mirroring your /opt logic into Nix share) + mkdir -p "$out/share/${pname}" + cp -r data assets "$out/share/${pname}/" + + # Docs + install -Dm644 "license.md" -t "$out/share/licenses/${pname}/" + install -Dm644 "readme.md" "code-of-conduct.md" -t "$out/share/doc/${pname}/" + ''; + + dontCheckRuntimeDeps = true; + dontWrapQtApps = true; + preFixup = '' + makeWrapperArgs+=("''${qtWrapperArgs[@]}") + ''; + + shellHook = '' + # Ensure our wrapped Python and tools are first in PATH + export PATH="${myPython}/bin:${pyside-uic}/bin:${pyside-rcc}/bin:$PATH" + + # Reset PYTHONPATH to only include your source + export PYTHONPATH="$(pwd)/src" + + # Tell UV which Python to use + export UV_PYTHON="${myPython}/bin/python3" + + # NixOS Graphics & Qt Fixes + export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [ pkgs.libGL pkgs.stdenv.cc.cc ]}:$LD_LIBRARY_PATH" + export QT_PLUGIN_PATH="${pkgs.qt6.qtbase}/${pkgs.qt6.qtbase.qtPluginPrefix}" + export QT_QPA_PLATFORM_PLUGIN_PATH="${pkgs.qt6.qtbase}/lib/qt-6/plugins/platforms" + + echo "Environment Reset: Python is $(which python3)" + echo "pyside6-uic is now $(which pyside6-uic) and outputs Python code." + ''; +} \ No newline at end of file diff --git a/src/lce_qt_launcher/__init__.py b/src/lce_qt_launcher/__init__.py index 2e7ca1e..80b79fd 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 = "0.0.2b1" +FALLBACK_VERSION_NUMBER = "2026.5.9b0" 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/uv.lock b/uv.lock index 01393dc..507852a 100644 --- a/uv.lock +++ b/uv.lock @@ -465,7 +465,7 @@ wheels = [ [[package]] name = "lce-qt-launcher" -version = "0.0.2b0" +version = "26.5.9a0" source = { editable = "." } dependencies = [ { name = "hatch" },