Renamed 'resources' to 'share', and updated location of 'share' files in OSX/Win binaries

This commit is contained in:
Micah Lee 2017-02-21 16:59:14 -08:00
parent 5351501943
commit 248f59cbd1
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
30 changed files with 20 additions and 20 deletions

View File

@ -3,7 +3,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat resources/version.txt`
VERSION=`cat share/version.txt`
# clean up from last build
rm -r deb_dist >/dev/null 2>&1

View File

@ -3,7 +3,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat resources/version.txt`
VERSION=`cat share/version.txt`
# clean up from last build
rm -r build dist >/dev/null 2>&1

View File

@ -7,7 +7,7 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
cd $DIR
VERSION=`cat resources/version.txt`
VERSION=`cat share/version.txt`
rm -rf deb_dist >/dev/null 2>&1
python3 setup.py --command-packages=stdeb.command sdist_dsc

View File

@ -3,19 +3,19 @@
import platform
p = platform.system()
version = open('resources/version.txt').read().strip()
version = open('share/version.txt').read().strip()
a = Analysis(
['scripts/onionshare-gui'],
pathex=['.'],
binaries=None,
datas=[
('../resources/images/*', 'images'),
('../resources/locale/*', 'locale'),
('../resources/html/*', 'html'),
('../resources/license.txt', '.'),
('../resources/version.txt', '.'),
('../resources/wordlist.txt', '.')
('../share/license.txt', 'share'),
('../share/version.txt', 'share'),
('../share/wordlist.txt', 'share')
('../share/images/*', 'share/images'),
('../share/locale/*', 'share/locale'),
('../share/html/*', 'share/html'),
],
hiddenimports=[],
hookspath=[],

View File

@ -37,21 +37,21 @@ def get_resource_path(filename):
if getattr(sys, 'onionshare_dev_mode', False):
# Look for resources directory relative to python file
resources_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'resources')
prefix = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))), 'share')
elif p == 'Linux' and sys.argv and sys.argv[0].startswith(sys.prefix):
# OnionShare is installed systemwide in Linux
resources_dir = os.path.join(sys.prefix, 'share/onionshare')
prefix = os.path.join(sys.prefix, 'share/onionshare')
elif getattr(sys, 'frozen', False):
# Check if app is "frozen"
# https://pythonhosted.org/PyInstaller/#run-time-information
if p == 'Darwin':
resources_dir = sys._MEIPASS
prefix = os.path.join(sys._MEIPASS, 'share')
elif p == 'Windows':
resources_dir = os.path.join(os.path.dirname(sys.executable), 'resources')
prefix = os.path.join(os.path.dirname(sys.executable), 'share')
return os.path.join(resources_dir, filename)
return os.path.join(prefix, filename)
def get_version():

View File

@ -29,7 +29,7 @@ def file_list(path):
files.append(os.path.join(path, filename))
return files
version = open('resources/version.txt').read().strip()
version = open('share/version.txt').read().strip()
description = (
"""OnionShare lets you securely and anonymously share a file of any size with someone. """
"""It works by starting a web server, making it accessible as a Tor hidden service, """
@ -58,10 +58,10 @@ setup(
(os.path.join(sys.prefix, 'share/applications'), ['install/onionshare.desktop']),
(os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
(os.path.join(sys.prefix, 'share/pixmaps'), ['install/onionshare80.xpm']),
(os.path.join(sys.prefix, 'share/onionshare'), file_list('resources')),
(os.path.join(sys.prefix, 'share/onionshare/images'), file_list('resources/images')),
(os.path.join(sys.prefix, 'share/onionshare/locale'), file_list('resources/locale')),
(os.path.join(sys.prefix, 'share/onionshare/html'), file_list('resources/html')),
(os.path.join(sys.prefix, 'share/onionshare'), file_list('share')),
(os.path.join(sys.prefix, 'share/onionshare/images'), file_list('share/images')),
(os.path.join(sys.prefix, 'share/onionshare/locale'), file_list('share/locale')),
(os.path.join(sys.prefix, 'share/onionshare/html'), file_list('share/html')),
('/usr/share/nautilus-python/extensions/', ['install/scripts/onionshare-nautilus.py'])
]
)

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 346 B

View File

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

View File

Before

Width:  |  Height:  |  Size: 338 B

After

Width:  |  Height:  |  Size: 338 B