[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In order to successfully compile the Crystal Space 3D Software Development Kit (SDK), you will need a copy of Microsoft Developer Studio 6 or the stand alone version of Microsoft Visual C++ 6, with additionally Service Pack (SP) 5 installed.
If you need help with Crystal Space and Visual C++ or just Crystal Space in general. You can subscribe and then post a message to the Crystal Space mailing list. To subscribe see the following site and fill in the form:
http://lists.sourceforge.net/lists/listinfo/crystal-main
Alternatively you can email the Win32 port maintainer directly at the following:
All the following libraries and Software Development Kits (SDK) unless stated are not required. However, if you choose not to install them, at compile time you must follow the documented instructions of how to unload these projects from the Crystal Space build process.
Before you attempt to compile Crystal Space, you must download and install `msvc_libs'. msvc_libs is a package containing all third party header, pre-built library and dll files used by Crystal Space, i.e. `zlib.dll', `libjpeg.dll', `png.dll' and `xmlparse.dll' etc. The latest version of the msvc_libs package `msvc_libs_0.90.zip' can be downloaded from:
ftp://ftp.sunsite.dk/projects/crystal/support/win32/msvc_libs_0.90.zip
Once you have downloaded the msvc_libs package, extract it too your `CS\' root directory.
In order to compile Crystal Space at its minimum i.e. the software render, requires you must have at least some form of the DirectX Software Development Kit (SDK) on your system.
Visual C++ 6 comes with the minimum DirectX SDK 5 files in-order to build Crystal Space.
To enable you to build Crystal Space to it optimum D3D support, you must download the latest DirectX Software Development Kit (SDK), which can be obtained from:
http://www.msdn.microsoft.com/directx
If you are unable to accomplish the 100+Mb (For the full SDK) or 43Mb (For the VisualC only parts of the SDK) download of the DirectX 8a SDK from the link above. You can obtain cut down older versions (6 & 7 with no documents or example code) of the DirectX SDK's from the following website:
http://www.multimania.com/noote/CrystalSpace
Thanks, to the miracle which is Microsoft. If you download and install the latest DirectX 8a Software Development Kit (SDK) and already have Visual C++ installed, it will ask you if you wish to add the paths to the SDK to Visual C++ so it can use it. We recommend you accept when offered this option. If it is not the latest SDK you install you will have to manually point Visual C++ to where you installed the SDK in-order for it to be used. This can be done from the Visual C++ file menu and selecting Tools->Options->Directories. You must add the paths for both the include files and libraries and being that we wish Visual C++ to see and use this new SDK before all possible others on your system, you must click on and drag both paths you have entered to the top of the list.
Crystal Space contains support for a Simple Direct Media Layer 2D canvas which can be used as an alternative to the default Direct Draw canvas for use with the Crystal Space software 3D renderer. To compile the SDL2D canvas you must have the supported 1.2.2 development runtime for your version of MSVC be it 5 or 6. Please remeber to add the `indlude' and `lib' directories to the global MSVC options, so MSVC can see them.
Also remember to copy the `sdl.dll' into the `CS\' root directory or at it to your systems path before using the SDL2D canvas.
For instructon on using a specific canvas including the SDL2D canvas 3.1 Common Command Line Options
Crystal Space contains support for Python scripting and thus has projects within it requires that Python be installed on your system. If you wish to compile with Python support you must install Python 1.5.2, which can be obtained from:
Note: Crystal Space currently only supports Python 1.5.2 and not a more recent version i.e. 2.0.
To successfully build the Crystal Space Alternate Windowing System (AWS) plugin with Visual C++ requires you have BisonFlex by http://www.fg-soup.com installed on your system. To download the version of BisonFlex for your Visual C++ version, use the corresponding link below.
For Visual C++ 6:
http://www.philipwyett.dsl.pipex.com/crystal_space/msvc/downloads/bfwizard-1.6.zip
Open `CS\mk\visualc\csall.dsw'.
In the left hand Workspace window click on the FileView tab at the bottom, then in the window look for and find the project plgaws.
Now expand the aws project in the tree and then the Resource Files directory.
Right click on `skinlang.flx' and click on Settings.
You will now be presented with the Project Settings dialog for that file.
Click on the Custom Build tab. In the text box Commands enter the following:
flex.exe -Plex_cpp -L -t ..\..\plugins\aws\skinlang.flx > ..\..\plugins\aws\sllex.cpp
Now in the Outputs text box enter the following:
..\..\plugins\aws\sllex.cpp
Next click on the General tab and check the box Always use the custom build step
Now just Ok out of that dialog box and do a Save all and re-build CS.
You need not compile all parts of Crystal Space. For example, if you don't want to use DirectX (DDRAW/D3D) for graphics or have Python scripting support, then you don't have to compile it. See the compilation instructions on how to remove the projects.
To compile Crystal Space, you'll have to perform the following steps. If anything doesn't work, see the Win32 FAQ, MSVC6 FAQ.
------------ Configuration: grpall - Win32 Debug ------------ grpall.lib - 0 error(s), 0 warning(s) |
The first app you should try is Walktest. This program shows many of the features of the 3D engine. You can run it by starting it from the windows explorer. It should be at `.../cs/walktest.exe'. Don't start it from other locations or from within Visual Studio. It won't find the required files if you do.
If you want to run a debug session, you first have to set the working directory. Open Project/Settings, select the appWalktest project, switch to the Debug tab and enter the base `CS\' directory as the working directory for debug sessions (for example, `C:\CS\'). Be sure to to this for Debug and Release builds.
You can now continue with the next platform-independent step. The remaining Windows-specific sections are only important when you want to compile your own application using Crystal Space.
Note: If you find bugs in the MSVC project or workspace files coming with Crystal Space, don't send fixes for these files to the developers. These files are generated automatically, so your fixes would be useless. Better, send a description of the bug to the mailing list.
The Crystal Space workspace is divided into several projects. They all exist as separate project files (`*.dsp'). All of them are being bound together by a workspace `csall.dsw'. This workspace will also ensure correct linking between the various projects.
The workspace uses a prefix system for naming the projects and grouping them. There are currently four prefixes in use. The prefix `grp' is used to group the projects into the three main categories: libraries, plug-ins, and applications. There is also a special group `grpall' that contains the three major groups `grplibs', `grpapps', and `grpplugins'.
The Libraries are C++ libraries that you can link into your own programs. Some of these libraries are part of the core of Crystal Space. You can find more information about this in 6. Libraries. Their output are `.lib' files.
The Plugins are also programming libraries, but they use a special mechanism called SCF as their interface to your program. This separates their interface from the internals of the library and thus allows dynamic linking. In fact, some of the Libraries also use SCF. The rule for the MSVC workspace is simple: The Plugins are projects that build a dynamic library (`.dll'). You can find more information in the section of this manual dealing with plug-in modules. See section 7. Plug-In Modules and Drivers.
The Applications are programs using some of these libraries, so they produce `.exe' files.
It is assumed that you have set up MSVC projects before. If you want to create a project using Crystal Space, you have two possibilities how to do this: You can either create the project inside the Crystal Space workspace, or you can create a new workspace. Either way, you have to do the usual setup, like adding the source files. In addition to this, you must perform the following steps.
This is the list of frequently asked questions for the Win32 port of Crsytal Space. Please consult this list if you are having difficulty building or using the project.
plugins\video\canvas\ddraw8\i_g2d.h(14) : error C2061: syntax error : identifier 'LPDIRECTDRAW7' plugins\video\canvas\ddraw8\i_g2d.h(16) : error C2061: syntax error : identifier 'LPDIRECTDRAWSURFACE7' |
A. You are not using the DirectX SDK 8 or higher. Either you have not installed the correct DirectX SDK, or you haven't told MSVC to use it instead of the older SDK included with MSVC. Either install the SDK correctly or unload the DirectX 8 related projects.
A. Those files are not part of the Crystal Space project, but they are required to build it. You must get a version of the following packages, most of which can be easily found on the Internet. You can download precompiled versions of these libraries i.e. msvc_libs or grab the source code and compile it yourself if you prefer. See section 2.3 External Libraries.
The resources from these packages should be placed in the following locations.
CS\libjpeg.dll CS\png.dll CS\zlib.dll CS\include\cssys\win32\jconfig.h CS\include\cssys\win32\jerror.h CS\include\cssys\win32\jinclude.h CS\include\cssys\win32\jmorecfg.h CS\include\cssys\win32\jpeglib.h CS\include\cssys\win32\png.h CS\include\cssys\win32\pngconf.h CS\include\cssys\win32\zconf.h CS\include\cssys\win32\zlib.h CS\libs\cssys\win32\libs\zlib.lib CS\libs\cssys\win32\libs\png.lib CS\libs\cssys\win32\libs\libjpeg.lib |
Note that the source code package generally already contains the files from the `include' and `libs' directories, so you may not have to bother with them. The CVS repository contains these files as well.
A. Build only the projects you will need. You must build all the Crystal Space libraries, however those you may not need can be unloaded (Right click on the project you wish unload from the build process and click on Unload). Be very careful when unloading projects as some of Crystal Spaces projects e.g. some plugins are dependant on others.
A. Just look above at the question about `zlib.h' and `png.h'. It's the same problem, and if you have already done what is explained there, I can't do much for you!
A. What kind of symbols?
In order to add (or remove) a library for the link process, invoke the Project/Settings/Link menu item, then select the "General" category tab.. There is a field called "Object/Library Modules" that lists all the libraries added to the project at link time.
OK, now it should link. So you should have an executable file called `walktest.exe' in your src directory. Let's run it!
A. When I start `walktest' I just get a black screen, maybe with some text output, but after a few seconds it drops back to the normal windows screen without an error.
This shouldn't happen any more, because in most cases now, `walktest' will display proper error messages. Anyway, you should make sure you have set an appropriate directory set (see above). Make sure you have specified the map file in `walktest.cfg' as `Walktest.Settings.WorldFile=' (also keep in mind, that your current directory is, where the executable sits.)
WARNING: could not load plugin `crystalspace.graphics3d.software' WARNING: failed to initialize plugin `crystalspace.engine.3d' FATAL: No iGraphics3D plug-in loaded! FATAL: No iGraphics2D plug-in loaded! Error initializing system! |
A. You probably did not compile everything. Compiling only the `.exe' file is not sufficient! You must also compile all plug-ins you want to use. In the above example the software renderer is missing.
If you are certain that everything is compiled, make sure your working directory is set to `CS\'. To do this go to the Project menu. Select Settings and go to the Debug tab. Change the debug executate to `X:\CS\appname' where `X:' is the drive letter where the Crystal Space project is installed. Next set the working directory to `X:\CS'. Click OK and you should be all set.
If after doing this, you are still getting the same error, make sure that you have the `zlib.dll' installed, the VFS plugin is dependent upon it.
A. Right click on the Direct3DRender project, and click Unload Project. It won't be compiled any longer after that. To reload it, right click on it and click Load Project.
A. When working with Crystal Space, always keep in mind, that this is a multiplatform project. So sometimes not all features will work correct on all platforms. Sometimes a specific port may even be broken due to changes in other ports. Since the introduction of CVS (see CVS) this is usually only for a short time, so if you got your version out of CVS, it usually pays off, to post a message describing the problems to the Crystal Space Mailing List describing you problem and include the exact error messages. If you wait a while, this will probably be fixed, or at least be worked around. See section 1.6 Mailing Lists.
A. Try sending a note to the Crystal Space mailing list and asking your question there. See section 1.6 Mailing Lists. Be sure to include any pertinent information, such as the operating system you are using, the compiler, which version of Crystal Space, and any special configuration information.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |