184 | | === TODO === |
| 184 | == Compiling and Installing Development Versions of GRASS == |
| 185 | |
| 186 | === Optional Installation of Subversion === |
| 187 | |
| 188 | The GRASS source tree is stored in an online repository called Subversion. Rather than downloading source trees from the website, subversion lets you keep up to date, and manage your modifications, with simply commands. For more see [wiki:WorkingwithSVN Working with SVN]. |
| 189 | |
| 190 | 1. Download '''CollabNet Subversion Command-Line Client (1.6)''' from [http://www.collab.net/downloads/subversion/ here]. (You'll have to register on CollabNet) |
| 191 | |
| 192 | 2. Run the installer and install to somewhere without paths(?) such as c:/Subversion or c:/Programs/Subversion |
| 193 | |
| 194 | 3. Open c:\osgeo4w\etc\ini\msys.bat and at line 1 add the path to your subversion folder, eg.: |
| 195 | {{{ |
| 196 | PATH %PATH%;%OSGEO4W_ROOT%\apps\msys\bin |
| 197 | }}} |
| 198 | to: |
| 199 | {{{ |
| 200 | PATH %PATH%;%OSGEO4W_ROOT%\apps\msys\bin;/c/Programs/Subversion |
| 201 | }}} |
| 202 | |
| 203 | === Grass-6.5.svn (develbranch_6) === |
| 204 | |
| 205 | 1. Download the grass-6.5.svn source tree with: |
| 206 | * subversion (also see [wiki:DownloadSource here] |
| 207 | {{{ |
| 208 | cd /osgeo4w/usr/src |
| 209 | svn co http://svn.osgeo.org/grass/grass/branches/develbranch_6/ grass6-devel |
| 210 | }}} |
| 211 | For Subsequent updates, type: |
| 212 | {{{ |
| 213 | cd /osgeo4w/usr/src/grass6-devel |
| 214 | svn up |
| 215 | }}} |
| 216 | OR |
| 217 | |
| 218 | * Download a daily snapshot from [http://grass.osgeo.org/grass65/source/snapshot/ here] |
| 219 | |
| 220 | 2. Follow the instructions above for grass-6.4.0, but change all grass64 to grass65, etc. |
| 221 | |
| 222 | === Grass-7.0.svn (trunk) === |
| 223 | |
| 224 | 1. Download the grass-7.0.svn source tree with subversion (also see [wiki:DownloadSource here] |
| 225 | {{{ |
| 226 | cd /osgeo4w/usr/src |
| 227 | svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk |
| 228 | }}} |
| 229 | For Subsequent updates, type: |
| 230 | {{{ |
| 231 | cd /osgeo4w/usr/src/grass_trunk |
| 232 | svn up |
| 233 | }}} |
| 234 | |
| 235 | 2. Open c:\osgeo4w\etc\ini\msys.bat and at line 3 add: |
| 236 | {{{ |
| 237 | set PYTHONPATH=%OSGEO4W_ROOT%\apps\Python25 |
| 238 | }}} |
| 239 | 3. Open c:\osgeo4w\usr\src\grass_trunk\lib\python\grass.py, and at line 208 change: |
| 240 | {{{ |
| 241 | os.execvp("g.parser", [name] + argv) |
| 242 | }}} |
| 243 | To: |
| 244 | {{{ |
| 245 | os.execvp("g.parser.exe", [name] + argv) |
| 246 | }}} |
| 247 | 4. Open c:\osgeo4w\usr\src\grass_trunk\include\Make\Multi.make, at at line 19 change: |
| 248 | {{{ |
| 249 | $(BIN)/%$(EXE): $(DEPENDENCIES) |
| 250 | $(call linker) |
| 251 | |
| 252 | define objs_rule |
| 253 | $(BIN)/$(1)$(EXE): $$(patsubst %.o,$(OBJDIR)/%.o,$$($$(subst .,_,$(1)_OBJS))) |
| 254 | }}} |
| 255 | To: |
| 256 | {{{ |
| 257 | define objs_rule |
| 258 | $(BIN)/$(1)$(EXE): $$(patsubst %.o,$(OBJDIR)/%.o,$$($$(subst .,_,$(1)_OBJS))) $(DEPENDENCIES) |
| 259 | $$(call linker) |
| 260 | }}} |
| 261 | 5. Download the package.sh script from [http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/mswindows/osgeo4w/package.sh?format=raw here] |
| 262 | |
| 263 | 6. Put in c:\osgeo4w\usr\src\grass_trunk\mswindows\osgeo4w\ (you may have to create the latter two folders) |
| 264 | |
| 265 | 7. Open c:\osgeo4w\usr\src\grass_trunk\mswindows\osgeo4w\package.sh, and make the same changes as in the grass-6.4.0 section above |
| 266 | |
| 267 | 8. Also, at line 35 change: |
| 268 | {{{ |
| 269 | --with-freetype-includes=/osgeo4w/include/freetype2 |
| 270 | }}} |
| 271 | To: |
| 272 | {{{ |
| 273 | --with-freetype-includes=/osgeo4w/include/freetype2 \ |
| 274 | --without-cairo |
| 275 | }}} |
| 276 | |
| 277 | 9. To compile, type in MSYS console: |
| 278 | {{{ |
| 279 | cd /osgeo4w/usr/src/grass_trunk |
| 280 | ./mswindows/osgeo4w/package.sh |
| 281 | }}} |
| 282 | 10. Once the scripts fails on the r.li.* errors (see above), type: |
| 283 | {{{ |
| 284 | make install |
| 285 | }}} |
| 286 | |
| 287 | 11. Once this is finished open c:\osgeo4w\apps\grass\grass-7.0.svn\etc\Init.sh, and at line 150 change: |
| 288 | {{{ |
| 289 | PATH="$GRASS_LD_LIBRARY_PATH" |
| 290 | }}} |
| 291 | To: |
| 292 | {{{ |
| 293 | PATH="$GRASS_LD_LIBRARY_PATH:$PATH" |
| 294 | }}} |
| 295 | |
| 296 | 12. Open c:\osgeo4w\apps\grass\bin\grass70, and at line 25 add: |
| 297 | {{{ |
| 298 | # Set the PYTHONPATH |
| 299 | PYTHONPATH="$GISBASE/etc/python:$PYTHONPATH" |
| 300 | }}} |
| 301 | |
| 302 | 13. You're finished, start with: |
| 303 | {{{ |
| 304 | /osgeo4w/apps/grass/bin/grass70 |
| 305 | }}} |
| 306 | |
| 307 | == TODO == |