mirror of
https://github.com/onionshare/onionshare.git
synced 2025-12-10 14:06:48 -05:00
Ripping out dmg code, replacing pyinstaller with py2app for OSX -- still in progress (#151)
This commit is contained in:
parent
aae9995c5f
commit
a86cda4549
11 changed files with 105 additions and 175 deletions
|
|
@ -18,10 +18,11 @@ You should have received a copy of the GNU General Public License
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import os, sys, inspect, platform
|
||||
|
||||
from onionshare import helpers
|
||||
|
||||
def get_onionshare_gui_dir():
|
||||
if platform.system() == 'Darwin':
|
||||
p = helpers.get_platform()
|
||||
if p == 'Darwin':
|
||||
onionshare_gui_dir = os.path.dirname(__file__)
|
||||
else:
|
||||
onionshare_gui_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
|
|
@ -31,8 +32,11 @@ onionshare_gui_dir = get_onionshare_gui_dir()
|
|||
|
||||
|
||||
def get_image_path(filename):
|
||||
if platform.system() == 'Linux':
|
||||
p = helpers.get_platform()
|
||||
if p == 'Linux' or p == 'Tails':
|
||||
prefix = os.path.join(sys.prefix, 'share/onionshare/images')
|
||||
elif p == 'Darwin':
|
||||
prefix = os.path.join(helpers.get_osx_resources_dir(), 'images')
|
||||
else:
|
||||
prefix = os.path.join(os.path.dirname(get_onionshare_gui_dir()), 'images')
|
||||
return os.path.join(prefix, filename)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class OnionShareGui(QtGui.QWidget):
|
|||
self.status_bar.showMessage(strings._('gui_starting_server1', True))
|
||||
try:
|
||||
self.app.choose_port()
|
||||
print strings._("connecting_ctrlport").format(self.app.port)
|
||||
print strings._("connecting_ctrlport").format(int(self.app.port))
|
||||
self.app.start_hidden_service(gui=True)
|
||||
except onionshare.NoTor as e:
|
||||
alert(e.args[0], QtGui.QMessageBox.Warning)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue