Updating windows builders for pyside6 (halving the bundled installer size)
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adsooi 2023-05-26 06:25:29 +02:00
parent deb4355756
commit 66da751b36
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 27 additions and 3 deletions

View file

@ -1,5 +1,5 @@
rem Need pyinstaller >= 4.3, or there is an issue regarding the PATH of the building.
python -m pip install -U pyinstaller>=4.3
rem Make sure pyinstaller is installed
python -m pip install -U pyinstaller
rem Building translations
cd "LogarithmPlotter\i18n"
@ -7,3 +7,11 @@ cmd release.sh
cd ..\..
pyinstaller --add-data "logplotter.svg;." --add-data "LogarithmPlotter/qml;qml" --add-data "LogarithmPlotter/i18n;i18n" --noconsole LogarithmPlotter/logarithmplotter.py --icon=win/logarithmplotter.ico -n logarithmplotter
rem Remove QtWebEngine
del dist\logarithmplotter\PySide6\Qt6WebEngineCore.dll
rem Remove the QtQuick styles that are unused
rmdir dist\logarithmplotter\PySide6\qml\QtQuick\Controls\Imagine /s /q
rmdir dist\logarithmplotter\PySide6\qml\QtQuick\Controls\Material /s /q
rmdir dist\logarithmplotter\PySide6\qml\QtQuick\Controls\designer /s /q
rem Remove unused translations

View file

@ -1,7 +1,8 @@
#!/bin/bash
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.."
# Giving pyinstaller another run
rm -rf dist
rm $(find . -name "*.qmlc")
rm -rf $(find . -name "*.pyc")
wine python -m pip install -U pyinstaller
@ -12,3 +13,18 @@ bash release.sh
cd ../../
wine pyinstaller --add-data "logplotter.svg;." --add-data "LogarithmPlotter/qml;qml" --add-data "LogarithmPlotter/i18n;i18n" --noconsole LogarithmPlotter/logarithmplotter.py --icon=win/logarithmplotter.ico -n logarithmplotter
# Copy Qt6ShaderTools, a required library for for Qt5Compat
PYSIDE6PATH="$(wine python -c "import PySide6; from os import path; print(path.dirname(PySide6.__file__));")"
# Converting PySide6 path to absolute path
DRIVEC="${WINEPREFIX:-$HOME/.wine}/drive_c"
PYSIDE6PATH="${PYSIDE6PATH%$'\r'}"
PYSIDE6PATH="${PYSIDE6PATH//\\/\/}"
PYSIDE6PATH="${PYSIDE6PATH//C:/$DRIVEC}"
cp "$PYSIDE6PATH/Qt6ShaderTools.dll" dist/logarithmplotter/PySide6/
# Remove QtWebEngine
rm dist/logarithmplotter/PySide6/Qt6WebEngineCore.dll
# Remove the QtQuick styles that are unused
rm -rf dist/logarithmplotter/PySide6/qml/QtQuick/Controls/{Imagine,Material,designer}