2021-06-21 23:33:42 +00:00
|
|
|
#!/usr/bin/env bash
|
2023-05-27 08:36:37 +00:00
|
|
|
DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
cd "$DIR/.."
|
2022-01-26 18:48:46 +00:00
|
|
|
|
|
|
|
|
2021-06-21 23:33:42 +00:00
|
|
|
rm $(find . -name "*.qmlc")
|
|
|
|
rm $(find . -name "*.pyc")
|
|
|
|
python3 -m pip install -U pyinstaller
|
2022-01-20 17:19:36 +00:00
|
|
|
|
2022-01-24 15:16:58 +00:00
|
|
|
# Building translations
|
2022-01-20 17:19:36 +00:00
|
|
|
cd "LogarithmPlotter/i18n/"
|
|
|
|
bash release.sh
|
|
|
|
cd ../../
|
|
|
|
|
2021-06-22 16:39:03 +00:00
|
|
|
pyinstaller --add-data "LogarithmPlotter/qml:qml" \
|
2022-01-20 17:19:36 +00:00
|
|
|
--add-data "LogarithmPlotter/i18n:i18n" \
|
2021-06-21 23:33:42 +00:00
|
|
|
--add-data "LICENSE.md:." \
|
2021-07-11 20:46:21 +00:00
|
|
|
--add-data "mac/logarithmplotterfile.icns:." \
|
2021-06-21 23:33:42 +00:00
|
|
|
--add-data "README.md:." \
|
|
|
|
--exclude-module "FixTk" \
|
|
|
|
--exclude-module "tcl" \
|
|
|
|
--exclude-module "tk" \
|
|
|
|
--exclude-module "_tkinter" \
|
|
|
|
--exclude-module "tkinter" \
|
|
|
|
--exclude-module "Tkinter" \
|
|
|
|
--noconsole \
|
|
|
|
--noconfirm \
|
|
|
|
--icon=mac/logarithmplotter.icns \
|
2021-07-19 17:06:29 +00:00
|
|
|
--osx-bundle-identifier eu.ad5001.LogarithmPlotter \
|
2021-06-21 23:33:42 +00:00
|
|
|
-n LogarithmPlotter \
|
2021-08-16 17:50:54 +00:00
|
|
|
LogarithmPlotter/logarithmplotter.py
|
2021-07-11 20:46:21 +00:00
|
|
|
|
|
|
|
cp mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist
|
2023-05-27 08:36:37 +00:00
|
|
|
|
|
|
|
# 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}
|