diff options
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/build-distribution-archives | 7 | ||||
| -rwxr-xr-x | bin/build-electron | 4 | ||||
| -rwxr-xr-x | bin/build-python | 21 | ||||
| -rw-r--r-- | bin/build-windows-installer | 8 |
4 files changed, 38 insertions, 2 deletions
diff --git a/bin/build-distribution-archives b/bin/build-distribution-archives index 584c0579..d20a9a17 100755 --- a/bin/build-distribution-archives +++ b/bin/build-distribution-archives @@ -1,8 +1,11 @@ VERSION="$(echo ${GITHUB_REF} | sed -e 's|refs/heads/||' -e 's|refs/tags/||' -e 's|/|-|g')" OS="${BUILD:-$(uname)}" mkdir artifacts + if [ "$BUILD" = "osx" ]; then cp -a icons locales print LICENSE VERSION images/examples palettes symbols fonts inx dist/inkstitch.app/Contents/Resources + # adding version to Info.plist + sed -i '' 's/0.0.0/'${VERSION}'/' dist/inkstitch.app/Contents/Info.plist rm -rf dist/inkstitch/ temp_path="/tmp/inkstitch/" # inside the scripts folder are: @@ -68,6 +71,10 @@ if [ "$BUILD" = "osx" ]; then --install-location ${temp_path}inkstitch.app \ artifacts/inkstitch-${VERSION}-${OS}.pkg fi + # Creating the zip for Drag n' Drop install + cd dist + python -m zipfile -c ../artifacts/inkstitch-${VERSION}-${OS}.zip * + cd .. else cp -a images/examples palettes symbols fonts inx LICENSE VERSION dist/inkstitch cp -a icons locales print dist/inkstitch/bin diff --git a/bin/build-electron b/bin/build-electron index f375e347..9fdb88ae 100755 --- a/bin/build-electron +++ b/bin/build-electron @@ -12,6 +12,10 @@ elif [ "$BUILD" = "osx" ]; then args="-m" fi +# electron version setting on release +if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then + sed -i'' -e 's/11.99.11/'"${VERSION#v}"'/' electron/package.json +fi cd electron which yarn > /dev/null 2>&1 || npm install -g yarn yarn --link-duplicates --pure-lockfile diff --git a/bin/build-python b/bin/build-python index 5d16cdf8..e84e84a5 100755 --- a/bin/build-python +++ b/bin/build-python @@ -1,7 +1,7 @@ #!/bin/bash set -e - +info_year=$( date "+%Y" ) site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" if [ "$BUILD" = "linux" ]; then @@ -39,6 +39,7 @@ pyinstaller_args+="--log-level DEBUG " # This adds bundle identifier in reverse DSN format for macos if [ "$BUILD" = "osx" ]; then pyinstaller_args+="--osx-bundle-identifier org.inkstitch.app " + pyinstaller_args+="-i electron/build/icons/mac/inkstitch.icns" if [[ -z ${GITHUB_REF} ]]; then : else @@ -47,6 +48,24 @@ if [ "$BUILD" = "osx" ]; then fi if [ "$BUILD" = "windows" ]; then + if [[ "$VERSION" =~ ^v[0-9][.0-9]+$ ]]; then + # setting the file and product version for release + # Code to remove the periods in the version number + ENT=. + SAL=${VERSION#v}$ENT + INFO_VERSION=() + while [[ $SAL ]]; do + INFO_VERSION+=( "${SAL%%"$ENT"*}" ); + SAL=${SAL#*"$ENT"}; + done; + sed -i'' 's/3, 2, 1,/'"${INFO_VERSION[0]}, ${INFO_VERSION[1]}, ${INFO_VERSION[2]},"'/' installer_scripts/file_version_info.txt + fi + # set year and version in version_info + sed -i'' 's/1.1.1/'"${VERSION#v}"'/' installer_scripts/file_version_info.txt + sed -i'' 's/1234/'"${info_year}"'/' installer_scripts/file_version_info.txt + # sets icon to inkstitch.exe + pyinstaller_args+="--i electron/build/icons/win/inkstitch.ico " + pyinstaller_args+="--version-file installer_scripts/file_version_info.txt " python -m PyInstaller $pyinstaller_args inkstitch.py else # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of diff --git a/bin/build-windows-installer b/bin/build-windows-installer index 44c29742..a2d421ce 100644 --- a/bin/build-windows-installer +++ b/bin/build-windows-installer @@ -6,10 +6,16 @@ mkdir win cp installer_scripts/template.iss win/win_build.iss # adds the year and version to the inno installer info_year=$( date "+%Y" ) -copyright_year="#define COPYRIGHT \""${info_year}"\" + URL" +copyright_year="#define COPYRIGHT \""${info_year}"\"" version_block="#define VERSION \""${VERSION}"\"" sed -i'' -e '/;inkstitch-year/ a\'$'\n'"${copyright_year}"'' win/win_build.iss sed -i'' -e '/;inkstitch-version/ a\'$'\n'"${version_block}"'' win/win_build.iss iscc win/win_build.iss mv win/inkstitch.exe artifacts/inkstitch-${VERSION}-${OS}.exe +cd dist +echo "Creating zip" +# The python zipfile command line utility can't handle directories +# containing files with UTF-8 names on Windows, so we use 7-zip instead. +7z a ../artifacts/inkstitch-${VERSION}-${OS}.zip * +cd .. |
