Merge pull request #150 from alby128/master

Packaging in an executable .app for macOS and About dialog
This commit is contained in:
Alberto Sottile 2017-10-15 01:26:34 +02:00 committed by GitHub
commit bbaab4ac1e
16 changed files with 820 additions and 208 deletions

54
.appveyor.yml Normal file
View File

@ -0,0 +1,54 @@
environment:
MINICONDA: "C:\\Miniconda"
clone_folder: c:\projects\syncplay
image:
- Visual Studio 2013
platform: x86
configuration: Release
init:
- set PATH=C:\Miniconda;C:\Miniconda\Scripts;%PATH%
- cmd: conda create -n syncplay -y
- cmd: activate syncplay
- cmd: conda install python pywin32 pyside -y
- cmd: pip install twisted py2exe_py2 zope.interface
- cmd: type nul > C:\Miniconda\envs\syncplay\lib\site-packages\zope\__init__.py
- cmd: pip freeze
- cmd: conda list
install:
- cmd: cd c:\projects\syncplay
- cmd: python buildPy2exe.py
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\DNSAPI.dll
- cmd: del C:\projects\syncplay\syncplay_v1.5.0\lib\MPR.dll
- cmd: mkdir C:\projects\syncplay\syncplay_v1.5.0\platforms
#- cmd: 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.
build: off
artifacts:
path: 'syncplay_v1.5.0'
type: zip
name: Syncplay_win
# Push artefact to S3 bucket and list all
before_deploy:
- cmd: dir
#- cmd: python -c "from PySide2 import QtCore; print QtCore.QLibraryInfo.location(QtCore.QLibraryInfo.PluginsPath)"
# Deploy build to BinTray
deploy:
provider: BinTray
username: alby128
api_key:
secure: lAocj5KA9Z9x4BefQBIgNlQJbeW4qPBfCgYVBHMyOP3NgyhnMLmvR57ZCqtCKBlQ
subject: alby128
repo: Syncplay
package: Syncplay
version: "1.5.0"
publish: true
override: true

4
.gitignore vendored
View File

@ -9,4 +9,6 @@ venv
/syncplay v* /syncplay v*
syncplay_setup.nsi syncplay_setup.nsi
dist.7z dist.7z
.* .*
!.travis.yml
!.appveyor.yml

33
.travis.yml Normal file
View File

@ -0,0 +1,33 @@
language: objective-c
osx_image: xcode6.4
branches:
only:
- master
script:
- python buildPy2app.py py2app
before_install:
- brew install python
- brew tap cartr/qt4
- brew tap-pin cartr/qt4
- brew install pyside
install:
- export PATH=/usr/local/bin:$PATH
- pip install twisted appnope pyobjc py2app
before_deploy:
- pip install dmgbuild
- mkdir dist_dmg
- mv resources/macos_vlc_install.command resources/.macos_vlc_install.command
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_macOS.dmg
deploy:
on: master
provider: bintray
file: "bintray.json"
user: alby128
key:
secure: "N4XK9IxGEj+5aMskTEvUWwXSMXtHDFcjiLvnPRzVT3OOTSAA2AYjlH975MGiGEanap5gq5ftIo+M2TVNfiqflE9GSlFir+KfzabheoONZVegAq2sG6rDq9YElGJ8JefEb2O8vZykeyvow6TBxcsFdbV44RbGmf4obLALXKgK1cXG8MCKj8VOxVZpgaXFnNCxVlN1AlORx6MQ4ukaZMuO7fDnHjAgnkGlZOBq7/kMJfYGdZvLkKoe6qEoZHJQxVTcA3pkIwRQci5kx/AAxCuKcXYLpoHot5dytIumk0iwfzDqN4uUX5qOG8o2FrWy+7z/Yt7W97lA5c6hVltsoX5dqp0WB14EKgYq+wQwSNcI6tInjogDo4JnGSu1Tpmsy+Fc3Y5Z1cD29hWimxcC8h/wlm9C2hOjfEsdLOfkghevMjRdAW2RIIA8/KmR1Xi2EX78Q75wrPHvo4/4x0Cw0ZviN2wC9LY3GU8tmGjjC0P+WsF4M1Y9by2H2xLHuYPB7h7OnlD67d8pPQVq84Yl2jq9kT2PoYjlNwqWz1r/PsLBCGlXQtlTc7FQKXUAREFwBJY+b5mk2xMsiZZsNrtIfRQ2roDbHws+M0mAQPo1eqeDKLPH8fkDf/ZhWzE+swLadoGxuwKSux53ySAp7CQeObJYWJ3eHfO0cI21DZmd9uyjayA="

158
appdmg.py Normal file
View File

@ -0,0 +1,158 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import biplist
import os.path
application = defines.get('app', 'dist/Syncplay.app')
appname = os.path.basename(application)
def icon_from_app(app_path):
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
plist = biplist.readPlist(plist_path)
icon_name = plist['CFBundleIconFile']
icon_root,icon_ext = os.path.splitext(icon_name)
if not icon_ext:
icon_ext = '.icns'
icon_name = icon_root + icon_ext
return os.path.join(app_path, 'Contents', 'Resources', icon_name)
# Volume format (see hdiutil create -help)
format = defines.get('format', 'UDZO')
# Compression level (if relevant)
compression_level = 9
# Volume size
size = defines.get('size', None)
# Files to include
files = [ application, 'resources/lua/intf/syncplay.lua', 'resources/.macos_vlc_install.command' ]
# Symlinks to create
symlinks = { 'Applications': '/Applications', 'Install in VLC': '.macos_vlc_install.command' }
# Volume icon
#
# You can either define icon, in which case that icon file will be copied to the
# image, *or* you can define badge_icon, in which case the icon file you specify
# will be used to badge the system's Removable Disk icon
#
#icon = '/path/to/icon.icns'
badge_icon = icon_from_app(application)
# Where to put the icons
icon_locations = {
appname: (80, 80),
'Applications': (280, 80),
'syncplay.lua': (80, 240),
'Install in VLC': (280, 240)
}
# .. Window configuration ......................................................
# Background
#
# This is a STRING containing any of the following:
#
# #3344ff - web-style RGB color
# #34f - web-style RGB color, short form (#34f == #3344ff)
# rgb(1,0,0) - RGB color, each value is between 0 and 1
# hsl(120,1,.5) - HSL (hue saturation lightness) color
# hwb(300,0,0) - HWB (hue whiteness blackness) color
# cmyk(0,1,0,0) - CMYK color
# goldenrod - X11/SVG named color
# builtin-arrow - A simple built-in background with a blue arrow
# /foo/bar/baz.png - The path to an image file
#
# The hue component in hsl() and hwb() may include a unit; it defaults to
# degrees ('deg'), but also supports radians ('rad') and gradians ('grad'
# or 'gon').
#
# Other color components may be expressed either in the range 0 to 1, or
# as percentages (e.g. 60% is equivalent to 0.6).
background = '#bacbe0'
show_status_bar = False
show_tab_view = False
show_toolbar = False
show_pathbar = False
show_sidebar = False
sidebar_width = 180
# Window position in ((x, y), (w, h)) format
window_rect = ((100, 100), (360, 400))
# Select the default view; must be one of
#
# 'icon-view'
# 'list-view'
# 'column-view'
# 'coverflow'
#
default_view = 'icon-view'
# General view configuration
show_icon_preview = False
# Set these to True to force inclusion of icon/list view settings (otherwise
# we only include settings for the default view)
include_icon_view_settings = 'auto'
include_list_view_settings = 'auto'
# .. Icon view configuration ...................................................
arrange_by = None
grid_offset = (0, 0)
grid_spacing = 20
scroll_position = (0, 0)
label_pos = 'bottom' # or 'right'
text_size = 12
icon_size = 80
# .. List view configuration ...................................................
# Column names are as follows:
#
# name
# date-modified
# date-created
# date-added
# date-last-opened
# size
# kind
# label
# version
# comments
#
list_icon_size = 16
list_text_size = 12
list_scroll_position = (0, 0)
list_sort_by = 'name'
list_use_relative_dates = True
list_calculate_all_sizes = False,
list_columns = ('name', 'date-modified', 'size', 'kind', 'date-added')
list_column_widths = {
'name': 300,
'date-modified': 181,
'date-created': 181,
'date-added': 181,
'date-last-opened': 181,
'size': 97,
'kind': 115,
'label': 100,
'version': 75,
'comments': 300,
}
list_column_sort_directions = {
'name': 'ascending',
'date-modified': 'descending',
'date-created': 'descending',
'date-added': 'descending',
'date-last-opened': 'descending',
'size': 'descending',
'kind': 'ascending',
'label': 'ascending',
'version': 'ascending',
'comments': 'ascending',
}

19
bintray.json Normal file
View File

@ -0,0 +1,19 @@
{
"package": {
"name": "Syncplay",
"repo": "Syncplay",
"subject": "alby128"
},
"version": {
"name": "1.5.0"
},
"files":
[
{"includePattern": "dist_dmg/(.*)", "uploadPattern": "$1",
"matrixParams": {
"override": 1 }}
],
"publish": true
}

32
buildPy2app.py Normal file
View File

@ -0,0 +1,32 @@
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
from glob import glob
import syncplay
APP = ['syncplayClient.py']
DATA_FILES = [
('resources', glob('resources/*.png') + glob('resources/*.rtf')),
]
OPTIONS = {
'iconfile':'resources/icon.icns',
'plist': {
'CFBundleName':'Syncplay',
'CFBundleShortVersionString':syncplay.version,
'CFBundleIdentifier':'pl.syncplay.Syncplay',
'NSHumanReadableCopyright': '@ 2017 Syncplay All Rights Reserved'
}
}
setup(
app=APP,
name='Syncplay',
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)

View File

@ -33,7 +33,7 @@ if missingStrings is not None and missingStrings is not "":
p = "C:\\Program Files (x86)\\NSIS\\makensis.exe" #TODO: how to move that into proper place, huh p = "C:\\Program Files (x86)\\NSIS\\makensis.exe" #TODO: how to move that into proper place, huh
NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe" NSIS_COMPILE = p if os.path.isfile(p) else "makensis.exe"
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"""
!include LogicLib.nsh !include LogicLib.nsh
@ -118,7 +118,7 @@ NSIS_SCRIPT_TEMPLATE = r"""
LangString ^ClickInstall $${LANG_GERMAN} " " LangString ^ClickInstall $${LANG_GERMAN} " "
PageEx license PageEx license
LicenseData resources\license.txt LicenseData resources\license.rtf
PageExEnd PageExEnd
Page custom DirectoryCustom DirectoryCustomLeave Page custom DirectoryCustom DirectoryCustomLeave
Page instFiles Page instFiles
@ -665,7 +665,7 @@ guiIcons = ['resources/accept.png', 'resources/arrow_undo.png', 'resources/clock
'resources/email_go.png', 'resources/email_go.png',
'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng' 'resources/world_add.png', 'resources/film_add.png', 'resources/delete.png', 'resources/spinner.mng'
] ]
resources = ["resources/icon.ico", "resources/syncplay.png"] resources = ["resources/icon.ico", "resources/syncplay.png", "resources/license.rtf", "resources/third-party-notices.rtf"]
resources.extend(guiIcons) resources.extend(guiIcons)
intf_resources = ["resources/lua/intf/syncplay.lua"] intf_resources = ["resources/lua/intf/syncplay.lua"]
@ -698,5 +698,5 @@ info = dict(
cmdclass = {"py2exe": build_installer}, cmdclass = {"py2exe": build_installer},
) )
sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource']) sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-p PySide.QtGui'])
setup(**info) setup(**info)

BIN
resources/icon.icns Normal file

Binary file not shown.

View File

@ -1,202 +1,210 @@
{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww12600\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
Apache License \f0\fs24 \cf0 \
Version 2.0, January 2004 Apache License\
http://www.apache.org/licenses/ Version 2.0, January 2004\
http://www.apache.org/licenses/\
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION \
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\
1. Definitions. \
1. Definitions.\
"License" shall mean the terms and conditions for use, reproduction, \
and distribution as defined by Sections 1 through 9 of this document. "License" shall mean the terms and conditions for use, reproduction,\
and distribution as defined by Sections 1 through 9 of this document.\
"Licensor" shall mean the copyright owner or entity authorized by \
the copyright owner that is granting the License. "Licensor" shall mean the copyright owner or entity authorized by\
the copyright owner that is granting the License.\
"Legal Entity" shall mean the union of the acting entity and all \
other entities that control, are controlled by, or are under common "Legal Entity" shall mean the union of the acting entity and all\
control with that entity. For the purposes of this definition, other entities that control, are controlled by, or are under common\
"control" means (i) the power, direct or indirect, to cause the control with that entity. For the purposes of this definition,\
direction or management of such entity, whether by contract or "control" means (i) the power, direct or indirect, to cause the\
otherwise, or (ii) ownership of fifty percent (50%) or more of the direction or management of such entity, whether by contract or\
outstanding shares, or (iii) beneficial ownership of such entity. otherwise, or (ii) ownership of fifty percent (50%) or more of the\
outstanding shares, or (iii) beneficial ownership of such entity.\
"You" (or "Your") shall mean an individual or Legal Entity \
exercising permissions granted by this License. "You" (or "Your") shall mean an individual or Legal Entity\
exercising permissions granted by this License.\
"Source" form shall mean the preferred form for making modifications, \
including but not limited to software source code, documentation "Source" form shall mean the preferred form for making modifications,\
source, and configuration files. including but not limited to software source code, documentation\
source, and configuration files.\
"Object" form shall mean any form resulting from mechanical \
transformation or translation of a Source form, including but "Object" form shall mean any form resulting from mechanical\
not limited to compiled object code, generated documentation, transformation or translation of a Source form, including but\
and conversions to other media types. not limited to compiled object code, generated documentation,\
and conversions to other media types.\
"Work" shall mean the work of authorship, whether in Source or \
Object form, made available under the License, as indicated by a "Work" shall mean the work of authorship, whether in Source or\
copyright notice that is included in or attached to the work Object form, made available under the License, as indicated by a\
(an example is provided in the Appendix below). copyright notice that is included in or attached to the work\
(an example is provided in the Appendix below).\
"Derivative Works" shall mean any work, whether in Source or Object \
form, that is based on (or derived from) the Work and for which the "Derivative Works" shall mean any work, whether in Source or Object\
editorial revisions, annotations, elaborations, or other modifications form, that is based on (or derived from) the Work and for which the\
represent, as a whole, an original work of authorship. For the purposes editorial revisions, annotations, elaborations, or other modifications\
of this License, Derivative Works shall not include works that remain represent, as a whole, an original work of authorship. For the purposes\
separable from, or merely link (or bind by name) to the interfaces of, of this License, Derivative Works shall not include works that remain\
the Work and Derivative Works thereof. separable from, or merely link (or bind by name) to the interfaces of,\
the Work and Derivative Works thereof.\
"Contribution" shall mean any work of authorship, including \
the original version of the Work and any modifications or additions "Contribution" shall mean any work of authorship, including\
to that Work or Derivative Works thereof, that is intentionally the original version of the Work and any modifications or additions\
submitted to Licensor for inclusion in the Work by the copyright owner to that Work or Derivative Works thereof, that is intentionally\
or by an individual or Legal Entity authorized to submit on behalf of submitted to Licensor for inclusion in the Work by the copyright owner\
the copyright owner. For the purposes of this definition, "submitted" or by an individual or Legal Entity authorized to submit on behalf of\
means any form of electronic, verbal, or written communication sent the copyright owner. For the purposes of this definition, "submitted"\
to the Licensor or its representatives, including but not limited to means any form of electronic, verbal, or written communication sent\
communication on electronic mailing lists, source code control systems, to the Licensor or its representatives, including but not limited to\
and issue tracking systems that are managed by, or on behalf of, the communication on electronic mailing lists, source code control systems,\
Licensor for the purpose of discussing and improving the Work, but and issue tracking systems that are managed by, or on behalf of, the\
excluding communication that is conspicuously marked or otherwise Licensor for the purpose of discussing and improving the Work, but\
designated in writing by the copyright owner as "Not a Contribution." excluding communication that is conspicuously marked or otherwise\
designated in writing by the copyright owner as "Not a Contribution."\
"Contributor" shall mean Licensor and any individual or Legal Entity \
on behalf of whom a Contribution has been received by Licensor and "Contributor" shall mean Licensor and any individual or Legal Entity\
subsequently incorporated within the Work. on behalf of whom a Contribution has been received by Licensor and\
subsequently incorporated within the Work.\
2. Grant of Copyright License. Subject to the terms and conditions of \
this License, each Contributor hereby grants to You a perpetual, 2. Grant of Copyright License. Subject to the terms and conditions of\
worldwide, non-exclusive, no-charge, royalty-free, irrevocable this License, each Contributor hereby grants to You a perpetual,\
copyright license to reproduce, prepare Derivative Works of, worldwide, non-exclusive, no-charge, royalty-free, irrevocable\
publicly display, publicly perform, sublicense, and distribute the copyright license to reproduce, prepare Derivative Works of,\
Work and such Derivative Works in Source or Object form. publicly display, publicly perform, sublicense, and distribute the\
Work and such Derivative Works in Source or Object form.\
3. Grant of Patent License. Subject to the terms and conditions of \
this License, each Contributor hereby grants to You a perpetual, 3. Grant of Patent License. Subject to the terms and conditions of\
worldwide, non-exclusive, no-charge, royalty-free, irrevocable this License, each Contributor hereby grants to You a perpetual,\
(except as stated in this section) patent license to make, have made, worldwide, non-exclusive, no-charge, royalty-free, irrevocable\
use, offer to sell, sell, import, and otherwise transfer the Work, (except as stated in this section) patent license to make, have made,\
where such license applies only to those patent claims licensable use, offer to sell, sell, import, and otherwise transfer the Work,\
by such Contributor that are necessarily infringed by their where such license applies only to those patent claims licensable\
Contribution(s) alone or by combination of their Contribution(s) by such Contributor that are necessarily infringed by their\
with the Work to which such Contribution(s) was submitted. If You Contribution(s) alone or by combination of their Contribution(s)\
institute patent litigation against any entity (including a with the Work to which such Contribution(s) was submitted. If You\
cross-claim or counterclaim in a lawsuit) alleging that the Work institute patent litigation against any entity (including a\
or a Contribution incorporated within the Work constitutes direct cross-claim or counterclaim in a lawsuit) alleging that the Work\
or contributory patent infringement, then any patent licenses or a Contribution incorporated within the Work constitutes direct\
granted to You under this License for that Work shall terminate or contributory patent infringement, then any patent licenses\
as of the date such litigation is filed. granted to You under this License for that Work shall terminate\
as of the date such litigation is filed.\
4. Redistribution. You may reproduce and distribute copies of the \
Work or Derivative Works thereof in any medium, with or without 4. Redistribution. You may reproduce and distribute copies of the\
modifications, and in Source or Object form, provided that You Work or Derivative Works thereof in any medium, with or without\
meet the following conditions: modifications, and in Source or Object form, provided that You\
meet the following conditions:\
(a) You must give any other recipients of the Work or \
Derivative Works a copy of this License; and (a) You must give any other recipients of the Work or\
Derivative Works a copy of this License; and\
(b) You must cause any modified files to carry prominent notices \
stating that You changed the files; and (b) You must cause any modified files to carry prominent notices\
stating that You changed the files; and\
(c) You must retain, in the Source form of any Derivative Works \
that You distribute, all copyright, patent, trademark, and (c) You must retain, in the Source form of any Derivative Works\
attribution notices from the Source form of the Work, that You distribute, all copyright, patent, trademark, and\
excluding those notices that do not pertain to any part of attribution notices from the Source form of the Work,\
the Derivative Works; and excluding those notices that do not pertain to any part of\
the Derivative Works; and\
(d) If the Work includes a "NOTICE" text file as part of its \
distribution, then any Derivative Works that You distribute must (d) If the Work includes a "NOTICE" text file as part of its\
include a readable copy of the attribution notices contained distribution, then any Derivative Works that You distribute must\
within such NOTICE file, excluding those notices that do not include a readable copy of the attribution notices contained\
pertain to any part of the Derivative Works, in at least one within such NOTICE file, excluding those notices that do not\
of the following places: within a NOTICE text file distributed pertain to any part of the Derivative Works, in at least one\
as part of the Derivative Works; within the Source form or of the following places: within a NOTICE text file distributed\
documentation, if provided along with the Derivative Works; or, as part of the Derivative Works; within the Source form or\
within a display generated by the Derivative Works, if and documentation, if provided along with the Derivative Works; or,\
wherever such third-party notices normally appear. The contents within a display generated by the Derivative Works, if and\
of the NOTICE file are for informational purposes only and wherever such third-party notices normally appear. The contents\
do not modify the License. You may add Your own attribution of the NOTICE file are for informational purposes only and\
notices within Derivative Works that You distribute, alongside do not modify the License. You may add Your own attribution\
or as an addendum to the NOTICE text from the Work, provided notices within Derivative Works that You distribute, alongside\
that such additional attribution notices cannot be construed or as an addendum to the NOTICE text from the Work, provided\
as modifying the License. that such additional attribution notices cannot be construed\
as modifying the License.\
You may add Your own copyright statement to Your modifications and \
may provide additional or different license terms and conditions You may add Your own copyright statement to Your modifications and\
for use, reproduction, or distribution of Your modifications, or may provide additional or different license terms and conditions\
for any such Derivative Works as a whole, provided Your use, for use, reproduction, or distribution of Your modifications, or\
reproduction, and distribution of the Work otherwise complies with for any such Derivative Works as a whole, provided Your use,\
the conditions stated in this License. reproduction, and distribution of the Work otherwise complies with\
the conditions stated in this License.\
5. Submission of Contributions. Unless You explicitly state otherwise, \
any Contribution intentionally submitted for inclusion in the Work 5. Submission of Contributions. Unless You explicitly state otherwise,\
by You to the Licensor shall be under the terms and conditions of any Contribution intentionally submitted for inclusion in the Work\
this License, without any additional terms or conditions. by You to the Licensor shall be under the terms and conditions of\
Notwithstanding the above, nothing herein shall supersede or modify this License, without any additional terms or conditions.\
the terms of any separate license agreement you may have executed Notwithstanding the above, nothing herein shall supersede or modify\
with Licensor regarding such Contributions. the terms of any separate license agreement you may have executed\
with Licensor regarding such Contributions.\
6. Trademarks. This License does not grant permission to use the trade \
names, trademarks, service marks, or product names of the Licensor, 6. Trademarks. This License does not grant permission to use the trade\
except as required for reasonable and customary use in describing the names, trademarks, service marks, or product names of the Licensor,\
origin of the Work and reproducing the content of the NOTICE file. except as required for reasonable and customary use in describing the\
origin of the Work and reproducing the content of the NOTICE file.\
7. Disclaimer of Warranty. Unless required by applicable law or \
agreed to in writing, Licensor provides the Work (and each 7. Disclaimer of Warranty. Unless required by applicable law or\
Contributor provides its Contributions) on an "AS IS" BASIS, agreed to in writing, Licensor provides the Work (and each\
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or Contributor provides its Contributions) on an "AS IS" BASIS,\
implied, including, without limitation, any warranties or conditions WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A implied, including, without limitation, any warranties or conditions\
PARTICULAR PURPOSE. You are solely responsible for determining the of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\
appropriateness of using or redistributing the Work and assume any PARTICULAR PURPOSE. You are solely responsible for determining the\
risks associated with Your exercise of permissions under this License. appropriateness of using or redistributing the Work and assume any\
risks associated with Your exercise of permissions under this License.\
8. Limitation of Liability. In no event and under no legal theory, \
whether in tort (including negligence), contract, or otherwise, 8. Limitation of Liability. In no event and under no legal theory,\
unless required by applicable law (such as deliberate and grossly whether in tort (including negligence), contract, or otherwise,\
negligent acts) or agreed to in writing, shall any Contributor be unless required by applicable law (such as deliberate and grossly\
liable to You for damages, including any direct, indirect, special, negligent acts) or agreed to in writing, shall any Contributor be\
incidental, or consequential damages of any character arising as a liable to You for damages, including any direct, indirect, special,\
result of this License or out of the use or inability to use the incidental, or consequential damages of any character arising as a\
Work (including but not limited to damages for loss of goodwill, result of this License or out of the use or inability to use the\
work stoppage, computer failure or malfunction, or any and all Work (including but not limited to damages for loss of goodwill,\
other commercial damages or losses), even if such Contributor work stoppage, computer failure or malfunction, or any and all\
has been advised of the possibility of such damages. other commercial damages or losses), even if such Contributor\
has been advised of the possibility of such damages.\
9. Accepting Warranty or Additional Liability. While redistributing \
the Work or Derivative Works thereof, You may choose to offer, 9. Accepting Warranty or Additional Liability. While redistributing\
and charge a fee for, acceptance of support, warranty, indemnity, the Work or Derivative Works thereof, You may choose to offer,\
or other liability obligations and/or rights consistent with this and charge a fee for, acceptance of support, warranty, indemnity,\
License. However, in accepting such obligations, You may act only or other liability obligations and/or rights consistent with this\
on Your own behalf and on Your sole responsibility, not on behalf License. However, in accepting such obligations, You may act only\
of any other Contributor, and only if You agree to indemnify, on Your own behalf and on Your sole responsibility, not on behalf\
defend, and hold each Contributor harmless for any liability of any other Contributor, and only if You agree to indemnify,\
incurred by, or claims asserted against, such Contributor by reason defend, and hold each Contributor harmless for any liability\
of your accepting any such warranty or additional liability. incurred by, or claims asserted against, such Contributor by reason\
of your accepting any such warranty or additional liability.\
END OF TERMS AND CONDITIONS \
END OF TERMS AND CONDITIONS\
APPENDIX: How to apply the Apache License to your work. \
APPENDIX: How to apply the Apache License to your work.\
To apply the Apache License to your work, attach the following \
boilerplate notice, with the fields enclosed by brackets "[]" To apply the Apache License to your work, attach the following\
replaced with your own identifying information. (Don't include boilerplate notice, with the fields enclosed by brackets "[]"\
the brackets!) The text should be enclosed in the appropriate replaced with your own identifying information. (Don't include\
comment syntax for the file format. We also recommend that a the brackets!) The text should be enclosed in the appropriate\
file or class name and description of purpose be included on the comment syntax for the file format. We also recommend that a\
same "printed page" as the copyright notice for easier file or class name and description of purpose be included on the\
identification within third-party archives. same "printed page" as the copyright notice for easier\
identification within third-party archives.\
Copyright 2013 Syncplay \
Copyright 2013 Syncplay\
Licensed under the Apache License, Version 2.0 (the "License"); \
you may not use this file except in compliance with the License. Licensed under the Apache License, Version 2.0 (the "License");\
You may obtain a copy of the License at you may not use this file except in compliance with the License.\
You may obtain a copy of the License at\
http://www.apache.org/licenses/LICENSE-2.0 \
http://www.apache.org/licenses/LICENSE-2.0\
Unless required by applicable law or agreed to in writing, software \
distributed under the License is distributed on an "AS IS" BASIS, Unless required by applicable law or agreed to in writing, software\
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. distributed under the License is distributed on an "AS IS" BASIS,\
See the License for the specific language governing permissions and WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\
limitations under the License. See the License for the specific language governing permissions and\
limitations under the License.\
}

View File

@ -0,0 +1,5 @@
#!/bin/sh
mkdir -p $HOME/Library/Application\ Support/org.videolan.vlc/lua/intf/
cp /Volumes/Syncplay/syncplay.lua $HOME/Library/Application\ Support/org.videolan.vlc/lua/intf/

View File

@ -0,0 +1,206 @@
{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\paperw11900\paperh16840\margl1440\margr1440\vieww12600\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\f0\fs24 \cf0 Syncplay relies on the following softwares, in compliance with their licenses. \
\
\b PySide\
\b0 \
Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).\
Contact: PySide team <contact@pyside.org>\
\
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 <http://www.gnu.org/licenses/>\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 \
\b Twisted\
\
\b0 Copyright (c) 2001-2017\
Allen Short\
Amber Hawkie Brown\
Andrew Bennetts\
Andy Gayton\
Antoine Pitrou\
Apple Computer, Inc.\
Ashwini Oruganti\
Benjamin Bruheim\
Bob Ippolito\
Canonical Limited\
Christopher Armstrong\
David Reid\
Divmod Inc.\
Donovan Preston\
Eric Mangold\
Eyal Lotem\
Google Inc.\
Hybrid Logic Ltd.\
Hynek Schlawack\
Itamar Turner-Trauring\
James Knight\
Jason A. Mobarak\
Jean-Paul Calderone\
Jessica McKellar\
Jonathan D. Simms\
Jonathan Jacobs\
Jonathan Lange\
Julian Berman\
J\'fcrgen Hermann\
Kevin Horn\
Kevin Turner\
Laurens Van Houtven\
Mary Gardiner\
Massachusetts Institute of Technology\
Matthew Lefkowitz\
Moshe Zadka\
Paul Swartz\
Pavel Pergamenshchik\
Rackspace, US Inc.\
Ralph Meijer\
Richard Wall\
Sean Riley\
Software Freedom Conservancy\
Tavendo GmbH\
Thijs Triemstra\
Thomas Herve\
Timothy Allen\
Tom Prince\
Travis B. Hartwell\
\
and others that have contributed code to the public domain.\
\
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 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 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 <http://www.gnu.org/licenses/>\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\b \cf0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 appnope\
\b0 \
Copyright (c) 2013, Min Ragan-Kelley\
\
All rights reserved.\
\
Redistribution and use in source and binary forms, with or without\
modification, are permitted provided that the following conditions are met:\
\
Redistributions of source code must retain the above copyright notice, this\
list of conditions and the following disclaimer.\
\
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\
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.\
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\b \cf0 \
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
\cf0 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\
\b0 \
Copyright (c) 2000-2013 Thomas Heller, Jimmy Retzlaff\
\
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 py2app\
\
\b0 Copyright (c) 2004 Bob Ippolito.\
\
Some parts copyright (c) 2010-2014 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 dmgbuild\
\
\b0 Copyright (c) 2014 Alastair Houghton\
Copyright (c) 2017 The Qt Company Ltd.\
\
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.\
\
}

View File

@ -282,6 +282,14 @@ de = {
"help-menu-label" : u"&Hilfe", "help-menu-label" : u"&Hilfe",
"userguide-menu-label" : u"&Benutzerhandbuch öffnen", "userguide-menu-label" : u"&Benutzerhandbuch öffnen",
"update-menu-label" : u"auf &Aktualisierung prüfen", "update-menu-label" : u"auf &Aktualisierung prüfen",
#About dialog - TODO: Translate
"about-menu-label": u"&About Syncplay",
"about-dialog-title": u"About Syncplay",
"about-dialog-release": u"Version {} release {}",
"about-dialog-license-text" : u"Licensed under the Apache&nbsp;License,&nbsp;Version 2.0",
"about-dialog-license-button": u"License",
"about-dialog-dependencies": u"Dependencies",
"setoffset-msgbox-label" : u"Offset einstellen", "setoffset-msgbox-label" : u"Offset einstellen",
"offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):", "offsetinfo-msgbox-label" : u"Offset (siehe http://syncplay.pl/guide/ für eine Anleitung [Englisch]):",

View File

@ -282,6 +282,14 @@ en = {
"help-menu-label" : "&Help", "help-menu-label" : "&Help",
"userguide-menu-label" : "Open user &guide", "userguide-menu-label" : "Open user &guide",
"update-menu-label" : "Check for &update", "update-menu-label" : "Check for &update",
#About dialog
"about-menu-label": u"&About Syncplay",
"about-dialog-title": u"About Syncplay",
"about-dialog-release": u"Version {} release {}",
"about-dialog-license-text" : u"Licensed under the Apache&nbsp;License,&nbsp;Version 2.0",
"about-dialog-license-button": u"License",
"about-dialog-dependencies": u"Dependencies",
"setoffset-msgbox-label" : "Set offset", "setoffset-msgbox-label" : "Set offset",
"offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):", "offsetinfo-msgbox-label" : "Offset (see http://syncplay.pl/guide/ for usage instructions):",

View File

@ -284,6 +284,14 @@ ru = {
"help-menu-label" : u"&Помощь", "help-menu-label" : u"&Помощь",
"userguide-menu-label" : u"&Руководство пользователя", "userguide-menu-label" : u"&Руководство пользователя",
"update-menu-label" : u"Проверить &обновления", "update-menu-label" : u"Проверить &обновления",
#About dialog - TODO: Translate
"about-menu-label": u"&About Syncplay",
"about-dialog-title": u"About Syncplay",
"about-dialog-release": u"Version {} release {}",
"about-dialog-license-text" : u"Licensed under the Apache&nbsp;License,&nbsp;Version 2.0",
"about-dialog-license-button": u"License",
"about-dialog-dependencies": u"Dependencies",
"setoffset-msgbox-label" : u"Установить смещение", "setoffset-msgbox-label" : u"Установить смещение",
"offsetinfo-msgbox-label" : u"Смещение (см. инструкцию на странице www.syncplay.pl/guide):", "offsetinfo-msgbox-label" : u"Смещение (см. инструкцию на странице www.syncplay.pl/guide):",

73
syncplay/ui/gui.py Normal file → Executable file
View File

@ -1,6 +1,6 @@
from PySide import QtGui from PySide import QtGui
from PySide.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine from PySide.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine
from syncplay import utils, constants, version from syncplay import utils, constants, version, release_number
from syncplay.messages import getMessage from syncplay.messages import getMessage
import sys import sys
import time import time
@ -86,6 +86,59 @@ class UserlistItemDelegate(QtGui.QStyledItemDelegate):
optionQStyleOptionViewItem.rect.setX(optionQStyleOptionViewItem.rect.x()+16) optionQStyleOptionViewItem.rect.setX(optionQStyleOptionViewItem.rect.x()+16)
QtGui.QStyledItemDelegate.paint(self, itemQPainter, optionQStyleOptionViewItem, indexQModelIndex) QtGui.QStyledItemDelegate.paint(self, itemQPainter, optionQStyleOptionViewItem, indexQModelIndex)
class AboutDialog(QtGui.QDialog):
if sys.platform.startswith('win'):
resourcespath = utils.findWorkingDir() + u"\\resources\\"
else:
resourcespath = utils.findWorkingDir() + u"/resources/"
def __init__(self, parent=None):
super(AboutDialog, self).__init__(parent)
if sys.platform.startswith('darwin'):
self.setWindowTitle("")
else:
self.setWindowTitle(getMessage("about-dialog-title"))
if sys.platform.startswith('win'):
self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)
nameLabel = QtGui.QLabel("<center><strong>Syncplay</strong></center>")
nameLabel.setFont(QtGui.QFont("Helvetica", 20))
linkLabel = QtGui.QLabel("<center><a href=\"http://syncplay.pl\">syncplay.pl</a></center>")
linkLabel.setOpenExternalLinks(True)
versionLabel = QtGui.QLabel("<center>" + getMessage("about-dialog-release").format(version, release_number) + "</center>")
licenseLabel = QtGui.QLabel("<center><p>Copyright &copy; 2017 Syncplay</p><p>" + getMessage("about-dialog-license-text") + "</p></center>")
aboutIconPixmap = QtGui.QPixmap(self.resourcespath + u"syncplay.png")
aboutIconLabel = QtGui.QLabel()
aboutIconLabel.setPixmap(aboutIconPixmap.scaled(120, 120, Qt.KeepAspectRatio))
aboutLayout = QtGui.QGridLayout()
aboutLayout.addWidget(aboutIconLabel, 0, 0, 4, 2)
aboutLayout.addWidget(nameLabel, 0, 2, 1, 2)
aboutLayout.addWidget(linkLabel, 1, 2, 1, 2)
aboutLayout.addWidget(versionLabel, 2, 2, 1, 2)
aboutLayout.addWidget(licenseLabel, 3, 2, 1, 2)
licenseButton = QtGui.QPushButton(getMessage("about-dialog-license-button"))
licenseButton.setAutoDefault(False)
licenseButton.clicked.connect(self.openLicense)
aboutLayout.addWidget(licenseButton, 4, 2)
dependenciesButton = QtGui.QPushButton(getMessage("about-dialog-dependencies"))
dependenciesButton.setAutoDefault(False)
dependenciesButton.clicked.connect(self.openDependencies)
aboutLayout.addWidget(dependenciesButton, 4, 3)
aboutLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.setSizeGripEnabled(False)
self.setLayout(aboutLayout)
def openLicense(self):
if sys.platform.startswith('win'):
QtGui.QDesktopServices.openUrl(QUrl("file:///" + self.resourcespath + u"license.rtf"))
else:
QtGui.QDesktopServices.openUrl(QUrl("file://" + self.resourcespath + u"license.rtf"))
def openDependencies(self):
if sys.platform.startswith('win'):
QtGui.QDesktopServices.openUrl(QUrl("file:///" + self.resourcespath + u"third-party-notices.rtf"))
else:
QtGui.QDesktopServices.openUrl(QUrl("file://" + self.resourcespath + u"third-party-notices.rtf"))
class MainWindow(QtGui.QMainWindow): class MainWindow(QtGui.QMainWindow):
insertPosition = None insertPosition = None
playlistState = [] playlistState = []
@ -1360,6 +1413,7 @@ class MainWindow(QtGui.QMainWindow):
# Help menu # Help menu
window.helpMenu = QtGui.QMenu(getMessage("help-menu-label"), self) window.helpMenu = QtGui.QMenu(getMessage("help-menu-label"), self)
window.userguideAction = window.helpMenu.addAction(QtGui.QIcon(self.resourcespath + 'help.png'), window.userguideAction = window.helpMenu.addAction(QtGui.QIcon(self.resourcespath + 'help.png'),
getMessage("userguide-menu-label")) getMessage("userguide-menu-label"))
window.userguideAction.triggered.connect(self.openUserGuide) window.userguideAction.triggered.connect(self.openUserGuide)
@ -1367,10 +1421,22 @@ class MainWindow(QtGui.QMainWindow):
getMessage("update-menu-label")) getMessage("update-menu-label"))
window.updateAction.triggered.connect(self.userCheckForUpdates) window.updateAction.triggered.connect(self.userCheckForUpdates)
if not sys.platform.startswith('darwin'):
window.helpMenu.addSeparator()
window.about = window.helpMenu.addAction(QtGui.QIcon(self.resourcespath + 'syncplay.png'),
getMessage("about-menu-label"))
else:
window.about = window.helpMenu.addAction("&About")
window.about.triggered.connect(self.openAbout)
window.menuBar.addMenu(window.helpMenu) window.menuBar.addMenu(window.helpMenu)
if not sys.platform.startswith('darwin'): if not sys.platform.startswith('darwin'):
window.mainLayout.setMenuBar(window.menuBar) window.mainLayout.setMenuBar(window.menuBar)
def openAbout(self):
aboutMsgBox = AboutDialog()
aboutMsgBox.exec_()
def addMainFrame(self, window): def addMainFrame(self, window):
window.mainFrame = QtGui.QFrame() window.mainFrame = QtGui.QFrame()
window.mainFrame.setLineWidth(0) window.mainFrame.setLineWidth(0)
@ -1639,7 +1705,10 @@ class MainWindow(QtGui.QMainWindow):
self.resourcespath = utils.findWorkingDir() + u"\\resources\\" self.resourcespath = utils.findWorkingDir() + u"\\resources\\"
else: else:
self.resourcespath = utils.findWorkingDir() + u"/resources/" self.resourcespath = utils.findWorkingDir() + u"/resources/"
self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar) if sys.platform.startswith('darwin'):
self.setWindowFlags(self.windowFlags())
else:
self.setWindowFlags(self.windowFlags() & Qt.AA_DontUseNativeMenuBar)
self.setWindowTitle("Syncplay v" + version) self.setWindowTitle("Syncplay v" + version)
self.mainLayout = QtGui.QVBoxLayout() self.mainLayout = QtGui.QVBoxLayout()
self.addTopLayout(self) self.addTopLayout(self)

View File

@ -124,6 +124,8 @@ def findWorkingDir():
path = os.path.dirname(os.path.dirname(__file__)) path = os.path.dirname(os.path.dirname(__file__))
elif frozen in ('dll', 'console_exe', 'windows_exe'): elif frozen in ('dll', 'console_exe', 'windows_exe'):
path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
elif frozen in ('macosx_app'):
path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))))
else: else:
path = "" path = ""
return path return path