Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (488)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to: Nightly Builds (using google code and SVN)  (Read 1127 times)
0 Members and 1 Guest are viewing this topic.
Offline Trosters

Junior Member


Projects: 1



« Posted 2011-10-17 20:55:33 »

I didn't find a better place to put this, so here we go!

Ive been trying to find a good way to create nightly builds for my project but I find nothing on google.. The project and its report is due for handing in the night between wednesday and thursday so you guys are pretty much my last hope! (It is not required, but it will help me get a better grade if I learn this!)

Now the google code check out site gives me the following:
Use this command to anonymously check out the latest project source code:
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://project.googlecode.com/svn/trunk/ project-read-only

But I really have no ideas, at all, on where to start. Can someone please explain (or point me in the direction of a tutorial / explanation) how to run nightly builds? Please!:(
Offline loom_weaver

JGO Coder


Medals: 17



« Reply #1 - Posted 2011-10-17 21:30:36 »

Here are some things you can google:

In general:
Continuous Integration
Jenkins

On Windows: Windows Scheduler
On Linux: cron

Good luck!
Offline Trosters

Junior Member


Projects: 1



« Reply #2 - Posted 2011-10-18 08:13:00 »

Thank you. Smiley

Unfortunately so far it didn't help all that much, but I will continue trying to figure out it when I get back from uni tonight.

I managed to create an ant build script (at least I think I did) with eclipse,

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
              Any modifications will be overwritten.
              To include a user specific buildfile here, simply create one in the same
              directory with the processing instruction <?eclipse.ant.import?>
              as the first entry and export the buildfile again. -->
<project basedir="." default="build" name="TowerBone">
    <property environment="env"/>
    <property name="ECLIPSE_HOME" value="../../eclipse"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.6"/>
    <property name="source" value="1.6"/>
    <path id="TowerBone.classpath">
        <pathelement location="bin"/>
        <pathelement location="libs/gdx-backend-lwjgl-natives.jar"/>
        <pathelement location="libs/gdx-backend-lwjgl-sources.jar"/>
        <pathelement location="libs/gdx-backend-lwjgl.jar"/>
        <pathelement location="libs/gdx-natives.jar"/>
        <pathelement location="libs/gdx.jar"/>
        <pathelement location="libs/lwjgl_util_applet.jar"/>
    </path>
    <target name="init">
        <mkdir dir="bin"/>
        <copy includeemptydirs="false" todir="bin">
            <fileset dir="src">
                <exclude name="**/*.launch"/>
                <exclude name="**/*.java"/>
            </fileset>
        </copy>
    </target>
    <target name="clean">
        <delete dir="bin"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
            <src path="src"/>
            <classpath refid="TowerBone.classpath"/>
        </javac>
    </target>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
        <copy todir="${ant.library.dir}">
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
        </copy>
        <unzip dest="${ant.library.dir}">
            <patternset includes="jdtCompilerAdapter.jar"/>
            <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
        </unzip>
    </target>
    <target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
        <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
        <antcall target="build"/>
    </target>
    <target name="Starter">
        <java classname="com.struc.td.Starter" failonerror="true" fork="yes">
            <classpath refid="TowerBone.classpath"/>
        </java>
    </target>
</project>


But I don't know how to use it.. When I run it it will just say "
Buildfile: D:\Software Engineering\TowerBone\build.xml
build-subprojects:
init:
build-project:
     [echo] TowerBone: D:\Software Engineering\TowerBone\build.xml
build:
BUILD SUCCESSFUL
Total time: 160 milliseconds

So I figured perhaps it was just something that tries to compile the project and tells if it works or not, so then I replaced my main method with something that would cause an error (I just randomly wrote a couple of letters, like "new LwjglASDREASDApplication(...)". And ran the build script and it still said the exact same thing. Can someone explain?:/
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #3 - Posted 2011-10-18 11:30:24 »

Hi

If ant and eclipse both point to the same source, and both compile to the same directory, then ant will have no work to do as eclipse already compiled the classes.

Endolf

Offline loom_weaver

JGO Coder


Medals: 17



« Reply #4 - Posted 2011-10-19 04:33:16 »

If you run ant without any arguments then it will execute the default target which is in this case 'build'.

Thus:

$ ant

is equivalent to:
$ ant build

or:
$ ant -f build.xml build

In order to do a clean before build you need to specify the 'clean' target first e.g.:

$ ant clean
$ ant build

or:
$ ant clean build
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

TehJavaDev (17 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

atombrot (39 views)
2014-08-19 09:29:53

Tekkerue (36 views)
2014-08-16 06:45:27

Tekkerue (33 views)
2014-08-16 06:22:17

Tekkerue (22 views)
2014-08-16 06:20:21

Tekkerue (33 views)
2014-08-16 06:12:11

Rayexar (68 views)
2014-08-11 02:49:23

BurntPizza (45 views)
2014-08-09 21:09:32

BurntPizza (36 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!