Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: Red Spot on April 23, 2009, 07:26:53 PM

Title: Visual Studio 2005
Post by: Red Spot on April 23, 2009, 07:26:53 PM
From:
Quote from: GSH on May 03, 2008, 12:58:10 AM
The readme files for 1.3pb3's DLLs note that the Visual Studio Express Editions are quite free, and are fully functional for making BZ2 DLLs. Heck, my laptop's got 2005EE on it, and has made private builds for testers when I've been off on vacation. As the readme says:
QuoteIf you do not have VS.NET, there is a free download from
http://msdn.microsoft.com/vstudio/express/ . You may also need the
platform sdk from
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
.  If you want to develop your own games, you may want to also
download the DirectX SDK from http://msdn.microsoft.com/directx/sdk/
For more info about how to download & install these, please see some
good reference sites like
http://www.codeproject.com/useritems/FreeVS2005Win32.asp
(The platform SDK has some convoluted steps to install, unfortunately)
VS2008's Express Editions bundle the Platform SDK, thankfully, but the install of the redistributable files is a bit of a pain for 2005SP1/2008.

-- GSH

The link redirects to VS2008. Is VS2005 still available somewhere?
I've been looking all over microsofts site but the links for VS2005 all redirect to VS2008 and any google results comes with the old links for VS2005, and those again redirect to VS2008 ...
Title: Re: Visual Studio 2005
Post by: Clavin12 on April 23, 2009, 07:44:01 PM
2008 is almost exactly alike 2005 except prettier
Title: Re: Visual Studio 2005
Post by: Red Spot on April 23, 2009, 07:48:46 PM
Perhaps so, but I dont like what it costs after 90 days.
Title: Re: Visual Studio 2005
Post by: AHadley on April 23, 2009, 08:17:57 PM
There must be some way to manually extend the trial, but as far as I'm aware this can't be done with any program and nobody here has ever done it, least of all me. It can't be done, I tell you!
Title: Re: Visual Studio 2005
Post by: Nielk1 on April 23, 2009, 08:28:47 PM
WAIT? 2008 has a time limit? Screw you M$...

All I had was a 2005 web installer so it won't help if they closed 2005 down.
Title: Re: Visual Studio 2005
Post by: Red Devil on April 23, 2009, 08:34:39 PM
I've been using it for months and it hasn't cost me a thing.
Title: Re: Visual Studio 2005
Post by: TheJamsh on April 23, 2009, 08:41:47 PM
same as RD, mines no trial edition.
Title: Re: Visual Studio 2005
Post by: GSH on April 23, 2009, 10:14:38 PM
I know I had a link to Visual Studio Express 2005 download a bit ago, but I can't find it right now. The epxress editions are always free, though VC++ 2008 Express Edition required me to send in an email address, and they'd send back a code. Not onerous. See http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express (http://en.wikipedia.org/wiki/Microsoft_Visual_Studio_Express) for more info.

DLLs built with VS2008 will (usually) require the Visual Studio 2008 runtimes also installed; build with 2005 to usually require 2005 runtimes. 1.3pb4/4a install the VS2005 runtimes as part of the installer. Next public release (ta5) installs both 2005 and 2008 runtimes.

-- GSH
Title: Re: Visual Studio 2005
Post by: Red Devil on April 23, 2009, 10:59:18 PM
Found a link here, but 2008 should be your first choice:

VS 2005 C++ Express:

http://download.cnet.com/Visual-Studio-2005-SP1/3000-10250_4-10618634.html

SDK:

http://download.cnet.com/Visual-Studio-2005-SDK/3000-2352_4-10730962.html
Title: Re: Visual Studio 2005
Post by: OvermindDL1 on April 24, 2009, 01:19:12 AM
I think Microsoft changed the guidelines so you can use the Express edition for one year (although I guess they may have changed it to 90 days), then you are supposed to pay.

I actually own the standard edition (I would like the Pro, hmm, speaking of which, I may ask GSH for a certain DLL or two from the pro edition of 2005 if he still has it...).
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: Visual Studio 2005
Post by: Red Spot on April 24, 2009, 11:00:21 AM
Installed 2008, it seems you have to register in 30days to receive support. Which is what confused me as the site said 90days and when you click the register button it brings you to a page with prices ...

Anyway, installed 2008 and have been reading the source code for pb4a and G66-v1.5, which is a bit easier in VS than in notepad :)
But when I try to build the MPInstant dll I get the following errors:
QuoteOutput Window      Compiling...
Taunts.cpp
SubMission.cpp
StratInstant.cpp
StartingVehicles.cpp
MPInstant.cpp
.\MPInstant.cpp(29) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
        E:\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen'
DllBase.cpp
Generating Code...
Linking...
   Creating library D:\z BZ AIP Modding WIP\BZ2 1.3pb4a Dll Source Code\Missions\\..\Build\Debug\mpinstant\mpinstant.lib and object D:\z BZ AIP Modding WIP\BZ2 1.3pb4a Dll Source Code\Missions\\..\Build\Debug\mpinstant\mpinstant.exp
DllBase.obj : error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: virtual bool __thiscall DLLBase::AddPlayer(unsigned long,int,bool)" (?AddPlayer@DLLBase@@UAE_NKH_N@Z)
..\..\Debug\missions\\mpinstantd.dll : fatal error LNK1120: 1 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.
Results      Build log was saved at "file://D:\z BZ AIP Modding WIP\BZ2 1.3pb4a Dll Source Code\Build\Debug\mpinstant\BuildLog.htm"
mpinstant - 2 error(s), 1 warning(s)

Does anyone know what I can/should do to get a working dll out of 2008 based on the pb4a sourcefiles ?

The 'fopen' warning is in a part for the logfiles in MPInstan.ccp. Should this be altered as the log suggested?
static void OpenLogfile(void)
{
if(logfpout == NULL)
logfpout = fopen("c:\\mpinstant.txt", "w");
}


For the error I think its the following bit from DLLBase.ccp:
bool DLLBase::AddPlayer(DPID id, int Team, bool ShouldCreateThem)
{
_ASSERTE(FALSE);
return false;
}

But have no idea what it means .....

What I also dont understand is that the log speaks of "2 error(s), 1 warning(s)", should I see the warning as error and warning, as the log only mentions 1 error and 1 warning, afaik ...

Also when I first opened the project I got the following warning, but figured I would just try rebuilding the dlls and see if that worked ... ahem ..
It seems it could not convert the missions.suo file:
(http://members.ziggo.nl/red_spot/VS2008-start.jpg)

Any help would be very much apreciated :)
Title: Re: Visual Studio 2005
Post by: Nielk1 on April 24, 2009, 08:12:14 PM
I would suggest using 2005 for those things made in 2005. As GHS said TA5 will use both and I can say the DLL source is from 2008 for those. Perhaps you should use 2005 till TA5's DLLs come out (if ever).
Title: Re: Visual Studio 2005
Post by: Red Spot on April 24, 2009, 08:29:28 PM
Well, this topic started cause I couldnt find VS2005....

edit:found something at http://www.softpedia.com/get/Programming/Other-Programming-Files/Microsoft-Visual-C-Toolkit.shtml
So far this seems like it is really VS2005 EE as the downloader has finished and is currently installing :)
Title: Re: Visual Studio 2005
Post by: Red Spot on April 24, 2009, 09:45:47 PM
In VS2005 the same error come up as in VS2008 when using the pb4a sourcefiles.
So I downloaded the last pb3 source files, to be exact: BZ2 1.3b67y.
Those did partially work, it created 3 dll's. Hower it added a d after the name of the project like for mpi it had mpinstantd.dll.
Besides that it is over 400kb where the dll's in pb4a and pb3 are under 100kb.
Title: Re: Visual Studio 2005
Post by: GSH on April 24, 2009, 09:49:36 PM
The 'd' variant is a sign that you've built a debug version of the DLL. That's larger, as it has no optimizations, etc. If you're developing a DLL and want to debug it, debug builds are very handy. However, you need to ship release & releaseeditor builds to end users.

-- GSH
Title: Re: Visual Studio 2005
Post by: Red Spot on April 24, 2009, 10:28:29 PM
Thanks GSH, that set me of looking at some other settings.
I found out that:
A)I was an idiot for just building debug dll's
B)I had to generate .pdb files (somehow?)
C)Create a folder in the debug folder called 'redist'
D)Copy the .pdb files over to it
E)Build proper dll's based on the pb4a source files

Still not sure if these actually work. And it also failed to build the deathmatch01.dll as it couldnt find windows.h ?
It also seems VS2005 couldnt properly link some other files from the debug folder, but besides warnings didnt cause any errors.
Weird ... :)

I think I know what I will be doing this weekend  :roll:
Title: Re: Visual Studio 2005
Post by: GSH on April 24, 2009, 10:32:28 PM
If you can't find windows.h, then you need to download the platform sdk from MS. See the readme included with the DLL source. VS2008 includes the platform sdk, finally.

As to .pdb files, they help debug. Don't need to worry about them, yet. The .pdb files inside the redist folder are smaller, and don't contain full source code-- they have 'good enough' info to get a callstack dump on a crash, but not more. If you're debugging on your machine, just set the output folder for the DLLs to where BZ2 uses DLLs, and you shouldn't need to copy the .pdb, especially the redist pdb. Ship the redist pdb to end users, though.

-- GSH
Title: Re: Visual Studio 2005
Post by: Red Spot on April 24, 2009, 11:04:50 PM
Thanks for the info GSH. Still got to work out how to do the debugging, but it does explain why my pb4a build mpinstant.dll's have a twice as large .pdb file as the ones that actually come in pb4a.
It however works ok, at least what a 15 minute session in dunes showed where I saw the ai kill my recy and 2 turrets with an overwelming force ... fun :)

If you happen to have it onhand, do you know any good beginner tutorials? Ones that give a quick&dirty introduction of how VS2005 works, possibly how the debugging works?
Title: Re: Visual Studio 2005
Post by: GSH on April 24, 2009, 11:09:38 PM
There's some more comments on how to debug in the 1.3techalpha5 source code dist, just released. (It's built for VS2008, etc). Other than that, google around.

-- GSH
Title: Re: Visual Studio 2005
Post by: Red Spot on April 25, 2009, 01:45:13 AM
Whats in the source files is exactly that what I didnt find in the tutorials I found online, that I should link the debugger to battlezone itself.

I just did a quick test to see if I could build dll's from the ta5 source files. The debugger dll's worked ok, than the other dll's failed.
Repeated the process but now created a folder named 'redist' in the 'debug\mission' folder, the dll's build without a single warning .. :)