From e84a86d4ac0caf29d6074728376ff0a594243fec Mon Sep 17 00:00:00 2001 From: Kaalleen <36401965+kaalleen@users.noreply.github.com> Date: Thu, 4 Mar 2021 18:40:53 +0100 Subject: Update for Inkscape 1.0 (#880) * update for inkscape 1.0 * add about extension * Build improvements for the inkscape1.0 branch (#985) * zip: export real svg not stitch plan * #411 and #726 * Tools for Font Creators (#1018) * ignore very small holes in fills * remove embroider (#1026) * auto_fill: ignore shrink_or_grow if result is empty (#589) * break apart: do not ignore small fills Co-authored-by: Hagen Fritsch Co-authored-by: Lex Neva --- bin/build-distribution-archives | 10 ++++++---- bin/build-python | 5 ----- bin/generate-version-file | 10 ++++++++++ bin/inkstitch-fonts-gettext | 8 ++++---- bin/pyembroidery-gettext | 4 ++-- 5 files changed, 22 insertions(+), 15 deletions(-) create mode 100755 bin/generate-version-file (limited to 'bin') diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 6e11818d..6402122b 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -4,12 +4,14 @@ VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e OS="${BUILD:-$(uname)}" ARCH="$(uname -m)" -cp -a images/examples palettes symbols fonts dist/inkstitch -cp -a icons locales print dist/inkstitch/bin - if [ "$BUILD" = "osx" ]; then - cp -a electron/build/mac dist/inkstitch/electron + cp -a images/examples palettes symbols fonts LICENSE VERSION dist/inkstitch.app/Contents + cp -a icons locales print dist/inkstitch.app/Contents/MacOS + cp -a electron/build/mac dist/inkstitch.app/Contents/electron + rm -rf dist/inkstitch/ else + cp -a images/examples palettes symbols fonts LICENSE VERSION dist/inkstitch + cp -a icons locales print dist/inkstitch/bin cp -a electron/build/*-unpacked dist/inkstitch/electron fi diff --git a/bin/build-python b/bin/build-python index 0dd3e0a0..88e166ae 100755 --- a/bin/build-python +++ b/bin/build-python @@ -52,8 +52,3 @@ shopt -s dotglob mkdir dist/bin mv dist/inkstitch/* dist/bin mv dist/bin dist/inkstitch - -# on Mac, pyinstaller creates a .app version as well, but we don't need that -if [ "$BUILD" = "osx" ]; then - rm -rf dist/inkstitch.app/ -fi diff --git a/bin/generate-version-file b/bin/generate-version-file new file mode 100755 index 00000000..36c70944 --- /dev/null +++ b/bin/generate-version-file @@ -0,0 +1,10 @@ +#!/bin/bash + +VERSION="${GITHUB_REF##*/}" +OS="${BUILD:-$(uname)}" + +if [[ "$VERSION" == "" ]]; then + VERSION="Manual Install" +fi + +echo "${VERSION} (${OS})" > VERSION diff --git a/bin/inkstitch-fonts-gettext b/bin/inkstitch-fonts-gettext index 8b802fee..24fb9fdf 100755 --- a/bin/inkstitch-fonts-gettext +++ b/bin/inkstitch-fonts-gettext @@ -12,8 +12,8 @@ for font in sorted(os.listdir(fonts_dir)): with open(os.path.join(fonts_dir, font, "font.json")) as font_json: font_metadata = json.load(font_json) - print "# L10N name of font in fonts/%s" % font - print "_(%s)" % repr(font_metadata.get("name", "")) + print("# L10N name of font in fonts/%s" % font) + print("_(%s)" % repr(font_metadata.get("name", ""))) - print "# L10N description of font in fonts/%s" % font - print "_(%s)" % repr(font_metadata.get("description", "")) + print("# L10N description of font in fonts/%s" % font) + print("_(%s)" % repr(font_metadata.get("description", ""))) diff --git a/bin/pyembroidery-gettext b/bin/pyembroidery-gettext index ac9bd1ab..f4e844b9 100755 --- a/bin/pyembroidery-gettext +++ b/bin/pyembroidery-gettext @@ -6,5 +6,5 @@ import pyembroidery # generate fake python code containing the descriptions of pyembroidery formats # as gettext calls so that pybabel will extract them into messages.po for format in pyembroidery.supported_formats(): - print "# L10N description for pyembroidery file format: %s" % format['extension'] - print "_(%s)" % repr(format['description']) + print("# L10N description for pyembroidery file format: %s" % format['extension']) + print("_(%s)" % repr(format['description'])) -- cgit v1.3.1