=== What you'll need ===
-* Flex SDK 3.4 or 3.5 - http://www.adobe.com/products/flex/ (free, OS X/Windows/Linux)
+* Flex SDK 4.5
+** Product page: http://www.adobe.com/products/flex/
+** Flex 4.5 Download page: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5 (free, OS X/Windows/Linux)
* AS3 docs - http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/
* Flash debug player - http://www.adobe.com/support/flashplayer/downloads.html
* Basically you might as well just sell your soul to Adobe
* Ant
-***Do not use FlexSDK <= 3.3 or > 4***. There are compatibility errors with version 4, and 3.3
-and earlier have this bug: http://bugs.adobe.com/jira/browse/SDK-16705 which is a major issue for the
-tag editors.
+If you happen to have Adobe Flex Builder 3/Flash Builder 4, you can create a project and import files into it.
+See http://wiki.openstreetmap.org/wiki/Potlatch_2/Developer_Documentation for details.
You'll only need OSM Rails port installed on your local machine if you are doing hard-core
server-communication coding, but if generally you can use the dev server at api06.dev.openstreetmap.org
Compiling Potlatch 2:
-Before you start, copy the properties template file, and edit the FLEX_HOME variable
+1) Copy the properties template file
cp build.properties.template build.properties
+
+2) Edit the FLEX_HOME variable in build.properties
+ eg, FLEX_HOME=c:/flex_sdk/4.5.0.20967
+
+3) ant
The following command will compile potlatch2 in debug configuration
The result is put at resources/potlatch2.swf
* ant docs
+You can create and run the unit tests (not that there are that many) using flexunit
+
+* ant test
+
+For those that don't need I8n, the following give a much speedier build as it skips the all the language translation build steps.
+As an extra bonus, this uses much less memory and you may get away without needing to tell ant to use more memory (see below).
+
+* ant debug-no-locales
+or
+* ant release-no-locales
+
If you're using Mac OS X, you may need to tell ant to use more memory, by
-typing export ANT_OPTS=-Xmx500M beforehand (you can put this in your .profile).
+typing export ANT_OPTS="-Xms768m -Xmx1024m -XX:MaxPermSize=512m"
+beforehand (you can put this in your .profile).
Compiling during development:
* Flash security model sucks. If you want to use internet resource (e.g. map calls to the dev
server) the binary must have been served from "teh internets". Run resources/server.rb to launch a local
server, then go to http://localhost:3333/potlatch2.html to get started (or if you're already running e.g.
- Apache locally, feel free to use that instead.
+ Apache locally, feel free to use that instead.)
+
+ Alternatively, you can update your global Flash security settings to "always trust files" in your local dev area:
+ http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
+ Then you can run the swf file directly.
* If you are doing offline development, you will need a rails_port install. You
will need to add an OAuth application by going to