Skip to content

Commit f3b75d6

Browse files
committed
Small fixes regarding the setup process
1 parent 220d42d commit f3b75d6

File tree

1 file changed

+36
-35
lines changed

1 file changed

+36
-35
lines changed

WinBuild.md

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,85 @@
11
How to build NIX-MX on Windows
22
------------------------------
33

4-
Follow these steps to set up the development environment for the NIX Matlab bindings under Windows32/64 for Matlab 32bit
4+
Follow these steps to set up the development environment for the NIX Matlab bindings under Windows32/64 for Matlab 32/64bit
55

66
**Dependencies**
77
- download and install Visual Studio 12
88
- make sure you have a fork of [NIX](https://github.com/G-Node/nix) and [NIX-MX](https://github.com/G-Node/nix-mx)
9-
- get the latest [NIX Windows dependencies](https://projects.g-node.org/nix/), extract to [your path]\nix-dep\
9+
- get the latest [NIX Windows dependencies](https://projects.g-node.org/nix/), extract to [your path]/nix-dep/
1010

11-
**Build process for DEBUG build**
12-
- start cmd (NOT powershell!), move to [your path]\nix; create "build" directory, move inside
11+
- IMPORTANT: if you need the DEBUG instead of the RELEASE build, make sure you use the corresponding debug folders instead of the release folders and settings in all subsequent paths and scripts of these set up notes:
12+
13+
**Build process for RELEASE build**
14+
- start cmd (NOT powershell!), move to [your path]/nix; create "build" directory, move inside
15+
- if you need any other build than DEBUG (in our case RELEASE) on a 32bit windows, edit [your path]/nix-dep/nixenv.bat:
16+
edit PLATFORM from x86 to x64 if required
17+
edit CONFIGURATION from Debug to Release if required
1318
- to set up dependencies path variables for NIX cmake, run:
14-
`[your path]\nix-dep\nixenv.bat`
19+
`[your path]/nix-dep/nixenv.bat`
1520
- if working on a 32bit Windows, run:
1621
`cmake .. -G "Visual Studio 12"`
1722
- if working on a 64bit Windows, run:
18-
`set PLATFORM=x64`
1923
`cmake .. -G "Visual Studio 12 Win64"`
20-
- with Visual Studio open [your path]\nix\build\nix.sln
24+
- with Visual Studio open [your path]/nix/build/nix.sln
2125

22-
NOTE! Visual Studio builds by default with configuration "Debug" and "32bit"! If some other build is required, set BUILD->ConfigurationManager->Active solution configuration!
26+
IMPORTANT NOTE! Visual Studio builds by default with configuration "Debug" and "32bit"!
27+
- If some other build is required (in our case we need at least configuration "Release"), set BUILD->ConfigurationManager->Active solution configuration!
2328
- Build "ALL_BUILD"
24-
- within the cmd shell move to [your path]\nix\build\Debug
25-
- run again
26-
`[your path]\nix-dep\nixenv.bat`
29+
- within the cmd shell move to [your path]/nix/build/Release
2730
- run
28-
`[your path]\nix\build\Debug\TestRunner.exe`
29-
- within the cmd shell move to [your path]\nix-mx, create and move into "build" folder
31+
`[your path]/nix/build/Release/TestRunner.exe`
32+
- within the cmd shell move to [your path]/nix-mx, create and move into "build" folder
3033
- set the NIX root path;
3134
`set NIX_ROOT=[your path]/nix`
3235

3336
IMPORTANT:
3437
- do not use quotes in cmd!
3538
- do not use backslashes, only slashes! e.g. c:/work/nix; c:\work\nix will not work!
3639

37-
- run again
38-
`[your path]\nix-dep\nixenv.bat`
39-
- check, if the nix.dll library has been created in [your path]\nix\build\Debug
40-
- if yes, open [your path]\nix-mx\cmake\FindNIX.cmake
41-
- add "HINTS $ENV{NIX_ROOT}/build/Debug" to the "find_library(NIX_LIBRARY NAMES" statement
40+
- check, if the nix.dll library has been created in [your path]/nix/build/Release
41+
- if yes, open [your path]/nix-mx/cmake/FindNIX.cmake
42+
- add "HINTS $ENV{NIX_ROOT}/build/Release" to the "find_library(NIX_LIBRARY NAMES" statement
4243
- if working on Windows 32bit, run
4344
`cmake .. -G "Visual Studio 12"`
4445
- if working on Windows 64bit, run
4546
`cmake .. -G "Visual Studio 12 Win64"`
46-
- with Visual Studio open [your path]\nix-mx\build\nix-mx.sln
47+
- with Visual Studio open [your path]/nix-mx/build/nix-mx.sln
48+
- Set BUILD->ConfigurationManager->Active solution configuration to Release and the correct bit version!
4749
- Build "ALL_BUILD"
48-
- copy all of the following files into the [your path]\nix-mx\build folder; simply providing the directories to MatLab using "addpath" does not work
50+
- copy all of the following files into the [your path]/nix-mx/build folder; simply providing the directories to MatLab using "addpath" does not work
4951

50-
from [your path]\nix-dep\[x86/x64]\hdf5-1.8.14\bin (path dependent on the Windows 32/64 bit version)
52+
from [your path]/nix-dep/[x86/x64]/hdf5-1.8.14/bin (path dependent on the Windows 32/64 bit version)
5153

5254
`hdf5.dll, msvcp120.dll, msvcr120.dll, szip.dll, zlib.dll`
5355
54-
from [your path]\nix\build\Debug
56+
from [your path]/nix/build/Release
5557

5658
`nix.dll`
5759
58-
from [your path]\nix-mx\build\Debug
60+
from [your path]/nix-mx/build/Release
5961

6062
`nix_mx.mexw32 or nix_mx.mexw64`
6163
62-
- get some NIX files from the [your path]\nix\build\ test folder and NIX away!
64+
- get some NIX files from the [your path]/nix/build/ test folder and NIX away!
6365

6466

65-
**Alternate build process for RELEASE build**
67+
**Alternate build process for DEBUG build**
6668

67-
The build described above is for DEBUG which prevents the usage of msvcp120.dll and msvcr120.dll and requires the usage of msvcp120d.dll and msvcr120d.dll
69+
The build described above is for RELEASE which requires the usage of msvcp120d.dll and msvcr120d.dll and prevents the usage of msvcp120.dll and msvcr120.dll
6870

69-
To use the correct dlls, nix and nix-mx have to be built in RELEASE mode! For this:
70-
- replace "Debug" with "Release" in the nixenv.bat, use this to setup environmental variables
71+
To use the hdf5 debug dlls, nix and nix-mx have to be built in DEBUG mode! For this:
72+
- replace "Release" with "Debug" in the nixenv.bat, use this to setup environmental variables
7173
- run cmake
72-
- open sln, in Visual Studio set BUILD->ConfigurationManager->Active solution configuration to "Release" instead of "Debug"
73-
- re-run TestRunner.exe in folder "Release" instead of "Debug"
74-
- move to the [your path]\nix-mx\build folder
74+
- open sln, in Visual Studio set BUILD->ConfigurationManager->Active solution configuration to "Debug" instead of "Release"
75+
- re-run TestRunner.exe in folder "Debug" instead of "Release"
76+
- move to the [your path]/nix-mx/build folder
7577
- re-run the modified nixenv.bat
7678
- run
77-
7879
`$env:NIX_ROOT="c:/work/nix"`
79-
- open [your path]\nix-mx\cmake\FindNIX.cmake and add
80+
- open [your path]/nix-mx/cmake/FindNIX.cmake and add
8081

81-
"HINTS $ENV{NIX_ROOT}/build/Release" to the "find_library(NIX_LIBRARY NAMES" statement
82+
"HINTS $ENV{NIX_ROOT}/build/Debug" to the "find_library(NIX_LIBRARY NAMES" statement
8283
- run cmake
83-
- open sln, in Visual Studio set BUILD->ConfigurationManager->Active solution configuration to "Release" instead of "Debug"
84+
- open sln, in Visual Studio set BUILD->ConfigurationManager->Active solution configuration to "Debug" instead of "Release"
8485
- setup the rest like in debug mode

0 commit comments

Comments
 (0)