Browse Source

Compensate for some Apple-Python bugs.

tags/0.6.6
ShyPike 14 years ago
parent
commit
64f17675e2
  1. 7
      SABnzbd.py
  2. 4
      package.py

7
SABnzbd.py

@ -62,8 +62,8 @@ except:
else:
SQLITE_DLL = False
import sabnzbd.lang
import sabnzbd
import sabnzbd.lang
import sabnzbd.interface
from sabnzbd.constants import *
import sabnzbd.newsunpack
@ -810,6 +810,7 @@ def get_f_option(opts):
#------------------------------------------------------------------------------
def main():
global LOG_FLAG
import sabnzbd # Due to ApplePython bug
autobrowser = None
autorestarted = False
@ -1371,7 +1372,9 @@ def main():
sabnzbd.BROWSER_URL = browser_url
if not autorestarted:
launch_a_browser(browser_url)
if sabnzbd.FOUNDATION: sabnzbd.osxmenu.notify("SAB_Launched", None)
if sabnzbd.FOUNDATION:
import sabnzbd.osxmenu
sabnzbd.osxmenu.notify("SAB_Launched", None)
osx.sendGrowlMsg('SABnzbd %s' % (sabnzbd.__version__),"http://%s:%s/sabnzbd" % (browserhost, cherryport),osx.NOTIFICATION['startup'])
# Now's the time to check for a new version
check_latest_version()

4
package.py

@ -366,6 +366,10 @@ if target == 'app':
#build SABnzbd.py
sys.argv[1] = 'py2app'
# Due to ApplePython bug
sys.argv.append('-p');
sys.argv.append('email');
APP = ['SABnzbd.py']
DATA_FILES = ['interfaces', 'locale', 'email', ('',glob.glob("osx/resources/*"))]

Loading…
Cancel
Save