Imprudence:Compiling/1.4/Windows

From Kokua Wiki

Jump to: navigation, search

Windows compiling instructions for 1.4.x. Please correct any errors or missing information.

Visual Studio 2005 is the default compiler for Imprudence. Feel free to post about issues using it, the Express Editions, 2008, or 2010 in the development forums. Also, remember: Visual Studio is NOT the same thing as Visual C++ Express Edition (also called VCExpress)!

Contents

Necessary software

Optional

Downloading Source Code

Generating Build Files

Once the source is unpacked, the next step is to run the command to generate the project files. This will also automatically do a few things:

  1. Automatically download a bunch of software libraries and unpack them in the linden/libraries/ folder to be used later when compiling. This will take a while, depending on the speed of your internet connection, but the good news is it only has to download once, not every time you compile.
  2. Create project files to use for compiling with Visual Studio. CMake creates a separate directory for compiling and storing the project files. The exact directory name depends on your Visual Studio version.

Open up a cmd window (Start > Run > "cmd") and type:

   cd C:\imprudence\linden\indra
   
   python develop.py

(Note: you'll never use the --standalone flag on Windows.)

If you have multiple versions of Visual Studio installed, use the -G flag to specify a version to generate a solution for, e.g.: python develop.py -G VC80 where:

  • VC71 = VS2003
  • VC80 = VS2005
  • VC90 = VS2008

Or, browse to linden/indra/ directory and double-click on "develop.py.bat" to run it with ActivePython.

(Note: develop.py will always find a Visual Studio version before the VC++ Express Edition.)

Project files are generated in:

Compiling Imprudence

Now for the actual compiling! Compiling for the first time can take anywhere from 15 minutes to a couple of hours, so now'd be a good time to start thinking about that dirty laundry you've been puttying off doing (yes, we know about it!).

Visual Studio 2005

  1. After develop.py has completed, either browse to your newly created linden\indra\build-vc80 directory and double click on Imprudence.sln, or open the solution file directly from Visual Studio.

  2. The default StartUp Project should be "imprudence-bin" (you can tell because it's bold). If not, make it so by right clicking "imprudence-bin" and selecting "Set As StartUp Project".

  3. There will be three build options: Release, Debug, and RelWithDebInfo. We recommend building Release.

  4. Go grab some lunch, a full build takes a while.

  5. Your final compiled .exe and dlls are in \linden\indra\build-vc80\newview\release. You can run imprudence-bin.exe from within Visual Studio.

  6. If you want to run Imprudence outside of the debugger, run develop.py with python develop.py configure -DPACKAGE:BOOL=ON. A "package" project will be added to your solution, which will copy all the files needed to run Imprudence to a new "packaged" directory inside \linden\indra\build-vc80\newview\release.
Note: if you make any changes to the files in \linden\indra\newview, such as editing an xml file, you'll need to build the package project again to copy them over.

Visual Studio 2008

Visual Studio 2010

Currently under development! See Nicky Perian's repo on GitHub.

For build instructions; See Nicky Perian's User Page

Visual C++ 2005/2008 Express Edition

Generating The ChangeLog

The ChangeLog project requires git installed to run. If you don't have git already installed and added to your system PATH, see here for installing it, then add C:\Program Files\Git\bin (or whatever the path is to your git.exe application) to the bottom of Tools > Options > Projects and Solutions > VC++ Directories > Executable Files.

Compiling Windows Libraries

OPTIONAL! If you are feeling brave, you can compile the viewer's libraries for yourself. See User:McCabe/Win_build for Imprudence-specific library compile instructions (currently out of date). Any library not yet there can be found here.

Troubleshooting Errors

This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem

You don't have a high enough version of the VC++ CRT installed for a specific library/plugin/executable to be run. Compatible versions are included in two places:

Note that the Windows installer checks for the CRT and updates it if needed, but in rare cases the install might fail or become corrupt and you'll have to use the CRT's Repair option. If repairing fails, uninstalling/reinstalling the CRT usually works (this can be done from the control panel).

CMake 2.8.x errors on Windows Vista/7

Be sure you're running Visual Studio as an Administrator. The best way to fix is this to right click devenv.exe, select Properties, Compatibility tab, and check "Run this program as an administrator".

Boost errors using Visual C++ Express

There's a chance you might see something like:

Convert parameter 1 from 'void (__cdecl *) (const LLSD &)' const in 'boost:: slot <SlotFunction> &' not possible

You'll need to cast whatever's in the boost function as (boost::function<void (const LLSD &)>). See this forum thread for more info.

Error PRJ0019 when building

See this thread for an explanation and workaround.

Error: the command 'cmake' was not found

Reinstall CMake and add it to your system PATH.

AttributeError: 'WindowsSetup' object has no attribute '__name__'

develop.py isn't finding your version of Visual Studio. You need to specify it by using the -G command flag, e.g.:

python develop.py -G VC80 (or -G VC90 for 2008).

LINK : fatal error LNK1104: cannot open file 'user32.lib'

More than likely, you're using the VC++ Express Edition and it's trying to link using the cygwin version of link.exe rather than VC++'s. Make sure C:\cygwin\bin isn't in your PATH or your VC++ Executable options. Clear your CMake cache (delete your indra/build-*/CMakeCache.txt file) before running develop.py again.

LNK1181: cannot open input file 'libgstvideo-0.10.lib

If you see the error LINK : fatal error LNK1181: cannot open input file 'libgstvideo-0.10.lib CMake didn't find the right GStreamer library names (this was fixed in 1.2). Edit GStreamer.cmake with the right values, or right click imprudence-bin > Properties > Linker > Input > Additional dependencies and make sure these are the file names listed:

libgstvideo.lib
libgsttag.lib
libgstsdp.lib
libgstrtsp.lib
libgstrtp.lib
libgstriff.lib
libgstreamer-0.10.lib
libgstpbutils.lib
libgstnetbuffer.lib
libgstnet-0.10.lib
libgstinterfaces.lib
libgstdshow.lib
libgstdataprotocol-0.10.lib
libgstcontroller-0.10.lib
libgstbase-0.10.lib
libgstaudio.lib
libgstapp.lib

viewer_manifest.py errors at the end of a build on Windows

More than likely you'll see something like this:

27>------ Rebuild All started: Project: package, Configuration: Debug Win32 ------
27>Deleting intermediate and output files for project 'package', configuration 'Debug|Win32'
27>Generating Debug/touched.bat

... 

27>Processing relwithdebinfo/imprudence-bin.exe => imprudence.exe ... Traceback (most recent call last):
27>  File "/Imprudence 1.3.0 beta 1/linden/indra/newview/viewer_manifest.py", line 1113, in <module>
27>    main()

This is an error due to the "package" project that generates files for the installer in 1.3 b1. The files generate fine, but the error can be annoying. You can disable the "package" project by going to ALL_BUILD > Project Dependencies and unchecking "package."

BISON-NOTFOUND or FLEX-NOTFOUND

Also the cause of LINK : fatal error LNK1104: cannot open file '..\lscript\lscript_compile\Debug\lscript_compile.lib' when linking imprudence-bin.

You didn't install bison or flex when you installed cygwin. Install them, then delete \linden\indra\build-vc80\lscript\lscript_compile\lscript_compile.vcproj and run develop.py again. lscript_compile should now build.

Personal tools
Namespaces
Variants
Actions
Navigation
Wiki
Toolbox