Main Page » Compiling in Windows


Revision as of 01:59, 7 October 2006
Deathstryker (Talk | contribs)

← Previous diff
Current revision
Deathstryker (Talk | contribs)
Compiling Scorched 3D (Step 6) - changed information to reflect recent changes
Line 1: Line 1:
-This tutorial is intended to aid in building Scorched 3D with Visual Studio (more importantly, Visual Studio 2005). If you are new to compiling, I suggest you start at Step 1. If you've compiled Windows Applications before, skip to step 6.+This tutorial is intended to aid in building Scorched 3D with Visual C++ (more importantly, Visual C++ 2005). If you are new to compiling, I suggest you start at Step 1. If you've compiled Windows Applications before, skip to step 6.
==Setup== ==Setup==
-'''Step 1- Download and install MS Visual C++ 2005 from Microsoft (free until November 2006, so hurry up)'''+=== Downloading ===
-Choose either 1 of those links, the one that suits more your needs+'''Step 1- Download and install [http://msdn.microsoft.com/vstudio/express/visualc/ MS Visual C++ 2005] from Microsoft'''
 + 
 +Choose either of these links, depending on your needs:
Line 13: Line 15:
[http://go.microsoft.com/fwlink/?LinkId=51410&clcid=0x409 Download web installer] (recommended from Microsoft but should only be considered by dial-up users) 2.9 MB + additional download [http://go.microsoft.com/fwlink/?LinkId=51410&clcid=0x409 Download web installer] (recommended from Microsoft but should only be considered by dial-up users) 2.9 MB + additional download
-When asked what to install, you only need to install the Graphical IDE to to merely get Scorched to compile which should be about 70MB.+When asked what to install, you only need to install the Graphical IDE to merely get Scorched to compile which should be about 70MB.
 +http://i59.photobucket.com/albums/g316/SmartSped84/Compile1.jpg
(Broadband) (Broadband)
Line 25: Line 28:
'''Step 2- Download & install the Microsoft platform SDK''' '''Step 2- Download & install the Microsoft platform SDK'''
 +Choose either of these links, depending on your needs:
(Dial-Up) (Dial-Up)
Line 30: Line 34:
[http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en Web installer download page] scroll until you reach the bottom and search for your processor architecture. (again this should only be considered by dial-up users) 1.2MB + additional download [http://www.microsoft.com/downloads/details.aspx?familyid=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en Web installer download page] scroll until you reach the bottom and search for your processor architecture. (again this should only be considered by dial-up users) 1.2MB + additional download
-When asked what to install, make sure to choose a custom install and select all options EXCEPT for ones having to do with Documentation, Sample Code, or any 64 bit options.+When asked what to install, make sure to choose a custom install and select all options EXCEPT for ones having to do with Documentation, Sample Code, or any 64 bit options (You can if you want but they aren't needed). Also, do NOT install
 +Register Environment Variables.
 +http://i59.photobucket.com/albums/g316/SmartSped84/SDK.jpg
(Broadband) (Broadband)
Line 37: Line 43:
[http://download.microsoft.com/download/9/7/a/97a5ac16-69ae-4672-b93e-40d66d77b278/5.2.3790.2075.51.PlatformSDK_Svr2003R2_rtm.img Download full installer CD-Rom IMG image] (again i recommend this) 409.9 MB [http://download.microsoft.com/download/9/7/a/97a5ac16-69ae-4672-b93e-40d66d77b278/5.2.3790.2075.51.PlatformSDK_Svr2003R2_rtm.img Download full installer CD-Rom IMG image] (again i recommend this) 409.9 MB
 +=== Configuring ===
-'''Step 3- go the VC menu tools, then go to options, the select Projects & solutions, then select VC++ directories'''+'''Step 3- Go the VC "Tools" menu item, then go to "Options", then select Projects & Solutions, then Select VC++ Directories'''
-Add the paths to the appropriate subsection:+Add the paths to the appropriate subsection ("Show directories for:"):
Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin
Line 71: Line 78:
In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here: In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:
-// WIN_APP.disabled = true;+ // WIN_APP.disabled = true;
-// WIN_APP_LABEL.disabled = true;+ // WIN_APP_LABEL.disabled = true;
-// DLL_APP.disabled = true;+ // DLL_APP.disabled = true;
-// DLL_APP_LABEL.disabled = true;+ // DLL_APP_LABEL.disabled = true;
Save and close the file and open Visual C++ Express. Save and close the file and open Visual C++ Express.
-==Compiling Scorched 3D (Step 6)== 
-'''Step 6- Open the scorched project file, scorched.sln (you must download all CVS files first) and convert it (only need to convert in VS 2005)'''+==Compiling Scorched 3D (Step 6)==
 + 
 +'''Step 6- Open the scorched project file, scorched.sln (you must download all CVS files first). If you're compiling a version earlier than v41, you'll be asked to convert it in VS 2005.'''
-'''Step 7- Choose either debug (there may be problems experienced when compiling using debug in VS 2005) or release (should be considered the default option) from the drop down at the top of the page.'''+'''Step 7- Choose either "Debug" (there may be problems experienced when compiling using debug in VS 2005) or "Release" (should be considered the default option) from the drop down at the top of the page for the Solution Configuration.'''
-'''Step 8- Right click on the scorched icon in the file viewer in the left hand side and choose Properties from the pop-up menu.'''+'''Step 8- Right click on the scorched icon in the Solution Explorer window on the left hand side and choose "Properties" from the pop-up menu.'''
Select "Debugging" and change the working directory to : ..\.. Select "Debugging" and change the working directory to : ..\..
-Select "Linker" then "input" and edit the additional dependencies...+Select "Linker" then "Input" and edit the "Additional Dependencies"
 +...
-Remove:-+<br>'''Remove''':-
- dxguid.lib (This is very important. If not removed, Scorched will crash when you try to run it.)+<br>dxguid.lib (This is very important. If not removed, Scorched will crash when you try to run it.)
-Add (if not listed):-+ 
- User32.lib+<br>'''Add''' (if not listed):-
- Gdi32.lib+<br>User32.lib
- ole32.lib+<br>Gdi32.lib
- Shell32.lib+<br>ole32.lib
- Advapi32.lib+<br>Shell32.lib
- Comdlg32.lib+<br>Advapi32.lib
 +<br>Comdlg32.lib
Line 109: Line 119:
'''Step 10 - Run it (F5)''' '''Step 10 - Run it (F5)'''
- +== Acknowledgments ==
- +
This tutorial was originally written by Brain Damage with changes and additions by Gavin and Deathstryker This tutorial was originally written by Brain Damage with changes and additions by Gavin and Deathstryker
 +
 +* [http://www.scorched3d.co.uk/phpBB2/viewtopic.php?t=2525&highlight=mysql discussion thread]

Current revision

This tutorial is intended to aid in building Scorched 3D with Visual C++ (more importantly, Visual C++ 2005). If you are new to compiling, I suggest you start at Step 1. If you've compiled Windows Applications before, skip to step 6.


Contents

Setup

Downloading

Step 1- Download and install MS Visual C++ 2005 from Microsoft

Choose either of these links, depending on your needs:


(Dial-Up)

Download web installer (recommended from Microsoft but should only be considered by dial-up users) 2.9 MB + additional download

When asked what to install, you only need to install the Graphical IDE to merely get Scorched to compile which should be about 70MB.

Compile1.jpg

(Broadband)

Download full installer CD-Rom ISO image (recommended by me but not from Microsoft) 445MB

Download full installer CD-Rom IMG image (recommended by me but not from Microsoft) 445MB


Step 2- Download & install the Microsoft platform SDK

Choose either of these links, depending on your needs:

(Dial-Up)

Web installer download page scroll until you reach the bottom and search for your processor architecture. (again this should only be considered by dial-up users) 1.2MB + additional download

When asked what to install, make sure to choose a custom install and select all options EXCEPT for ones having to do with Documentation, Sample Code, or any 64 bit options (You can if you want but they aren't needed). Also, do NOT install Register Environment Variables.

SDK.jpg

(Broadband)

Download full installer CD-Rom IMG image (again i recommend this) 409.9 MB

Configuring

Step 3- Go the VC "Tools" menu item, then go to "Options", then select Projects & Solutions, then Select VC++ Directories

Add the paths to the appropriate subsection ("Show directories for:"):

Executable files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin

Include files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include

Library files: C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib

Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the \vc\vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%\Local Settings\Application Data\Microsoft\VCExpress\8.0" if it exists before restarting Visual C++ Express Edition.


Step 4- Update the corewin_express.vsprops file.

One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and

Change the string that reads:

AdditionalDependencies="kernel32.lib" to

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Additionally, to subdue the deprecation warnings, you can change the VCCLCompilerTool line so that it reads:

<Tool Name="VCCLCompilerTool" PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"/>


Step 5- Enable Win32 Application Type

In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%\Microsoft Visual Studio 8\VC\VCWizards\AppWiz\Generic\Application\html\1033\".

In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:

// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;

Save and close the file and open Visual C++ Express.


Compiling Scorched 3D (Step 6)

Step 6- Open the scorched project file, scorched.sln (you must download all CVS files first). If you're compiling a version earlier than v41, you'll be asked to convert it in VS 2005.


Step 7- Choose either "Debug" (there may be problems experienced when compiling using debug in VS 2005) or "Release" (should be considered the default option) from the drop down at the top of the page for the Solution Configuration.


Step 8- Right click on the scorched icon in the Solution Explorer window on the left hand side and choose "Properties" from the pop-up menu.

Select "Debugging" and change the working directory to : ..\..

Select "Linker" then "Input" and edit the "Additional Dependencies" ...


Remove:-
dxguid.lib (This is very important. If not removed, Scorched will crash when you try to run it.)


Add (if not listed):-
User32.lib
Gdi32.lib
ole32.lib
Shell32.lib
Advapi32.lib
Comdlg32.lib


Step 9 - Build it (F7)


Step 10 - Run it (F5)

Acknowledgments

This tutorial was originally written by Brain Damage with changes and additions by Gavin and Deathstryker

Donate to Scorched3D Get it from CNET Download.com! 5 Stars