NameDateSize

..16-Mar-201612 KiB

.gitignore10-Apr-2013249

build.properties.template29-Dec-2012757

build.xml06-Jul-201516.2 KiB

CODING.txt10-Apr-20132 KiB

com/07-Feb-20124 KiB

debug-config.xml29-Dec-2012312

embedded/22-Dec-20144 KiB

fonts/29-Dec-20124 KiB

halcyon_viewer-config.xml29-Dec-2012597

halcyon_viewer.as29-Dec-20123.5 KiB

hxasm/29-Dec-20124 KiB

it/07-Feb-20124 KiB

l10n/07-Feb-20124 KiB

lib/29-Dec-20124 KiB

LICENCE.txt29-Dec-2012507

net/07-Feb-20124 KiB

org/07-Feb-20124 KiB

potlatch2-config.xml29-Dec-2012694

potlatch2.mxml06-Jul-201527.1 KiB

README.txt29-Dec-20125.1 KiB

resources/22-Dec-20144 KiB

resources_src/29-Dec-20124 KiB

styles/06-Jul-20154 KiB

tests/07-Feb-20124 KiB

TODO.txt29-Dec-20125.1 KiB

version.as.template06-Jul-2015282

README.txt

1== Halcyon and Potlatch 2.0 - ActionScript 3 renderer and editor ==
2
3Potlatch 2.0 is the new version of the OpenStreetMap online editor.
4
5Halcyon is its rendering engine. It's rules-based (like, say, Mapnik) and does dotted lines, text on a path, casing, icons for POIs, all of that.
6
7Both are written in ActionScript 3. Potlatch 2.0 additionally uses the Flex framework.
8
9Many icons used in halcyon/potlatch2 are based on the awesome CC0-licensed SJJB icons project. http://www.sjjb.co.uk/mapicons/
10
11=== What you'll need ===
12
13* Flex SDK 4.5
14** Product page: http://www.adobe.com/products/flex/ 
15** Flex download page: http://www.adobe.com/devnet/flex/flex-sdk-download-all.html (free, OS X/Windows/Linux)
16* AS3 docs - http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/
17* Flash debug player - http://www.adobe.com/support/flashplayer/downloads.html
18* Basically you might as well just sell your soul to Adobe
19* Ant
20
21If you happen to have Adobe Flex Builder 3/Flash Builder 4, you can create a project and import files into it. 
22See http://wiki.openstreetmap.org/wiki/Potlatch_2/Developer_Documentation for details.
23
24You'll only need OSM Rails port installed on your local machine if you are doing hard-core 
25server-communication coding, but if generally you can use the dev server at api06.dev.openstreetmap.org
26for development and testing.
27
28
29=== How to compile and run ===
30
31Compiling Potlatch 2:
32
331) Copy the properties template file
34  cp build.properties.template build.properties
35  
362) Edit the FLEX_HOME variable in build.properties  
37 eg, FLEX_HOME=c:/flex_sdk/4.5.0.20967
38 
393) ant
40
41The following command will compile potlatch2 in debug configuration
42The result is put at resources/potlatch2.swf
43
44* ant
45
46The following command will compile potlatch2 in release configuration
47
48* ant release
49
50Compiling Halcyon as standalone viewer:
51
52* ant halcyon
53
54You can create class documentation (in resources/docs) using asdoc
55
56* ant docs
57
58You can create and run the unit tests (not that there are that many) using flexunit
59
60* ant test
61
62For those that don't need I8n, the following give a much speedier build as it skips the all the language translation build steps.
63As an extra bonus, this uses much less memory and you may get away without needing to tell ant to use more memory (see below).
64
65* ant debug-no-locales
66or
67* ant release-no-locales
68
69If you're using Mac OS X, you may need to tell ant to use more memory, by
70typing export ANT_OPTS="-Xms768m -Xmx1024m -XX:MaxPermSize=768m -XX:ReservedCodeCacheSize=512m" 
71beforehand (you can put this in your .profile).
72
73
74Compiling during development:
75
76Compiling optimized versions from scratch takes a _long_ time. There are
77several ways to make it faster during development and also add useful
78debug stack traces and enable the commandline debugger (at the expense
79of a much larger swf file.. but we're developing so that doesn't matter!).
80
81* fcsh
82  - launches the Flex Compiler SHell -- stops the compiler having to
83    bootstrap itself each time you invoke it. You don't /need/ this, but it
84    does make things slightly faster (about a second a shot for me)
85
86* mxmlc -load-config+=debug-config.xml potlatch2.mxml
87  - compile potlatch2 in debug configuration -- build is incremental so you
88    can run it again and mxmlc will only compile changes. Output has debug
89    enabled along with decent stack traces.
90    (you can substitute halcyon_viewer.as in the above to compile that)
91
92* compile 1 
93  - when using fcsh recompile the first command
94
95* compile 1
96  - type it again to compile again. You'll really wish that up-arrow,enter 
97    worked, but Adobe is laughing at you RIGHT NOW.
98
99* rlwrap
100  - if you have it on your system (e.g. linux), rlwrap is a godsend. Launch
101    fcsh with 'rlwrap path/to/fcsh' and up arrows will work, even persistantly
102    across one fcsh session to the next.
103
104Running:
105
106* Flash security model sucks. If you want to use internet resource (e.g. map calls to the dev
107  server) the binary must have been served from "teh internets". Run resources/server.py to launch a local
108  server, then go to http://localhost:3333/potlatch2.html to get started (or if you're already running e.g. 
109  Apache locally, feel free to use that instead.)
110  
111  Alternatively, you can update your global Flash security settings to "always trust files" in your local dev area:
112  http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html
113  Then you can run the swf file directly.
114  
115* If you are doing offline development, you will need a rails_port install. You 
116  will need to add an OAuth application by going to 
117  http://rails-port.local/user/<username>/oauth_clients/new
118  Enter the following details (assuming the above point):
119  * Name (Required): Potlatch2 (local)
120  * Main Application URL (Required): http://localhost:3333/resources/potlatch2.html
121  And then update resources/potlatch2.html replacing the domains.
122
123=== Some other stuff you might need to know ===
124
125* Flex compiler runs at about the speed of a tortoise soaked in molasses which happens also to be dead.
126* Running the debug player helps when coding, since it'll pop up the runtime errors. You don't see them
127  with the normal player.
128  
129Richard Fairhurst
130richard@systemeD.net
131
132Dave Stubbs
133osm@randomjunk.co.uk
134
135