Menu

Building

Michael Kay Small SQL Jeroen Frijters

Building IKVM.NET from Repository

If you want build IKVM then you need start with the steps listed under general, and continue with the steps in the section specific to your operating system.

General

  • Checkout the module ikvm from the CVS repository. A description for the checkout can you find in sourceforge. You may want to check out a specific revision, for example 0.40.
  • Install the build tool NANT. You can download it from SourceForge. I am using version 0.85 but newer and older versions are possible.
  • Install Java 7 (64 bit recommended), and make sure that your PATH and JAVA_HOME environment variables point to the Java installation.
  • Download the openjdk7-bxxx-stripped.zip file that is currently in use. For a release you find it in the download area. For the HEAD you can find it the news area.
  • See ikvm/HOWTO for up-to-date and/or additional build instructions.

Extract the content of the zip file parallel to the ikvm module. This zip file is a subset of the public available OpenJDK download. But it include also many with make generated *.java files. In the original OpenJDK download you have only the make files. In some rare conditions if you work with the MAIN (trunk) it can be needed to extends it with more files from the original OpenJDK.

When you have done this, you will typically have a directory such as e:/my-ikvm with two subdirectories, called "ikvm" and "openjdk7-bxxx" or equivalent. Please note that your directory name should not have spaces in it.

Windows

You must have installed the .NET 2.0 framework. But you need a little more. In particular, you need to set a number of environment variables correctly. An easy way to achieve this is via the batch scripts that come with Visual Studio.

Depending of your software there are multiple possible steps.

Visual Studio

With this tool things are very simple, but the software is not free. You need version 2005 or higher.

  • Start the Visual Studio Command Prompt. This is a link to a batch file that sets the required enviroment variables.
  • Change the directory to the root of ikvm
  • call "nant" in the console

Visual Studio Express

Because there is a C# and a C part you need Visual Studio Express for C# and Visual Studio Express for C. You can download and use it for free. Then you need to create a batch file for starting. It can look like:

@SET VSINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0\Common7\IDE
@SET VCINSTALLDIR=C:\Programme\Microsoft Visual Studio 9.0
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
@SET FrameworkVersion=v3.5
@SET FrameworkSDKDir=C:\Programme\Microsoft Visual Studio 9.0\SDK\v3.5
@rem Root of Visual Studio common files.

@if "%VSINSTALLDIR%"=="" goto Usage
@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%

@rem
@rem Root of Visual Studio ide installed files.
@rem
@set DevEnvDir=%VSINSTALLDIR%

@rem
@rem Root of Visual C++ installed files.
@rem
@set MSVCDir=C:\Programme\Microsoft Visual Studio Studio 9.0\VC7

@rem
@echo Setting environment for using Microsoft Visual Studio 9.0 tools.
@echo (If you have another version of Visual Studio or Visual C++ installed and wish
@echo to use its tools from the command line, run vcvars32.bat for that version.)
@rem

@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.

@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%MSVCDir%\..\Common7\IDE;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%FrameworkDir%\v2.0.50727;%PATH%;
@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include;%INCLUDE%
@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib;%LIB%

@goto end

:Usage

@echo. VSINSTALLDIR variable is not set. 
@echo.
@echo SYNTAX: %0

@goto end

:end

Linux

TODO

Creating strong-named assemblies

By default the build creates DLLs that are not strong-named. If you want to issue the DLLs, they need to be strong-named.

To achieve this you can either install a key in named key container ("ikvm-key") or edit the ikvm.build file to replace "ikvm-key" with your named key container (you can use "sn -i <keyfile> <container>" to install a key into a named container).

After that do a "nant clean" followed by "nant signed" to do a strong-named build (also from the top level directory).


Related

Wiki: Contribute
Wiki: Debugging
Wiki: FAQ

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.