Building with an older Version of Visual Studio

From FreeAllegiance Wiki
Jump to navigationJump to search

Visual Studio 2008 and 2010 are the currently supported version for R6 development. The information for older version is kept here but has not been updated for R6.

If a development environment is already setup, please jump directly to the build instructions by clicking the appropriate link below:

#Visual Studio 6.0

#Visual Studio .NET 2002

#Visual Studio .NET 2003

#Visual Studio 2005/2008 Express

#Visual Studio 2005 SP1


Important notes regarding Express & Starter editions

  • You must also download and install the Windows SDK (iso) (web-install) and DX9 SDK (web-install)
  • In your Express/Starter edition of Visual studio, you have to add the SDK files to your VC++ Directories options manually:
    • Tools->Options...
      • Expand (+) Projects and Solutions->VC++ Directories
        • Select Executable files then add your Windows & DirectX SDK \bin paths, Select Include files, add your Win & DX SDK \include paths and lastly select Library files then add your SDK & DX's \lib paths. For your DX SDK lib path be sure to append x86 to the end. (i.e. G:\DX9\Lib\x86) Pay close attention to these directories, the DX SDK ones especially!
Click here to see a larger version
 
Click on the image to view a larger version. Popup.png
  • ATL/MFC is no longer available in the current Windows SDK, expect errors, you won't be able to build the AllSrv, AllSrvUI or AGC projects.
    • You can download an old Windows SDK and copy the include files from ...\include\Win64\mfc and ...\include\Win64\atl into your current Windows SDK include folder. (you can then build everything except AllServUI targeting x86)
  • Solution folders are not supported, expect errors immediately when you load, they are mostly harmless.


Info.png
Note For 2005 Express Users Only:

In this file (vs install location):

\VC\VCProjectDefaults\corewin_express.vsprops

replace this line:

AdditionalDependencies="kernel32.lib" />

with this line:

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" />

Visual Studio 6.0

Warn.png
Warning! This development environment is no longer maintained by the FAZ Development team.

The FAZ_R4 tag in SVN contains solution files suitable for building with the VS98 IDE, your millage may vary. Available also to you is the makefile build method. The root makefile reads ONE environment variable necessary for a successful build, %FEDROOT%.

  • Set this variable from a command prompt, it will be cleared out when Windows reboots.
    • Set it from My Computer as a System variable to get it to "stick", C:\>set FEDROOT=C:\alleg_src.
  • You need your entire environment's SDK's within the FEDROOT path in a folder named extern.


Info.png
Note If you set your FEDROOT as the path in the above example (C:\alleg_src) you should make a directory 'extern' in C:\alleg_src
  • Verify your extern directory contains the following structure:
		- DirectX SDK (Make file defaults to dx7)
dx7\
    include\
    lib\

		- DirectX SDK (optional)
dx9\
    include\
    lib\

		- The ICQ API
icqapi\

		- Site Builder Network SDK
		(MSXML includes and UUID.lib go here if not in vc\)
sbn\
    include\
    lib\
        nt50\

		- Your MS Visual Studio\Common\MSDev98\Bin files (or equivalent)
SharedIDE\
	Bin\
		IDE\

		- Your MS Visual C++ headers and libraries (or equivalent)
vc\
    atl\
       inc\
    bin\
    inc\
        sys\
    lib\
    MFC\
    	Include\
    	Lib\
    	SRC\
  • Open a command prompt and navigate to the root of the src directory
    • Like this Start->Run... fill the input line with cmd and press return key or click OK.
 C:\> cd folder_of_source
      C:\folder_of_source> cd src
      C:\folder_of_source\src> nmake 
  • Nmake.exe can be sent a number of optional arguments/targets to build different types of the binaries:
            full - specifies the default target (all) and deletes all the Objs for a complete rebuild

            debug= - on by default, makes binaries with debugging/trace information

            retail= - builds smallest fastest binaries possible

            VERBOSE= - Shows commands (breaks MC)

            ALLEGIANCE_DEV=1 - recommended you set this for any tests builds

            HTTP=1 - define this to enable the auth implementation

            USEASGS=1 - uses the ASGS auth stuff (Only if HTTP is defined)

            USEAUTH=1 - use the Zone auth stuff (Legacy)

            DXn=1 - Use DirectX n SDK instead of default (7)
  • Examples from a Command shell
C:\alleg_src\src>nmake retail=

The above example will build most of everything in alleg_src. Your executables will use the Allegiance/1.1 #Registry keys, find them in the /objs folder, you're done!.

These solution and make files are removed in R5.

Visual Studio .NET 2002

Warn.png
Warning! This development environment is no longer maintained by the FAZ Development team.
Edit.png
This section is a stub You can help by improving it!

These solution files are removed in R5.

Visual Studio .NET 2003

Warn.png
Warning! This development environment is no longer maintained by the FAZ Development team.
Edit.png
This section is a stub You can help by improving it!

These solution files are removed in R5.

Visual Studio 2005/2008 Express

Info.png
Note Download and install Service Pack 1 (2008) (exe)

It's very important to keep your development environment up to date.

  • Double click on the VS200n\Allegiance.sln in your checkout folder.
  • Find the drop down box in the toolbar near the top menu bar, make sure it says FZDebug
    • The FZRetail build flavor should only be used for releases.
  • From the Build menu click Build Solution (or press F7).
  • Your executables will use the Allegiance/1.1 #Registry keys, find them in the \objs9 folder for VS2008 or \objs for VS2005, you're done!.

Visual Studio 2005 SP1

Warn.png
Warning! This development environment is being deprecated in R6.


Info.png
Note Download and install Service Pack 1 (exe)

It's very important to keep your development environment up to date.

  • Double click on the VS2005\Allegiance.sln in your checkout folder.
  • Just like in #Important notes regarding Express & Starter editions, add your DirectX SDK lib\ARCH and \include.
    • Important: ARCH is either x86 or x64, you can use the $(PlatformShortName) macro, for example G:\DX9\lib\$(PlatformShortName)
  • Find the drop down box in the toolbar near the top menu bar, if it says Debug,change this to FZDebug
    • The FZRetail build flavor should only be used for releases.
  • From the Build menu click Build Solution (or press F7).
  • Your executables will use the Allegiance/1.1 #Registry keys, find them in the \objs folder, you're done!.