Renamed 'resources' to 'share', and updated location of 'share' files in OSX/Win binaries
@ -3,7 +3,7 @@
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
VERSION=`cat resources/version.txt`
|
VERSION=`cat share/version.txt`
|
||||||
|
|
||||||
# clean up from last build
|
# clean up from last build
|
||||||
rm -r deb_dist >/dev/null 2>&1
|
rm -r deb_dist >/dev/null 2>&1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
VERSION=`cat resources/version.txt`
|
VERSION=`cat share/version.txt`
|
||||||
|
|
||||||
# clean up from last build
|
# clean up from last build
|
||||||
rm -r build dist >/dev/null 2>&1
|
rm -r build dist >/dev/null 2>&1
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
||||||
cd $DIR
|
cd $DIR
|
||||||
|
|
||||||
VERSION=`cat resources/version.txt`
|
VERSION=`cat share/version.txt`
|
||||||
|
|
||||||
rm -rf deb_dist >/dev/null 2>&1
|
rm -rf deb_dist >/dev/null 2>&1
|
||||||
python3 setup.py --command-packages=stdeb.command sdist_dsc
|
python3 setup.py --command-packages=stdeb.command sdist_dsc
|
||||||
|
@ -3,19 +3,19 @@
|
|||||||
import platform
|
import platform
|
||||||
p = platform.system()
|
p = platform.system()
|
||||||
|
|
||||||
version = open('resources/version.txt').read().strip()
|
version = open('share/version.txt').read().strip()
|
||||||
|
|
||||||
a = Analysis(
|
a = Analysis(
|
||||||
['scripts/onionshare-gui'],
|
['scripts/onionshare-gui'],
|
||||||
pathex=['.'],
|
pathex=['.'],
|
||||||
binaries=None,
|
binaries=None,
|
||||||
datas=[
|
datas=[
|
||||||
('../resources/images/*', 'images'),
|
('../share/license.txt', 'share'),
|
||||||
('../resources/locale/*', 'locale'),
|
('../share/version.txt', 'share'),
|
||||||
('../resources/html/*', 'html'),
|
('../share/wordlist.txt', 'share')
|
||||||
('../resources/license.txt', '.'),
|
('../share/images/*', 'share/images'),
|
||||||
('../resources/version.txt', '.'),
|
('../share/locale/*', 'share/locale'),
|
||||||
('../resources/wordlist.txt', '.')
|
('../share/html/*', 'share/html'),
|
||||||
],
|
],
|
||||||
hiddenimports=[],
|
hiddenimports=[],
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
|
@ -37,21 +37,21 @@ def get_resource_path(filename):
|
|||||||
|
|
||||||
if getattr(sys, 'onionshare_dev_mode', False):
|
if getattr(sys, 'onionshare_dev_mode', False):
|
||||||
# Look for resources directory relative to python file
|
# 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):
|
elif p == 'Linux' and sys.argv and sys.argv[0].startswith(sys.prefix):
|
||||||
# OnionShare is installed systemwide in Linux
|
# 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):
|
elif getattr(sys, 'frozen', False):
|
||||||
# Check if app is "frozen"
|
# Check if app is "frozen"
|
||||||
# https://pythonhosted.org/PyInstaller/#run-time-information
|
# https://pythonhosted.org/PyInstaller/#run-time-information
|
||||||
if p == 'Darwin':
|
if p == 'Darwin':
|
||||||
resources_dir = sys._MEIPASS
|
prefix = os.path.join(sys._MEIPASS, 'share')
|
||||||
elif p == 'Windows':
|
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():
|
def get_version():
|
||||||
|
10
setup.py
@ -29,7 +29,7 @@ def file_list(path):
|
|||||||
files.append(os.path.join(path, filename))
|
files.append(os.path.join(path, filename))
|
||||||
return files
|
return files
|
||||||
|
|
||||||
version = open('resources/version.txt').read().strip()
|
version = open('share/version.txt').read().strip()
|
||||||
description = (
|
description = (
|
||||||
"""OnionShare lets you securely and anonymously share a file of any size with someone. """
|
"""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, """
|
"""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/applications'), ['install/onionshare.desktop']),
|
||||||
(os.path.join(sys.prefix, 'share/appdata'), ['install/onionshare.appdata.xml']),
|
(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/pixmaps'), ['install/onionshare80.xpm']),
|
||||||
(os.path.join(sys.prefix, 'share/onionshare'), file_list('resources')),
|
(os.path.join(sys.prefix, 'share/onionshare'), file_list('share')),
|
||||||
(os.path.join(sys.prefix, 'share/onionshare/images'), file_list('resources/images')),
|
(os.path.join(sys.prefix, 'share/onionshare/images'), file_list('share/images')),
|
||||||
(os.path.join(sys.prefix, 'share/onionshare/locale'), file_list('resources/locale')),
|
(os.path.join(sys.prefix, 'share/onionshare/locale'), file_list('share/locale')),
|
||||||
(os.path.join(sys.prefix, 'share/onionshare/html'), file_list('resources/html')),
|
(os.path.join(sys.prefix, 'share/onionshare/html'), file_list('share/html')),
|
||||||
('/usr/share/nautilus-python/extensions/', ['install/scripts/onionshare-nautilus.py'])
|
('/usr/share/nautilus-python/extensions/', ['install/scripts/onionshare-nautilus.py'])
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 286 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |