fix build and better command

This commit is contained in:
xgui4
2026-04-26 11:56:17 -04:00
parent 8966d669bb
commit 5a60241687
6 changed files with 22 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
echo "Starting Compilaton of Qt Ressource"
pyside6-rcc "res.qrc" -o "src\lce_qt_launcher\res_rc.py" || exit /b 1
echo "Compilation of 'res.rc' was a success"
echo "done"
setlocal enabledelayedexpansion
@@ -22,7 +22,7 @@ for /L %%i in (0,1,4) do (
echo Error compiling !filename!.ui
exit /b 1
)
echo "Compilation of !filename!.ui to 'src\lce_qt_launcher\ui_!filename!.py' finished"
echo "done"
)
echo "Compilation of all Qt ui files finished"

View File

@@ -9,38 +9,38 @@ if [[ $(uname -s) != "FreeBSD" ]]; then
if command -v pyside6-rcc &> /dev/null; then
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"
echo "done"
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"
sed -i "s/^import $QT_RESSOURCE/from . import res_rc/g" "$OUT"
echo "done"
sed -i "s/^import res_rc/from . import res_rc/g" "$OUT"
done
else
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"
echo "done"
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 $QT_RESSOURCE/from . import res_rc/g" "$OUT"
echo "done"
sed -i "s/^import res_rc/from . import res_rc/g" "$OUT"
done
fi
else
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"
echo "done"
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"
sed -i "s/^import $QT_RESSOURCE/from . import res_rc/g" "$OUT"
echo "done"
sed -i "s/^import res_rc/from . import res_rc/g" "$OUT"
done
fi

View File

@@ -4,7 +4,7 @@ $ErrorActionPreference = 'Stop'
Write-Output "Removing the Nuitka compilation folder"
Remove-Item -Path "dist" -Recurse
Write-Output "Removing the Nuitka compilation folder finished"
Write-Output "done"
Write-Output "Removing the compilated Qt UI and Qt Ressource files"
@@ -13,15 +13,15 @@ $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"
Write-Output "done"
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 "done"
}
Write-Output "Removing every pycaches filed"
Get-ChildItem -Path . -Recurse -Include '__pycache__', '*.pyc' | Remove-Item -Recurse -Force
Write-Output "Removing every pycaches done"
Write-Output "done"

View File

@@ -13,15 +13,15 @@ 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"
echo "done"
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"
echo "done"
done
echo "Removing every pycaches filed"
find . -n '__pycache__' -print0 | xargs rm -rf
echo "Removing every pycaches done"
echo "done"

View File

@@ -3,8 +3,8 @@ $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
Write-Output "Nuitka compilation done"
Write-Output "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"
Write-Output "done"

View File

@@ -6,8 +6,8 @@ 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
echo "Nuitka compilation done"
echo "done"
echo "Compressing the Nuitka compressions"
tar -czf LCE-Qt-Launcher-Linux.tar.gz -C dist/main.dist .
echo "Compressing the Nuitka compressions done"
echo "done"