Installation

From X4X

Jump to: navigation, search

Contents

Installation since v0.3

Dependencies

Version 0.3 introduces quite much changes. Therefor also the dependencies changed

  • JDK5 (JDK6 for 0.3 and 0.3.1) (get one from [1])
  • Apache Ant >=1.6 (0.7 for 0.3)
  • Xmms2 DrJekyll or -devel right before DrJekyll (get it from [2])
  • SWIG >=1.3.25 (from [3])
  • XWidgets 0.1.3 (from [4] or get x4x-xwidgets-bin which ships a swing_only version of Xwidgets)
  • JmDNS 0.1.1 for optional mdns support


Windows: If you are going to use X4X on Microsoft Windows you don't have to compile it from source, just get x4x-win32-full.zip from the downloadpage, unpack it and run x4x.exe.

Compilation

After unpacking the tarball simply run

ant install

to build and install X4X or ant jar to compile and jar X4X.

Troubleshooting

There are much causes which may let the buildprocess fail.

Note: When you set any paths be sure to use absolute paths. Otherwise you may fail after install since things aren't reachable.

java.home is wrong

Run ant with the parameter -Djava.home=/path/to/the/jdk, not the jre!

You get an error, that source=1.6 is a not known version

Get a JDK6 from [5] and set it as the system JDK

"you are missing xwidgets"-error

Run ant with the flag -Dxwidgets=/directory/of/Xwidgets, do not point that property to the Xwidgets.jar, only to the directory where it is in

Ant bails out with an IOException not finding swig

Please install Swig (from [6]) and be sure it is accessible through PATH

xmmsclient.h cannot be found

This either means that you miss xmms2 at all, or you miss the xmms2 clientlib or you installed it not using the default prefix. Use the parameter -Dxmms2prefix=/whatever/prefix/you/used to fix that. Default is /usr/local


For everything else (there can be much I didn't think of) please check #x4x at irc://irc.freenode.net


Installation before v0.3

You need some prerequisites met to get X4X up and running

Dependencies

The following things have to be installed to get X4X up and running on your system:

XMMS2 DrDolittle for X4X <0.2 and DrEvil or one of its RCs for X4X 0.2 Before that the java-bindings were not included. If you install XMMS2 from source you need to have a jdk>=1.4 (gcj would do it probably too) and swig >= 1.3.25 installed and javac/java/jar/swig in path and JAVA_HOME environment variable set. If you install XMMS2 via some other way be sure the java-bindings are installed too. You can get more information on how to install xmms2 on xmms2's installation page

XWidgets XWidgets support atm only SWT (Standard Widgets Toolkit) which you need to have installed therefor too - you can get SWT from SWT home. Put the jar to a place where we can find it or set swtHome when running ant and put the libs (*.dll/*.so/...) into your library path (e.g. /usr/local/lib). If you have eclipse installed you can use eclipse' SWT too.

At the moment XWidgets are distributed together with X4X but this will change in future

Apache ant We use ant to build our sourcecode. You can build it on your own but we won't help you with that ;). It's quite annoying to do that manually

ant-tasks Some additional tasks for ant which we use. On gentoo e.g. this package is separated off ant so you may have to install it too.

Installation

Via some package system

If you want to install X4X on your system via your system's package-manager please look here.

From source code using ant

To start compilation of X4X just type

ant compile

which only compiled class-files or

ant jar

which builds a jar.

For installation type

ant install

This will install X4X to /usr/local/X4X. If you like junit tests you can use ant junit or ant junitX. You need to start xmms2d before that. If you or ant have problems compiling X4X you are probably missing swt.jar. X4X thinks it should be in /usr/share/swt-3/libs and it should be named swt.jar. No need to rename or move it anyway ;), you can just set the swtHome-property to the right directory.

ant -DswtHome=/right/dir jar

Another way to let ant fail is that you miss xmms2java.jar or it's not in /usr/local/share/xmms2/java. Just set xmms2JavaHome to the right directory to solve that problem. If xmms2java.jar is not there or in another place you are missing the java-bindings. If you have some crazy SetUp to store your libs or you didn't install xmms2 already you have to set addLDPath to the right directory too. It is set to /usr/local/lib by default since xmms2's prefix is /usr/local and /usr/local/lib is not in java.library.path on some systems.

Since X4X-0.2 x4x supports properties files for ant. E.g. if you are a gentoo user and have already emerged junit, log4j, jdom and jcifs just call

ant -Dprop=gentoo install

which will install X4X to prefix /usr/local and link everything against your installed libraries. Those properties files are placed in ant-props/, you can write your own one for special needs, just place it there too and call ant with -Dprop=myProp if your properties file is called myProp.properties. Look at ant-props/default.properties for available properties.

ant -p

can tell you some other intresting things, e.g. ant cvs which does a cvs-update of our code (if you have cvs installed)


If you come in any trouble check Troubleshooting

To get some ideas how to use X4X check Tips and Tricks

If you are happy to have x4x installed now you are maybe interested in some [X4X Plugins | plugins] we already have developed

Changes in Installationprocedure since 0.2.2

No great changes happened besides the fact that we use source=1.5 and target=1.5 now and in future, and, that the dependencies for log4j and jdom got removed since using extra packages for the less functions x4x uses from them was quite an overkill. This implies that you need have java5 installed from now on to use x4x.

Changes in Installationprocedure since 0.1.2

You can build against systeminstalled jars now. Therefor also the properties swtHome and xmms2JavaHome got renamed to swt and xmms2java. You can build x4x now using following syntax.

ant -Dlog4j="/where/ever/log4j.jar" -Dswt="/bla/bla/swt.jar" install

If you still want to use the shipped libs you can do this but you need to run

ant installLibs

afterwards to install them too.

You should delete .xmms2/clients/x4x before running 0.2, else you won't get some of the nice new icons ;)


Have fun using X4X and visit us in #x4x on irc://irc.freenode.net ;)

Personal tools