diff --git a/.appveyor.yml b/.appveyor.yml index 7c03173..eb1ac1e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,7 +9,9 @@ init: - set PATH=C:\Miniconda;C:\Miniconda\Scripts;C:\Program Files (x86)\NSIS;%PATH% - conda create -n syncplay -y - activate syncplay - - conda install python pywin32 pyside -y + - conda install python=2.7.13 -y + - conda install pywin32 -y + - conda install -c conda-forge pyside2 -y - pip install twisted py2exe_py2 zope.interface - type nul > C:\Miniconda\envs\syncplay\lib\site-packages\zope\__init__.py - pip freeze @@ -19,17 +21,22 @@ install: - cd %APPVEYOR_BUILD_FOLDER% - for /F "tokens=2 delims='" %%a in ('findstr version syncplay\__init__.py') do @set ver=%%a - python buildPy2exe.py + - del syncplay_v%ver%\lib\api-* + - del syncplay_v%ver%\lib\DNSAPI.dll + - del syncplay_v%ver%\lib\IPHLPAPI.dll - del syncplay_v%ver%\lib\MPR.dll - mkdir syncplay_v%ver%\platforms - #- copy C:\Miniconda\envs\syncplay\library\plugins\platforms\qwindows.dll C:\projects\syncplay\syncplay_v1.5.0\platforms\ + - copy C:\Miniconda\envs\syncplay\library\plugins\platforms\qwindows.dll syncplay_v%ver%\platforms\ + - type nul > syncplay_v%ver%\syncplay.ini + - copy resources\win_lua_note.txt syncplay_v%ver%\"VLC LUA Script installation.txt" # Not a project with an msbuild file, build done at install. -build: off +build: off artifacts: - path: 'syncplay_v$(ver)' type: zip - name: Syncplay-$(ver)-win + name: Syncplay_v$(ver)_Portable - path: Syncplay-$(ver)-Setup.exe name: Syncplay-$(ver)-win-setup @@ -37,6 +44,7 @@ artifacts: # Push artefact to S3 bucket and list all before_deploy: - dir + - dir syncplay_v%ver% #- python -c "from PySide2 import QtCore; print QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.PluginsPath)" @@ -51,4 +59,4 @@ deploy: subject: syncplay version: v$(ver) publish: true - override: true + override: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index d3c6767..9b9e6b4 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ syncplay_setup.nsi dist.7z .* !.travis.yml +!.appveyor.yml diff --git a/.travis.yml b/.travis.yml index 631d11f..a2c67ae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,37 @@ language: objective-c -osx_image: xcode6.4 +osx_image: xcode7.3 branches: only: - master script: -- python2 buildPy2app.py py2app fix +- python buildPy2app.py py2app before_install: - brew update -- travis/download-homebrew -- export PATH="/usr/local/opt/python@2/bin:$PATH" -- travis/download-python -- brew tap cartr/qt4 -- brew tap-pin cartr/qt4 -- brew install pyside +- curl -O http://syncplay.s3.amazonaws.com/qt595.rb +- mv qt595.rb qt.rb +- brew install ./qt.rb +- which python +- which pip +- curl -L https://bintray.com/alby128/Syncplay/download_file?file_path=PySide2-5.9.0a1-5.9.5-cp27-cp27m-macosx_10_11_x86_64.whl -o PySide2-5.9.0a1-5.9.5-cp27-cp27m-macosx_10_11_x86_64.whl +- pip install PySide2-5.9.0a1-5.9.5-cp27-cp27m-macosx_10_11_x86_64.whl +- ln -s /usr/local/lib/python2.7/site-packages/PySide2/libshiboken2-python2.7v.5.9.dylib /usr/local/lib/ +- ln -s /usr/local/lib/python2.7/site-packages/PySide2/libpyside2-python2.7v.5.9.dylib /usr/local/lib/ +#- python -c "from PySide2 import QtCore" +- python -c "from PySide2.QtCore import __version__; print __version__" +- hg clone https://alby128@bitbucket.org/alby128/py2app +- cd py2app +- python setup.py install +- cd .. +- python -c "from py2app.recipes import pyside2" install: -- export QT_PREFERRED_BINDING="PySide" -- pip2 install twisted appnope pyobjc py2app +- pip install twisted appnope +#- git clone -b qtpy-pyside2 https://github.com/alby128/syncplay.git syncplay-qtpy-PySide2 +#- cd syncplay-qtpy-PySide2 +#- git checkout qtpy-pyside2 before_deploy: #- travis/cache-homebrew @@ -29,7 +41,7 @@ before_deploy: - mv resources/lua/intf/syncplay.lua resources/lua/intf/.syncplay.lua - mv resources/macOS_readme.pdf resources/.macOS_readme.pdf - export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')" -- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}_macOS.dmg +- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg deploy: skip_cleanup: true @@ -38,4 +50,4 @@ deploy: file: "bintray.json" user: alby128 key: - secure: "I9J3lgHyDoLzuGkjjMuYIk3ZI7Lszn2AG1H6lxIU3SXYaBpbLK+BHXotW0IsSxK5idCK8uszeA2svVipepwtCc9xJYEAlEYLVBgO9BpgTdQid9XjvI1eLDG3+iw0ew+FwEqaYwYbFHfnnQhVzIwBq353kl9ksgDMXi1uREpUk/L3HfVOUV3rDF6mgOPwAUJHBc3d56IVX1yQunM7NwJuswFrBMESauAlzw/C1gWDAuWJ5iJfnFz/4RBDa3C1sZdFmNnkuQEI332HzoMialMGyEP5gE8l0dmXBtFHpE1acgEZ+l1hVz9OsI2/dyICkjYFRLWF2tmxAk4DDF3jTsIRRsxpQo25XGKfvd0FrbN8Zqw8Yb0a5/WPP2E2ERGGLDxqTfkybYPv35utbtHEd4IZTX0Yv/GnmSwFa39+a7RDNhgFJWDR8XUX4Srd9CBron+36KrS+zY2Nn0c36YBxyAocw8qQ/pXmS15sQxSq2pi+GASyhemN546Gz2jbc3W/Ybp85iQ9Py/7Q1wUyYQVvJqEPL0K+/ioDSr4bDWbtqBLpUPlOYOvR4MPGCpqrfjJslpPPKBN8lD0BV2LYZEW6Bip0e8CsrFhecD1atNyWClaPoC0aikH3jpFfQYJOyQ6zghqpHSC+/S3HuGV/P8WCVBpC3TTrk0/TacwZwch3yhK9A=" + secure: "I9J3lgHyDoLzuGkjjMuYIk3ZI7Lszn2AG1H6lxIU3SXYaBpbLK+BHXotW0IsSxK5idCK8uszeA2svVipepwtCc9xJYEAlEYLVBgO9BpgTdQid9XjvI1eLDG3+iw0ew+FwEqaYwYbFHfnnQhVzIwBq353kl9ksgDMXi1uREpUk/L3HfVOUV3rDF6mgOPwAUJHBc3d56IVX1yQunM7NwJuswFrBMESauAlzw/C1gWDAuWJ5iJfnFz/4RBDa3C1sZdFmNnkuQEI332HzoMialMGyEP5gE8l0dmXBtFHpE1acgEZ+l1hVz9OsI2/dyICkjYFRLWF2tmxAk4DDF3jTsIRRsxpQo25XGKfvd0FrbN8Zqw8Yb0a5/WPP2E2ERGGLDxqTfkybYPv35utbtHEd4IZTX0Yv/GnmSwFa39+a7RDNhgFJWDR8XUX4Srd9CBron+36KrS+zY2Nn0c36YBxyAocw8qQ/pXmS15sQxSq2pi+GASyhemN546Gz2jbc3W/Ybp85iQ9Py/7Q1wUyYQVvJqEPL0K+/ioDSr4bDWbtqBLpUPlOYOvR4MPGCpqrfjJslpPPKBN8lD0BV2LYZEW6Bip0e8CsrFhecD1atNyWClaPoC0aikH3jpFfQYJOyQ6zghqpHSC+/S3HuGV/P8WCVBpC3TTrk0/TacwZwch3yhK9A=" \ No newline at end of file diff --git a/bintray.json b/bintray.json index 0583eee..7ad0312 100644 --- a/bintray.json +++ b/bintray.json @@ -6,7 +6,7 @@ }, "version": { - "name": "v1.5.3" + "name": "v1.5.4" }, "files": @@ -16,4 +16,4 @@ "override": 1 }} ], "publish": true -} +} \ No newline at end of file diff --git a/buildPy2app.py b/buildPy2app.py index f923626..f889c3d 100644 --- a/buildPy2app.py +++ b/buildPy2app.py @@ -5,21 +5,20 @@ Usage: python setup.py py2app """ -from setuptools import setup, Command +from setuptools import setup from glob import glob -import shutil import syncplay -cmdlist = {} - APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'iconfile':'resources/icon.icns', - 'includes': {'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'}, - 'plist': { + 'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui','PySide2.QtWidgets'}, + 'excludes': {'PySide', 'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'}, + 'qt_plugins': ['platforms/libqcocoa.dylib', 'platforms/libqminimal.dylib','platforms/libqoffscreen.dylib'], + 'plist': { 'CFBundleName':'Syncplay', 'CFBundleShortVersionString':syncplay.version, 'CFBundleIdentifier':'pl.syncplay.Syncplay', @@ -27,32 +26,10 @@ OPTIONS = { } } -class Fix(Command): - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def trim_packages(self): - """Remove big files in external dependencies that Syncplay doesn't need""" - - shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtDesigner.framework', ignore_errors=True) - shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtScript.framework', ignore_errors=True) - shutil.rmtree('dist/Syncplay.app/Contents/Frameworks/QtXml.framework', ignore_errors=True) - - def run(self): - self.trim_packages() - -cmdlist['fix'] = Fix - setup( app=APP, name='Syncplay', data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=['py2app'], - cmdclass=cmdlist ) diff --git a/buildPy2exe.py b/buildPy2exe.py index 310f765..bff96a4 100755 --- a/buildPy2exe.py +++ b/buildPy2exe.py @@ -720,9 +720,9 @@ info = dict( # console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}], options={'py2exe': { 'dist_dir': OUT_DIR, - 'packages': 'PySide.QtUiTools', - 'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide, liburl, ast, unicodedata', - 'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter', + 'packages': 'PySide2.QtUiTools', + 'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide2, liburl, ast, unicodedata', + 'excludes': 'venv, _ssl, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter', 'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll', 'optimize': 2, 'compressed': 1 @@ -733,5 +733,5 @@ info = dict( cmdclass = {"py2exe": build_installer}, ) -sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-p PySide.QtGui']) +sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-i PySide2.QtCore', '-p PySide2.QtGui', '-i PySide2.QtWidgets']) setup(**info) diff --git a/resources/third-party-notices.rtf b/resources/third-party-notices.rtf index 492a24a..90bddfc 100644 --- a/resources/third-party-notices.rtf +++ b/resources/third-party-notices.rtf @@ -24,26 +24,25 @@ The above copyright notice and this permission notice shall be included in all\ copies or substantial portions of the Software.\ \ -\b PySide\ +\b Qt for Python\ \b0 \ -Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\ -Contact: PySide team \ +Copyright (C) 2018 The Qt Company Ltd.\ +Contact: https://www.qt.io/licensing/\ \ -This library is free software; you can redistribute it and/or\ -modify it under the terms of the GNU Lesser General Public\ -License as published by the Free Software Foundation; either\ -version 2.1 of the License, or (at your option) any later version.\ -This library is distributed in the hope that it will be useful,\ +This program is free software: you can redistribute it and/or modify\ +it under the terms of the GNU Lesser General Public License as published\ +by the Free Software Foundation, either version 3 of the License, or\ +(at your option) any later version.\ +\ +This program is distributed in the hope that it will be useful,\ but WITHOUT ANY WARRANTY; without even the implied warranty of\ -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ -Lesser General Public License for more details.\ +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\ +GNU Lesser General Public License for more details.\ +\ +You should have received a copy of the GNU Lesser General Public License\ +along with this program. If not, see .\ \ -\pard\pardeftab720\partightenfactor0 -\cf0 You should have received a copy of the GNU Lesser General Public License\ -along with this program. If not, see \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 \ \b Twisted\ \ @@ -113,27 +112,6 @@ The above copyright notice and this permission notice shall be\ included in all copies or substantial portions of the Software.\ \b \ -Qt 4\ -\ - -\b0 Copyright (C) 2015 The Qt Company Ltd.\ -Contact: http://www.qt.io/licensing/\ -\ -This library is free software; you can redistribute it and/or\ -modify it under the terms of the GNU Lesser General Public\ -License as published by the Free Software Foundation; either\ -version 2.1 of the License, or (at your option) any later version.\ -This library is distributed in the hope that it will be useful,\ -but WITHOUT ANY WARRANTY; without even the implied warranty of\ -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\ -Lesser General Public License for more details.\ -\ -\pard\pardeftab720\partightenfactor0 -\cf0 You should have received a copy of the GNU Lesser General Public License\ -along with this program. If not, see \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 - -\b \cf0 \ appnope\ \b0 \ @@ -157,17 +135,6 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ - -\b \ -PyObjC\ - -\b0 \ -Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al.\ -Copyright 2003-2016 - Ronald Oussoren\ -\ -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\ -\ -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\ \ \b py2exe\ diff --git a/resources/win_lua_note.txt b/resources/win_lua_note.txt new file mode 100755 index 0000000..66835d8 --- /dev/null +++ b/resources/win_lua_note.txt @@ -0,0 +1,6 @@ +You must follow the following instructions to use Syncplay with VLC: + +Place the syncplay.lua file from /resources/lua/intf/ into the main (all user) VLC /lua/intf/ sub-directory: +* Window: %ProgramFiles%\VideoLAN\VLC\lua\intf\ + +Note: A version of these instructions is also available from http://syncplay.pl/LUA \ No newline at end of file diff --git a/syncplay/__init__.py b/syncplay/__init__.py index d601a37..874d028 100644 --- a/syncplay/__init__.py +++ b/syncplay/__init__.py @@ -1,4 +1,4 @@ -version = '1.5.3' +version = '1.5.4' milestone = 'Yoitsu' -release_number = '61' +release_number = '62' projectURL = 'https://syncplay.pl/' diff --git a/syncplay/ui/ConfigurationGetter.py b/syncplay/ui/ConfigurationGetter.py index d1bbe81..72cd879 100755 --- a/syncplay/ui/ConfigurationGetter.py +++ b/syncplay/ui/ConfigurationGetter.py @@ -467,17 +467,17 @@ class ConfigurationGetter(object): self._overrideConfigWithArgs(args) if not self._config['noGui']: try: - from syncplay.vendor.Qt import QtWidgets, IsPySide, IsPySide2 - from syncplay.vendor.Qt.QtCore import QCoreApplication - from syncplay.vendor import qt5reactor - if not (IsPySide2 or IsPySide): - raise ImportError - if QCoreApplication.instance() is None: - self.app = QtWidgets.QApplication(sys.argv) - qt5reactor.install() - if isMacOS(): - import appnope - appnope.nope() + from syncplay.vendor.Qt import QtWidgets, IsPySide, IsPySide2 + from syncplay.vendor.Qt.QtCore import QCoreApplication + from syncplay.vendor import qt5reactor + if not (IsPySide2 or IsPySide): + raise ImportError + if QCoreApplication.instance() is None: + self.app = QtWidgets.QApplication(sys.argv) + qt5reactor.install() + if isMacOS(): + import appnope + appnope.nope() except ImportError: print getMessage("unable-import-gui-error") self._config['noGui'] = True