![]() |
Developers »
Build From SVN |
|
Build from SVNSome instructions on how to build the very latest version of FreeGuide. If you have developer access to SVN you will want to read the SVN Rules. There is also more useful info on the Help us make FreeGuide page. WindowsGetting the JDK (Java)In order to compile FreeGuide you will need the Java Developer Kit (JDK), not just the Java Runtime Environment (JRE) version of Java. To get the JDK, got to http://java.sun.com/j2se and follow the link on the right to download J2SE, and then choose to install the JDK. Its easiest to choose the Windows Online Installation, Multi-language version. Now you will need to set two environment variables: PATH, which should give the location of the "bin" directory inside the directory where you installed the JDK, and JAVA_HOME, which should give the location of the main JDK directory (the one that contains "bin" and other directories). Right-click on My Computer and choose Properties, you will find PATH under Advanced/Environment Variables/System Variables. Find PATH and select edit. The PATHS to the various applications are to be found between semicolons. For example, if your PATH looks like this:
You need to edit it to this, assuming that your JDK is in directory C:\Program Files\Java\jdk1.5.0_06:
Don't forget to add "\bin" on the end. You will also need to add a new environment variable, called JAVA_HOME. The value of that should just be the directory in which the JDK is installed, e.g. C:\Program Files\Java\jdk1.5.0_06\bin Now, close any DOS/Cmd windows you have opened, and start a new one (to make sure the changes you have made are registered) and type:
The output should be a long usage message complaining that you haven't provided any source files. If so, you are ready to go - continue to the next section. If, instead you get something like this:
or something similar, then you either don't have the JDK installed, or it is not in your PATH. Ask on the FreeGuide developers' mailing list if you need help getting this set up. Now type:
If you get no response, you haven't set up your JAVA_HOME environment variable properly (try logging out and logging in again if you think you have). Ask on our developers' mailing list if you need help here. Getting the code from SubversionYou will need a Subversion client installed. You can use Tortoise SVN or the command line client. Download and install the Windows msi version of TortoiseSVN by clicking the ".msi" file here: http://sourceforge.net/project/showfiles.php?group_id=138498&package_id= 151948. Once the program is installed you will find that it is available in the Context Menus (right mouse click). Tortoise is not a "program" that you can run, it is now always available as part of Windows Explorer. To download a full copy of the latest source files from FreeGuide just open My Computer, choose a suitable directory (e.g. My Documents) and right-click somewhere inside it, and select SVN Checkout. You will be asked for the URL of the repository, which is this:
Note: if you have low bandwidth or low disk space, you might like to try Getting the code without XMLTV. The simplest way to start is just to take the default settings and you will get the latest of everything. Just enter the directory where you want to save the files, preferably something short and simple without long file names, and download. Below, we assume you checked the source out into a directory called C:\My Documents\freeguide-tv. Running using EclipseRunning the classes from the command line[Note: this is the hard way to do it, but simple. Normally you will want to use an IDE such as Eclipse.] You will need the Ant tool installed and in your PATH. You will also need Ant's "optional tasks", which may be distributed under a separate package, possibly called "ant-optional". To build the code, open a DOS or Cmd window and use the "cd" command to change into the directory where you checked out the code:
To compile, type this:
Run FreeGuide (after building as above) like this:
or, alternatively, you can do this:
LinuxGetting the JDK (Java)In order to compile FreeGuide you will need the Java Developer Kit (JDK), not just the Java Runtime Environment (JRE) version of Java. To get the JDK, got to http://java.sun.com/j2se and follow the link on the right to download J2SE, and then choose to install the JDK. When you have downloaded and installed the JDK, open a DOS/Cmd window or terminal, and type:
The output should be a long usage message complaining that you haven't provided any source files. Check the very first line of this output (you may need to scroll up). It should be something like "javac 1.5.0_06" - make sure it matches the version you downloaded, not an earlier version. If so, you are ready to go - continue to the next section. If, instead you get something like this:
or something similar, then you either don't have the JDK installed, or it is not in your PATH. Ask on the FreeGuide developers' mailing list if you need help getting this set up. Getting the code from SubversionTo check out the latest code, do this (after installing Subversion):
After you've done that, if someone else has made changes and you want to get the latest version, do this:
XMLTVI really do not recommend installing XMLTV from source - it is very difficult. It is better to use a package for your operating system. On Debian and Ubuntu, this should work:
If you do compile from source, ensure you install Tk, so that XMLTV's --gui configuration mode will work from within FreeGuide (i.e. when you click "Choose channels for XMLTV" something will happen). Running using EclipseBuilding the jarsEnsure you have ant and ant-optional installed, and do this:
Now to run the program do this:
Running the classes from the command lineEnsure you have ant and ant-optional installed, and do this:
Run FreeGuide (after building as above) like this:
or, alternatively, do this:
Notes on using EclipseBefore you build in Eclipse, run this in the main freeguide directory:
Download Eclipse Integrated Development Environment (IDE). Don't tell Eclipse to use the Ant scripts to set up the build process, as it won't understand our separate XML files. Instead, just tell Eclipse to compile all the .class files into the same directory as the .java files (which is the default behaviour), and then to run the project set the working directory to the "src" subdirectory, and set the main class to be "freeguide.startup.Startup". You can put sources in one Eclipse project. However, in order to run sources in Eclipse, make sure that the working directory of JVM is the same as the output directory of the compiling process. In Eclipse, the default working directory is usually the workspace directory, and the default output directory is bin sub-directory of the workspace. Therefore, if your workspace directory is c:\home\freeguideTV and the default output directory is c:\home\freeguideTV\bin then the working directory must be c:\home\freeguideTV\bin. The working directory can be specified through Run/Run.../Arguments or Run/Debug.../Arguments (depending on which mode of execution you choose to do). The output directory (or folder) can be specified through Project/Properties/Java Build Path. Note that the workspace directory for a project named "freeguideTV" is accessed through the variable ${workspace_loc:freeguideTV}. You can use this variable to specify other relative paths. If you receive a "java.util.MissingResourceException", running 'ant prepare' should fix this. Please Contact Us if you have questions. |
If you would like to help improve this site, please Contact Us and we will give you the password to edit pages. | |
Page last modified on June 03, 2008 PmWiki Info | - - - () - |