From faae76fbbdf42a49b8a6b4d44b478fbe080b635d Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 26 Jan 2022 19:48:46 +0100 Subject: [PATCH] Moving scripts to their own dedicated directory. --- README.md | 8 +++++--- build-macosx.sh => scripts/build-macosx.sh | 3 +++ build-windows.bat => scripts/build-windows.bat | 0 build-wine.sh => scripts/build-wine.sh | 2 ++ package-linux.sh => scripts/package-linux.sh | 1 + package-macosx.sh => scripts/package-macosx.sh | 4 +++- package-windows.bat => scripts/package-windows.bat | 0 package-wine.sh => scripts/package-wine.sh | 2 ++ {linux => scripts}/sign-deb.sh | 0 9 files changed, 16 insertions(+), 4 deletions(-) rename build-macosx.sh => scripts/build-macosx.sh (94%) rename build-windows.bat => scripts/build-windows.bat (100%) rename build-wine.sh => scripts/build-wine.sh (88%) rename package-linux.sh => scripts/package-linux.sh (93%) rename package-macosx.sh => scripts/package-macosx.sh (96%) rename package-windows.bat => scripts/package-windows.bat (100%) rename package-wine.sh => scripts/package-wine.sh (71%) rename {linux => scripts}/sign-deb.sh (100%) diff --git a/README.md b/README.md index d1580c8..7c9e14f 100644 --- a/README.md +++ b/README.md @@ -22,16 +22,18 @@ In order to test translations, you can use the `--lang=` command line ## Install ### Generate installers: -You can generate installers from AccountFree after installing all the dependencies: +All scripts noted here can be found in the `scripts` directory. + +You can generate installers from LogarithmPlotter after installing all the dependencies: For all builds, you need [Python 3](https://python.org) with [PySide2](https://pypi.org/project/PySide2/) installable with `pip install PySide2`. - Windows installer: - You need `pyinstaller`. You can install it using `pip install pyinstaller`. - Run the `build-windows.bat` script (or `build-wine.sh` if you're cross-compiling with wine on Linux) to build an exe for LogarithmPlotter. - You also need [NSIS](https://nsis.sourceforge.io/Main_Page) (Linux users can install 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/accountfree/ folder. + - 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/accountfree/ folder. - MacOS Archive creator installer: - You need `pyinstaller`. You can install it using `pip install pyinstaller`. - - Run the `build-macosx.sh` script to build an .app for AccountFree 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 dist directory. - Run the `package-macosx.sh` script. You will find a LogarithmPlotter-v0.1-dev-setup.dmg installer in the dist/ folder. - Linux packages: - To build a DEB, you need DPKG and stdeb. You can install the later by using `pip install stdeb`. diff --git a/build-macosx.sh b/scripts/build-macosx.sh similarity index 94% rename from build-macosx.sh rename to scripts/build-macosx.sh index 08554ce..c4b7686 100755 --- a/build-macosx.sh +++ b/scripts/build-macosx.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." + + rm $(find . -name "*.qmlc") rm $(find . -name "*.pyc") python3 -m pip install -U pyinstaller diff --git a/build-windows.bat b/scripts/build-windows.bat similarity index 100% rename from build-windows.bat rename to scripts/build-windows.bat diff --git a/build-wine.sh b/scripts/build-wine.sh similarity index 88% rename from build-wine.sh rename to scripts/build-wine.sh index 940f32e..3406bbc 100644 --- a/build-wine.sh +++ b/scripts/build-wine.sh @@ -1,4 +1,6 @@ #!/bin/bash +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." + # Giving pyinstaller another run rm $(find . -name "*.qmlc") rm -rf $(find . -name "*.pyc") diff --git a/package-linux.sh b/scripts/package-linux.sh similarity index 93% rename from package-linux.sh rename to scripts/package-linux.sh index ba53904..9f8db9e 100755 --- a/package-linux.sh +++ b/scripts/package-linux.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." # Building translations cd "LogarithmPlotter/i18n/" diff --git a/package-macosx.sh b/scripts/package-macosx.sh similarity index 96% rename from package-macosx.sh rename to scripts/package-macosx.sh index 770abcb..a228092 100644 --- a/package-macosx.sh +++ b/scripts/package-macosx.sh @@ -1,4 +1,6 @@ -#!/bin/bash +#!/usr/bin/env bash +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." + VERSION=0.1.6 title="LogarithmPlotter v${VERSION} Setup" finalDMGName="LogarithmPlotter-v${VERSION}-setup.dmg" diff --git a/package-windows.bat b/scripts/package-windows.bat similarity index 100% rename from package-windows.bat rename to scripts/package-windows.bat diff --git a/package-wine.sh b/scripts/package-wine.sh similarity index 71% rename from package-wine.sh rename to scripts/package-wine.sh index 2c2757f..98209e0 100644 --- a/package-wine.sh +++ b/scripts/package-wine.sh @@ -1,4 +1,6 @@ #!/bin/bash +cd "$(dirname "$(readlink -f "$0" || realpath "$0")")/.." + # Moving files cp win/* README.md LICENSE.md dist/logarithmplotter/ # Creating installer diff --git a/linux/sign-deb.sh b/scripts/sign-deb.sh similarity index 100% rename from linux/sign-deb.sh rename to scripts/sign-deb.sh