X-Git-Url: https://git.openstreetmap.org/potlatch2.git/blobdiff_plain/a7311c3205fd137c9f4193c494747ef6dd280bf4..74b3a311ff0e37dc96d2a22a223d3531a700e5c9:/README.txt diff --git a/README.txt b/README.txt index 72163374..b905b9fd 100644 --- a/README.txt +++ b/README.txt @@ -6,29 +6,65 @@ Halcyon is its rendering engine. It's rules-based (like, say, Mapnik) and does d Both are written in ActionScript 3. Potlatch 2.0 additionally uses the Flex framework. +Many icons used in halcyon/potlatch2 are based on the awesome CC0-licensed SJJB icons project. http://www.sjjb.co.uk/mapicons/ + === What you'll need === -* OSM Rails port installed on your local machine -* Flex SDK - http://www.adobe.com/products/flex/ (free, OS X/Windows/Linux) +* Flex SDK 3.4 or 3.5 +** Product page: http://www.adobe.com/products/flex/ +** Flex 3 Download page: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3 (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 -* Yahoo! Maps API - http://developer.yahoo.com/flash/maps/ - (copy the .swc to your Flex SDK frameworks/libs folder) +* 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 +for development and testing. + === How to compile and run === Compiling Potlatch 2: -The following command will compile potlatch2 in optimized configuration +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/3.5.0.12683 + +3) ant + +The following command will compile potlatch2 in debug configuration The result is put at resources/potlatch2.swf -* mxmlc potlatch2.mxml +* ant +The following command will compile potlatch2 in release configuration + +* ant release Compiling Halcyon as standalone viewer: -* mxmlc halcyon_viewer.as +* ant halcyon + +You can create class documentation (in resources/docs) using asdoc + +* ant docs + +You can create and run the unit tests (not that there are that many) using flexunit + +* ant test + +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). Compiling during development: @@ -52,17 +88,40 @@ of a much larger swf file.. but we're developing so that doesn't matter!). * compile 1 - when using fcsh recompile the first command +* compile 1 + - type it again to compile again. You'll really wish that up-arrow,enter + worked, but Adobe is laughing at you RIGHT NOW. + +* rlwrap + - if you have it on your system (e.g. linux), rlwrap is a godsend. Launch + fcsh with 'rlwrap path/to/fcsh' and up arrows will work, even persistantly + across one fcsh session to the next. Running: -* Move everything from the resources/ directory into the same directory as the SWF -* Open halcyon.html or potlatch2.html in your browser +* 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.) + + 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 + http://rails-port.local/user//oauth_clients/new + Enter the following details (assuming the above point): + * Name (Required): Potlatch2 (local) + * Main Application URL (Required): http://localhost:3333/resources/potlatch2.html + And then update resources/potlatch2.html replacing the domains. === Some other stuff you might need to know === * Flex compiler runs at about the speed of a tortoise soaked in molasses which happens also to be dead. - - +* Running the debug player helps when coding, since it'll pop up the runtime errors. You don't see them + with the normal player. + Richard Fairhurst richard@systemeD.net