diff options
author | Micah Lee <micah@micahflee.com> | 2017-02-21 16:59:14 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2017-02-21 16:59:14 -0800 |
commit | 248f59cbd17f2599abb363270574ebd9f4b3cc35 (patch) | |
tree | 88c3f9fdc7e33363ce89795f307b9ab180cdcec4 | |
parent | 535150194390e08ae1b31ef9ab2bc04a7aabe44d (diff) | |
download | onionshare-248f59cbd17f2599abb363270574ebd9f4b3cc35.tar.gz onionshare-248f59cbd17f2599abb363270574ebd9f4b3cc35.zip |
Renamed 'resources' to 'share', and updated location of 'share' files in OSX/Win binaries
-rwxr-xr-x | install/build_deb.sh | 2 | ||||
-rwxr-xr-x | install/build_rpm.sh | 2 | ||||
-rwxr-xr-x | install/ppa_release.sh | 2 | ||||
-rw-r--r-- | install/pyinstaller.spec | 14 | ||||
-rw-r--r-- | onionshare/helpers.py | 10 | ||||
-rw-r--r-- | setup.py | 10 | ||||
-rw-r--r-- | share/html/404.html (renamed from resources/html/404.html) | 0 | ||||
-rw-r--r-- | share/html/denied.html (renamed from resources/html/denied.html) | 0 | ||||
-rw-r--r-- | share/html/index.html (renamed from resources/html/index.html) | 0 | ||||
-rw-r--r-- | share/images/drop_files.png (renamed from resources/images/drop_files.png) | bin | 2035 -> 2035 bytes | |||
-rw-r--r-- | share/images/logo.png (renamed from resources/images/logo.png) | bin | 3824 -> 3824 bytes | |||
-rw-r--r-- | share/images/server_started.png (renamed from resources/images/server_started.png) | bin | 346 -> 346 bytes | |||
-rw-r--r-- | share/images/server_stopped.png (renamed from resources/images/server_stopped.png) | bin | 286 -> 286 bytes | |||
-rw-r--r-- | share/images/server_working.png (renamed from resources/images/server_working.png) | bin | 338 -> 338 bytes | |||
-rw-r--r-- | share/license.txt (renamed from resources/license.txt) | 0 | ||||
-rw-r--r-- | share/locale/cs.json (renamed from resources/locale/cs.json) | 0 | ||||
-rw-r--r-- | share/locale/de.json (renamed from resources/locale/de.json) | 0 | ||||
-rw-r--r-- | share/locale/en.json (renamed from resources/locale/en.json) | 0 | ||||
-rw-r--r-- | share/locale/eo.json (renamed from resources/locale/eo.json) | 0 | ||||
-rw-r--r-- | share/locale/es.json (renamed from resources/locale/es.json) | 0 | ||||
-rw-r--r-- | share/locale/fi.json (renamed from resources/locale/fi.json) | 0 | ||||
-rw-r--r-- | share/locale/fr.json (renamed from resources/locale/fr.json) | 0 | ||||
-rw-r--r-- | share/locale/it.json (renamed from resources/locale/it.json) | 0 | ||||
-rw-r--r-- | share/locale/nl.json (renamed from resources/locale/nl.json) | 0 | ||||
-rw-r--r-- | share/locale/no.json (renamed from resources/locale/no.json) | 0 | ||||
-rw-r--r-- | share/locale/pt.json (renamed from resources/locale/pt.json) | 0 | ||||
-rw-r--r-- | share/locale/ru.json (renamed from resources/locale/ru.json) | 0 | ||||
-rw-r--r-- | share/locale/tr.json (renamed from resources/locale/tr.json) | 0 | ||||
-rw-r--r-- | share/version.txt (renamed from resources/version.txt) | 0 | ||||
-rw-r--r-- | share/wordlist.txt (renamed from resources/wordlist.txt) | 0 |
30 files changed, 20 insertions, 20 deletions
diff --git a/install/build_deb.sh b/install/build_deb.sh index 8c4d487f..05a37822 100755 --- a/install/build_deb.sh +++ b/install/build_deb.sh @@ -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 diff --git a/install/build_rpm.sh b/install/build_rpm.sh index 7be77bb1..89b85586 100755 --- a/install/build_rpm.sh +++ b/install/build_rpm.sh @@ -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 diff --git a/install/ppa_release.sh b/install/ppa_release.sh index e64fb866..cb1a4cdb 100755 --- a/install/ppa_release.sh +++ b/install/ppa_release.sh @@ -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 diff --git a/install/pyinstaller.spec b/install/pyinstaller.spec index 3c5c19bf..3c5a7fe0 100644 --- a/install/pyinstaller.spec +++ b/install/pyinstaller.spec @@ -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=[], diff --git a/onionshare/helpers.py b/onionshare/helpers.py index 1ba21ed6..a7873942 100644 --- a/onionshare/helpers.py +++ b/onionshare/helpers.py @@ -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(): @@ -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']) ] ) diff --git a/resources/html/404.html b/share/html/404.html index 2e2b06f0..2e2b06f0 100644 --- a/resources/html/404.html +++ b/share/html/404.html diff --git a/resources/html/denied.html b/share/html/denied.html index ef77642e..ef77642e 100644 --- a/resources/html/denied.html +++ b/share/html/denied.html diff --git a/resources/html/index.html b/share/html/index.html index 9b857a6a..9b857a6a 100644 --- a/resources/html/index.html +++ b/share/html/index.html diff --git a/resources/images/drop_files.png b/share/images/drop_files.png Binary files differindex 1e2ea7d6..1e2ea7d6 100644 --- a/resources/images/drop_files.png +++ b/share/images/drop_files.png diff --git a/resources/images/logo.png b/share/images/logo.png Binary files differindex 43884c1f..43884c1f 100644 --- a/resources/images/logo.png +++ b/share/images/logo.png diff --git a/resources/images/server_started.png b/share/images/server_started.png Binary files differindex 833387e1..833387e1 100644 --- a/resources/images/server_started.png +++ b/share/images/server_started.png diff --git a/resources/images/server_stopped.png b/share/images/server_stopped.png Binary files differindex 414ce81e..414ce81e 100644 --- a/resources/images/server_stopped.png +++ b/share/images/server_stopped.png diff --git a/resources/images/server_working.png b/share/images/server_working.png Binary files differindex c6db94ff..c6db94ff 100644 --- a/resources/images/server_working.png +++ b/share/images/server_working.png diff --git a/resources/license.txt b/share/license.txt index 1223e5a6..1223e5a6 100644 --- a/resources/license.txt +++ b/share/license.txt diff --git a/resources/locale/cs.json b/share/locale/cs.json index 9be7c830..9be7c830 100644 --- a/resources/locale/cs.json +++ b/share/locale/cs.json diff --git a/resources/locale/de.json b/share/locale/de.json index 10caa62a..10caa62a 100644 --- a/resources/locale/de.json +++ b/share/locale/de.json diff --git a/resources/locale/en.json b/share/locale/en.json index 74fe4739..74fe4739 100644 --- a/resources/locale/en.json +++ b/share/locale/en.json diff --git a/resources/locale/eo.json b/share/locale/eo.json index 42c6fd9d..42c6fd9d 100644 --- a/resources/locale/eo.json +++ b/share/locale/eo.json diff --git a/resources/locale/es.json b/share/locale/es.json index 79dd8023..79dd8023 100644 --- a/resources/locale/es.json +++ b/share/locale/es.json diff --git a/resources/locale/fi.json b/share/locale/fi.json index 7e1fb1df..7e1fb1df 100644 --- a/resources/locale/fi.json +++ b/share/locale/fi.json diff --git a/resources/locale/fr.json b/share/locale/fr.json index b38653c1..b38653c1 100644 --- a/resources/locale/fr.json +++ b/share/locale/fr.json diff --git a/resources/locale/it.json b/share/locale/it.json index 973a0576..973a0576 100644 --- a/resources/locale/it.json +++ b/share/locale/it.json diff --git a/resources/locale/nl.json b/share/locale/nl.json index 06ea85a1..06ea85a1 100644 --- a/resources/locale/nl.json +++ b/share/locale/nl.json diff --git a/resources/locale/no.json b/share/locale/no.json index 1e648532..1e648532 100644 --- a/resources/locale/no.json +++ b/share/locale/no.json diff --git a/resources/locale/pt.json b/share/locale/pt.json index b6a89183..b6a89183 100644 --- a/resources/locale/pt.json +++ b/share/locale/pt.json diff --git a/resources/locale/ru.json b/share/locale/ru.json index 5ed976cc..5ed976cc 100644 --- a/resources/locale/ru.json +++ b/share/locale/ru.json diff --git a/resources/locale/tr.json b/share/locale/tr.json index 78d590b0..78d590b0 100644 --- a/resources/locale/tr.json +++ b/share/locale/tr.json diff --git a/resources/version.txt b/share/version.txt index d822536b..d822536b 100644 --- a/resources/version.txt +++ b/share/version.txt diff --git a/resources/wordlist.txt b/share/wordlist.txt index caf71f52..caf71f52 100644 --- a/resources/wordlist.txt +++ b/share/wordlist.txt |