One-click plugin development

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

One-click plugin development

Bert Freudenberg-3
I found myself doing this a gazillion times over the last days: click  
the VMMaker's "generate plugin" button, switch to XCode, invoke the  
plugin build, switch back to Squeak, unload the plugin to test the  
new one.

No more.

A few lines of code automate all of this:

VMMaker>>generateExternalPlugins
        ...
        externalPlugins size = 1 ifTrue: [
                | result |
                logger show: 'XCode: building ', externalPlugins first, ' ... '.
                result := Applescript doIt: 'tell application "XCode" to build'.
                logger show: result; cr.
                (result beginsWith: '"Build succeeded')
                        ifTrue: [Smalltalk unloadModule: externalPlugins first]
                        ifFalse: [Applescript doIt: 'tell application "XCode" to activate']].

Now I just click "generate plugin" and debug on. Life is bright  
again. Except for the occasional crash, of course :)

- Bert -