Changes between Initial Version and Version 1 of BuildNomWindows


Ignore:
Timestamp:
Apr 21, 2008, 10:21:06 PM (16 years ago)
Author:
bird
Comment:

drafted windows build instruction from the darwin ones

Legend:

Unmodified
Added
Removed
Modified
  • BuildNomWindows

    v1 v1  
     1= Building NOM on Windows =
     2
     3Note that the the Windows port is very fresh and there are a couple of things that still needs addressing.
     4
     5Also note that this is a '''draft''' and will not work for everyone yet!
     6
     7If you have problems visit the #netlabs channel on the [http://www.ecomstation.com/community.phtml?url=nls/en/content/ircnetwork.html&title=eComStation%20IRC%20Network%20Explained eCS IRC network] and try to catch bird.
     8
     9
     10== Prerequisites ==
     11
     12=== Visual Studio and Platform SDK ===
     13
     14You'll need a compiler and the Platform SDK in order to compile and link NOM on windows. You might get it working with the express version of the compiler. The Platform SDK should be available for download.
     15
     16TODO: What to put in [wiki:LocalConfig.kmk]
     17
     18=== GLib2 ===
     19
     20NOM makes use of GLib2. This means that you'd either have to find a recent version that matches your compiler (the runtime in particular - it really won't work otherwise) or you can tell the NOM build system to compile the necessary bits.
     21
     22In the latter case, you should download the 2.16.x sources of GLib2 (no, don't try a svn checkout of the sources, it's not the same). Unpack them somewhere edit [LocalConfig.kmk] so that PATH_SRC_PATH points to where you've unpacked them. Also add SDK_glib2_FROM_NOM=yes to indicate that GLib needs building.
     23Example [LocalConfig.kmk]:
     24{{{
     25GLIB_SRC_PATH=e:/coding/nom/glib/glib-2.16.1
     26SDK_glib2_FROM_NOM=yes
     27}}}
     28
     29
     30=== kBuild ===
     31
     32The build system is [http://svn.netlabs.org/kbuild/wiki kBuild].  Until kBuild 0.1.3 is released and a .msi package has been created (yeah, dream on), we will be using it in the self-contained fashion. This means that we'll have to check out the {{{trunk/kBuild/}}} directory from the kBuild subversion repository. You can check this out standing in the NOM trunk (just make sure it goes into a subdirectory), or you can give it its own place outside the NOM tree. Whichever you choose, run the following to get the stuff:
     33{{{
     34svn co http://svn.netlabs.org/repos/kbuild/trunk/kBuild kBuild
     35}}}
     36
     37After checking out kBuild, you will have to make sure that you have some easy way of getting to {{{kBuild\bin\win.x86\kmk.exe}}} from the command line. There a number of options:
     38  * Add it the {{{kBuild\bin\win.x86}}} directory to the '''PATH''' by editing the user environment (My Computer -> Properties -> Advanced -> Environment).
     39  * 4NT users could create an '''alias''' {{{kmk=d:\wherever\kBuild\bin\win.x86\kmk.exe}}}.
     40  * Or run '''kBuild\envwin.cmd''' to create a new shell instance with the changed 'PATH'.
     41
     42The last option is currently the most common one. Note that {{{kBuild\env.cmd}}} has a number of options that can be useful for scripting and such (like {{{--full}}}).
     43
     44Note. If you're on a 64-bit windows system (AMD64 not IA64), you should replace the '.x86' with '.amd64' in the above paths, such that you'll end up with {{{kBuild/bin/win.amd64/kmk.exe}}}
     45
     46== Compiling It ==
     47
     48To compile enter the NOM '''trunk''' directory and run:
     49{{{
     50kmk
     51}}}
     52
     53Compilation should succeed without errors. You will find the result in {{{.\out\win.x86\release\installed}}}.
     54
     55If you get the errors like "'kmk' is not recognized as an internal or external command, operable program or batch file." or "4NT: Unknown command "kmk"",  go back a step and make sure you've setup kBuild correctly.
     56
     57=== Build Types - debug and release  ===
     58
     59By default kBuild will create a '''release''' build for you. For development and debugging it is recommended to use a '''debug''' build. You select this by the '''KBUILD_TYPE''' variable. You can either specify it on the '''kmk''' command line like this:
     60{{{
     61kmk KBUILD_TYPE=debug
     62}}}
     63Or you can set it in the shell environment like this:
     64{{{
     65set KBUILD_TYPE=debug
     66kmk
     67}}}
     68
     69The output from a debug build can be found in {{{.\out\win.x86\debug\installed}}}.
     70
     71KBUILD_TYPE can also be set to '''release'''.
     72
     73
     74== Misc information ==
     75
     76=== Garbage Collector ===
     77
     78NOM uses garbage collected memory only. Go to [http://www.hpl.hp.com/personal/Hans_Boehm/gc/index.html] if you want to learn more about the GC. The GC will be statically linked to the NOM runtime.
     79
     80
     81=== IDL Compiler ===
     82
     83The IDL compiler used for the object system is named ''nom-idl-compiler''.
     84
     85
     86=== NOM Kernel and Runtime ===
     87
     88No further info.
     89
     90
     91=== Test program ===
     92
     93The executable ''nom-test'' performs some basic tests of the object system.
     94To run (from a 32-bit release build):
     95{{{
     96.\out\win.x86\release\installed\bin\nom-test.exe
     97}}}
     98
     99Running it shouldn't show any errors.
     100