kopia lustrzana https://github.com/inkstitch/inkstitch
				
				
				
			
							rodzic
							
								
									4c5e578939
								
							
						
					
					
						commit
						633ec88186
					
				
							
								
								
									
										58
									
								
								.travis.yml
								
								
								
								
							
							
						
						
									
										58
									
								
								.travis.yml
								
								
								
								
							|  | @ -15,10 +15,13 @@ matrix: | |||
|     env: LINT=true | ||||
|     sudo: false | ||||
| 
 | ||||
|   # only bother to build if we're going to deploy a release | ||||
|   - python: 2.7 | ||||
|     sudo: required | ||||
|     env: BUILD=true | ||||
|     env: BUILD=linux | ||||
|     if: tag =~ ^v[0-9.]+$ OR branch != master | ||||
|   - python: 2.7 | ||||
|     sudo: required | ||||
|     env: BUILD=windows | ||||
|     if: tag =~ ^v[0-9.]+$ OR branch != master | ||||
| branches: | ||||
|   except: | ||||
|  | @ -27,16 +30,17 @@ cache: pip | |||
| install: | ||||
|   - | | ||||
|     if [ -n "$BUILD" ]; then | ||||
|       # Need this for inkex.py and friends | ||||
|       wget -q https://inkscape.org/en/gallery/item/11254/inkscape-0.92.2.tar.bz2 | ||||
|       tar jxf inkscape-0.92.2.tar.bz2 | ||||
|       rm inkscape-0.92.2.tar.bz2 | ||||
|     fi | ||||
|     if [ "$BUILD" = "linux" ]; then | ||||
|       # For some bizarre reason, this build has been failing due to the | ||||
|       # key for the mongodb repo expiring.  Maybe Travis includes the | ||||
|       # mongodb repo by default...? | ||||
|       sudo rm /etc/apt/sources.list.d/mongodb*.list | ||||
| 
 | ||||
|       # Need inkscape >=0.92 for inkex.py and friends | ||||
|       sudo add-apt-repository --yes ppa:inkscape.dev/stable | ||||
|       sudo apt-get update | ||||
|       sudo apt-get install inkscape | ||||
| 
 | ||||
|       # for shapely | ||||
|       sudo apt-get install libgeos-dev | ||||
| 
 | ||||
|  | @ -61,7 +65,38 @@ install: | |||
|       pip install --no-binary shapely -r requirements.txt | ||||
|      | ||||
|       pip install pyinstaller | ||||
|     else | ||||
|     elif [ "$BUILD" = "windows" ]; then | ||||
|       set -x | ||||
| 
 | ||||
|       sudo add-apt-repository ppa:ubuntu-wine/ppa -y | ||||
|       sudo apt-get update -qq | ||||
|       export DISPLAY=:99.0 | ||||
|       sh -e /etc/init.d/xvfb start | ||||
|       sleep 3 | ||||
|       sudo apt-get install -y wine | ||||
| 
 | ||||
|       export WINEDEBUG=-all | ||||
| 
 | ||||
|       wget -q https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/windows-libembroidery.tar.gz | ||||
|       tar zxf windows-libembroidery.tar.gz | ||||
|       rm windows-libembroidery.tar.gz | ||||
| 
 | ||||
|       wget -q http://download.microsoft.com/download/1/1/1/1116b75a-9ec3-481a-a3c8-1777b5381140/vcredist_x86.exe | ||||
|       wine vcredist_x86.exe /q | ||||
| 
 | ||||
|       wget -q https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi --output-document=python.msi | ||||
|       wine msiexec /i python.msi /qn TARGETDIR=C:\\Python | ||||
| 
 | ||||
|       wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install pyinstaller --upgrade | ||||
|       wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install setuptools --upgrade | ||||
| 
 | ||||
|       wget -q https://github.com/lexelby/inkstitch-build-objects/releases/download/v1.0.0/Shapely-1.6.3-cp27-cp27m-win32.whl | ||||
|       wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install Shapely-1.6.3-cp27-cp27m-win32.whl | ||||
| 
 | ||||
|       wine c:\\Python\\python.exe c:\\Python\\scripts\\pip.exe install -r requirements.txt | ||||
| 
 | ||||
|       set +x | ||||
|     elif [ -n "$LINT" ]; then | ||||
|       pip install flake8 | ||||
|     fi | ||||
| before_script: | ||||
|  | @ -71,13 +106,17 @@ script: | |||
|     if [ -n "$LINT" ]; then | ||||
|       flake8 . --count --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 [ -n "$BUILD" ]; then | ||||
|     elif [ "$BUILD" = "linux" ]; then | ||||
|       ( | ||||
|         cd embroidermodder/experimental | ||||
|         qmake swigpython.pro | ||||
|         make | ||||
|       )         | ||||
|       make dist | ||||
|     elif [ "$BUILD" = "windows" ]; then | ||||
|       # work around some bug... pyinstaller? shapely? not sure. | ||||
|       cp $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos_c.dll') $(winepath 'C:\Python\lib\site-packages\shapely\DLLs\geos.dll') | ||||
|       make dist | ||||
|     else | ||||
|       true | ||||
|     fi | ||||
|  | @ -104,6 +143,7 @@ deploy: | |||
|       secure: pYORXHcn0hPcMIo6+brVE+wYce272H4COp1iXmPvBUz64MAX0Bdm5UX6cTAvzwNd9Hhi2nnWebaoS5AiPelbZgQoZJXsy4whrp7+ZrkQZkhGcqsSqXN6j5k5xdGeFX4k37T7eGkFyajTAdIWB3locHcikKN6N6PnyCPxGD/xuxiD1fJSVKGqBOptBYsqFtMddKy3aT0nmRG/2pMElq2Fcxozo+rR00j2/3npVoh2VTRt2L0S/DrX3zKT4vi2+AQ1MmKEAfF/YxCPybJGPe+wHz4egs0+PIJYb7pSZL8Ja81IS4v5cmmy/r2la815amyRyXwZXbJwBX8h9wPa7dwGStMvJdUidlqaXjKMsWba3QbD6YHOi0+UOFvWeubCDqXKhqxVAvZyCvXCx2WPlBfGWsJDHK/j2pU5Iul5Jz2Zsa3PLYA3UeGWVy081SZNuklNdccKGTokntFnR3pGM/jDN/JK7RkvuPM5qQqn3gludQnrdo/Kw0I77hAEDasgUyO8cweSfyqOXBN0dkbLjfBVRslRRRuC5fV9MIqFvLclaPfMlxsSTdDO4MGJRsF7VvFySBdh0xK7Rm+Vb9jYjCR3FV+b8TRsnY0eD2eFM+rmQt/OYdNIs6emVrTXCcAIzq4JoKZdFDIDDRsiztGSjIBB0+rSXmiUMtCiUo5GS/7zxGs= | ||||
|     file: | ||||
|       - '*.tar.gz' | ||||
|       - '*.zip' | ||||
|     file_glob: true | ||||
|     skip_cleanup: true | ||||
|     prerelease: true | ||||
|  |  | |||
							
								
								
									
										6
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										6
									
								
								Makefile
								
								
								
								
							|  | @ -9,7 +9,11 @@ dist: distclean locales | |||
| 	bin/build-dist $(EXTENSIONS) | ||||
| 	cp *.inx dist | ||||
| 	mv locales dist/inkstitch/bin | ||||
| 	cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz * | ||||
| 	if [ "$$BUILD" = "windows" ]; then \
 | ||||
| 		cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \
 | ||||
| 	else \
 | ||||
|     	cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \
 | ||||
| 	fi | ||||
| 
 | ||||
| distclean: | ||||
| 	rm -rf build dist *.spec *.tar.gz | ||||
|  |  | |||
|  | @ -2,9 +2,11 @@ | |||
| 
 | ||||
| site_packages="$(python -c "import os; print(os.path.dirname(os.__file__) + '/site-packages')")" | ||||
| 
 | ||||
| if [ "$TRAVIS_OS_NAME" = "linux" -a "$BUILD" != "windows" ]; then | ||||
|     # pyinstaller misses these two | ||||
|     pyinstaller_args+="--add-binary /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so:. " | ||||
|     pyinstaller_args+="--add-binary  /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " | ||||
| fi | ||||
| 
 | ||||
| # This one's tricky.  ink/stitch doesn't actually _use_ gi.repository.Gtk, | ||||
| # but it does use GTK (through wxPython).  pyinstaller has some special | ||||
|  | @ -15,17 +17,27 @@ pyinstaller_args+="--add-binary  /usr/lib/x86_64-linux-gnu/libproxy.so.1:. " | |||
| # above! | ||||
| pyinstaller_args+="--hidden-import gi.repository.Gtk " | ||||
| 
 | ||||
| # This lets pyinstaller see inkex.py, etc. | ||||
| pyinstaller_args+="-p /usr/share/inkscape/extensions " | ||||
| # mac and windows build seem to miss wx and libembroidery import | ||||
| pyinstaller_args+="--hidden-import wx --hidden-import libembroidery " | ||||
| 
 | ||||
| # for libembroidery | ||||
| if [ -d windows-libembroidery ]; then | ||||
|     pyinstaller_args+="-p windows-libembroidery " | ||||
| else | ||||
|     pyinstaller_args+="-p embroidermodder/experimental/python/binding " | ||||
| fi | ||||
| 
 | ||||
| # This lets pyinstaller see inkex.py, etc. | ||||
| pyinstaller_args+="-p inkscape-0.92.2/share/extensions " | ||||
| 
 | ||||
| mkdir -p dist/inkstitch/bin | ||||
| for extension in "$@"; do | ||||
|     if [ "$BUILD" = "windows" ]; then | ||||
|         wine c:\\Python\\scripts\\pyinstaller.exe $pyinstaller_args ${extension}.py | ||||
|     else | ||||
|         # without the LD_LIBRARY_PATH, it seems that pyinstaller can't find all of | ||||
|         # wxpython's shared libraries | ||||
|         LD_LIBRARY_PATH="${site_packages}/wx" pyinstaller $pyinstaller_args ${extension}.py; | ||||
|     fi | ||||
| 
 | ||||
| 	# By default, pyinstaller will treat each of ink/stitch's extensions | ||||
| 	# separately.  This means it packages a lot of the same shared libraries (like | ||||
|  |  | |||
|  | @ -287,7 +287,7 @@ class ParamsTab(ScrolledPanel): | |||
|         summary_box = wx.StaticBox(self, wx.ID_ANY, label=_("Inkscape objects")) | ||||
|         sizer = wx.StaticBoxSizer(summary_box, wx.HORIZONTAL) | ||||
| #        sizer = wx.BoxSizer(wx.HORIZONTAL) | ||||
|         self.description = wx.StaticText(self, style=wx.TE_WORDWRAP) | ||||
|         self.description = wx.StaticText(self) | ||||
|         self.update_description() | ||||
|         self.description.SetLabel(self.description_text) | ||||
|         self.description_container = box | ||||
|  | @ -757,7 +757,7 @@ class EmbroiderParams(inkex.Effect): | |||
| 
 | ||||
| def save_stderr(): | ||||
|     # GTK likes to spam stderr, which inkscape will show in a dialog. | ||||
|     null = open('/dev/null', 'w') | ||||
|     null = open(os.devnull, 'w') | ||||
|     sys.stderr_dup = os.dup(sys.stderr.fileno()) | ||||
|     os.dup2(null.fileno(), 2) | ||||
|     sys.stderr_backup = sys.stderr | ||||
|  |  | |||
|  | @ -260,7 +260,7 @@ class EmbroiderySimulator(wx.Frame): | |||
| 
 | ||||
|     def on_paint(self, e): | ||||
|         dc = wx.PaintDC(self.panel) | ||||
|         dc.DrawBitmap(self.buffer, 0, 0) | ||||
|         dc.Blit(0, 0, self.buffer.GetWidth(), self.buffer.GetHeight(), self.dc, 0, 0) | ||||
| 
 | ||||
|         if self.last_pos: | ||||
|             dc.DrawLine(self.last_pos[0] - 10, self.last_pos[1],      self.last_pos[0] + 10, self.last_pos[1]) | ||||
|  |  | |||
|  | @ -31,7 +31,7 @@ SVG_GROUP_TAG = inkex.addNS('g', 'svg') | |||
| 
 | ||||
| EMBROIDERABLE_TAGS = (SVG_PATH_TAG, SVG_POLYLINE_TAG) | ||||
| 
 | ||||
| dbg = open("/tmp/embroider-debug.txt", "w") | ||||
| dbg = open(os.devnull, "w") | ||||
| 
 | ||||
| _ = lambda message: message | ||||
| 
 | ||||
|  |  | |||
|  | @ -8,7 +8,7 @@ msgid "" | |||
| msgstr "" | ||||
| "Project-Id-Version: PACKAGE VERSION\n" | ||||
| "Report-Msgid-Bugs-To: \n" | ||||
| "POT-Creation-Date: 2018-02-17 10:13-0500\n" | ||||
| "POT-Creation-Date: 2018-02-19 20:13-0500\n" | ||||
| "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||||
| "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||||
| "Language-Team: LANGUAGE <LL@li.org>\n" | ||||
|  |  | |||
										
											Plik binarny nie jest wyświetlany.
										
									
								
							
		Ładowanie…
	
		Reference in New Issue
	
	 Lex Neva
						Lex Neva