Author Topic: Paintball 2 Project/Solution file(s) won't Upgrade.  (Read 8678 times)

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #20 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.

Narga

  • 68 Carbine
  • Posts: 401
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #21 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.

Narga

  • 68 Carbine
  • Posts: 401
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #22 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".

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #23 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.

Narga

  • 68 Carbine
  • Posts: 401
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #24 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?

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #25 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.

ViciouZ

  • Map Committee
  • Autococker
  • Posts: 2227
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #26 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.

Narga

  • 68 Carbine
  • Posts: 401
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #27 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.

T3RR0R15T

  • Map Committee
  • Autococker
  • Posts: 2593
Re: Paintball 2 Project/Solution file(s) won't Upgrade.
« Reply #28 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.