diff --git a/lightningbeam.py b/lightningbeam.py index 8c61d82..69dc2fc 100755 --- a/lightningbeam.py +++ b/lightningbeam.py @@ -6,7 +6,7 @@ import os #Uncomment to build on OS X -import objc, AppKit +import objc, AppKit, cPickle #SVLGUI - my custom GUI wrapper to abstract the GUI import svlgui @@ -162,8 +162,8 @@ def run_file(self=None): global root print "RUNNING" root.descendItem().activelayer.frames[root.descendItem().activelayer.currentframe].actions = MainWindow.scriptwindow.text - open("test.sc", "w").write(create_sc(root)) - svlgui.execute("swfc/swfc_"+svlgui.PLATFORM+" test.sc -o test.swf") + open(os.getenv('HOME')+"/test.sc", "w").write(create_sc(root)) + svlgui.execute("swfc/swfc_"+svlgui.PLATFORM+" "+os.getenv('HOME')+"/test.sc -o "+os.getenv('HOME')+"/test.swf") #TODO: Make this cross-platform compatible logloc = os.getenv('HOME')+"/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt" try: diff --git a/setup.py b/setup.py index 9d579e1..86688b1 100644 --- a/setup.py +++ b/setup.py @@ -25,13 +25,13 @@ if sys.platform == 'darwin': app=[mainscript], # Cross-platform applications generally expect sys.argv to # be used for opening files. - options=dict(py2app=dict(argv_emulation=True, + options=dict(py2app=dict(argv_emulation=False, plist=dict( #CFBundleDocumentTypes= , CFBundleIdentifyer='org.lightningbeam.lightningbeam', #LSPrefersPPC=True, ), - resources=["media","gpl.txt"], + resources=["media","gpl.txt","swfc"], iconfile="Lightningbeam.icns" )), ) @@ -39,6 +39,7 @@ elif sys.platform == 'win32': extra_options = dict( setup_requires=['py2exe'], app=[mainscript], + options=dict(py2app=dict(resources=["media","gpl.txt","swfc"],)), ) else: extra_options = dict(