BIT-101 [2003-2017]

Brevity Mac update


So, as mentioned, my poor Toshiba is in the hospital. So for the last 6 days, 22 hours and 47 minutes, I’ve been confined to my Mac Mini. It could be another week or more, so I’ve settled down and tried to make the most of it.

I had some initial Python problems but finally got a good 2.4 install going, and got wxPython in there just fine.

I removed the ActiveX stuff from the Brevity IDE and it fired right up on the Python. That in itself is pretty amazing: that you can make a full featured, native UI application on Windows and run the same code on a Mac and get a native UI Mac application.

Now, getting the IDE to coordinate the other parts of Brevity: the parser, the compiler, and the player, was another story.

I spent hours trying to get the IDE to call the parser as an external Python program. I made it executable and chmod’ed it and everything. No go. Finally got it down to, print “hello world” and it still wouldn’t run. Yet a brand new Python program with the same code worked. So I copied and pasted the parser code into a brand new file and it worked fine. Arrrrrggghhhhh…. Some stray Windows bit must have copied over and Mac was choking on it. No idea.

Happily, the compiler had no major problems. Just changed the path and got that working pretty quickly.

Then onto the player. On Windows you can basically say:

SAPlayer.exe myfile.swf

So of cource I tried the same thing on the Mac, but it kept telling me it couldn’t execute the binary file. Finally after some searching I found out you’re supposed to do something like:

open -a SAPlayer myfile.swf

So now I can write Brevity code, press a button and have it save, parse, compile and launch. Not bad for a weekend’s work. Other than the open thing, all the code should continue to work on the pc side too. I’ll probably do a platform check in the launch method just so I don’t have to deal with multiple code bases.

Still some things here and there to clean up, but it’s functional enough so that I can go back to developing the AS3 classes and test them on the Mac.

Anyone know a good Mac AS3 editor? 😉

Looking for a public release some time in mid June.

Oh, also, if anyone has experience with py2app, drop me a line.

« Previous Post
Next Post »