FreeGuide | Developers »
Build The Latest Source |
|
Build the latest sourceSome instructions on how to build the very latest version of FreeGuide. If you have developer access to Git you will want to read the Code Rules. There is also more useful info on the Help us make FreeGuide page. WindowsGetting git(Needed for downloading latest source code files for developers.) You will need a Git client installed. You can use msysGit to install Git for windows, from the following link: install msysGit. Getting Ant(Needed to compile to the, unless you use Eclipse) You will need to download and install the Ant tool. You can download ant from http://ant.apache.org/bindownload.cgi. (From here on we will be assuming you extracted the downloaded archive to
Check the Apache documentation on Installing Ant for further details on how to set up the environment variables and path. You will also need Ant's "optional tasks", which may be distributed under a separate package, possibly called "ant-optional". Getting 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: You need to edit it to this, assuming that your JDK is in directory Don't forget to add "\bin" on the end. You will also need to add a new environment variable, called 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 GitTo download a full copy of the latest source files from FreeGuide just open DOS command line (cmd), change directory to a suitable directory (e.g. My Documents) and type the following: 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. To get new updates, do this: Below, we assume you checked the source out into a directory called Running 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.] 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:
Running using EclipseSee Using Eclipse in the Linux section. 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. 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). Getting the code from GitIf git is not installed on your system you will have to install it. On Ubuntu or Debian this should be just: To download a full copy of the latest source files from FreeGuide just open a terminal, change directory to a suitable directory (e.g. Documents) and type the following: Change directory to the Documents directory Download the project files using the git command To get the latest updates, do this: Now you have two options: you can build on the project from command line, or use Eclipse. Building on the command lineYou will need to install Apache Ant. On Ubuntu or Debian this should be: Change directory to Build the project by typing: and run it with: or:
To test a different language translation:
Using Eclipse
(Note that project source files will be copied from now on to your eclipse MyFreeGuideProject location any modifications you make will affect these files.)
After you've done that, if someone else has made changes and you want to get the latest version, do this:
Building the jarsEnsure you have ant and ant-optional installed, and do this:
Now to run the program do this:
Running the testsAny code you write should be unit tested, and all the existing unit tests should still pass. You can run the tests like this: or run the "test" target from build.xml in Eclipse's ant plugin. Please ContactUs 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 November 04, 2022, at 04:19 PM PmWiki Info |