diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e1557ae..8a81603 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -9,7 +9,7 @@ permissions: contents: write jobs: - # --- JOB 1 : COMPILATION NUITKA (WIN/LINUX) --- + # --- JOB 1 : NUITKA COMPILATION (Windows/Linux) --- build: name: Build Nuitka Binaries strategy: @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install . nuitka zstandard + pip install . zstandard - name: Build with Nuitka run: hatch run python -m nuitka --standalone --assume-yes-for-download --output-dir=dist src/lce_qt_launcher/main.py @@ -47,7 +47,7 @@ jobs: *.zip *.tar.gz - # --- JOB 2 : INSTALLATEUR WINDOWS --- + # --- JOB 2 : Building Windows Installer --- build_windows_installer: name: Build Inno Setup runs-on: windows-latest @@ -63,9 +63,9 @@ jobs: uses: actions/upload-artifact@v4 with: name: installer-windows - path: packages/windows/*.exe # Vérifie que l'exe sort bien ici + path: packages/windows/*.exe - # --- JOB 3 : PAQUET ARCH LINUX --- + # --- JOB 3 : Making Arch Linux Packages --- build_arch_installer: name: Build Arch Package runs-on: ubuntu-latest @@ -82,12 +82,12 @@ jobs: uses: actions/upload-artifact@v4 with: name: installer-arch - path: ./*.pkg.tar.zst # Arch utilise souvent .zst maintenant au lieu de .gz + path: ./*.pkg.tar.zst - # --- JOB 4 : RELEASE FINALE --- + # --- JOB 4 : Publish the Nightly Release --- release: name: Create Nightly Release - needs: [build, build_windows_installer, build_arch_installer] # Attend TOUT le monde + needs: [build, build_windows_installer, build_arch_installer] runs-on: ubuntu-latest steps: - name: Download all artifacts diff --git a/assets/images/download_img.ps1 b/assets/images/download_img.ps1 index 6e75c4f..a5faa47 100644 --- a/assets/images/download_img.ps1 +++ b/assets/images/download_img.ps1 @@ -2,7 +2,9 @@ $PSNativeCommandUseErrorActionPreference = $true +Write-Output "Donwloading image from the internet" curl.exe -L -o "internet-lce-hub-ico.png" "https://avatars.githubusercontent.com/u/267444710?s=48&v=4" curl.exe -L -o "internet-lce-evolved-ico.png" "https://codeberg.org/repo-avatars/c60b9f3bb0dfca3d35a457d921d2f68b73ebd2054d6d6e25a949bb3a7f32ad3a" curl.exe -L -o "internet-4jcraft-ico.png" "https://avatars.githubusercontent.com/u/265054390?s=48&v=4" -curl.exe -L -o "internet-mclce-ico.png" "https://avatars.githubusercontent.com/u/274307453?s=200&v=4" \ No newline at end of file +curl.exe -L -o "internet-mclce-ico.png" "https://avatars.githubusercontent.com/u/274307453?s=200&v=4" +Write-Output "done" \ No newline at end of file diff --git a/assets/images/download_img.sh b/assets/images/download_img.sh index 2465d01..85362b3 100755 --- a/assets/images/download_img.sh +++ b/assets/images/download_img.sh @@ -2,7 +2,9 @@ set -e +echo "Donwloading image from the internet" curl -L -o "internet-lce-hub-ico.png" "https://avatars.githubusercontent.com/u/267444710?s=48&v=4" curl -L -o "internet-lce-evolved-ico.png" "https://codeberg.org/repo-avatars/c60b9f3bb0dfca3d35a457d921d2f68b73ebd2054d6d6e25a949bb3a7f32ad3a" curl -L -o "internet-4jcraft-ico.png" "https://avatars.githubusercontent.com/u/265054390?s=48&v=4" -curl -L -o "internet-mclce-ico.png" "https://avatars.githubusercontent.com/u/274307453?s=200&v=4" \ No newline at end of file +curl -L -o "internet-mclce-ico.png" "https://avatars.githubusercontent.com/u/274307453?s=200&v=4" +echo "done" \ No newline at end of file diff --git a/packages/flatpak/io.github.xgui4.lce_qt_launcher.yml b/packages/flatpak/io.github.xgui4.lce_qt_launcher.yml index 99dc561..f4bb0c3 100644 --- a/packages/flatpak/io.github.xgui4.lce_qt_launcher.yml +++ b/packages/flatpak/io.github.xgui4.lce_qt_launcher.yml @@ -37,4 +37,4 @@ modules: - type: file path: io.github.xgui4.lce_qt_launcher.desktop - type: file - path: app.ico \ No newline at end of file + path: io.github.xgui4.lce_qt_launcher.png \ No newline at end of file diff --git a/packages/lce_inst-mime.xml b/packages/lce_inst-mime.xml index 4232f30..821ef91 100644 --- a/packages/lce_inst-mime.xml +++ b/packages/lce_inst-mime.xml @@ -1,11 +1,11 @@ - + LCE Qt Launcher Instance Save File - + - + \ No newline at end of file diff --git a/packages/linux/dev/PKGBUILD b/packages/linux/dev/PKGBUILD index 534ef87..7c45a72 100644 --- a/packages/linux/dev/PKGBUILD +++ b/packages/linux/dev/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Xgui4 pkgname=lce-qt-launcher-beta -pkgver=nightly.r8.g5c41dbe +pkgver=nightly.r9.gcd8d126 pkgrel=1 pkgdesc="A custom Minecraft LCE Launcher written in Python and Qt with GNU/Linux support in mind. (Beta Build)" arch=('any') @@ -58,5 +58,5 @@ package() { 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.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-lce_inst.png" + install -Dm644 "assets/lce_inst.png" "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png" } diff --git a/packages/linux/nigthly/PKGBUILD b/packages/linux/nigthly/PKGBUILD index 17a2109..49f3b8c 100644 --- a/packages/linux/nigthly/PKGBUILD +++ b/packages/linux/nigthly/PKGBUILD @@ -58,5 +58,5 @@ package() { 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-lce_inst.png" + install -Dm644 "assets/lce_inst.png" "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png" } diff --git a/packages/linux/stable/PKGBUILD b/packages/linux/stable/PKGBUILD index 965efad..e2ca85d 100644 --- a/packages/linux/stable/PKGBUILD +++ b/packages/linux/stable/PKGBUILD @@ -51,5 +51,5 @@ package() { 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-lce_inst.png" + install -Dm644 "assets/lce_inst.png" "$pkgdir/usr/share/icons/hicolor/128x128/mimetypes/application-x-lce_inst.png" } diff --git a/schemas/lce_qrt_inst_config.json b/schemas/x-application-lce_inst_config.json similarity index 100% rename from schemas/lce_qrt_inst_config.json rename to schemas/x-application-lce_inst_config.json diff --git a/scripts/build.cmd b/scripts/build.cmd index ed54433..9810573 100644 --- a/scripts/build.cmd +++ b/scripts/build.cmd @@ -1,7 +1,28 @@ @echo off + +echo "Starting Compilaton of Qt Ressource" pyside6-rcc "res.qrc" -o "src\lce_qt_launcher\res_rc.py" || exit /b 1 -pyside6-uic "src\system_info.ui" -o "src\lce_qt_launcher\ui_system_info.py" || exit /b 1 -pyside6-uic "src\form.ui" -o "src\lce_qt_launcher\ui_form.py" || exit /b 1 -pyside6-uic "src\instance.ui" -o "src\lce_qt_launcher\ui_instance.py" || exit /b 1 -pyside6-uic "src\settingDialog.ui" -o "src\lce_qt_launcher\ui_settingDialog.py" || exit /b 1 -pyside6-uic "src\about.ui" -o "src\lce_qt_launcher\ui_about.py" || exit /b 1 \ No newline at end of file +echo "Compilation of 'res.rc' was a success" + +setlocal enabledelayedexpansion + +echo "Compilation of Qt ui files" + +set ui[0]="form" +set ui[1]="system_info" +set ui[2]="instance" +set ui[3]="settingDialog" +set ui[4]="about" + +for /L %%i in (0,1,4) do ( + set "filename=!ui[%%i]!" + + echo "Compiling !filename!.ui Qt UI file" + pyside6-uic "!filename!.ui" -o "src\lce_qt_launcher\ui_!filename!.py" || ( + echo Error compiling !filename!.ui + exit /b 1 + ) + echo "Compilation of !filename!.ui to 'src\lce_qt_launcher\ui_!filename!.py' finished" +) + +echo "Compilation of all Qt ui files finished" \ No newline at end of file diff --git a/scripts/build.sh b/scripts/build.sh index 4412505..cfae678 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -2,35 +2,44 @@ set -e +QT_RESSOURCE="res.qrc" +UI_FILES=("form" "system_info" "instance" "settingDialog" "about") + if [[ $(uname -s) != "FreeBSD" ]]; then if command -v pyside6-rcc &> /dev/null; then - pyside6-rcc res.qrc -o src/lce_qt_launcher/res_rc.py - - UICS=("form" "system_info" "instance" "settingDialog" "about") - - for ui in "${UICS[@]}"; do + echo "Starting Compilaton of Qt Ressource" + pyside6-rcc $QT_RESSOURCE -o src/lce_qt_launcher/res_rc.py + echo "Compilation of $QT_RESSOURCE to src/lce_qt_launcher/res_rc.py is finished" + + for ui in "${UI_FILES[@]}"; do + echo "Compiling ${ui}.ui" OUT="src/lce_qt_launcher/ui_${ui}.py" pyside6-uic -g python "src/${ui}.ui" -o "$OUT" + echo "Compilation of ${ui}.ui to $OUT finished" done else - /usr/lib/qt6/rcc -g python res.qrc -o src/lce_qt_launcher/res_rc.py - - UICS=("form" "system_info" "instance" "settingDialog" "about") - - for ui in "${UICS[@]}"; do + echo "Starting Compilaton of Qt Ressource" + /usr/lib/qt6/rcc -g python $QT_RESSOURCE -o src/lce_qt_launcher/res_rc.py + echo "Compilation of $QT_RESSOURCE to src/lce_qt_launcher/res_rc.py is finished" + + for ui in "${UI_FILES[@]}"; do + echo "Compiling ${ui}.ui" OUT="src/lce_qt_launcher/ui_${ui}.py" /usr/lib/qt6/uic -g python "src/${ui}.ui" -o "$OUT" + echo "Compilation of ${ui}.ui to $OUT finished" - sed -i 's/^import res_rc/from . import res_rc/g' "$OUT" + sed -i "s/^import $QT_RESSOURCE/from . import res_rc/g" "$OUT" done fi else - /usr/local/pyside6/rcc -g python res.qrc -o src/lce_qt_launcher/res_rc.py - - UICS=("form" "system_info" "instance" "settingDialog") - - for ui in "${UICS[@]}"; do + echo "Starting Compilaton of Qt Ressource" + /usr/local/pyside6/rcc -g python $QT_RESSOURCE -o src/lce_qt_launcher/res_rc.py + echo "Compilation of $QT_RESSOURCE to src/lce_qt_launcher/res_rc.py is finished" + + for ui in "${UI_FILES[@]}"; do + echo "Compiling ${ui}.ui" OUT="src/lce_qt_launcher/ui_${ui}.py" /usr/local/pyside6/uic -g python "src/${ui}.ui" -o "$OUT" + echo "Compilation of ${ui}.ui to $OUT finished" done fi \ No newline at end of file diff --git a/scripts/clean.ps1 b/scripts/clean.ps1 index ab05d77..a2b7e69 100644 --- a/scripts/clean.ps1 +++ b/scripts/clean.ps1 @@ -2,13 +2,26 @@ $ErrorActionPreference = 'Stop' +Write-Output "Removing the Nuitka compilation folder" Remove-Item -Path "dist" -Recurse +Write-Output "Removing the Nuitka compilation folder finished" -Remove-Item -Path "src\lce_qt_launcher\res_rc.py" -Remove-Item -Path "src\lce_qt_launcher\ui_system_info.py" -Remove-Item -Path "src\lce_qt_launcher\ui_form.py" -Remove-Item -Path "src\lce_qt_launcher\ui_instance.py" -Remove-Item -Path "src\lce_qt_launcher\ui_settingDialog.py" -Remove-Item -Path "src\lce_qt_launcher\ui_about.py" +Write-Output "Removing the compilated Qt UI and Qt Ressource files" -Get-ChildItem -Path . -Recurse -Include '__pycache__', '*.pyc' | Remove-Item -Recurse -Force \ No newline at end of file +$QT_RESSOURCE="res_rc" +$QT_UI_ARRAY="system_info","form","instance","settingDialog","about" + +Write-Output "Removing the compilated Qt Ressource file" +Remove-Item -Path "src\lce_qt_launcher\$QT_RESSOURCE.py" +Write-Output "Removing the compilated Qt Ressource file finished" + +foreach ($QT_UI in $QT_UI_ARRAY) +{ + Write-Output "Removing the compilated ui_$QT_UI.py Qt UI file" + Remove-Item -Path "src\lce_qt_launcher\ui_$QT_UI.py" + Write-Output "Removing the compilated ui_$QT_UI.py Qt UI file finished" +} + +Write-Output "Removing every pycaches filed" +Get-ChildItem -Path . -Recurse -Include '__pycache__', '*.pyc' | Remove-Item -Recurse -Force +Write-Output "Removing every pycaches done" diff --git a/scripts/clean.sh b/scripts/clean.sh index 9d89428..f81a202 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -1,14 +1,27 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e -rm -rf dist/ +echo "Removing the Nuitka compilation folder" +rm -rf "dist" +echo "Removing the Nuitka compilation folder finished" -rm "src/lce_qt_launcher/res_rc.py" -rm "src/lce_qt_launcher/ui_system_info.py" -rm "src/lce_qt_launcher/ui_form.py" -rm "src/lce_qt_launcher/ui_instance.py" -rm "src/lce_qt_launcher/ui_settingDialog.py" -rm "src/lce_qt_launcher/ui_about.py" +echo "Removing the compilated Qt UI and Qt Ressource files" -rm -rf "*/__pycache__" \ No newline at end of file +QT_RESSOURCE="res_rc" +QT_UI_ARRAY=("system_info" "form" "instance" "settingDialog" "about") + +echo "Removing the compilated Qt Ressource file" +rm "src/lce_qt_launcher/$QT_RESSOURCE.py" +echo "Removing the compilated Qt Ressource file finished" + +for QT_UI in "${QT_UI_ARRAY[@]}" +do + echo "Removing the compilated ui_$QT_UI.py Qt UI file" + rm "src/lce_qt_launcher/ui_$QT_UI.py" + echo "Removing the compilated ui_$QT_UI.py Qt UI file finished" +done + +echo "Removing every pycaches filed" +find . -n '__pycache__' -print0 | xargs rm -rf +echo "Removing every pycaches done" \ No newline at end of file diff --git a/scripts/packages.ps1 b/scripts/packages.ps1 index 2f10715..fc2137c 100644 --- a/scripts/packages.ps1 +++ b/scripts/packages.ps1 @@ -1,5 +1,10 @@ $ErrorActionPreference = 'Stop' $PSNativeCommandUseErrorActionPreference = $true +Write-Output "Beginning the Nuitka compilation" hatch run python -m nuitka --standalone --assume-yes-for-download --output-dir=dist src\lce_qt_launcher\main.py -Compress-Archive -Path dist/main.dist\* -DestinationPath LCE-Qt-Launcher-Windows.zip \ No newline at end of file +Write-Output "Nuitka compilation done" + +Write-Output "Compressing the Nuitka compressions" +Compress-Archive -Path dist/main.dist\* -DestinationPath LCE-Qt-Launcher-Windows.zip +Write-Output "Compressing the Nuitka compressions done" \ No newline at end of file diff --git a/scripts/packages.sh b/scripts/packages.sh index 4bad0ac..f52f98d 100755 --- a/scripts/packages.sh +++ b/scripts/packages.sh @@ -4,5 +4,10 @@ set -e scripts/prepare.sh +echo "Beginning the Nuitka compilation" hatch run python -m nuitka --standalone --assume-yes-for-download --output-dir=dist src/lce_qt_launcher/main.py -tar -czf LCE-Qt-Launcher-Linux.tar.gz -C dist/main.dist . \ No newline at end of file +echo "Nuitka compilation done" + +echo "Compressing the Nuitka compressions" +tar -czf LCE-Qt-Launcher-Linux.tar.gz -C dist/main.dist . +echo "Compressing the Nuitka compressions done" \ No newline at end of file diff --git a/scripts/prepare.cmd b/scripts/prepare.cmd index 155fce2..b98b370 100644 --- a/scripts/prepare.cmd +++ b/scripts/prepare.cmd @@ -1,5 +1,7 @@ @echo off +echo "Changing directory to the images directory" cd assets/images || exit /b 1p +echo "done" pwsh-bypass.bat \ No newline at end of file diff --git a/scripts/prepare.sh b/scripts/prepare.sh index f6b3442..7be3565 100755 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -2,6 +2,8 @@ set -e +echo "Changing directory to the images directory" cd assets/images +echo "done" ./download_img.sh \ No newline at end of file diff --git a/scripts/run.cmd b/scripts/run.cmd index c2e1a2e..c3879e1 100644 --- a/scripts/run.cmd +++ b/scripts/run.cmd @@ -1,5 +1,7 @@ @echo off +echo "Activate the python venv" call .venv\Scripts\activate.bat || exit /b 1 +echo "done" python src\lce_qt_launcher\main.py || exit /b 1 \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index 6d87ab9..c9d3261 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -2,7 +2,9 @@ set -e +echo "Activate the python venv" # shellcheck source=/dev/null source .venv/bin/activate +echo "done" src/lce_qt_launcher/main.py \ No newline at end of file