JTalton's picture

Compiling from SVN on Ubuntu

I grabbed both the lastest SVN and the latest zip. In the build instructions it says to open the sln file from the Build directory. The sln file does not seem to be there. (I've looked in both Build directories in the tree) I installed nant and tried to build targeting mono and there are build errors. I have not looked into those.

Is there something I am missing?


Comments

Comment viewing options

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

The .sln file is only avalailable in actual releases, not SVN. The fact that it's missing in 0.9.7 is a bug (#782: There is no .sln file in the Build/ directory).

Solution: run Build.exe and type "vs" to create the missing sln. You can build this with MonoDevelop 2.0 and Mono 1.9.2 or 2.0.

JTalton's picture

Perfect. The "vs" build target was not listed as an option from the build.exe so I did not know about it. Thanks!

the Fiddler's picture

Ok, updated Build.exe to clarify available options.

The build system now relies on MSBuild and OpenTK can be built either from an IDE (Visual Studio, SharpDevelop, MonoDevelop 2.0) or from the commandline (msbuild.exe). Nant is no longer required or supported.

On the downside, it won't be possible to build OpenTK with Mono from the commandline, because xbuild (Mono's msbuild implementation) is nowhere near mature enough. On the bright side, MonoDevelop 2.0 works fine. Even MonoDevelop 1.0 can work, if you import the solution and correct its project settings.

JTalton's picture

mono Build.exe vs - Works great!
(Now puts sln in opentk/Build instead of opentk/Sources/Build)

But inputing "vs" after the fact causes a crash.

mono Build.exe
Usage: Build.exe BuildTarget [BuildMode]
BuildMode: debug/release
BuildTarget: vs/vs2005 or clean/distclean
Select build target: vs
Creating VS2005 project files
Prebuild v2.0.4
Creating Visual C# 2005 solution and project files
...Creating project: Bind
...Creating project: Build
...Creating project: Examples
...Creating project: OpenTK
...Creating project: OpenTK.Utilities

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at OpenTK.Build.Project.Main (System.String[] args) [0x00000]

the Fiddler's picture

Can you please checkout and try again? I don't have access to Linux ATM.

JTalton's picture

Works but says building VS 2005.
If you don't specify a BuildMode gives the help text.
If you do, it seems to run twice.

~/Desktop/opentk/Build$ mono Build.exe
Usage: Build.exe BuildTarget [BuildMode]
BuildTarget: vs (recommended) or one of clean/distclean/mono/net
BuildMode: debug/release
Select build target: vs
Select build mode (optional):
Creating VS2005 project files
Prebuild v2.0.4
Copyright (c) 2004-2008
See 'prebuild /usage' for help
Creating Visual C# 2005 solution and project files
...Creating project: Bind
...Creating project: Build
...Creating project: Examples
...Creating project: OpenTK
...Creating project: OpenTK.Utilities
Unknown command:
Usage: Build.exe BuildTarget [BuildMode]
BuildTarget: vs (recommended) or one of clean/distclean/mono/net
BuildMode: debug/release

~/Desktop/opentk/Build$ mono Build.exe
Usage: Build.exe BuildTarget [BuildMode]
BuildTarget: vs (recommended) or one of clean/distclean/mono/net
BuildMode: debug/release
Select build target: vs
Select build mode (optional): debug
Creating VS2005 project files
Prebuild v2.0.4
Copyright (c) 2004-2008
See 'prebuild /usage' for help
Creating Visual C# 2005 solution and project files
...Creating project: Bind
...Creating project: Build
...Creating project: Examples
...Creating project: OpenTK
...Creating project: OpenTK.Utilities
Creating VS2005 project files
Prebuild v2.0.4
Copyright (c) 2004-2008
See 'prebuild /usage' for help
Creating Visual C# 2005 solution and project files
...Creating project: Bind
...Creating project: Build
...Creating project: Examples
...Creating project: OpenTK
...Creating project: OpenTK.Utilities

the Fiddler's picture

Ok, I've installed a Jaunty VM and will fix that ASAP.