summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2008-08-19 19:42:47 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2008-08-19 19:42:47 -0500
commite439306089abf3c3f9d634511611fa0baab8d8ee (patch)
tree9a4d85e32ffe81b9a5d4292e6359f06ca69ef051
parent65c9995aee7be35939cee043d7b8447b225d271e (diff)
downloadnohgooee-e439306089abf3c3f9d634511611fa0baab8d8ee.tar.gz
nohgooee-e439306089abf3c3f9d634511611fa0baab8d8ee.tar.xz
nohgooee-e439306089abf3c3f9d634511611fa0baab8d8ee.zip
Get rid of is_frozen_exe
-rw-r--r--NohGooee/Encoder.py1
-rw-r--r--NohGooee/__init__.py4
-rw-r--r--NohGooee/configfile.py4
-rw-r--r--NohGooee/parseargs.py7
-rw-r--r--NohGooee/platform.py9
5 files changed, 5 insertions, 20 deletions
diff --git a/NohGooee/Encoder.py b/NohGooee/Encoder.py
index 8675823..394a6ad 100644
--- a/NohGooee/Encoder.py
+++ b/NohGooee/Encoder.py
@@ -16,7 +16,6 @@ from NohGooee import BTFailure
from NohGooee.RawServer_magic import Handler
from NohGooee.NatTraversal import UPNPError
from NohGooee.Connecter import Connection
-from NohGooee.platform import is_frozen_exe
from NohGooee.ClientIdentifier import identify_client
# header, reserved, download id, my id, [length, message]
diff --git a/NohGooee/__init__.py b/NohGooee/__init__.py
index 5dc8996..d30ca30 100644
--- a/NohGooee/__init__.py
+++ b/NohGooee/__init__.py
@@ -22,14 +22,14 @@ if os.access('.cdv', os.F_OK):
branch = os.path.split(os.path.realpath(os.path.split(sys.argv[0])[0]))[1]
from NohGooee.language import languages, language_names
-from NohGooee.platform import get_home_dir, is_frozen_exe
+from NohGooee.platform import get_home_dir
if os.name == 'posix':
if os.uname()[0] == "Darwin":
from NohGooee.platform import install_translation
install_translation()
-del sys, get_home_dir, is_frozen_exe
+del sys, get_home_dir
INFO = 0
WARNING = 1
diff --git a/NohGooee/configfile.py b/NohGooee/configfile.py
index 49c4e4f..78b1dd3 100644
--- a/NohGooee/configfile.py
+++ b/NohGooee/configfile.py
@@ -24,7 +24,7 @@ except ImportError:
from ConfigParser import MissingSectionHeaderError, ParsingError
from NohGooee import parseargs
from NohGooee import app_name, version, ERROR, BTFailure
-from NohGooee.platform import get_config_dir, locale_root, is_frozen_exe
+from NohGooee.platform import get_config_dir, locale_root
from NohGooee.defaultargs import MYTRUE
from NohGooee.zurllib import bind_tracker_connection, set_zurllib_rawserver
@@ -129,8 +129,6 @@ def save_ui_config(defaults, section, save_options, error_callback):
p.set(section, name, defaults[name])
else:
err_str = _("Configuration option mismatch: '%s'") % name
- if is_frozen_exe:
- err_str = _("You must quit %s and reinstall it. (%s)") % (app_name, err_str)
error_callback(ERROR, err_str)
_write_config(error_callback, filename, p)
diff --git a/NohGooee/parseargs.py b/NohGooee/parseargs.py
index e2f773a..663a000 100644
--- a/NohGooee/parseargs.py
+++ b/NohGooee/parseargs.py
@@ -16,7 +16,6 @@ from cStringIO import StringIO
from NohGooee.defaultargs import MyBool, MYTRUE
from NohGooee import BTFailure
from NohGooee.bencode import bdecode
-from NohGooee.platform import is_frozen_exe
def makeHelp(uiname, defaults):
ret = ''
@@ -36,11 +35,7 @@ def makeHelp(uiname, defaults):
return ret
def printHelp(uiname, defaults):
- if uiname in ('bittorrent','maketorrent') and is_frozen_exe:
- from NohGooee.GUI import HelpWindow
- HelpWindow(None, makeHelp(uiname, defaults))
- else:
- print makeHelp(uiname, defaults)
+ print makeHelp(uiname, defaults)
def formatDefinitions(options, COLS):
s = StringIO()
diff --git a/NohGooee/platform.py b/NohGooee/platform.py
index 4749fd3..36b929e 100644
--- a/NohGooee/platform.py
+++ b/NohGooee/platform.py
@@ -41,8 +41,6 @@ if sys.platform.startswith('win'):
else:
bttime = time.time
-is_frozen_exe = (os.name == 'nt') and hasattr(sys, 'frozen') and (sys.frozen == 'windows_exe')
-
os_name = os.name
os_version = None
if os_name == 'nt':
@@ -98,10 +96,7 @@ def calc_unix_dirs():
lp = os.path.join('share', 'locale')
return ip, dp, lp
-if is_frozen_exe:
- app_root = os.path.split(os.path.abspath(win32api.GetModuleFileName(0)))[0]
-else:
- app_root = os.path.split(os.path.abspath(sys.argv[0]))[0]
+app_root = os.path.split(os.path.abspath(sys.argv[0]))[0]
doc_root = app_root
osx = False
if os.name == 'posix':
@@ -251,8 +246,6 @@ if os.name == 'nt':
def btspawn(torrentqueue, cmd, *args):
ext = ''
- if is_frozen_exe:
- ext = '.exe'
path = os.path.join(app_root, cmd+ext)
if not os.access(path, os.F_OK):
if os.access(path+'.py', os.F_OK):