Philipp Hörist pushed to branch gajim_0.16 at gajim / gajim
Commits: aaf4771b by Philipp Hörist at 2016-12-27T22:05:47+01:00 Update files for appveyor Windows build
- - - - - 8a3ddae3 by Philipp Hörist at 2016-12-27T22:07:19+01:00 Merge branch 'appveyor' into 'gajim_0.16'
Update files for appveyor Windows build
See merge request !13 - - - - -
7 changed files:
- .gitignore - + appveyor.yml - build.bat - + dependencys.ps1 - gajim.nsi - + requirements.txt - setup_win32.py
Changes:
===================================== .gitignore ===================================== --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ po/stamp-it stamp-h1 Makefile __pycache__/ +src/gtk/
syntax: regexp ^config.*
===================================== appveyor.yml ===================================== --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,80 @@ +environment: + + matrix: + + - PYTHON: "C:\Python27" + +branches: + only: + - gajim_0.16 + +clone_depth: 1 + +# Print Login Data for RDP Session on Build VM, in case the build has errors +# init: +# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + +install: + - git clone --depth=1 --branch=master https://dev.gajim.org/gajim/gajim-plugins.git c:\projects\gajim-plugins + - git clone https://dev.gajim.org/gajim/gtk-windows-bin.git c:\projects\gtk + + # Download & Install Dependencys + - ps: c:\projects\gajim\dependencys.ps1 + + - msiexec /i C:\cairo.msi /quiet + - msiexec /i C:\pygobject.msi /quiet + - msiexec /i C:\pygtk.msi /quiet + - msiexec /i C:\pygoocanvas.msi /quiet + - msiexec /i C:\bonjour.msi /quiet + + - set PATH=C:\MinGW\bin;%PATH% + - "%PYTHON%\python.exe -m pip install --upgrade pip" + - "%PYTHON%\python.exe -m pip install -r c:\projects\gajim\requirements.txt" + + - ps: Add-Content C:\Python27\Lib\site-packages\google__init__.py " " + - "%PYTHON%\python.exe -m pip install --no-dependencies python-axolotl" + - "%PYTHON%\python.exe -m pip install --global-option=build_ext --global-option --compiler=mingw32 python-axolotl-curve25519" + + # Prepare Build Dir + - cd c:\projects\gajim\ + - xcopy . ..\gajim_built /e /i + - cd ..\gajim_built + + # Copy Shipped Plugins + - xcopy ..\gajim-plugins\plugin_installer plugins\plugin_installer /e /i + + # Compile Translation Strings + - cmd: for %%l in (po*.po) do mkdir po%%~nl & mkdir po%%~nl\LC_MESSAGES & msgfmt -o po%%~nl\LC_MESSAGES\gajim.mo %%l + + # Make Gajim.exe + - "%PYTHON%\python.exe setup_win32.py build_exe" + + - move build\exe.win32-2.7 . + - rmdir build + - rename exe.win32-2.7 bin + + # Add GTK files so we can make the Installer + - xcopy ..\gtk bin\gtk /e /i + + # Make Installer + - ps: '& "C:\Program Files (x86)\NSIS\makensis.exe" gajim.nsi' + + # Push Installer Exe + - ps: $env:TIME_STRING=(get-date).ToString(‘d-M-yyyy’) + - ps: Push-AppveyorArtifact Gajim.exe -FileName "Gajim-0.16.6-$($env:TIME_STRING).exe" + +build: off + +deploy: + # FTP deployment provider settings + - provider: FTP + protocol: ftp + host: panoramix.gajim.org + username: + secure: SNcOJDhUtBjfddbKXudE2w== + password: + secure: tQkYbcUb6nChCp0cdqo4CA== + folder: win_snap + active_mode: false + beta: true # enable alternative FTP library for 'ftp' and 'ftps' modes + debug: true \ No newline at end of file
===================================== build.bat ===================================== --- a/build.bat +++ b/build.bat @@ -1,38 +1,15 @@ -rmdir /S /Q gajim_built -rmdir /S /Q gajim_built +rmdir /S /Q ..\gajim_built
-mkdir gajim_built -hg archive gajim_built -xcopy ..\gajim-plugins\plugin_installer gajim_built\plugins\plugin_installer /e /i - -copy msgfmt.exe gajim_built -copy gettextsrc.dll gajim_built -copy gettextlib.dll gajim_built -copy msvcr90.dll gajim_built - -cd gajim_built - -REM for libglade-2.0.0.dll -PATH=..\src\gtk\bin;%PATH% +xcopy . ..\gajim_built /e /i +xcopy ..\gajim-plugins\plugin_installer ..\gajim_built\plugins\plugin_installer /e /i +cd ..\gajim_built
c:\python27\python.exe setup_win32.py build_exe
move build\exe.win32-2.7 . rename exe.win32-2.7 bin
-copy ..\LIBEAY32.dll bin -copy ..\SSLEAY32.dll bin - -REM for snarl plugin -xcopy ..\win32com bin\win32com /e /i - -mkdir bin\gtk -cd ../src/gtk -hg archive ....\gajim_built\bin\gtk -cd ../../gajim_built/ - -REM for msgfmt -PATH=bin\gtk\bin;%PATH% +xcopy ..\gtk bin\gtk /e /i
for %%l in (po*.po) do mkdir po%%~nl & mkdir po%%~nl\LC_MESSAGES & msgfmt -o po%%~nl\LC_MESSAGES\gajim.mo %%l
===================================== dependencys.ps1 ===================================== --- /dev/null +++ b/dependencys.ps1 @@ -0,0 +1,22 @@ +# Download Dependencys + +$clnt = new-object System.Net.WebClient +$url = "https://gajim.org/downloads/snap/win/build/pycairo-1.8.10.win32-py2.7.msi" +$file = "c:\cairo.msi" +$clnt.DownloadFile($url,$file) + +$url = "https://gajim.org/downloads/snap/win/build/pygobject-2.28.3.win32-py2.7.msi" +$file = "c:\pygobject.msi" +$clnt.DownloadFile($url,$file) + +$url = "https://gajim.org/downloads/snap/win/build/pygtk-2.24.0.win32-py2.7.msi" +$file = "c:\pygtk.msi" +$clnt.DownloadFile($url,$file) + +$url = "https://gajim.org/downloads/snap/win/build/pygoocanvas-0.14.2.win32-py2.7.ms..." +$file = "c:\pygoocanvas.msi" +$clnt.DownloadFile($url,$file) + +$url = "https://gajim.org/downloads/snap/win/build/Bonjour64.msi" +$file = "c:\bonjour.msi" +$clnt.DownloadFile($url,$file) \ No newline at end of file
===================================== gajim.nsi ===================================== --- a/gajim.nsi +++ b/gajim.nsi @@ -153,70 +153,7 @@ Section "Gajim" SecGajim File "COPYING" File "THANKS" File "THANKS.artists" - - SetOutPath "$INSTDIR\bin" - File "bin_bsddb.pyd" - File "bin_cffi_backend.pyd" - File "bin_ctypes.pyd" - File "bin_hashlib.pyd" - File "bin_socket.pyd" - File "bin_sqlite3.pyd" - File "bin_ssl.pyd" - File "bin\atk.pyd" - File "bin\axolotl_curve25519.pyd" - File "bin\bz2.pyd" - File "bin\cairo._cairo.pyd" - File "bin\Crypto.Cipher._AES.pyd" - File "bin\Crypto.Cipher._DES.pyd" - File "bin\Crypto.Cipher._DES3.pyd" - File "bin\Crypto.Hash._SHA256.pyd" - File "bin\Crypto.Random.OSRNG.winrandom.pyd" - File "bin\Crypto.Util._counter.pyd" - File "bin\Crypto.Util.strxor.pyd" - File "bin\cryptography.hazmat.bindings._constant_time.pyd" - File "bin\cryptography.hazmat.bindings._openssl.pyd" - File "bin\cryptography.hazmat.bindings._padding.pyd" - File "bin\farstream.pyd" - File "bin\gajim.exe" - File "bin\gio._gio.pyd" - File "bin\glib._glib.pyd" - File "bin\gobject._gobject.pyd" - File "bin\goocanvas.pyd" - File "bin\gst._gst.pyd" - File "bin\gst.interfaces.pyd" - File "bin\gtk._gtk.pyd" - File "bin\history_manager.exe" - File "bin\libcurl.dll" - File "bin\libeay32.dll" - File "bin\libgoocanvas-3.dll" - File "bin\library.zip" - File "bin\libxml2mod.pyd" - File "bin\libxmlmods.libxml2mod.pyd" - File "bin\pangocairo.pyd" - File "bin\pango.pyd" - File "bin\PIL._imaging.pyd" - File "bin\PIL._imagingcms.pyd" - File "bin\PIL._imagingft.pyd" - File "bin\PIL._imagingmath.pyd" - File "bin\PIL._imagingmorph.pyd" - File "bin\PIL._imagingtk.pyd" - File "bin\PIL._webp.pyd" - File "bin\pycurl.pyd" - File "bin\pyexpat.pyd" - File "bin\python27.dll" - File "bin\pythoncom27.dll" - File "bin\pywintypes27.dll" - File "bin\select.pyd" - File "bin\sqlite3.dll" - File "bin\ssleay32.dll" - File "bin\unicodedata.pyd" - File "bin\win32api.pyd" - File "bin\win32file.pyd" - File "bin\win32pipe.pyd" - File "bin\win32ui.pyd" - File "bin\winsound.pyd" - File "msvcr90.dll" - File /r "bin\win32com" + File /r "bin"
WriteRegStr HKCU "Software\Gajim" "" $INSTDIR WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Gajim" "DisplayName" "Gajim"
===================================== requirements.txt ===================================== --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +setuptools +git+https://dev.gajim.org/gajim/python-nbxmpp.git +https://gajim.org/downloads/snap/win/build/pybonjour-1.1.1.zip +protobuf +pycrypto +cryptography +cx_freeze==4.3.4 +keyring +pypiwin32 +pyopenssl +future +gnupg +pillow +pycurl
===================================== setup_win32.py ===================================== --- a/setup_win32.py +++ b/setup_win32.py @@ -1,4 +1,4 @@ -## setup_win32.py (run me as python setup_win32.py py2exe -O2) +## setup_win32.py (run me as python setup_win32.py build_exe) ## ## Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org> ## Copyright (C) 2005-2006 Nikos Kouremenos <kourem AT gmail.com> @@ -20,37 +20,25 @@ ##
from cx_Freeze import setup, Executable -import glob import sys -import os
sys.path.append('src') # Use local gtk folder instead of the one in PATH that is not latest gtk -if 'gtk' in os.listdir('.'): - sys.path.append('gtk/bin') +# if 'gtk' in os.listdir('.'): +# sys.path.append('gtk/bin') + +# probably not necessary anymore +# includes 'dumbdbm', 'dbhash', 'bsddb', +# 'gtk.keysyms', 'goocanvas' 'numbers', 'HTMLParser'
options = { 'build_exe': { - 'includes': ['gtk.keysyms', 'dumbdbm', 'dbhash', 'bsddb', 'new', - 'goocanvas', 'Crypto.PublicKey.DSA', 'Crypto.Hash.HMAC', - 'numbers', 'win32com.client', 'win32com.server', 'HTMLParser', 'pkg_resources'], - 'base': 'Win32GUI', - 'packages': ['cffi', 'cryptography', 'PIL', 'axolotl', 'google'], - 'bin_excludes': [ - 'iconv.dll', 'intl.dll', 'libatk-1.0-0.dll', - 'libgdk_pixbuf-2.0-0.dll', 'libgdk-win32-2.0-0.dll', - 'libgio-2.0-0.dll', - 'libglib-2.0-0.dll', 'libgmodule-2.0-0.dll', - 'libgobject-2.0-0.dll', 'libgthread-2.0-0.dll', - 'libgtk-win32-2.0-0.dll', 'libpango-1.0-0.dll', - 'libpangowin32-1.0-0.dll', 'libcairo-2.dll', - 'libpangocairo-1.0-0.dll', 'libpangoft2-1.0-0.dll', - 'libfarstream-0.1-0.dll', 'libgcc_s_dw2-1.dll', - 'libgstbase-0.10-0.dll', 'libgstcontroller-0.10-0.dll', - 'libgstdataprotocol-0.10-0.dll', 'libgstinterfaces-0.10-0.dll', - 'libgstnet-0.10-0.dll', 'libgstreamer-0.10-0.dll', - 'libiconv-2.dll', 'libxml2.dll', 'libxml2-2.dll', - ], + 'includes': ['win32com.server', 'win32com.client'], + 'packages': ['pkg_resources', 'cffi', 'gtk', + 'cryptography', 'Crypto', 'PIL', + 'axolotl', 'google'], + 'includes': ['new'], + 'excludes': ['Tkinter', 'unittest', 'psutil'], } }
@@ -64,6 +52,11 @@ setup( download_url='http://gajim.org/downloads.php', license='GPL', options=options, - executables=[Executable('src/gajim.py', icon='data/pixmaps/gajim.ico'), - Executable('src/history_manager.py', icon='data/pixmaps/gajim.ico')], + executables=[ + Executable( + 'src/gajim.py', base='Win32GUI', + icon='data/pixmaps/gajim.ico'), + Executable( + 'src/history_manager.py', base='Win32GUI', + icon='data/pixmaps/gajim.ico')], )
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/6d76cfb2dd39bdbd7d5b4ec2f31ba68b07...