April 5, 2008

Building Flexlib from SVN source to get openEnd and closeEnd events for WindowShade

Filed under: component, cool, dev, eclipse, education, flex, mac, subclipse, svn, tip, tool — michaelangela @ 12:20 am

Short version: You must provide a path to the manifest.xml file in order for ant to find it! For example:

<arg line="-namespace http://code.google.com/p/flexlib/ /path/to/manifest.xml" />

Long version: I didn’t know that… thought it makes total sense in hindsight.

I am using the very nifty WindowShade from the life-saving (OK that’s a bit melodramatic…) FlexLib library. However, I wanted to be notified of open and close events. I heard somewhere (can’t find where now) that those events have been added into the SVN for FlexLib. I didn’t want to have to do a checkout and copy those files over and update it everytime the FlexLib SVN code updated… not fun. Fortunately there is a note in the FlexLib Wiki about creating a FlexBuildProject from the svn tree. This got interesting. I never build a SWC before and it certainly makes it a lot easier.

I decided to take the plunge.

I previously installed ant and all the other goodies (like subclipse) from previous project development, including my still-not-quite successful compilation of the Cairngen project for Cairngorm. (On a mac. That’s another story.)

Anyway, after fiddling with the build.xml file and the build.<your platform here>.properties file, it wouldn’t compile. compc complained about not being able to open the manifest.xml file. So very close. Then after a bit of digging, this note popped up.

Talk:Flex Ant Tasks – Adobe Labs

<namespace uri="http://www.company.com/2007/mxml" manifest="${CustomFlexLibrarySource.dir}/customFlexLibrary-manifest.xml"/>

That actually still provided that user with an error which is unfortunate. It’s also unfortunate I don’t know how to help in that situation. 😦 However the bit about providing a full path to the manifest.xml file was the tip I needed. And so, the flexlib.swc file has been created. A quick hit with the SVN update command followed by another build will keep it current. Gotta like that. Of course I need to test it and make sure I built it right, i.e. it works… 🙂

There is an option for running tests for the build as well. Well… let’s see…Run as > Ant Build… add compile tests… test… OK… trying…working…working… doh! Gotta uncomment the the flashPlayerDebug.exe line. Doh! It can’t execute Flash Player.app. Gotta set the path to /path/to/Adobe Flex Builder 3 Plug-in/Player/mac/Flash Player.app/Contents/MacOS/Flash Player instead.

What ho! It worked! Other than some deprecation warnings it worked. Cool.

update…Building the examples and everything else works without a hitch now as well. And yes I have the new openEnd, closeEnd and other properties I was looking for in WindowShade. However I got the “unable to export SWC oem”. I haven’t found a solution for it yet. I saw this:

I think I’ll start using this set up for many other libraries…

[flexcoders] Re: Compiling problems

First of all, I rebuild the workspace using the instructions (I did 
not see it before:( ) like FlexBuilder -clean -vmargs -Xmx512m.

Furthermore, it remained the problem of the connection for my swc.
After reading all debug instructions, I saw that the cause was the
history management. I disable it and it works.

But why the history management caused an error during execution (no
modification made to the swc) ?????

But that’s about actual Flex projects and not just a library project. More study on this later. (Hey, it’s Friday night after all! Time for a break! :-p ) But it’s working as needed so far… *finger’s crossed* Oh yes, the compile tests did pass so that’s a good sign.


1 Comment »

  1. Glaenzer

    Building Flexlib from SVN source to get openEnd and closeEnd events for WindowShade | Ramblings

    Trackback by Glaenzer — June 4, 2014 @ 12:49 am

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: