kopia lustrzana https://github.com/inkstitch/inkstitch
windows build github action
rodzic
9747e057a2
commit
13fe706716
|
@ -0,0 +1,45 @@
|
|||
name: Build
|
||||
on: [push]
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '2.7.x'
|
||||
architecture: 'x86'
|
||||
- name: download dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
curl -sOL https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl
|
||||
curl -sOL https://inkscape.org/en/gallery/item/12187/inkscape-0.92.3.tar.bz2
|
||||
- name: install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install Shapely-1.6.3-cp27-cp27m-win32.whl
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller==3.3.1
|
||||
|
||||
tar -jxf inkscape-0.92.3.tar.bz2
|
||||
rm inkscape-0.92.3.tar.bz2
|
||||
mv inkscape-0.92.3 inkscape
|
||||
|
||||
echo "::add-path::${{ env.pythonLocation }}\bin"
|
||||
- name: fix geos
|
||||
shell: bash
|
||||
run: |
|
||||
cd "${{ env.pythonLocation }}\Lib/site-packages/shapely/DLLs"
|
||||
cp geos_c.dll geos.dll
|
||||
- shell: bash
|
||||
run: |
|
||||
make dist
|
||||
find .
|
||||
env:
|
||||
BUILD: windows
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: inkstitch-windows
|
||||
path: artifacts
|
6
Makefile
6
Makefile
|
@ -10,11 +10,7 @@ distclean:
|
|||
.PHONY: inx
|
||||
inx: locales
|
||||
mkdir -p inx
|
||||
if [ "$$BUILD" = "windows" ]; then \
|
||||
wine c:\\Python\\python.exe bin/generate-inx-files; \
|
||||
else \
|
||||
bin/generate-inx-files; \
|
||||
fi
|
||||
python bin/generate-inx-files; \
|
||||
|
||||
.PHONY: messages.po
|
||||
messages.po:
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# TRAVIS_BRANCH is the branch name or the name of the tag.
|
||||
VERSION="$(echo ${TRAVIS_BRANCH} | tr / -)"
|
||||
OS="${TRAVIS_OS_NAME}"
|
||||
VERSION="$(echo ${TRAVIS_BRANCH:-${GITHUB_REF}} | tr / -)"
|
||||
OS="${TRAVIS_OS_NAME:-$(uname)}"
|
||||
ARCH="$(uname -m)"
|
||||
|
||||
MACVERSION="${TRAVIS_OSX_IMAGE}"
|
||||
if [ ${MACVERSION} = "xcode9.2" ]; then
|
||||
if [ "${MACVERSION}" = "xcode9.2" ]; then
|
||||
MACVERSION="sierra"
|
||||
elif [ ${MACVERSION} = "xcode9.4" ]; then
|
||||
elif [ "${MACVERSION}" = "xcode9.4" ]; then
|
||||
MACVERSION="high_sierra"
|
||||
elif [ ${MACVERSION} = "xcode10.2" ]; then
|
||||
elif [ "${MACVERSION}" = "xcode10.2" ]; then
|
||||
MACVERSION="mojave"
|
||||
fi
|
||||
|
||||
|
@ -21,6 +23,8 @@ else
|
|||
cp -a electron/dist/*-unpacked dist/inkstitch/electron
|
||||
fi
|
||||
|
||||
mkdir artifacts
|
||||
|
||||
for d in inx/*; do
|
||||
lang=${d%.*}
|
||||
lang=${lang#*/}
|
||||
|
@ -28,11 +32,12 @@ for d in inx/*; do
|
|||
|
||||
cd dist
|
||||
if [ "$BUILD" = "windows" ]; then
|
||||
zip -r ../inkstitch-${VERSION}-win32-${lang}.zip *
|
||||
echo
|
||||
python -m zipfile -c ../artifacts/inkstitch-${VERSION}-win32-${lang}.zip *
|
||||
elif [ "$BUILD" = "osx" ]; then
|
||||
tar zcf ../inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz *
|
||||
tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${MACVERSION}-${ARCH}-$lang.tar.gz *
|
||||
else
|
||||
tar zcf ../inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz *
|
||||
tar zcf ../artifacts/inkstitch-${VERSION}-${OS}-${ARCH}-$lang.tar.gz *
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$BUILD" = "windows" -o "$BUILD" = "linux" ]; then
|
||||
if [ "$BUILD" = "windows" ]; then
|
||||
args="-w --ia32"
|
||||
else
|
||||
if [ "$BUILD" = "windows" ]; then
|
||||
cd electron
|
||||
yarn --link-duplicates --pure-lockfile && yarn run dist -w --ia32
|
||||
elif [ "$BUILD" = "linux" ]; then
|
||||
args="-l --x64"
|
||||
fi
|
||||
|
||||
docker run --rm \
|
||||
-e ELECTRON_CACHE=$HOME/.cache/electron \
|
||||
|
|
|
@ -35,7 +35,7 @@ pyinstaller_args+="-p inkscape/share/extensions "
|
|||
pyinstaller_args+="--log-level DEBUG "
|
||||
|
||||
if [ "$BUILD" = "windows" ]; then
|
||||
wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args inkstitch.py
|
||||
pyinstaller $pyinstaller_args inkstitch.py
|
||||
else
|
||||
# without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of
|
||||
# wxpython's shared libraries
|
||||
|
|
Ładowanie…
Reference in New Issue