Fixed MAC 32-bit problem in a nicer way.
This commit is contained in:
parent
1bbd2f1ab7
commit
5918bf1a3c
@ -37,14 +37,46 @@ The [wxPython] packages can be found at http://www.wxpython.org/
|
||||
Ubuntu users: the wxPython packages are called 'python-wxgtk' followed by the
|
||||
version number."""
|
||||
elif '32-bit mode' in str(err):
|
||||
import os
|
||||
|
||||
key = "VERSIONER_PYTHON_PREFER_32_BIT"
|
||||
data = "yes"
|
||||
|
||||
keyfound = False
|
||||
try:
|
||||
if sys.environment[key] == data:
|
||||
keyfound = True
|
||||
except:
|
||||
pass
|
||||
|
||||
if keyfound:
|
||||
"""
|
||||
We already tried to set the environment variable, but it is still not working.
|
||||
"""
|
||||
import sys
|
||||
#print "Key found. good job. no success."
|
||||
|
||||
errmsg = """Problem with importing the required [wxPython] package.
|
||||
|
||||
Possibly the problem is caused by wxPython only working in 32-bit mode currently.
|
||||
You can try the following on the command line:
|
||||
Possibly the problem is caused by wxPython only working in 32-bit mode currently.
|
||||
You can try the following on the command line:
|
||||
|
||||
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
|
||||
$ ./scyther-gui.py"""
|
||||
|
||||
else:
|
||||
"""
|
||||
Key not found. Try if that works.
|
||||
"""
|
||||
import sys
|
||||
from subprocess import call
|
||||
|
||||
#print "Key not found. Trying to set it now."
|
||||
# TODO: check for MAC's if we need something like 'pythonw'
|
||||
call(sys.argv, shell=True, env={key: data})
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
Misc.panic("""
|
||||
ERROR:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user