Merged master_local in qtpy-pyside2
This commit is contained in:
commit
09b2c1446d
@ -1,53 +1,59 @@
|
|||||||
environment:
|
environment:
|
||||||
MINICONDA: "C:\\Miniconda"
|
MINICONDA: "C:\\Miniconda"
|
||||||
clone_folder: c:\projects\syncplay
|
|
||||||
|
|
||||||
image:
|
|
||||||
- Visual Studio 2013
|
|
||||||
|
|
||||||
platform: x86
|
platform: x86
|
||||||
|
|
||||||
configuration: Release
|
configuration: Release
|
||||||
|
|
||||||
init:
|
init:
|
||||||
- set PATH=C:\Miniconda;C:\Miniconda\Scripts;%PATH%
|
- set PATH=C:\Miniconda;C:\Miniconda\Scripts;C:\Program Files (x86)\NSIS;%PATH%
|
||||||
- cmd: conda create -n syncplay -y
|
- conda create -n syncplay -y
|
||||||
- cmd: activate syncplay
|
- activate syncplay
|
||||||
- cmd: conda install python pywin32 -y
|
- conda install python pywin32 -y
|
||||||
- cmd: conda install -c conda-forge pyside2 -y
|
- conda install -c conda-forge pyside2 -y
|
||||||
- cmd: pip install twisted py2exe_py2 zope.interface
|
- pip install twisted py2exe_py2 zope.interface
|
||||||
- cmd: type nul > C:\Miniconda\envs\syncplay\lib\site-packages\zope\__init__.py
|
- type nul > C:\Miniconda\envs\syncplay\lib\site-packages\zope\__init__.py
|
||||||
- cmd: pip freeze
|
- pip freeze
|
||||||
- cmd: conda list
|
- conda list
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cmd: cd c:\projects\syncplay
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- cmd: python buildPy2exe.py
|
- for /F "tokens=2 delims='" %%a in ('findstr version syncplay\__init__.py') do @set ver=%%a
|
||||||
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\api-*
|
- python buildPy2exe.py
|
||||||
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\DNSAPI.dll
|
- del syncplay_v%ver%\lib\api-*
|
||||||
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\IPHLPAPI.dll
|
- del syncplay_v%ver%\lib\DNSAPI.dll
|
||||||
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\MPR.dll
|
- del syncplay_v%ver%\lib\IPHLPAPI.dll
|
||||||
- cmd: mkdir C:\projects\syncplay\syncplay_v1.5.0\platforms
|
- del syncplay_v%ver%\lib\MPR.dll
|
||||||
- cmd: copy C:\Miniconda\envs\syncplay\library\plugins\platforms\qwindows.dll C:\projects\syncplay\syncplay_v1.5.0\platforms\
|
- mkdir syncplay_v%ver%\platforms
|
||||||
|
#- copy C:\Miniconda\envs\syncplay\library\plugins\platforms\qwindows.dll C:\projects\syncplay\syncplay_v1.5.0\platforms\
|
||||||
|
|
||||||
# Not a project with an msbuild file, build done at install.
|
# Not a project with an msbuild file, build done at install.
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
path: 'syncplay_v1.5.0'
|
- path: 'syncplay_v$(ver)'
|
||||||
type: zip
|
type: zip
|
||||||
name: Syncplay_win_pyside2
|
name: Syncplay-$(ver)-win-pyside2
|
||||||
|
|
||||||
|
- path: Syncplay-$(ver)-Setup.exe
|
||||||
|
name: Syncplay-$(ver)-win-setup-pyside2
|
||||||
|
|
||||||
# Push artefact to S3 bucket and list all
|
# Push artefact to S3 bucket and list all
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- cmd: python -c "from PySide2 import QtCore; print QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.PluginsPath)"
|
- dir
|
||||||
|
#- python -c "from PySide2 import QtCore; print QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.PluginsPath)"
|
||||||
|
|
||||||
# Deploy build to Amazon S3 bucket
|
|
||||||
|
# Deploy build to BinTray
|
||||||
deploy:
|
deploy:
|
||||||
provider: S3
|
provider: BinTray
|
||||||
access_key_id: AKIAJS554GLAZJ5L6TUA
|
username: alby128
|
||||||
secret_access_key:
|
api_key:
|
||||||
secure: ZPxgm95K1SIqcFlqwoMWmGpPfctamQhhAedoyCT4RDQM/+VbdFLfEfUtu3rZZeBm
|
secure: lAocj5KA9Z9x4BefQBIgNlQJbeW4qPBfCgYVBHMyOP3NgyhnMLmvR57ZCqtCKBlQ
|
||||||
bucket: syncplay
|
subject: alby128
|
||||||
region: eu-central-1
|
repo: Syncplay
|
||||||
set_public: true
|
package: Syncplay
|
||||||
|
version: "test"
|
||||||
|
publish: true
|
||||||
|
override: true
|
||||||
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@ venv
|
|||||||
/build
|
/build
|
||||||
/dist
|
/dist
|
||||||
/syncplay v*
|
/syncplay v*
|
||||||
|
/syncplay_v*
|
||||||
syncplay_setup.nsi
|
syncplay_setup.nsi
|
||||||
dist.7z
|
dist.7z
|
||||||
.*
|
.*
|
||||||
|
|||||||
19
.travis.yml
19
.travis.yml
@ -39,16 +39,13 @@ before_deploy:
|
|||||||
- mv resources/macos_vlc_install.command resources/.macos_vlc_install.command
|
- mv resources/macos_vlc_install.command resources/.macos_vlc_install.command
|
||||||
- mv resources/lua/intf/syncplay.lua resources/lua/intf/.syncplay.lua
|
- mv resources/lua/intf/syncplay.lua resources/lua/intf/.syncplay.lua
|
||||||
- mv resources/macOS_readme.pdf resources/.macOS_readme.pdf
|
- mv resources/macOS_readme.pdf resources/.macOS_readme.pdf
|
||||||
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay-qtpy-pyside2.dmg
|
- export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
||||||
|
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}_macOS_pyside2.dmg
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: s3
|
on: master_local
|
||||||
access_key_id: AKIAJS554GLAZJ5L6TUA
|
provider: bintray
|
||||||
secret_access_key:
|
file: "bintray.json"
|
||||||
secure: "iDuHZ6lgASU1O/9UKncgKfJZ96PpLzdKKvASDKCDPWBXXI5LyjGIIZJxbdjcE+WVoH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OfkghevMjRdAW2RIIA8/KmR1Xi2EX78Q75wrPHvo4/4x0Cw0ZviN2wC9LY3GU8tmGjjC0P+WsF4M1Y9by2H2xLHuYPB7h7OnlD67d8pPQVq84Yl2jq9kT2PoYjlNwqWz1r/PsLBCGlXQtlTc7FQKXUAREFwBJY+b5mk2xMsiZZsNrtIfRQ2roDbHws+M0mAQPo1eqeDKLPH8fkDf/ZhWzE+swLadoGxuwKSux53ySAp7CQeObJYWJ3eHfO0cI21DZmd9uyjayA="
|
||||||
region: eu-central-1
|
|
||||||
local_dir: dist_dmg
|
|
||||||
on:
|
|
||||||
branch: qtpy-pyside2
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.5.0_test"
|
"name": "test"
|
||||||
},
|
},
|
||||||
|
|
||||||
"files":
|
"files":
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
) If you get the error "ImportError: No module named zope.interface" then add an empty __init__.py file to the PYTHONDIR/Lib/site-packages/zope directory
|
) If you get the error "ImportError: No module named zope.interface" then add an empty __init__.py file to the PYTHONDIR/Lib/site-packages/zope directory
|
||||||
|
|
||||||
2) It is expected that you will have NSIS 3 NSIS from http://nsis.sourceforge.net installed to: C:\Program Files (x86)\NSIS\
|
2) It is expected that you will have NSIS 3 NSIS from http://nsis.sourceforge.net installed.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
@ -31,8 +31,21 @@ if missingStrings is not None and missingStrings is not "":
|
|||||||
import warnings
|
import warnings
|
||||||
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
warnings.warn("MISSING/UNUSED STRINGS DETECTED:\n{}".format(missingStrings))
|
||||||
|
|
||||||
p = "C:\\Program Files (x86)\\NSIS\\makensis.exe" #TODO: how to move that into proper place, huh
|
def get_nsis_path():
|
||||||
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
|
bin_name = "makensis.exe"
|
||||||
|
from _winreg import HKEY_LOCAL_MACHINE as HKLM
|
||||||
|
from _winreg import KEY_READ, KEY_WOW64_32KEY, OpenKey, QueryValueEx
|
||||||
|
|
||||||
|
try:
|
||||||
|
nsisreg = OpenKey(HKLM, "Software\\NSIS", 0, KEY_READ | KEY_WOW64_32KEY)
|
||||||
|
if QueryValueEx(nsisreg, "VersionMajor")[0] >= 3:
|
||||||
|
return "{}\\{}".format(QueryValueEx(nsisreg, "")[0], bin_name)
|
||||||
|
else:
|
||||||
|
raise Exception("You must install NSIS 3 or later.")
|
||||||
|
except WindowsError:
|
||||||
|
return bin_name
|
||||||
|
NSIS_COMPILE = get_nsis_path()
|
||||||
|
|
||||||
OUT_DIR = "syncplay_v{}".format(syncplay.version)
|
OUT_DIR = "syncplay_v{}".format(syncplay.version)
|
||||||
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
SETUP_SCRIPT_PATH = "syncplay_setup.nsi"
|
||||||
NSIS_SCRIPT_TEMPLATE = r"""
|
NSIS_SCRIPT_TEMPLATE = r"""
|
||||||
@ -48,7 +61,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
|
|||||||
Unicode true
|
Unicode true
|
||||||
|
|
||||||
Name "Syncplay $version"
|
Name "Syncplay $version"
|
||||||
OutFile "Syncplay $version Setup.exe"
|
OutFile "Syncplay-$version-Setup.exe"
|
||||||
InstallDir $$PROGRAMFILES\Syncplay
|
InstallDir $$PROGRAMFILES\Syncplay
|
||||||
RequestExecutionLevel admin
|
RequestExecutionLevel admin
|
||||||
XPStyle on
|
XPStyle on
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
version = '1.5.0'
|
version = '1.5.1'
|
||||||
milestone = 'Yoitsu'
|
milestone = 'Yoitsu'
|
||||||
release_number = '50'
|
release_number = '51'
|
||||||
projectURL = 'http://syncplay.pl/'
|
projectURL = 'http://syncplay.pl/'
|
||||||
|
|||||||
@ -9,7 +9,7 @@ UI_TIME_FORMAT = "[%X] "
|
|||||||
CONFIG_NAMES = [".syncplay", "syncplay.ini"] #Syncplay searches first to last
|
CONFIG_NAMES = [".syncplay", "syncplay.ini"] #Syncplay searches first to last
|
||||||
DEFAULT_CONFIG_NAME_WINDOWS = "syncplay.ini"
|
DEFAULT_CONFIG_NAME_WINDOWS = "syncplay.ini"
|
||||||
DEFAULT_CONFIG_NAME_LINUX = ".syncplay"
|
DEFAULT_CONFIG_NAME_LINUX = ".syncplay"
|
||||||
RECENT_CLIENT_THRESHOLD = "1.5.0" #This and higher considered 'recent' clients (no warnings)
|
RECENT_CLIENT_THRESHOLD = "1.5.1" #This and higher considered 'recent' clients (no warnings)
|
||||||
WARN_OLD_CLIENTS = True #Use MOTD to inform old clients to upgrade
|
WARN_OLD_CLIENTS = True #Use MOTD to inform old clients to upgrade
|
||||||
LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded
|
LIST_RELATIVE_CONFIGS = True # Print list of relative configs loaded
|
||||||
SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI
|
SHOW_CONTACT_INFO = True # Displays dev contact details below list in GUI
|
||||||
@ -177,7 +177,7 @@ USERLIST_GUI_FILENAME_COLUMN = 3
|
|||||||
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af-add', 'scaletempo']
|
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af-add', 'scaletempo']
|
||||||
MPV_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--keep-open']
|
MPV_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--keep-open']
|
||||||
MPV_SLAVE_ARGS = ['--msg-level=all=error,cplayer=info,term-msg=info', '--input-terminal=no', '--input-file=/dev/stdin']
|
MPV_SLAVE_ARGS = ['--msg-level=all=error,cplayer=info,term-msg=info', '--input-terminal=no', '--input-file=/dev/stdin']
|
||||||
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=length:${=duration:0}}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
|
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=duration:${=length:0}}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
|
||||||
MPV_NEW_VERSION = False
|
MPV_NEW_VERSION = False
|
||||||
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
|
||||||
'--play-and-pause', '--start-time=0']
|
'--play-and-pause', '--start-time=0']
|
||||||
|
|||||||
@ -479,7 +479,7 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def getIconPath(path):
|
def getIconPath(path):
|
||||||
if MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64.exe'.lower()):
|
if MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64.exe'.lower()) or MPCHCAPIPlayer.getExpandedPath(path).lower().endswith(u'mpc-hc64_nvo.exe'.lower()):
|
||||||
return constants.MPC64_ICONPATH
|
return constants.MPC64_ICONPATH
|
||||||
else:
|
else:
|
||||||
return constants.MPC_ICONPATH
|
return constants.MPC_ICONPATH
|
||||||
@ -493,7 +493,7 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def getExpandedPath(path):
|
def getExpandedPath(path):
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
if path.lower().endswith(u'mpc-hc.exe'.lower()) or path.lower().endswith(u'mpc-hc64.exe'.lower()):
|
if path.lower().endswith(u'mpc-hc.exe'.lower()) or path.lower().endswith(u'mpc-hc64.exe'.lower()) or path.lower().endswith(u'mpc-hc64_nvo.exe'.lower()) or path.lower().endswith(u'mpc-hc_nvo.exe'.lower()):
|
||||||
return path
|
return path
|
||||||
if os.path.isfile(path + u"mpc-hc.exe"):
|
if os.path.isfile(path + u"mpc-hc.exe"):
|
||||||
path += u"mpc-hc.exe"
|
path += u"mpc-hc.exe"
|
||||||
@ -501,9 +501,22 @@ class MPCHCAPIPlayer(BasePlayer):
|
|||||||
if os.path.isfile(path + u"\\mpc-hc.exe"):
|
if os.path.isfile(path + u"\\mpc-hc.exe"):
|
||||||
path += u"\\mpc-hc.exe"
|
path += u"\\mpc-hc.exe"
|
||||||
return path
|
return path
|
||||||
|
if os.path.isfile(path + u"mpc-hc_nvo.exe"):
|
||||||
|
path += u"mpc-hc_nvo.exe"
|
||||||
|
return path
|
||||||
|
if os.path.isfile(path + u"\\mpc-hc_nvo.exe"):
|
||||||
|
path += u"\\mpc-hc_nvo.exe"
|
||||||
|
return path
|
||||||
if os.path.isfile(path + u"mpc-hc64.exe"):
|
if os.path.isfile(path + u"mpc-hc64.exe"):
|
||||||
path += u"mpc-hc64.exe"
|
path += u"mpc-hc64.exe"
|
||||||
return path
|
return path
|
||||||
if os.path.isfile(path + u"\\mpc-hc64.exe"):
|
if os.path.isfile(path + u"\\mpc-hc64.exe"):
|
||||||
path += u"\\mpc-hc64.exe"
|
path += u"\\mpc-hc64.exe"
|
||||||
return path
|
return path
|
||||||
|
if os.path.isfile(path + u"mpc-hc64_nvo.exe"):
|
||||||
|
path += u"mpc-hc64_nvo.exe"
|
||||||
|
return path
|
||||||
|
if os.path.isfile(path + u"\\mpc-hc64_nvo.exe"):
|
||||||
|
path += u"\\mpc-hc64_nvo.exe"
|
||||||
|
return path
|
||||||
|
|
||||||
|
|||||||
@ -183,7 +183,10 @@ class MplayerPlayer(BasePlayer):
|
|||||||
self._storePauseState(bool(value == 'yes'))
|
self._storePauseState(bool(value == 'yes'))
|
||||||
self._pausedAsk.set()
|
self._pausedAsk.set()
|
||||||
elif name == "length":
|
elif name == "length":
|
||||||
self._duration = float(value)
|
try:
|
||||||
|
self._duration = float(value)
|
||||||
|
except:
|
||||||
|
self._duration = 0
|
||||||
self._durationAsk.set()
|
self._durationAsk.set()
|
||||||
elif name == "path":
|
elif name == "path":
|
||||||
self._filepath = value
|
self._filepath = value
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class NewMpvPlayer(OldMpvPlayer):
|
|||||||
if property_ in floatProperties:
|
if property_ in floatProperties:
|
||||||
propertyID = u"={}".format(property_)
|
propertyID = u"={}".format(property_)
|
||||||
elif property_ == 'length':
|
elif property_ == 'length':
|
||||||
propertyID = u'=length:${=duration:0}'
|
propertyID = u'=duration:${=length:0}'
|
||||||
else:
|
else:
|
||||||
propertyID = property_
|
propertyID = property_
|
||||||
self._listener.sendLine(u"print_text ""ANS_{}=${{{}}}""".format(property_, propertyID))
|
self._listener.sendLine(u"print_text ""ANS_{}=${{{}}}""".format(property_, propertyID))
|
||||||
|
|||||||
@ -1575,6 +1575,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
|||||||
data = event.mimeData()
|
data = event.mimeData()
|
||||||
urls = data.urls()
|
urls = data.urls()
|
||||||
if urls and urls[0].scheme() == 'file':
|
if urls and urls[0].scheme() == 'file':
|
||||||
|
url = event.mimeData().urls()[0]
|
||||||
if isMacOS() and IsPySide:
|
if isMacOS() and IsPySide:
|
||||||
dropfilepath = os.path.abspath(NSURL.URLWithString_(str(url.toString())).filePathURL().path())
|
dropfilepath = os.path.abspath(NSURL.URLWithString_(str(url.toString())).filePathURL().path())
|
||||||
else:
|
else:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user