|
|
(35 intermediate revisions by 10 users not shown) |
Line 1: |
Line 1: |
− | == How to check out Freeplane and use svn ==
| + | [[Category:Coding]] |
| | | |
− | ok, first step is to get a svn client; this is the program you need for checking out of a central repository - the one where we all work together.
| + | == Requirements == |
| + | * You need java 11 or later and gradle >= 6.0 |
| | | |
− | you need to understand what 'commit' and 'update' means, there are many hello world tutorials for svn in the net
| + | == Download gradle == |
| + | * Download gradle: https://gradle.org/releases/ |
| + | * Unzip to your home directory |
| | | |
− | (by the way, 'svn' stands for 'subversion', this is also the name of a command line program if you have installed the svn client.)
| + | == Clone the freeplane repository == |
| + | git clone https://github.com/freeplane/freeplane.git |
| + | cd freeplane |
| | | |
− | READ: http://subversion.tigris.org/faq.html
| + | == Run gradle == |
| + | * Gradle wrapper files are intentionally not committed to the sources but git ignored so that you can add them yourself if you need them. |
| + | $ ~/Downloads/gradle-6.0.1/bin/gradle build |
| | | |
− | especially try to understand what is going on in
| + | == Run freeplane == |
| + | cd BIN |
| + | ./freeplane.sh # linux |
| + | freeplane.bat |
| + | |
| + | == Create package == |
| + | ~/git2/freeplane(1.7.x u=)$ ~/Downloads/gradle-6.0.1/bin/gradle clean build dist |
| + | ls DIST |
| | | |
− | http://subversion.tigris.org/faq.html#co-svn
| + | == Configuring an IDE == |
− | | + | * See [[IDE setup| how to set up IDE]] |
− | after reading the example, you can try that out in your svn client (either plain cli program svn, tortoisesvn which is a gui for the same functionality integrated in the file explorer) and check out the code from freeplane.
| |
− | | |
− | There is also a web interface for better svn browsing:
| |
− | | |
− | http://freeplane.svn.sourceforge.net/viewvc/freeplane/
| |
− | | |
− | (insert the url directly in your browser, see what happens!)
| |
− | | |
− | the files you'll get are locally saved copies from the central repository. you can change them as you like, edit files, delete files, even directories - svn will track what you've done and eventually you can 'commit' the files again, which means you want to put your local changes to the central repository.
| |
− | | |
− | You don't need to check out whole projects, subversion can also just checkout a directory, or a subset of directory trees.
| |
− | | |
− | Try
| |
− | | |
− | svn co https://freeplane.svn.sourceforge.net/svnroot/freeplane/freeplane_program/trunk/freeplane/resources/images
| |
− | | |
− | for example: it will create the directory of images you want dimitry to put them 'in the main thing which saves our "code"'. This is it, plain and simple.
| |
− | | |
− | Only if you want to change something centrally, you'll have to get a username and a password for that.
| |
− | | |
− | Of course, if you use eclipse with the subversion plugin, checking out projects is very easy. you can also try www.netbeans.org, which does it perfectly well also.
| |
− | | |
− | concerning your problems: seems like you've tried to add metadata stored in .svn directories which typicaly happens if you download 'somehow' the whole archive (means: without a client). the data in the .svn directories manage the whole 'versioning' process, but this data mustn't be commited, added or updated, its the task of your svn client to do so.
| |
− | | |
− | again, there are many svn howtows out there, read
| |
− | | |
− | http://paulstamatiou.com/how-to-subversion-basics
| |
− | | |
− | where sb uses a command client svn. google for svn howto, subversion basics etc.
| |
− | | |
− | BUT: using svn is tricky sometimes ...
| |
− | | |
− | == How to compile freeplane == | |
− | | |
− | here is a short cookbook how to compile freeplane:
| |
− | | |
− | (assuming you have checked out the newest code via SVN ;) )
| |
− | | |
− | open a cli (on windows this can be done via <windows key> + r ( a window pops up) and you enter 'cmd')
| |
− | | |
− | then you have a command line interface. (there are various again, if you want a decent cli use cygwin.com albeit this is not necessary atm)
| |
− | | |
− | enter:
| |
− | | |
− | java -version
| |
− | | |
− | something like this should be displayed:
| |
− | | |
− | $ java -version java version "1.6.0_10-beta" Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25) Java HotSpot(TM) Client VM (build 11.0-b12, mixed mode, sharing)
| |
− | | |
− | if this doesn't appear, check your JAVA installation (please follow the steps in the readme files thorougly) - go to java.sun.com and get the latest distribution.
| |
− | | |
− | <br> then, secondly, you have to make sure ANT is properly installed. you can check this by typing:
| |
− | | |
− | ant
| |
− | | |
− | on the cli. Something like this should appear:
| |
− | | |
− | $ ant Buildfile: build.xml does not exist! Build failed
| |
− | | |
− | if not, check your ant installation (ant is a java program which is used to construct (compile) other java programs) - see http://ant.apache.org/
| |
− | | |
− | the 'build.xml' is the file which says to ant what to do. check out freeplane code for the directory containing the build.xml (its in freeplane/ant/ !)
| |
− | | |
− | just go there with your cli - using the 'cd' program (hope you know how to do that) and execute ant again. now the output changes:
| |
− | | |
− | $ ant
| |
− | | |
− | Buildfile: build.xml
| |
− | | |
− | ....
| |
− | | |
− | <br> BUILD SUCCESSFUL Total time: 54 seconds
| |
− | | |
− | Ok, the important line here is 'BUILD SUCCESSFUL'. Ant informs you that it created various artefacts (jar files (have you ever tried to open a jar file with a zip program? try it out!!) and obviously everything is fine.
| |
− | | |
− | So how to start your own homegrown freeplane??
| |
− | | |
− | <br> ... go to the newly created dist directory (assuming you are still in the ant dir)
| |
− | | |
− | cd ../bin/dist/lib
| |
− | | |
− | java -jar freeplaneeditor.jar
| |
− | | |
− | this should start your newly built freeplane instance. I've tried it out just now, i have some errors complaining he can't find default property files, this can be fixed by tweaking the classpath a little (classpath is a neat 'thought-to-be' module system for java, soon to be replaced by jigsaw and osgi)
| |
− | | |
− | There are other ways to start freeplane in the meantime, since dimitry pulls hard to use osgi, the most efficient way for developing is to use the ide (eclipse - but of course you have to learn eclipse then, too ...)
| |
− | | |
− | by following the steps described above you should be able to start freeplane from source, your changes are reflected immediately, but only AFTER you have compiled it again. this means that everytimeyou change something you have to call ANT again from the cli:
| |
− | | |
− | ant clean dist
| |
− | | |
− | should give you a fresh artifact you can experiment with,
| |
− | | |
− | note: of course you can rename the freeplane-editor.jar to freeplane-editor.zip and copy your new icons to the directory 'images' contained in the zip file. this should be the fastest way. the same applies for new translations which can be found in the 'translations' directory.
| |
− | | |
− | [[Category:Developer_Documentation]] [[Category:Needs_Updating]]
| |