LogarithmPlotter/scripts/build-macosx.sh

40 lines
1.7 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2024-09-29 22:23:39 +00:00
cd "$DIR/.." || exit 1
2024-09-29 22:23:39 +00:00
rm -rf build
bash scripts/build.sh
2024-09-29 23:27:30 +00:00
cd build/runtime-pyside6 || exit 1
rm $(find . -name "*.pyc")
pyinstaller --add-data "LogarithmPlotter/qml:qml" \
--add-data "LogarithmPlotter/i18n:i18n" \
--add-data "LICENSE.md:." \
2024-09-29 22:23:39 +00:00
--add-data "../assets/native/mac/logarithmplotterfile.icns:." \
--add-data "README.md:." \
--exclude-module "FixTk" \
--exclude-module "tcl" \
--exclude-module "tk" \
--exclude-module "_tkinter" \
--exclude-module "tkinter" \
--exclude-module "Tkinter" \
--noconsole \
--noconfirm \
2024-09-29 23:27:30 +00:00
--icon=../../assets/native/mac/logarithmplotter.icns \
--osx-bundle-identifier eu.ad5001.LogarithmPlotter \
-n LogarithmPlotter \
LogarithmPlotter/logarithmplotter.py
2024-09-29 23:27:30 +00:00
cp ../../assets/native/mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist
# Remove QtWebEngine, 3D and all other unused libs libs
2023-05-27 09:09:13 +00:00
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/{QtWeb*,*3D*,QtRemote*,QtPdf,QtCharts,QtLocation,QtTest,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
2024-09-29 22:23:39 +00:00
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/{QtQuick3D,Qt3D,QtWebEngine}
# Remove the QtQuick styles that are unused
2023-05-27 09:09:13 +00:00
rm -rf dist/LogarithmPlotter.app/Contents/MacOS/PySide6/Qt/qml/QtQuick/Controls/{Imagine,Material,iOS,Universal,designer}