Fixed so that SWF compiles on Windows
This commit is contained in:
parent
b236516418
commit
96b1480063
|
|
@ -113,8 +113,8 @@ def create_sc(root):
|
||||||
def run_file(self=None):
|
def run_file(self=None):
|
||||||
global root
|
global root
|
||||||
print "RUNNING"
|
print "RUNNING"
|
||||||
open("/Users/skyler/Desktop/test.sc", "w").write(create_sc(root))
|
open("test.sc", "w").write(create_sc(root))
|
||||||
svlgui.execute("swfc/swfc_osx /Users/skyler/Desktop/test.sc -o /Users/skyler/Desktop/test.swf")
|
svlgui.execute("swfc/swfc_"+svlgui.PLATFORM+" test.sc -o test.swf")
|
||||||
|
|
||||||
|
|
||||||
def box(x, y, width, height, fill=None):
|
def box(x, y, width, height, fill=None):
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,7 @@ 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"
|
||||||
import gtk
|
import gtk
|
||||||
import cairo
|
import cairo
|
||||||
import gobject
|
import gobject
|
||||||
|
|
@ -133,6 +134,7 @@ if sys.platform=="linux2":
|
||||||
jsfunctions = ""'''
|
jsfunctions = ""'''
|
||||||
sep = "/"
|
sep = "/"
|
||||||
elif sys.platform=="win32":
|
elif sys.platform=="win32":
|
||||||
|
PLATFORM="win32"
|
||||||
import pickle
|
import pickle
|
||||||
import misc_funcs
|
import misc_funcs
|
||||||
import GUI # Using PyGUI. Experimental.
|
import GUI # Using PyGUI. Experimental.
|
||||||
|
|
@ -152,6 +154,7 @@ elif sys.platform=="linux-armv6l":
|
||||||
sep = "/"
|
sep = "/"
|
||||||
print str(sys.platform)
|
print str(sys.platform)
|
||||||
elif sys.platform=="darwin":
|
elif sys.platform=="darwin":
|
||||||
|
PLATFORM="osx"
|
||||||
import pickle
|
import pickle
|
||||||
import misc_funcs
|
import misc_funcs
|
||||||
import GUI # Using PyGUI. Experimental.
|
import GUI # Using PyGUI. Experimental.
|
||||||
|
|
@ -627,7 +630,7 @@ class Canvas(Widget):
|
||||||
self.invalidate_rect([0,0,self.extent[0],self.extent[1]])
|
self.invalidate_rect([0,0,self.extent[0],self.extent[1]])
|
||||||
|
|
||||||
def key_up(self, event):
|
def key_up(self, event):
|
||||||
print ord(event.unichars)
|
pass
|
||||||
self.canvas = OSXCanvas(extent = (width, height), scrolling = 'hv')
|
self.canvas = OSXCanvas(extent = (width, height), scrolling = 'hv')
|
||||||
self.canvas.objs = self.objs
|
self.canvas.objs = self.objs
|
||||||
elif SYSTEM=="html":
|
elif SYSTEM=="html":
|
||||||
|
|
@ -1578,7 +1581,7 @@ def alert(text,critical=False):
|
||||||
jscommunicate("window.location.reload()")
|
jscommunicate("window.location.reload()")
|
||||||
|
|
||||||
def execute(command):
|
def execute(command):
|
||||||
os.system(command)
|
os.system(command.replace("/",sep))
|
||||||
|
|
||||||
class OverlayWindow:
|
class OverlayWindow:
|
||||||
if SYSTEM=="gtk":
|
if SYSTEM=="gtk":
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue