0

I want to do some development on a Flex project that uses Ant: http://svn.openstreetmap.org/applications/editors/potlatch2/ . I can build it from the command line but now want to use Flex Builder 3.0.2 to build, debug, etc.

I can see a few different paths to follow, but nothing that screams out "this is the right way":

  • create new project, SVN checkout in there (but then the directory structures won't match, and not sure how to tell FB to build using the existing build.xml)
  • create new project, create external source links to another directory with the files in it

Surely people do this all the time? (Never done Flash development before...)

Steve Bennett
  • 114,604
  • 39
  • 168
  • 219
  • I'm confused as to what you're asking. If you want to build the project using ANT, go for it. If you want to build the project using Flex Builder, you can do that too. If you want to trigger an ANT script from Flex Builder, you'll need some special Eclipise/ANT plugin installed. I know it's part of some Eclipse package, but don't remember specifics. Without knowing anything about your SVN structure, I don't understand why using a SVN checkout would give you different directory structure (Different than what?). – JeffryHouser Dec 12 '10 at 02:07
  • I guses I was assuming that FlexBuilder needs or imposes a specific directory structure, since when you create a project it creates /libs, /src etc. But it appears that you don't need to follow that - you just have to update a few project properties to suit. – Steve Bennett Dec 15 '10 at 02:11

1 Answers1

0

Ok, here's what ended up working for me. It turns out I didn't need to use ant to build the project after all. This is for the specific project (Potlatch2) but lots of the principles are probably common.

  1. File | New Flex Project (no server), save it somewhere, eg "c:\pot"
  2. SVN checkout the potlatch2 files inside, so you have c:\pot\potlatch2\potlatch2.mxml etc...
  3. Rename version.as.template to version.as and make up some stuff inside
  4. Remove the "..." line from potlatch2-config.xml. Don't ask me why.
  5. Set Flex SDK version - configure it to point to SDK 3.5
  6. Project | Properties | Flex Build Path:
    1. set source folder to potlatch2
    2. set output folder to potlatch2\resources
    3. set library path to potlatch2\lib
  7. Update Flash global security settings to allow access to c:\pot\potlatch2\resources (otherwise you get 1. SWF security errors)[1]
  8. Update browser settings (Window | Preferences...) to use a browser that has Flash Debug Player installed (ie, not Chrome).
  9. Under debug settings (click the bug drop down, Other...): Turn off "Use defaults", make debug (and possibly run and profile) point to an HTML host file that passes the right settings to potlatch2.swf, passing lat/long coordinates of a place you want to edit.
Steve Bennett
  • 114,604
  • 39
  • 168
  • 219