kopia lustrzana https://github.com/inkstitch/inkstitch
commit
820a69339d
42
.travis.yml
42
.travis.yml
|
@ -23,6 +23,11 @@ matrix:
|
|||
sudo: required
|
||||
env: BUILD=windows
|
||||
if: tag =~ ^v[0-9.]+$ OR branch != master
|
||||
- language: generic
|
||||
os: osx
|
||||
sudo: required
|
||||
env: BUILD=osx
|
||||
if: tag =~ ^v[0-9.]+$ OR branch != master
|
||||
branches:
|
||||
except:
|
||||
- /^dev-build-/
|
||||
|
@ -89,6 +94,31 @@ install:
|
|||
|
||||
wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install -r requirements.txt
|
||||
|
||||
set +x
|
||||
elif [ "$BUILD" = "osx" ]; then
|
||||
set -x
|
||||
brew update
|
||||
#brew outdated python || brew upgrade python
|
||||
|
||||
# brew told me to do this
|
||||
mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages
|
||||
|
||||
# the 3 in pygobject3 signifies gtk3, not python3
|
||||
brew install pygobject3 gtk+3
|
||||
|
||||
# for msgfmt
|
||||
brew link gettext --force
|
||||
|
||||
export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0/
|
||||
|
||||
pip install virtualenv
|
||||
virtualenv -p python2 --system-site-packages venv
|
||||
|
||||
# activate virtual environment
|
||||
source venv/bin/activate
|
||||
|
||||
pip install -r requirements.txt
|
||||
pip install pyinstaller
|
||||
set +x
|
||||
elif [ -n "$LINT" ]; then
|
||||
pip install flake8
|
||||
|
@ -97,11 +127,19 @@ before_script:
|
|||
- "echo LINT: $LINT BUILD: $BUILD"
|
||||
script:
|
||||
- |
|
||||
set -e
|
||||
if [ -n "$BUILD" -a "$DEBUG_BUILD" = "$BUILD" ]; then
|
||||
mkdir .ssh
|
||||
echo -e "${SSH_KEY}" > .ssh/id_rsa
|
||||
chmod -R go-rwx .ssh
|
||||
mkfifo fifo
|
||||
( while :; do cat fifo | /bin/bash -i 2>&1 | nc -l 127.0.0.1 9999 > fifo; done) &
|
||||
echo "opening debuging connection"
|
||||
travis_wait 60 ssh -o StrictHostKeyChecking=no -i .ssh/id_rsa -N -R 9999:localhost:9999 debug@lex.gd
|
||||
fi
|
||||
if [ -n "$LINT" ]; then
|
||||
flake8 . --count --exit-zero --select=E901,E999,F821,F822,F823 --show-source --statistics --exclude=embroidermodder
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=embroidermodder
|
||||
elif [ "$BUILD" = "linux" ]; then
|
||||
elif [ "$BUILD" = "linux" -o "$BUILD" = "osx" ]; then
|
||||
make dist
|
||||
elif [ "$BUILD" = "windows" ]; then
|
||||
# work around some bug... pyinstaller? shapely? not sure.
|
||||
|
|
4
Makefile
4
Makefile
|
@ -2,7 +2,7 @@ EXTENSIONS:=inkstitch
|
|||
|
||||
# This gets the branch name or the name of the tag
|
||||
VERSION:=$(TRAVIS_BRANCH)
|
||||
OS:=$(shell uname)
|
||||
OS:=$(TRAVIS_OS_NAME)
|
||||
ARCH:=$(shell uname -m)
|
||||
|
||||
dist: distclean locales
|
||||
|
@ -17,7 +17,7 @@ dist: distclean locales
|
|||
if [ "$$BUILD" = "windows" ]; then \
|
||||
cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
|
||||
else \
|
||||
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
|
||||
cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
|
||||
fi
|
||||
|
||||
distclean:
|
||||
|
|
|
@ -22,6 +22,12 @@ pyinstaller_args+="--hidden-import gi.repository.Gtk "
|
|||
# mac and windows build seem to miss wx import
|
||||
pyinstaller_args+="--hidden-import wx "
|
||||
|
||||
# We need to use the precompiled bootloader linked with graphical Mac OS X
|
||||
# libraries if we develop a GUI application for Mac:
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
pyinstaller_args+="--windowed "
|
||||
fi
|
||||
|
||||
# This lets pyinstaller see inkex.py, etc.
|
||||
pyinstaller_args+="-p inkscape-0.92.3/share/extensions "
|
||||
|
||||
|
@ -45,6 +51,11 @@ 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 [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
rm -rf dist/inkstitch.app/
|
||||
fi
|
||||
|
||||
# Inkscape doesn't let us run native binaries as extensions(?!). Instead we
|
||||
# add this stub script which executes the binary that pyinstaller creates.
|
||||
cp stub.py dist/inkstitch.py
|
||||
|
|
|
@ -424,7 +424,7 @@ class SettingsFrame(wx.Frame):
|
|||
self.simulate_window.stop()
|
||||
self.simulate_window.load(stitch_plan=stitch_plan)
|
||||
else:
|
||||
my_rect = self.GetRect()
|
||||
my_rect = self.GetScreenRect()
|
||||
simulator_pos = my_rect.GetTopRight()
|
||||
simulator_pos.x += 5
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue