setuptools: change resources path
@ -28,7 +28,7 @@ install:
|
|||||||
before_deploy:
|
before_deploy:
|
||||||
- pip3 install dmgbuild
|
- pip3 install dmgbuild
|
||||||
- mkdir dist_dmg
|
- mkdir dist_dmg
|
||||||
- mv resources/macOS_readme.pdf resources/.macOS_readme.pdf
|
- mv syncplay/resources/macOS_readme.pdf syncplay/resources/.macOS_readme.pdf
|
||||||
- export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
- export VER="$(cat syncplay/__init__.py | awk '/version/ {gsub("\047", "", $3); print $NF}')"
|
||||||
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg
|
- dmgbuild -s appdmg.py "Syncplay" dist_dmg/Syncplay_${VER}.dmg
|
||||||
- python3 bintray_version.py
|
- python3 bintray_version.py
|
||||||
|
|||||||
18
GNUmakefile
@ -35,18 +35,18 @@ endif
|
|||||||
SHARE_PATH = ${DESTDIR}${PREFIX}/share
|
SHARE_PATH = ${DESTDIR}${PREFIX}/share
|
||||||
|
|
||||||
common:
|
common:
|
||||||
-mkdir -p $(LIB_PATH)/syncplay/resources/lua/intf
|
-mkdir -p $(LIB_PATH)/syncplay/syncplay/resources/lua/intf
|
||||||
-mkdir -p $(APP_SHORTCUT_PATH)
|
-mkdir -p $(APP_SHORTCUT_PATH)
|
||||||
-mkdir -p $(SHARE_PATH)/app-install/icons
|
-mkdir -p $(SHARE_PATH)/app-install/icons
|
||||||
-mkdir -p $(SHARE_PATH)/pixmaps/
|
-mkdir -p $(SHARE_PATH)/pixmaps/
|
||||||
cp -r syncplay $(LIB_PATH)/syncplay/
|
cp -r syncplay $(LIB_PATH)/syncplay/
|
||||||
chmod 755 $(LIB_PATH)/syncplay/
|
chmod 755 $(LIB_PATH)/syncplay/
|
||||||
cp -r resources/hicolor $(SHARE_PATH)/icons/
|
cp -r syncplay/resources/hicolor $(SHARE_PATH)/icons/
|
||||||
cp -r resources/*.png $(LIB_PATH)/syncplay/resources/
|
cp -r syncplay/resources/*.png $(LIB_PATH)/syncplay/syncplay/resources/
|
||||||
cp -r resources/*.lua $(LIB_PATH)/syncplay/resources/
|
cp -r syncplay/resources/*.lua $(LIB_PATH)/syncplay/syncplay/resources/
|
||||||
cp -r resources/lua/intf/*.lua $(LIB_PATH)/syncplay/resources/lua/intf/
|
cp -r syncplay/resources/lua/intf/*.lua $(LIB_PATH)/syncplay/syncplay/resources/lua/intf/
|
||||||
cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/
|
cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/app-install/icons/
|
||||||
cp resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/
|
cp syncplay/resources/hicolor/48x48/apps/syncplay.png $(SHARE_PATH)/pixmaps/
|
||||||
|
|
||||||
u-common:
|
u-common:
|
||||||
-rm -rf $(LIB_PATH)/syncplay
|
-rm -rf $(LIB_PATH)/syncplay
|
||||||
@ -60,7 +60,7 @@ client:
|
|||||||
sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay
|
sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay
|
||||||
chmod 755 $(BIN_PATH)/syncplay
|
chmod 755 $(BIN_PATH)/syncplay
|
||||||
cp syncplayClient.py $(LIB_PATH)/syncplay/
|
cp syncplayClient.py $(LIB_PATH)/syncplay/
|
||||||
cp resources/syncplay.desktop $(APP_SHORTCUT_PATH)/
|
cp syncplay/resources/syncplay.desktop $(APP_SHORTCUT_PATH)/
|
||||||
|
|
||||||
ifeq ($(SINGLE_USER),false)
|
ifeq ($(SINGLE_USER),false)
|
||||||
chmod 755 $(APP_SHORTCUT_PATH)/syncplay.desktop
|
chmod 755 $(APP_SHORTCUT_PATH)/syncplay.desktop
|
||||||
@ -79,7 +79,7 @@ server:
|
|||||||
sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay-server
|
sed -i -e '/# libpath/ a\import site\nsite.addsitedir\("${PREFIX}/lib/syncplay"\)' $(BIN_PATH)/syncplay-server
|
||||||
chmod 755 $(BIN_PATH)/syncplay-server
|
chmod 755 $(BIN_PATH)/syncplay-server
|
||||||
cp syncplayServer.py $(LIB_PATH)/syncplay/
|
cp syncplayServer.py $(LIB_PATH)/syncplay/
|
||||||
cp resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/
|
cp syncplay/resources/syncplay-server.desktop $(APP_SHORTCUT_PATH)/
|
||||||
|
|
||||||
ifeq ($(SINGLE_USER),false)
|
ifeq ($(SINGLE_USER),false)
|
||||||
chmod 755 $(APP_SHORTCUT_PATH)/syncplay-server.desktop
|
chmod 755 $(APP_SHORTCUT_PATH)/syncplay-server.desktop
|
||||||
|
|||||||
10
MANIFEST.in
@ -1,6 +1,6 @@
|
|||||||
include LICENSE
|
include LICENSE
|
||||||
include resources/*.png
|
include syncplay/resources/*.png
|
||||||
include resources/*.mng
|
include syncplay/resources/*.mng
|
||||||
include resources/*.lua
|
include syncplay/resources/*.lua
|
||||||
include resources/*.rtf
|
include syncplay/resources/*.rtf
|
||||||
include resources/lua/intf/*.lua
|
include syncplay/resources/lua/intf/*.lua
|
||||||
@ -31,7 +31,7 @@ size = defines.get('size', None)
|
|||||||
# Files to include
|
# Files to include
|
||||||
files = [
|
files = [
|
||||||
application,
|
application,
|
||||||
'resources/.macOS_readme.pdf'
|
'syncplay/resources/.macOS_readme.pdf'
|
||||||
]
|
]
|
||||||
|
|
||||||
# Symlinks to create
|
# Symlinks to create
|
||||||
@ -78,7 +78,7 @@ icon_locations = {
|
|||||||
#
|
#
|
||||||
# Other color components may be expressed either in the range 0 to 1, or
|
# Other color components may be expressed either in the range 0 to 1, or
|
||||||
# as percentages (e.g. 60% is equivalent to 0.6).
|
# as percentages (e.g. 60% is equivalent to 0.6).
|
||||||
background = 'resources/macOS_dmg_bkg.tiff'
|
background = 'syncplay/resources/macOS_dmg_bkg.tiff'
|
||||||
|
|
||||||
show_status_bar = False
|
show_status_bar = False
|
||||||
show_tab_view = False
|
show_tab_view = False
|
||||||
|
|||||||
@ -11,11 +11,11 @@ import syncplay
|
|||||||
|
|
||||||
APP = ['syncplayClient.py']
|
APP = ['syncplayClient.py']
|
||||||
DATA_FILES = [
|
DATA_FILES = [
|
||||||
('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')),
|
('resources', glob('syncplay/resources/*.png') + glob('syncplay/resources/*.rtf') + glob('syncplay/resources/*.lua')),
|
||||||
('resources/lua/intf', glob('resources/lua/intf/*.lua'))
|
('resources/lua/intf', glob('syncplay/resources/lua/intf/*.lua'))
|
||||||
]
|
]
|
||||||
OPTIONS = {
|
OPTIONS = {
|
||||||
'iconfile': 'resources/icon.icns',
|
'iconfile': 'syncplay/resources/icon.icns',
|
||||||
'extra_scripts': 'syncplayServer.py',
|
'extra_scripts': 'syncplayServer.py',
|
||||||
'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui', 'PySide2.QtWidgets', 'certifi', 'cffi'},
|
'includes': {'PySide2.QtCore', 'PySide2.QtUiTools', 'PySide2.QtGui', 'PySide2.QtWidgets', 'certifi', 'cffi'},
|
||||||
'excludes': {'PySide', 'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'},
|
'excludes': {'PySide', 'PySide.QtCore', 'PySide.QtUiTools', 'PySide.QtGui'},
|
||||||
|
|||||||
@ -691,14 +691,14 @@ guiIcons = [
|
|||||||
'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 = [
|
||||||
"resources/icon.ico",
|
"syncplay/resources/icon.ico",
|
||||||
"resources/syncplay.png",
|
"syncplay/resources/syncplay.png",
|
||||||
"resources/syncplayintf.lua",
|
"syncplay/resources/syncplayintf.lua",
|
||||||
"resources/license.rtf",
|
"syncplay/resources/license.rtf",
|
||||||
"resources/third-party-notices.rtf"
|
"syncplay/resources/third-party-notices.rtf"
|
||||||
]
|
]
|
||||||
resources.extend(guiIcons)
|
resources.extend(guiIcons)
|
||||||
intf_resources = ["resources/lua/intf/syncplay.lua"]
|
intf_resources = ["syncplay/resources/lua/intf/syncplay.lua"]
|
||||||
|
|
||||||
qt_plugins = ['platforms\\qwindows.dll', 'styles\\qwindowsvistastyle.dll']
|
qt_plugins = ['platforms\\qwindows.dll', 'styles\\qwindowsvistastyle.dll']
|
||||||
|
|
||||||
@ -714,7 +714,7 @@ info = dict(
|
|||||||
common_info,
|
common_info,
|
||||||
windows=[{
|
windows=[{
|
||||||
"script": "syncplayClient.py",
|
"script": "syncplayClient.py",
|
||||||
"icon_resources": [(1, "resources\\icon.ico")],
|
"icon_resources": [(1, "syncplay\\resources\\icon.ico")],
|
||||||
'dest_base': "Syncplay"},
|
'dest_base': "Syncplay"},
|
||||||
],
|
],
|
||||||
console=['syncplayServer.py'],
|
console=['syncplayServer.py'],
|
||||||
|
|||||||
2
setup.py
@ -11,7 +11,7 @@ with open("README.md", "r") as fh:
|
|||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="syncplay-distutil-test-3",
|
name="syncplay-setuptools-test-3",
|
||||||
version=syncplay_version,
|
version=syncplay_version,
|
||||||
author="Syncplay",
|
author="Syncplay",
|
||||||
author_email="dev@syncplay.pl",
|
author_email="dev@syncplay.pl",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 781 B After Width: | Height: | Size: 781 B |
|
Before Width: | Height: | Size: 581 B After Width: | Height: | Size: 581 B |
|
Before Width: | Height: | Size: 685 B After Width: | Height: | Size: 685 B |
|
Before Width: | Height: | Size: 683 B After Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 631 B After Width: | Height: | Size: 631 B |
|
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 349 B |
|
Before Width: | Height: | Size: 418 B After Width: | Height: | Size: 418 B |
|
Before Width: | Height: | Size: 959 B After Width: | Height: | Size: 959 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 847 B After Width: | Height: | Size: 847 B |
|
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 655 B After Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 671 B |
|
Before Width: | Height: | Size: 715 B After Width: | Height: | Size: 715 B |
|
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
|
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 754 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |
|
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
|
Before Width: | Height: | Size: 750 B After Width: | Height: | Size: 750 B |
|
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 739 B |
|
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 855 B |
|
Before Width: | Height: | Size: 1021 B After Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 830 B |
|
Before Width: | Height: | Size: 679 B After Width: | Height: | Size: 679 B |
|
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 792 B |
|
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 806 B After Width: | Height: | Size: 806 B |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 133 KiB |
|
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 744 B |
|
Before Width: | Height: | Size: 884 B After Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 791 B |
|
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 862 B |
|
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 824 B |
|
Before Width: | Height: | Size: 890 B After Width: | Height: | Size: 890 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 931 B After Width: | Height: | Size: 931 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 759 B After Width: | Height: | Size: 759 B |
|
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 758 B |
|
Before Width: | Height: | Size: 773 B After Width: | Height: | Size: 773 B |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 795 B After Width: | Height: | Size: 795 B |
|
Before Width: | Height: | Size: 537 B After Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 556 B After Width: | Height: | Size: 556 B |
|
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 743 B |
|
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 940 B After Width: | Height: | Size: 940 B |
|
Before Width: | Height: | Size: 987 B After Width: | Height: | Size: 987 B |
|
Before Width: | Height: | Size: 944 B After Width: | Height: | Size: 944 B |
@ -147,7 +147,7 @@ def isASCII(s):
|
|||||||
|
|
||||||
def findResourcePath(resourceName):
|
def findResourcePath(resourceName):
|
||||||
if resourceName == "syncplay.lua":
|
if resourceName == "syncplay.lua":
|
||||||
resourcePath = os.path.join(findWorkingDir(),"resources", "lua", "intf", resourceName)
|
resourcePath = os.path.join(findWorkingDir(), "resources", "lua", "intf", resourceName)
|
||||||
else:
|
else:
|
||||||
resourcePath = os.path.join(findWorkingDir(), "resources", resourceName)
|
resourcePath = os.path.join(findWorkingDir(), "resources", resourceName)
|
||||||
return resourcePath
|
return resourcePath
|
||||||
@ -156,7 +156,7 @@ def findResourcePath(resourceName):
|
|||||||
def findWorkingDir():
|
def findWorkingDir():
|
||||||
frozen = getattr(sys, 'frozen', '')
|
frozen = getattr(sys, 'frozen', '')
|
||||||
if not frozen:
|
if not frozen:
|
||||||
path = os.path.dirname(os.path.dirname(__file__))
|
path = os.path.dirname(__file__)
|
||||||
elif frozen in ('dll', 'console_exe', 'windows_exe', 'macosx_app'):
|
elif frozen in ('dll', 'console_exe', 'windows_exe', 'macosx_app'):
|
||||||
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: # needed for PyInstaller
|
elif frozen: # needed for PyInstaller
|
||||||
|
|||||||