Added platform checking
This commit is contained in:
parent
a778741379
commit
0d64a8fa53
13
svlgui.py
13
svlgui.py
|
|
@ -5,6 +5,7 @@ import sys
|
||||||
import math
|
import math
|
||||||
import random
|
import random
|
||||||
import colors
|
import colors
|
||||||
|
import platform
|
||||||
|
|
||||||
'''
|
'''
|
||||||
# Tool mode. Keyboard shortcut is the same key. Modes are:
|
# Tool mode. Keyboard shortcut is the same key. Modes are:
|
||||||
|
|
@ -107,7 +108,17 @@ FILLCOLOR = Color("#000000")
|
||||||
|
|
||||||
#Magic. Detect platform and select appropriate toolkit. To be used throughout code.
|
#Magic. Detect platform and select appropriate toolkit. To be used throughout code.
|
||||||
if sys.platform=="linux2":
|
if sys.platform=="linux2":
|
||||||
PLATFORM="linux32"
|
id = platform.machine()
|
||||||
|
if id.startswith('arm'):
|
||||||
|
PLATFORM = 'linuxARM'
|
||||||
|
elif (not id) or (not re.match('(x|i[3-6])86$', id) is None):
|
||||||
|
PLATFORM = 'linux32'
|
||||||
|
elif id == 'x86_64':
|
||||||
|
PLATFORM = 'linux64'
|
||||||
|
elif "ppc" in plid.lower():
|
||||||
|
PLATFORM = "linuxPPC"
|
||||||
|
else:
|
||||||
|
PLATFORM = "error"
|
||||||
import gtk
|
import gtk
|
||||||
import cairo
|
import cairo
|
||||||
import gobject
|
import gobject
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue