Developer's Quickstart guide

For discussions about the source code and how to get involved in the development of muCommander.

Developer's Quickstart guide

Postby maxence » Thu Jul 12, 2007 1:31 am

The Quickstart guide has been moved to the Wiki : http://trac.mucommander.com/wiki/QuickStartGuide .

The information containted in this post is no longer current.


----------------------------

Getting access to the source code

There are two ways to get access to the muCommander source code:
1/ By downloading a nightly snapshot of the project at http://mucommander/download/nightly/
2/ By checking out the project from the anonymous Subversion (SVN) repository

The latter option is recommended as it makes it easier to merge the changes you made to the project with the latest made by fellow developers. Basically, you should check out the project from the repository if you're planning to do any serious work with muCommander. The following section explains how to do so.

Checking out the project

First, you'll need to make sure you have Subversion installed on your machine. Entering 'svn' in a terminal should tell you that. If you don't have it, you can get Subversion at http://subversion.tigris.org/ .

Open a terminal, change the current directory to where you'd like to download the project and enter two following line:

Code: Select all
svn checkout https://svn.mucommander.com/mucommander/trunk mucommander


You will be warned that the server certificate can't be trusted, this is just a warning because the certificate is self-signed and not an error. Accept the certificate permanently if you don't want to see this warning the next time you access the SVN repository.

Next you'll see a gazillion files scrolling through your terminal. When this excitement is over, you should have a 'mucommander' directory in your current directory, this is it !

Note: the above command checks out the 'trunk', which is the main development branch. If you want to download the whole repository with tagged versions and other branches, issue the following command instead :

Code: Select all
svn checkout https://svn.mucommander.com/mucommander mucommander


Updating the project

The SVN repository is frequently updated, as developers commit their latest changes. To bring your project directory up-to-date, change the current directory of your terminal to the 'mucommander' project directory and type :

Code: Select all
svn update


If you modified project files and the same files were also modified in the SVN repository, your changes and the repository's will be merged. Conflicts may arise if the same lines of code were modified on both ends. In this unfortunate event, you'll need to edit the file and resolve the conflict manually.

Note that the anonymous SVN repository is read-only: you will not be able to commit your changes to it. Please refer to the 'Contributing your changes' section for information on how to contribute your changes back to the project.

Compiling muCommander

muCommander requires that you have the following software installed :
- JDK 6 or later. You can download it at http://java.sun.com
Note: If you're building muCommander under Mac OS X 10.4 (Tiger), you'll need to get the Java 6 Developer Preview at http://developer.apple.com/java/ , as Tiger only comes with Java 5.
- Apache Ant 1.6.5 or later. You can download it at http://ant.apache.org .

From the 'mucommander' project directory, copy the 'local_template.xml' file to 'local.xml'. Edit 'local.xml' and fill in the required values (path to the Java runtime file and Ant JAR files).

Then, from the project directory, type:

Code: Select all
ant


This will compile and launch your freshly-built muCommander. For additional information about the build process, please refer to the 'compile.txt' file found in the project directory.

Contributing your changes

If you made changes (new feature, bug fix...) that you think muCommander could benefit from, please send your patch to:

<contributions AT mucommander DOT com>

Of course, you can also post to this forum.

However, please note that we cannot guarantee your contribution will make it into muCommander as-is, or even at all. So if you plan on developing and contributing a feature, we advise that you first discuss it in this forum before you start working on it. This will ensure that the feature you have in mind has a chance of making in into muCommander. It will also give us a chance to point you into the right direction regarding the implementation, warn you about pitfalls... or even split the work with you. To put it simply, it will save you time.

Distributing muCommander

You are free to distribute muCommander as long as you respect the terms of the GNU GPL License v3. Any derived work must be released in source form, and must include the original license terms that come with muCommander.

Note that we're planning to release some of the muCommander APIs under a license that makes it compatible with non-free programs. Stay tuned !
Last edited by maxence on Fri Jul 13, 2007 10:22 pm, edited 1 time in total.
User avatar
maxence
Site Admin
 
Posts: 436
Joined: Wed Aug 21, 2002 8:18 pm

Congratulations!

Postby alejandroscandroli » Thu Jul 12, 2007 11:47 am

First of all congratulations on the source release. Thank YOU! Thank YOU!
WOW!! The source code looks amazing, very clean, simple and well documented.
Thank you for your wonderful work!
alejandroscandroli
 
Posts: 26
Joined: Sat Feb 25, 2006 8:54 pm

Postby hritcu » Fri Jul 13, 2007 2:36 pm

Thank you Nicolas and Maxence. This is really great! I am looking forward to have a look at the source. I think the choice of GPL v3 is also very nice. Happy, happy, joy, joy :)
hritcu
 
Posts: 111
Joined: Wed Nov 29, 2006 10:33 pm
Location: Saarbrucken, Germany

Postby samopal » Mon Jul 30, 2007 2:45 am

hi there,
nice work this muCommander, however I'm facing some difficulties in compiling it. It is most probably lack of experience from my side, because I'm quite new in Java.. but:
after setting ant and java locations in local.xml (I don't know if I set it right)>
Code: Select all
<property name="java.lib" location="/usr/lib/jvm/java-6-sun-1.6.0.00/jre/libs"/>
<property name="ant.lib" location="/usr/lib/eclipse/plugins/org.apache.ant_1.6.5"/>

ant gives me this output>
Code: Select all
Buildfile: /home/samopal/eclipseWork/muCommander/build.xml
check-7za:
stand-alone-structure:
mucommander-structure:
init-structure:
check-tools:
     [echo] Checking whether the Ant tools are up-to-date...
compile-tools:
jar-tools:
check-proguard:
load-proguard:
check-copy-tools-bytecode:
copy-tools-bytecode:
obfuscate-tools-bytecode:
obfuscate-tools:
compress-obfuscated-tools:
check-copy-obfuscated-tools:
copy-obfuscated-tools:
compress-tools:
load-javaw:
constants:
     [echo] Creating runtime constants...

BUILD FAILED
/home/samopal/eclipseWork/muCommander/build.xml:358: java.lang.NullPointerException

Total time: 1 second
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Postby Nicolas » Mon Jul 30, 2007 7:47 am

Hey there,

I'm not sure this will fix your problem, but I don't think your local.xml file is configured properly. Check out the compile.txt file at the root of the project structure for detailed instructions, but:

- java.lib: I'm guessing the value for your system should be /usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar

- ant.lib: I might be wrong, but it looks like you're importing an eclipse plugin rather than Ant itself. I can't really guess where Ant is installed, but typing in "which ant" at the command prompt should help you. That will tell you where the Ant executable is located, but it's probably just a link. Say that 'which ant' answers '/usr/bin/ant', just type in 'ls -la /usr/bin/ant' and *that* will give you the path to your Ant installation dir. The Ant library is typically in a ./lib/ant.jar subdirectory.

If correcting these values fails, would you main running "ant -v" and posting its output here?

Cheers,
Nicolas
User avatar
Nicolas
 
Posts: 831
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Postby samopal » Wed Aug 01, 2007 4:16 am

hi,
thanks for help, you were right, paths to libs in local.xml were wrong. I've read the compile.txt - 3x rtfm for myself :) - and I hope I set correct values now>
Code: Select all
<property name="java.lib"        location="/usr/lib/jvm/java-6-sun-1.6.0.00/jre/lib/rt.jar"/>
<property name="ant.lib"         location="/usr/share/ant/lib/ant.jar"/>

However, problem remains>
http://pastebin.ca/641322
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Postby Nicolas » Wed Aug 01, 2007 9:10 am

This is *very* strange. From the trace you pasted, it appears that your version of Ant doesn't respect its own specifications.

Would you mind running another test for me?
Open ./source/com/mucommander/ant/java/JavaTask.java and go line 48 (the constructor).

At the moment, the constructor is empty. Replace it by:
Code: Select all
    public JavaTask() {init();}


If my guess is correct, then the build will probably still fail, but while running other tasks.

Can you let me know what happens?

Nicolas
User avatar
Nicolas
 
Posts: 831
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Postby samopal » Wed Aug 01, 2007 4:03 pm

Nicolas wrote:Open ./source/com/mucommander/ant/java/JavaTask.java and go line 48 (the constructor).

At the moment, the constructor is empty. Replace it by:
Code: Select all
    public JavaTask() {init();}


done.
'ant -v' output http://pastebin.ca/641837
compiled and running muCommander withou problems :D

and just to make sure, I deleted "init();" in constructor and run ant again and it compiled and run perfectly fine :?
there is output without init(); http://pastebin.ca/641841

now I really don't know what happends, restart maybe changed something or I don't know. now I set it to work within eclipse and everything works.
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Postby Nicolas » Wed Aug 01, 2007 5:19 pm

Something's *really* messed up with your Ant installation :)
That last compilation you did didn't realise that it had to recompile the Ant tasks (the bit of code you modified).

Can you delete the ./tools/mucommander-ant-tools.jar file and try compiling again after having deleted the init() call?

If it compiles without a problem, then I'm very confused. If it doesn't, well, it's not normal but at least I know what's causing it :)

Nicolas
User avatar
Nicolas
 
Posts: 831
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Postby samopal » Wed Aug 01, 2007 5:35 pm

Nicolas wrote:Can you delete the ./tools/mucommander-ant-tools.jar file and try compiling again after having deleted the init() call?

I think you will not enjoy it, but I've deleted init() and ran ant -v and everything works -> http://pastebin.ca/641933
I've double checked if /tools/mucommander-ant-tools.jar was deleted and it is deleted
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Postby Nicolas » Fri Aug 03, 2007 7:43 pm

Oh for crying out loud...

Right, well, at least it works. Let me know if you encounter the problem again, maybe with more symptoms I can figure out what the bloody hell is happening to my ant tasks and why they're throwing exceptions when they really shouldn't...

Thanks for reporting the problem though, I'm sure this thread will be helpful to people who have the same issue.

Nicolas
User avatar
Nicolas
 
Posts: 831
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Postby samopal » Sat Aug 04, 2007 1:51 am

everything works now without any problem. thanx for support, I hope when I grow up a little bit in Java programming I can contribute or do some plugins for this great program.. :)
Besides, I work as technical editor for one "don't want to advertise it here" IT magazine in my home country Slovakia, and I'm writing article about interesting freeware for everyday use - and I gave very high score for muCommander in file managers category (along with total commander and krusader). Will post here .pdf if it will be in sale (1. September).
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Postby Nicolas » Sun Aug 05, 2007 1:00 pm

Glad I could help!

As for code contribution, Maxence and I are putting the finishing touches to a few features we want to finish, and are considering working on a plugin API once that's done. Soon as this is finished, you'll be able to contribute your own plugins and enhancements :)

Glad to know that muCommander is going to be featured in a press article, it's its first print review! Let us know if there's anything we can do to help.

Cheers,
Nicolas
User avatar
Nicolas
 
Posts: 831
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Developer's Quickstart guide

Postby kozmoz » Fri Aug 17, 2007 11:18 am

maxence wrote:Getting access to the source code
cvs -d:ext:cvsread@cvs.mucommander.com:/var/cvsroot checkout mucommander


I try to connect to this CVS server. It is working fine at the command line, but when I configure IntelliJ IDEA to get the CVS sources, it is giving me an authentication error (wrong combination of user name and password)

Actually it is a small issue, but I just cannot stand that this is not working through IntelliJ IDEA.

Are there any errors in the log around approximately 12:00 hours (11:00 GMT)?
kozmoz
 
Posts: 9
Joined: Thu May 31, 2007 11:29 pm

Postby samopal » Sun Sep 30, 2007 2:51 am

kozmos> for me it took about half an hour to discover how to get CVS work under eclipse, though I never woked with CVS before at all... double-check everything, if it works under command line, it must work in IntelliJ too (it is solid IDE, so it suppoused to have good CVS interface too)

Nicolas> good news! review for muCommander is out in magazine stores for about 1month now and pdf version became freely aviable now, so I encourage you to download -> samopal.eu/storage/pcr9.pdf
here is whole magazine and when you search for muCommander, you will find it there. I can provide you with english translation if you are interested. I had only small space for every app, but I tried to get most of it :wink:
samopal
 
Posts: 16
Joined: Mon Jul 30, 2007 2:39 am
Location: Vancouver, BC

Next

Return to Developer's corner

Who is online

Users browsing this forum: No registered users and 0 guests

cron