Updating remaining paths in scripts

This commit is contained in:
Ad5001 2024-09-30 01:27:30 +02:00
parent ca5c7492dc
commit e2841c0129
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
9 changed files with 33 additions and 34 deletions

View file

@ -19,15 +19,15 @@ You can find more screenshots on the [app's website](https://apps.ad5001.eu/loga
First, you'll need to install all the required dependencies: First, you'll need to install all the required dependencies:
- [Python 3](https://python.org) with [poetry](https://python-poetry.org/), and setup a virtual environment and call - [Python 3](https://python.org) with [poetry](https://python-poetry.org/), setup a virtual environment, go to the `runtime-pyside6` directory, and call
`poetry install`. `poetry install`.
- [npm](https://npmjs.com) (or [yarn](https://yarnpkg.com/)), and run `npm install` (or `yarn install`). - [npm](https://npmjs.com) (or [yarn](https://yarnpkg.com/)), go to the `common` directory, and run `npm install` (or `yarn install`).
You can simply run LogarithmPlotter using `python3 run.py`. It automatically compiles the language files (requires You can simply run LogarithmPlotter using `python3 run.py`. It automatically compiles the language files (requires
`lrelease` to be installed and in path), and the JavaScript modules. `lrelease` to be installed and in path), and the JavaScript modules.
If you do not wish do recompile the files again on every run, you can use If you do not wish do recompile the files again on every run, you can use the build script (`scripts/build.sh`) and run
`python3 LogarithmPlotter/logarithmplotter.py`. `python3 build/runtime-pyside6/LogarithmPlotter/logarithmplotter.py`.
In order to test translations, you can use the `--lang=<lang code>` commandline option to force the locale. In order to test translations, you can use the `--lang=<lang code>` commandline option to force the locale.
@ -39,22 +39,18 @@ All scripts noted here can be found in the `scripts` directory.
You can generate installers for LogarithmPlotter after installing all the dependencies. You can generate installers for LogarithmPlotter after installing all the dependencies.
- Windows installer: - Windows installer (crosscompiling from Linux):
- Run the `build-windows.bat` script (or `build-wine.sh` if you're cross-compiling with wine on Linux) to build an - Run `build-wine.sh` (requires wine) to build an exe for LogarithmPlotter in build/runtime-pyside6/dist.
exe for LogarithmPlotter. - You also need [NSIS](https://nsis.sourceforge.io/Main_Page) (the [nsis](https://pkgs.org/download/nsis) package is available on linux).
- You also need [NSIS](https://nsis.sourceforge.io/Main_Page) (Linux users can install - Run the `package-wine.sh` script. You will find a logarithmplotter-setup.exe installer in the build/runtime-pyside6/dist/logarithmplotter/ folder.
the [nsis](https://pkgs.org/download/nsis) package).
- Run the `package-windows.bat` script (or `package-wine.sh`if you're cross-compiling on Linux). You will find a
logarithmplotter-setup.exe installer in the dist/logarithmplotter/ folder.
- MacOS Archive creator installer: - MacOS Archive creator installer:
- Run the `build-macosx.sh` script to build an .app for LogarithmPlotter which can be found in the dist directory. - Run the `build-macosx.sh` script to build an .app for LogarithmPlotter which can be found in the build/runtime-pyside6/dist directory.
- Run the `package-macosx.sh` script. You will find a LogarithmPlotter-v&lt;version&gt;-setup.dmg installer in the - Run the `package-macosx.sh` script. You will find a LogarithmPlotter-v&lt;version&gt;-setup.dmg installer in the
dist/ folder. build/runtime-pyside6/build/pysdist/ folder.
- Linux packages: - Linux packages:
- To build and install the flatpak, you - Run `package-deb.sh`. It will create an DSC and a DEB in build/runtime-pyside6/deb_dist/
need [flatpak-builder](https://docs.flatpak.org/en/latest/flatpak-builder.html) installed. - Run `scripts/build.sh` followed by `snapcraft`. It .snap file in the root directory.
- To build the snap, you need [snapcraft](https://snapcraft.io) installed. - See [the flatpak repo](https://github.com/Ad5001/eu.ad5001.LogarithmPlotter) for instrutions on how to build the flatpak.
- Run `package-linux.sh`.
## Contribute ## Contribute

View file

@ -449,4 +449,4 @@ type = ["pytest-mypy"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = ">=3.9,<3.13" python-versions = ">=3.9,<3.13"
content-hash = "867f6da20f7e5b66e5d6cf927b56b335e81ff15f53d4ee0fc3c68ab1603de7af" content-hash = "5636605737f21954e102a0110972e6bd3df07f2d5929f41fe541c7347c3ecf08"

View file

@ -9,8 +9,8 @@ package-mode = false
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.9,<3.13" python = ">=3.9,<3.13"
PySide6-Essentials = "^6.7.2" PySide6-Essentials = "^6.7"
pyside6-addons = "^6.7.2" PySide6-Addons = "^6.7"
[tool.poetry.group.packaging.dependencies] [tool.poetry.group.packaging.dependencies]
pyinstaller = "^6.10.0" pyinstaller = "^6.10.0"

View file

@ -4,7 +4,7 @@ cd "$DIR/.." || exit 1
rm -rf build rm -rf build
bash scripts/build.sh bash scripts/build.sh
cd build || exit 1 cd build/runtime-pyside6 || exit 1
rm $(find . -name "*.pyc") rm $(find . -name "*.pyc")
@ -21,12 +21,12 @@ pyinstaller --add-data "LogarithmPlotter/qml:qml" \
--exclude-module "Tkinter" \ --exclude-module "Tkinter" \
--noconsole \ --noconsole \
--noconfirm \ --noconfirm \
--icon=../assets/native/mac/logarithmplotter.icns \ --icon=../../assets/native/mac/logarithmplotter.icns \
--osx-bundle-identifier eu.ad5001.LogarithmPlotter \ --osx-bundle-identifier eu.ad5001.LogarithmPlotter \
-n LogarithmPlotter \ -n LogarithmPlotter \
LogarithmPlotter/logarithmplotter.py LogarithmPlotter/logarithmplotter.py
cp ../assets/native/mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist cp ../../assets/native/mac/Info.plist dist/LogarithmPlotter.app/Contents/Info.plist
# Remove QtWebEngine, 3D and all other unused libs libs # Remove QtWebEngine, 3D and all other unused libs libs
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/{QtWeb*,*3D*,QtRemote*,QtPdf,QtCharts,QtLocation,QtTest,QtMultimedia,QtSpatialAudio,QtDataVisualization,QtQuickParticles,QtChartsQml,QtScxml,QtDataVisualizationQml,QtTest,QtPositioningQuick,QtQuickTest,QtSql,QtSensorsQuick}

View file

@ -3,16 +3,16 @@ cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit
rm -rf build rm -rf build
bash scripts/build.sh bash scripts/build.sh
cd build || exit 1 cd build/runtime-pyside6 || exit 1
rm -rf $(find . -name "*.pyc") rm -rf $(find . -name "*.pyc")
wine pyinstaller --add-data "LogarithmPlotter/logarithmplotter.svg;." \ wine_py pyinstaller --add-data "LogarithmPlotter/logarithmplotter.svg;." \
--add-data "LogarithmPlotter/qml;qml" \ --add-data "LogarithmPlotter/qml;qml" \
--add-data "LogarithmPlotter/i18n;i18n" \ --add-data "LogarithmPlotter/i18n;i18n" \
--noconsole \ --noconsole \
LogarithmPlotter/logarithmplotter.py \ LogarithmPlotter/logarithmplotter.py \
--icon=../assets/native/win/logarithmplotter.ico \ --icon=../../assets/native/win/logarithmplotter.ico \
-n logarithmplotter -n logarithmplotter
# Copy Qt6ShaderTools, a required library for for Qt5Compat # Copy Qt6ShaderTools, a required library for for Qt5Compat

View file

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/../build/runtime-pyside6/dist" || exit 1
VERSION=0.6.0 VERSION=0.6.0
title="LogarithmPlotter v${VERSION} Setup" title="LogarithmPlotter v${VERSION} Setup"
@ -8,14 +8,13 @@ applicationName=LogarithmPlotter
backgroundPictureName=logarithmplotter-installer-background.png backgroundPictureName=logarithmplotter-installer-background.png
source=Installer source=Installer
cd build/dist
rm -rf Installer rm -rf Installer
mkdir -p Installer mkdir -p Installer
mkdir -p Installer/.background mkdir -p Installer/.background
cp ../../assets/native/mac/install-bg.png "./Installer/.background/${backgroundPictureName}" cp ../../../assets/native/mac/install-bg.png "./Installer/.background/${backgroundPictureName}"
cp -r LogarithmPlotter.app Installer/LogarithmPlotter.app cp -r LogarithmPlotter.app Installer/LogarithmPlotter.app
cp ../../LICENSE.md Installer/LICENSE.md cp ../../../LICENSE.md Installer/LICENSE.md
cp ../../README.md Installer/README.md cp ../../../README.md Installer/README.md
# Calculating folder size # Calculating folder size
duoutput=$(du -h Installer | tail -n1) duoutput=$(du -h Installer | tail -n1)

View file

@ -2,7 +2,7 @@
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1 cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." || exit 1
# Moving files # Moving files
cp assets/native/win/* README.md LICENSE.md build/dist/logarithmplotter/ cp assets/native/win/* README.md LICENSE.md build/runtime-pyside6/dist/logarithmplotter/
# Creating installer # Creating installer
cd build/dist/logarithmplotter/ cd build/runtime-pyside6/dist/logarithmplotter/ || exit 1
makensis installer.nsi makensis installer.nsi

View file

@ -1,7 +1,11 @@
#!/bin/bash #!/bin/bash
cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.."
rm -rf build
bash scripts/build.sh
# Run python tests # Run python tests
cp -r runtime-pyside6/tests build/runtime-pyside6
PYTHONPATH="$PYTHONPATH:." pytest --cov=LogarithmPlotter --cov-report term-missing . PYTHONPATH="$PYTHONPATH:." pytest --cov=LogarithmPlotter --cov-report term-missing .
npm test npm test

View file

@ -69,7 +69,7 @@ parts:
logarithmplotter.desktop: usr/share/applications/logarithmplotter.desktop logarithmplotter.desktop: usr/share/applications/logarithmplotter.desktop
x-logarithm-plot.xml: usr/share/mime/packages/x-logarithm-plot.xml x-logarithm-plot.xml: usr/share/mime/packages/x-logarithm-plot.xml
application-x-logarithm-plot.svg: usr/share/mime/packages/application-x-logarithm-plot.svg application-x-logarithm-plot.svg: usr/share/mime/packages/application-x-logarithm-plot.svg
linuxfiles: filetypeicon:
source: assets/ source: assets/
plugin: dump plugin: dump
organize: organize: