Digital Paint Discussion Board

Development => General Development => Topic started by: Narga on September 18, 2012, 04:42:15 PM

Title: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 18, 2012, 04:42:15 PM
Whenever I try to upgrade the Paintball 2 project/solution file(s) I get a whole bunch of errors, not just when upgrading, but when compiling/building/debugging as well.

I tried just upgrading the solution file, but Visual Studio complains that I need to migrate the project files.

The version of Visual Studio I'm using is Visual Studio 2012 (Express Edition).

Edit: I've attached the migration log.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: ViciouZ on September 18, 2012, 06:10:07 PM
2008 and 2010 express editions work, so maybe get one of those installed as well and try using that. Also, post the errors. You will probably need to install the DirectX SDK and libpng/zlib to get paintball to compile, also either install libvorbis/libvorbisfile or disable the ENABLE_OGG define.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 18, 2012, 06:33:55 PM
2008 and 2010 express editions work, so maybe get one of those installed as well and try using that. Also, post the errors. You will probably need to install the DirectX SDK and libpng/zlib to get paintball to compile, also either install libvorbis/libvorbisfile or disable the ENABLE_OGG define.

OK, here's the migration log. I've attached it to this post and the original post.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 19, 2012, 03:04:24 PM
Also, I've tried Visual Studio 2010, that didn't work.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: jitspoe on September 19, 2012, 04:49:29 PM
Which file are you trying to open?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 19, 2012, 05:49:21 PM
Which file are you trying to open?

paintball2.sln.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: jitspoe on September 20, 2012, 08:24:25 AM
That's the old VC6.0 project.  Open the vcproj file instead.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 21, 2012, 04:00:33 PM
That's the old VC6.0 project.  Open the vcproj file instead.

Do you mean open paintball2.vcproj with Visual Studio 2012 or only migrate paintball2.vcproj? When I do the former I still get a whole ton of errors. When I do the latter then I have to migrate the solution file as well but I only get warnings when migrating and only one warning and one error when compiling.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 23, 2012, 08:48:47 PM
Also, post the errors. You will probably need to install the DirectX SDK and libpng/zlib to get paintball to compile, also either install libvorbis/libvorbisfile or disable the ENABLE_OGG define.

Do you mean open paintball2.vcproj with Visual Studio 2012 or only migrate paintball2.vcproj? When I do the former I still get a whole ton of errors. When I do the latter then I have to migrate the solution file as well but I only get warnings when migrating and only one warning and one error when compiling.

Would doing both of these solve the problem?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: jitspoe on September 24, 2012, 04:15:48 PM
Posting the errors won't solve the problem, but it will give us a clue as to how to help you solve it.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 24, 2012, 05:23:25 PM
Posting the errors won't solve the problem, but it will give us a clue as to how to help you solve it.

I was talking about Installing the DirectX SDK, libpng, etc.

I've attached the migration log I got when only migrating the solution and paintball2.vcproj.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 27, 2012, 09:39:13 PM
I would install the things that ViciouZ mentioned and install Visual Studio 2010. It's just that uninstalling Visual 11 (Professional) (beta) was a pain because instead of automatically uninstalling all the files, it just uninstalls one file so I have to uninstall the rest one at a time.

I'm scared that if I install Visual Studio 2010 and the things ViciouZ mentioned and they don't work I would have to go through the same, painful uninstallation process I went through for Visual Studio 11 (professional) (beta).

Uninstalling Visual Studio 2010, DirectX SDK, libpng, and libvorbis one at a time is OK, but uninstalling Visual Studio 2010, Microsoft SQL Server 2010 Command Line Utilities, Microsoft .NET Framework 4, Microsoft System CLR Types for SQL Server 2010, etc. one at a time is ridiculous.

Also, when I uninstalled Visual Studio 11 (professional) (beta) and installed Visual Studio 2012 (express), it said it was going to install Visual Studio 2012 (express) onto my other hard drive when it would normally install Visual Studio onto my C drive. What's even weirder is that I couldn't change the directory.

I got the feeling that I did not completely uninstall Visual Studio 11 (professional) (beta).
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on September 28, 2012, 10:18:42 PM
I installed Visual C++ 2010 and the upgrade log I got is included in the attached .zip file. I don't know if you can properly view it though.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on October 01, 2012, 11:01:57 AM
I installed the DirectX SDK. I think I have less errors when compiling. For some reason, the upgrade log complains that it can't find paintball.vcproj and gamex86 is unavailable.

On the bright side! I finally got the compiler log! I couldn't get it earlier because it wouldn't be created for some reason. Since it's a text file it should be visible in any text editor you want (I hope).

Unfortunately, I can't attach it to my post so you'll have to extract it from this .zip folder.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: jitspoe on October 01, 2012, 12:47:45 PM
You can ignore the paintball.vcproj / gamex86 warning.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on October 01, 2012, 01:43:01 PM
I downloaded libpng/zlib and libvorbis. I looked in the downloaded archives and noticed source files. Did I download the right file/archive?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: ViciouZ on October 01, 2012, 04:47:09 PM
Yup. Now extract them somewhere and add the "include" directories to your vc++ directory settings. google can probably help you with that.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on October 01, 2012, 10:16:09 PM
Now I keep getting a error that says "TargetPath does not match the Linker's OutputFile property value. This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile)."

How can I fix that?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Rick on October 01, 2012, 10:23:23 PM
After this you should throw together a little guide for others on how to do this ;)
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on October 16, 2012, 10:10:03 AM
I managed to find, download, and install Visual C++ 2008 (Express Edition). I didn't get that stupid "TargetPath does not match the Linker's OutputFile property value. This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName), and $(TargetExt) property values match the value specified in %(Link.OutputFile)" error when compiling.

Although I didn't get prompted to upgrade, I do remember getting an error of some sort but Visual Studio managed to open the project anyway.

Is there a certain version of DirectX SDK I need or can I just download the latest version?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: jitspoe on October 16, 2012, 10:16:55 AM
I'm pretty sure you can just get the latest version.  I don't remember what version I'm using offhand.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on October 17, 2012, 04:12:24 PM
OK, this is the build log I got when I built Paintball 2 in Visual C++ 2008. It is attached to this post.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on December 16, 2012, 01:04:17 AM
Now I get an error message that says "This application has failed to start because pthreadVC.dll was not found. Re-installing the application may fix this problem".
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: T3RR0R15T on December 16, 2012, 09:07:34 AM
I try to get visual studio 2012 working, if i have time (after christmas). I hope, i can explain how to do it after that.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on December 16, 2012, 10:52:20 AM
I try to get visual studio 2012 working, if i have time (after Christmas). I hope, i can explain how to do it after that.

I used Visual Studio 2008 because of the annoying "$(targetpath) doesn't match the linker's output directory" that I get in Visual Studio 2010 and newer. If anyone knows how to fix that annoying error then could you please tell me?
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: T3RR0R15T on January 13, 2013, 07:35:37 AM
I had time to test this and got it working with visual studio 2012 express (for windows desktop), but i have to disable SAFESEH (only for ref_gl) to compile it. If i try to compile it with SAFESEH, i got some LNK2026 errors ("insecure module for safeseh-image" at the files libpng.lib and zlib.lib) and two intellisense errors (identifier expected) at the line "typedef enum {false, true} qboolean;" in q_shared.h.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: ViciouZ on January 13, 2013, 07:47:47 AM
You can probably fix the first two by compiling zlib and libpng from source, it's been a while since they were updated in the paintball CVS.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: Narga on January 25, 2013, 11:39:08 AM
I heard that the C compiler in Visual C++ uses the original edition of C standard (from 1989) and Microsoft only keeps it for historical reasons. So people either have to compile the code as C++ (which probably makes the game slightly higher level, because after looking at a benchmark, I found that C is slightly faster than C++), use Intel's C++ compiler, or use the GCC.
Title: Re: Paintball 2 Project/Solution file(s) won't Upgrade.
Post by: T3RR0R15T on January 26, 2013, 09:54:20 AM
I tested it with compiling zlib and libpng from source. That worked for the dynamic link library (additional dll file), but i got a lot of errors while compiling it as a static link library (lib file). So i use it with the old zlib.lib / libpng.lib and disable SAFESEH for ref_gl at the moment. It's not the best solution, but enough for testing.



If anyone want to compile it (i installed the german version, so it is possible that the translation is not the best and some menus or options have other names):

1. Download and install Visual Studio 2012 Express for Windows Desktop (http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express).
2. Get the paintball2 source code (Sourceforge CVS or downloads page).
3. Open the file paintball2.vcproj (there may be an error message like "no program found to open this file", click OK and visual studio will start) and start the upgrade with OK. Visual studio shows you a migration log in your browser if it is done.
4. Go back to visual studio and change the Solution Configuration to "Debug" (dropdown, under the menu bar).
5. Open the file client.h [Solution Explorer --> Solution "paintball2" (2 projects) --> paintball2 --> Header Files --> client.h]. Search "#define OGG_SUPPORT" (without "") and change it to "//#define OGG_SUPPORT" (without "").
6. Make a right click on paintball2 [Solution Explorer --> Solution "paintball2" (2 projects) --> paintball2] and go to Properties. Then go to Configuration Properties --> General and change the Output Directory from "..\debug\exe\" to "..\". Close the properties window.
7. Make a right click on ref_gl [Solution Explorer --> Solution "paintball2" (2 projects) --> ref_gl] and go to Properties. Then go to Configuration Properties --> General and change the Output Directory from "..\..\debug\ref_gl\" to "..\..\". Close the properties window.
8. Make a right click on ref_gl and rename it to ref_pbgl.
9. Open the file string.h [Solution Explorer --> Solution "paintball2" (2 projects) --> paintball2 --> External Dependencies --> string.h]. Search "#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_MEMORY" (without "") and change it to "#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_STANDA" (without "").
10. Search in the same file (string.h) "#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_MEMORY" (without "") and change it to "#if defined(__cplusplus) && _CRT_SECURE_CPP_OVERLOAD_SECURE" (without "").
11. Make a right click on ref_pbgl [Solution Explorer --> Solution "paintball2" (2 projects) --> ref_pbgl] and go to Properties. Then go to Configuration Properties --> Linker --> Advanced and change the Image has Safe Exception Handlers setting from "Yes (/SAFESEH)" to "No (/SAFESEH:NO)". Close the properties window.
12. Try to compile it.

Visual studio 2012 saves the project as paintball2.vcxproj instead of paintball2.vcproj. Use that new file (with x in the name) to open it again.