Search This Blog

Wednesday, February 8, 2012

Luxrender compile with VS2010

This documented is a guide to make development environment for Luxrender with VS2010. Because the guide to compile Luxrender in http://www.luxrender.net is based on VS2008, you may want to following instructions to compile it with the latest version of Visual Studio.

Note. This guide was tested with Luxrender x64, Windows 7 x64, and VS2010.

1. Check out sources from the repository

- You need a Mercurial client for this job

- Make an empty directory for the BASE
- Clone 3 sources into your BASE

- source: http://src.luxrender.net/lux/ destination: BASE/lux
- source: http://src.luxrender.net/windows/ destination: BASE/windows
- source: http://src.luxrender.net/luxrays/ destination: BASE/luxrays

2. Start the Visual Studio Command prompt

- You need to run x64 Win64 command prompt for x64 platform, otherwise you can run 32bit command prompt.

3. Goto BASE/windows

4. Run the appropriate build batch file

- Run getdeps.bat
- If you don't want to install OpenCL SDK, choose N3, N4 or A when you need to choose so that you don't have to download.
- Run build-vars.reg to register environmental variables
- Log out and log in for the changes to take effect

- Replace msvc-9.0 with msvc-10.0 in build-deps-*.bat
- Run build-deps-x64.bat
- It will make some errors while building FreeImage and LuxRays, since they are designed for VS2008.

5. Compile FreeImage

- Go to BASE\deps\x64\FreeImage3141\FreeImage and open FreeImage.2008.sln
- Convert the solution to VS2010
- Change run-time libraries to /MD for FreeImageLib, LibJPEG, LibMNG, LibOpenJPEG, LibPNG, LibRaw, LibTIFF, OpenEXR and ZLib
- Build Solution for Win64 Release

6. Compile Luxrender

- Go to BASE\windows

- Convert the solution to VS2010
- Build liblux for Win64 ReleaseNoOpenCL

- Build liblux

- You may want to change flex_on_path.bat and bison_on_path, since you may want to use flex and bison for Lux here.


- Add FreeImage.lib to Additional Dependencies


libboost_zlib-vc100-mt-1_43.lib
libboost_iostreams-vc100-mt-1_43.lib
libboost_thread-vc100-mt-1_43.lib


- Add ..\..\..\deps\x64\boost_1_43_0\stage\boost\lib to Additional library directories

..\..\..\deps\x64\FreeImage3141\FreeImage\Dist

- Build luxrender

No comments:

Post a Comment

Blog Archive