From df3e7d47965ce4f7a3f5d6dd69af12c85737adc5 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Sat, 27 May 2023 10:36:37 +0200 Subject: [PATCH] I thought I pushed the updated script for macOS, but it looks like I didn't. --- scripts/build-macosx.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/build-macosx.sh b/scripts/build-macosx.sh index c4b7686..296d088 100755 --- a/scripts/build-macosx.sh +++ b/scripts/build-macosx.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." +DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$DIR/.." rm $(find . -name "*.qmlc") @@ -30,3 +31,15 @@ pyinstaller --add-data "LogarithmPlotter/qml:qml" \ LogarithmPlotter/logarithmplotter.py cp mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist + +# Remove QtWebEngine, 3D and all other unused libs libs +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/{QtWeb*,*3D*,QtRemote*,QtPdf,QtCharts,QtLocation,QtTest,QtNetwork,QtMultimedia,QtSpatialAudio,QtDataVisualization,QtQuickParticles,QtChartsQml,QtScxml,QtDataVisualizationQml,QtTest,QtPositioningQuick,QtQuickTest,QtSql,QtSensorsQuick} +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/{QtNetwork.abi3.so} + +# Removing QtQuick3D +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/QtQuick3D +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/Qt3D +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/QtWebEngine + +# Remove the QtQuick styles that are unused +rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/QtQuick/Controls/{Imagine,Material,iOS,Universal,Fusion,designer}