|
Compiling The Source Code for Seamless3d Using the Free Microsoft Visual C++ 2005 Express Compiler
VC 8 express Download the ISO file for the Visual C++ 2005 Express Edition compiler from the Microsoft site: http://msdn.microsoft.com/vstudio/express/support/install Be sure to download the C++ compiler and not to confuse it with the C# compiler and be sure to download the manual download (not the automatic) from the above URL so that you can reinstall it again and again in the future. After the ISO file has been downloaded burn it onto a CD (recommended) or instead the files can be extracted from the ISO file using ISO Buster as shown in the instructions from the same URL above. Install VC8 by Inserting the CD into the CD drive and follow the prompts. MASM32 (Microsoft Macro Assembler) Download the MASM32 from: http://www.masm32.com Click on the link (Download MASM32 Version 9 ) at the top of the page and select a country closest to you to download the file m32v9r.zip unzip the file and run the setup.exe file. Once the installer has done it's thing we can exit the DOS window (Alt+C) because all we want is the ML.exe file. Open the masm32 folder which will be located in your root drive and copy the ML.exe file from the masm32\bin folder into the folder: Program Files\Microsoft Visual Studio 8\VC\bin The masm32 folder can be deleted. Win32 SDK Install the Win32 SDK (Windows® Server 2003 R2 Platform SDK Web Install) from the Microsoft site: http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en click the download button for PSDK-x86.exe and run it after it has download. Only a fraction of these components will be required for seamless but since I am not sure exactly what is needed install the default components. DirectX 9 SDK Download the DirectX 9 SDK file from the Microsoft Site: http://msdn.microsoft.com/directx/sdk and install the exe set up file by double clicking on it and following the prompts. VC8++ Directories To set VC8 to know where the Win32 and DirectX9 header and lib files are we must: From the Tools menu select Options ![]() Expand Projects and Solutions and select VC++ Directories ![]() Executable files In the "Show directories for" drop down menu select "Executable files" (if it's not already selected) ![]() To add a new directory entry click on this button: ![]() If not already added add the following entry to add the the Win32 SDK bin directory: $(Program Files)\Microsoft Platform SDK\Bin Add another entry to add the bin\86 folder for the DirectX 9 SDK Mine looks like this: C:\Program Files\Microsoft DirectX SDK (December 2005)\Utilities\Bin\x86 However your's will likely be different according to the year and month you installed the SDK Use the browse button: ![]() to locate the folder on your computer (go to the root folder then "Program Files" etc.) Include files In the "Show directories for" drop down menu select "Include files" ![]() and add the following entry: $(Program Files)\Microsoft Platform SDK\Include for the Win32 SDK Include files and add the following entry: C:\Program Files\Microsoft DirectX SDK (December 2005)\Include for the DirectX9 SDK Include files (remember this folder will be a little different on your computer) Library files In the "Show directories for" drop down menu select "Library files" ![]() and add the following entry: $(Program Files)\Microsoft Platform SDK\Lib for the Win32 SDK Include files and add the following entry: C:\Program Files\Microsoft DirectX SDK (December 2005)\Lib\x86 for the DirectX9 SDK Lib files (remember this folder will be a little different on your computer) Change corewin_express.vsprops for Linking Win32 and DirectX 8.1 Make a copy of the file corewin_express.vsprops in the folder: Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults by renaming it to: original_corewin_express.vsprops and replace the original file with this file: dx_8.1_corewin_express.vsprops Rename this file back to the original name: corewin_express.vsprops Seamless3d Source Files Download the seamless3d_editor_source.zip file from the Seamless3d source code page. unzip the seamless3d_editor_source.zip files into a folder and name the folder seamless3d_editor_source zlib Files Go to the zlib home site www.zlib.net Half way down the page you will see: "The current release is publicly available here:" Download a file from this section that is the nearest country to you. unzip the contensts of the file into a sibling folder of the seamless3d_editor_source folder and name it zlib Compile the Files run VC8 and select from the file menu: open/project/solution Open the file seamless3d.vcproj from the seamless3d_editor_source folder from the build menu select Build Solution ![]() from the debug menu select Start Debugging ![]() and seamless should run as a result in Debug mode (slower than Release mode) To compile seamless using Release mode so that the code is optimized for speed and size go to the Build menu and select: configuration manager in the active solution configuration drop down menu select: Release now when you build it will build the same seamless that I uploaded for users but for developing scripts we will want to compiler seamless in debug mode so that we can single step code and inspect the values of variables. Compile for DirectX 9 To compile for DirectX 9 do the same to change the corewin_express.vsprops file except use dx_9_corewin_express.vsprops from my site instead of dx_8.1_corewin_express.vsprops and from the Project menu select: Seamless3d Properties expand Configuration Properties expand C/C++ Properties Select Preprocessor In preprocessor definitions change DX8 to DX9 Note if you want to compile for DirectX9 for both Debug and Release mode, DX8 must be changed to DX9 for both Debug and Release settings. Now the compiler will compile seamless to use DirectX9 Copyright © 2000-2006 Graham Perrett thyme@seamless3d.com |