objarni's picture

Automatic building of OpenTK trunk

Project:The Open Toolkit library
Version:1.0-2010-10-06
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

As discussed in this thread, it would be good if OpenTK had a continous integration build server, featuring this:

  • Hourly update-prebuild-build of OpenTK trunk
  • Generation of "build report" in eg. HTML format, viewable from OpenTK.com

This would make it easier for OpenTK developers to know whether a commit has "broken the trunk", and minimize traffic on the forums for issues of mere compilation errors.

Questions:

  • What OSs should the build script build on?
  • What build tool should be used? NAnt, xbuild, VisualStudio, ..?
  • Should the script also produce "nightly builds" of the OpenTK library?

Lets update the above together, since I'm not sure of the details on how to build OpenTK (never done it, shame on me!)


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
objarni's picture

#11

At work I use VCSExpress.exe to auto-build my solutions. We could use that inside VirtualBox with a windows install.
For mono I don't know - doesn't gmcs come with a .sln build tool?

I guess the basic question is -- what platforms/compilers/buildtools should OpenTK be conveniently buildable from..?

Just found this; it seems the mono team uses a "build monitor" kind of similar to what we have been discussing (but concrete not imaginary heh)

http://mono.ximian.com/monobuild/

Edit: just found out about 'mdtool' included in the mono platform. I used this command line to compile trunk OpenTK (after generating source with the help of Build.exe) with 0 errors, 117 warnings:

olof@olof-desktop:~/Projects/opentk/trunk/Build$ mdtool build -f:OpenTK.sln

Edit2: and randomly running some of the Examples works! :)

objarni's picture

#12

(deleted see prev comment)

the Fiddler's picture

#13

objarni wrote:

At work I use VCSExpress.exe to auto-build my solutions. We could use that inside VirtualBox with a windows install.

As I mentioned previously, no need for an IDE. MSBuild is a commandline tool that ships with .Net and build solutions. We are covered on the Windows-side.

objarni wrote:

For mono I don't know - doesn't gmcs come with a .sln build tool?

It's called XBuild and you need version 2.4.2+ to build OpenTK. I attached that version on my second-to-last post, but it doesn't work on Mono 2.0.

objarni wrote:

I guess the basic question is -- what platforms/compilers/buildtools should OpenTK be conveniently buildable from..?

As long as you have an IDE, you can build OpenTK with three clicks (double click OpenTK.sln and click "Build" :D). The question is which is the most convenient way to build OpenTK from the commandline. We are covered on Windows (MSBuild), but Linux offers various non-ideal solutions right now.

objarni wrote:

Just found this; it seems the mono team uses a "build monitor" kind of similar to what we have been discussing (but concrete not imaginary heh)

http://mono.ximian.com/monobuild/

Yes, they've built a pretty nice system there.. The difference is that Mono is built with configure && make which works fine on Unices but not Windows. In a sense, they are in the exact opposite condition compared to us: a convenient build system on Linux but various non-ideal solutions on Windows (cygwin or semi-working msbuild files).

As far as OpenTK is concerned, I would like a single build system to rule them all. MSBuild/XBuild are ideal: you need a single file (OpenTK.sln) and you can use it to build from the commandline or an IDE. The snag is that we need a very recent version of XBuild - more recent than the one which ships in Ubuntu, for example.

This is why I am investigating different solutions, but none seems to be working 100% so far. While it might not be difficult to make OpenTK work with them, I'd prefer to find the one that needs the least maintenance and hassle to work.

Still looking. :)

objarni's picture

#14

I think one build-tool to rule them all is a sane target.. After all we are talking generating .NET2.0 complient DLLs that, after created, should be usable on both mono and .NET frameworks.

But the "lower" the bar on building OpenTK from scratch - the more collaborative this project will get - and that goes directly into better quality / faster development / speedier bug fixes.

Lower bar means = less dependencies to build things, less configuration for programmers. Less hassle simply :)

So how do we lower the bar, and keep things maintainable?

the Fiddler's picture

#15

I really don't think the bar can get any lower. OpenTK does not have any external dependencies outside of .Net/Mono and your normal system installation. It can be built with a single click from your favorite IDE (be it VS, MD, #D, Borland or whatever). It can also be built through the commandline (only caveat: you need the latest Mono for Linux). Finally, you can fetch a fresh version from SVN and build it in less than 1' total time.

The only change I can think of is to get rid of Build.exe and ship OpenTK.sln on its own - which would be a step back, since: a) you only need to run Build.exe on SVN checkouts, b) we already ship OpenTK.sln is actual releases and c) getting rid of Prebuild would mean removing VS2005 and (in the near future) VS2008 support.

What am I missing?

objarni's picture

#16

It's probably me who is missing things. This is the first time I actually manage to build OpenTK from scratch.

For example

1) what is the difference between Prebuild and Build?
2) does IDE-building OpenTK run Build.exe too?

martinsm's picture

#17

>> As I mentioned previously, no need for an IDE. MSBuild is a commandline tool that ships with .Net and build solutions. We are covered on the Windows-side.

I agree, that MSBuild should be used instead of MSVC#, but you can also use devenv command to invoke building of projects for solution automatically in command line. No nee to run IDE:
devenv OpenTK.sln /build Release

triton's picture

#18

This seems like a pretty good idea.

Any progress so far?

the Fiddler's picture

#19

The xbuild issues I have reported have been fixed by the mono folks. The next step is to grab xbuild from Mono's SVN, build it and try to make it work on Mono 2.0.

objarni's picture

#20

Great news about xbuild. Will it be packaged for easy download in Ubuntu 9.10 maybe?

Is there any online documentation of the "complete building of OpenTK"? I mean describing Prebuild, Build, Bind, the sln's? I feel a bit confused by all steps..