PDA

View Full Version : OJP SDK Project File Upgrade to VS2005


razorace
06-11-2006, 03:04 PM
I've been thinking about it and I think it would be a good idea to update the project files so that they'll be compatible in VS2005. Right now, the SDK doesn't work in VS2005 without some modifications. I'm concerned that this is going to present an obsticle to new users.

Plus, if I upgrade the project files, it should, in theory, be easier to set things up for use on new systems (assuming everyone uses the same folder locations as I do).

Any objections?

Vruki Salet
06-11-2006, 06:40 PM
Is this going to effect how it works with older VSs?

razorace
06-11-2006, 07:58 PM
I don't think it will affect anyone that already has it set up on their system.

The current project files on the repository are ancient and won't work "off-the-shelve" anyway. When I do this I'll include my up-to-date vs2003 project files, but they will be renamed and not updated after the switch.

Vruki Salet
06-11-2006, 08:10 PM
OK sounds great.

Sushi_CW
06-12-2006, 02:23 AM
I approve. VS2005 will work better for me anyway... once I get my CVS connection set up properly. Haven't had time to do that yet. :)

Master_Luke
06-12-2006, 05:57 AM
I also think that with VS2005 will be better,because when i use VS2005 with the current SDK it gives atleast 5-6 errors.

Vruki Salet
06-13-2006, 01:26 PM
Does anyone know how to open the project and compile it with dev-cpp? Is that possible? ms dev studio (.net 2003) is acting like such a pig. It bogs everything down and after it runs for a while I have to reboot my computer. This is with a G of RAM. Makes me feel like it's 1998 or something.

ensiform
06-13-2006, 01:36 PM
well you really cant without having seperate dev-c++'s open at once and if u modify a file thats used by multiple ones it will bitch at you to say yes to accept changes in the other windows. its just a hassle, can be done though and u need the gcc patches.

what are the advantages of vs2005 over 2003?

Vruki Salet
06-13-2006, 01:39 PM
Why is it necessary to open multiple instances of devc++?

ensiform
06-13-2006, 01:53 PM
because.

one for botlib, one for cgame, one for game, and one for ui... duh. dev-c++ cant do solutions like vc can.

razorace
06-13-2006, 02:24 PM
what are the advantages of vs2005 over 2003?
Runs faster in debug mode.
Allows you to apply code changes without performing a break on the program.
Various tweaks and such.

Vruki Salet
06-13-2006, 03:38 PM
because.

one for botlib, one for cgame, one for game, and one for ui... duh. dev-c++ cant do solutions like vc can.

Oh, ok.

razorace
06-14-2006, 02:43 PM
FYI, all the project files have now been commited. Let me know if there's any problems.

Sushi_CW
06-15-2006, 08:06 PM
I can't get anything to compile except in Debug mode...if I do, I get the following about 100 times.

error C2059: syntax error : 'type'
game\q_shared.h:1297

I've traced the problem to having something to do with the way that my copy of VS2005 (Express Edition) handles the "VS2005" flag. Apparently, it isn't recognizing it, at least for me.

And yes, I updated my CVS recently. 10 minutes ago. :)

My current goal is to get at least cgame and game to compile to "Final" before I even try to mess with anything.

razorace
06-15-2006, 09:04 PM
Oops, I didn't configure the Final build configuration to have the VS2005 tag in the preprocessor. I'm working on changing the project files now.

EDIT: As of now, all the project files have been updated. Update and give it another shot.

Sushi_CW
06-15-2006, 09:49 PM
I just did... everything works. Thanks!

I did notice, however, that the "Final" DLLs end up in the same place as the "Debug" DLLs. It caused momentary confusion, but fortunately isn't a real problem.

razorace
06-15-2006, 10:44 PM
I did that so that you only need one copy of the other mod assets for debugging purposes. Having two copies would get messy. :)

Atska
07-24-2006, 03:09 PM
In each project. Clic with right mouse button, go to properties

then, Configuration Properties / C/C++ / Command Line

and add this in the text area

/D _CRT_SECURE_NO_DEPRECATE
/D _CRT_NONSTDC_NO_DEPRECATE
/D _USE_32BIT_TIME_T /wd4996 /wd4005

That will cut all deprecated Errors and warnings

Search in the Solution about this function "float powf ( float x, int y );"

and add below this "#undef powf" and that will solve the 'type' error in q_shared.h

the last error ur gonna have is about redefinition
locate which variables got Redefined and add this

#ifndef <DEFINITION NAME>
#define <DEFINITION NAME>
#endif

With that, source code works

JRHockney*
07-25-2006, 02:08 AM
and add below this "#undef powf" and that will solve the 'type' error in q_shared.h

That didn't work.

I tried this:
#if defined(_WIN32) && !defined(VS2005)
//#ifdef _WIN32
//[/VS2005]
//
//#if !MAC_PORT //This should also work for the MAC port, so I'm commenting this out for now.
//
float powf ( float x, int y );
#undef powf
#endif

and I still got the same q_shared.h "type" error at that line. I also tried putting it above it like this:

#undef powf
float powf ( float x, int y );

and I got rid of the type errors for the shared.h but a ton of warnings on other random things. What am I doing wrong?

Atska
07-25-2006, 07:38 PM
Well

I maded a tutorial for update the SDK, it will help you.

http://z3.invisionfree.com/TheJediPurge/index.php?showtopic=5

razorace
07-26-2006, 01:27 AM
Does this actually fix the issues with OJP not compiling in Express? If so, what different changes did you make?

JRHockney*
07-26-2006, 04:11 AM
Ok, I got most of it to compile, but I am stuck at the redefinition part. It says that the part that needed redefiniting is "afxres.h". I ran a search on it and found it in the following places:
G:\Documents and Settings\John\Desktop\Basic\source\win32\JK2cgame. rc(10):#include "afxres.h"
G:\Documents and Settings\John\Desktop\Basic\source\win32\JK2cgame. rc(37): "#include ""afxres.h""\r\n"
G:\Documents and Settings\John\Desktop\Basic\source\win32\JK2game.r c(10):#include "afxres.h"
G:\Documents and Settings\John\Desktop\Basic\source\win32\JK2game.r c(37): "#include ""afxres.h""\r\n"
G:\Documents and Settings\John\Desktop\Basic\source\win32\ui.rc(10) :#include "afxres.h"
G:\Documents and Settings\John\Desktop\Basic\source\win32\ui.rc(37) : "#include ""afxres.h""\r\n"

I tried to go to these files and do the redefinition thing, but when I tried to open any of the win32 "rc" files it said that editing is for these files is not supported in VC Express C++. Is there a way around this, or am I screwed?

razorace
07-26-2006, 01:44 PM
just edit them like they are text files in wordpad or notepad.

Atska
07-26-2006, 01:59 PM
No, That .rc files are useless for VS2005, Just delete the folders called Win32 in JK2cgame, JK2game and ui projects



http://i97.photobucket.com/albums/l213/kreviatsu/Jedi%20Academy%20SDK/step_10_win32_remove.jpg

If we try to compile again our solution, now it will return a new error about a file (afxres.h)
This source is useless for VS8, so we dont need it. And how to delete this error?

Easy, in the solution explorer, delete all the folders called "win32" and the problem is solved

razorace
07-26-2006, 10:13 PM
What exactly do .rc files supposed to do anyway? I never got that.

JRHockney*
07-26-2006, 10:33 PM
I got it to compile!!!!(or at least debug right, since I havent made any changes worthy of a final) You da man, Atska! I've been trying to get that to compile for weeks! I should mention that I ended up having to put the libs file in the source folder to make it work since there is no "codemap" folder in OJP Repository.

JRHockney*
07-27-2006, 11:11 AM
Can somebody tell me where to find the new DLL after you build a final version in Express? I thought it was at the "final" folder, but the jampexe86's dont say dll and they are only a few KB big.

Sushi_CW
07-27-2006, 12:45 PM
The final DLLs still show up in the debug folder. :)

As far as .rc files, they were files used primarily by older versions of Visual Studio to hold "external" resources like images, string tables, and icons together. I've never found them useful myself.

Atska
07-27-2006, 02:04 PM
You da man, Atska!

Girl... lol,

And im happy that you can compile it now without problems :lol:

razorace
07-28-2006, 12:27 AM
Can somebody tell me where to find the new DLL after you build a final version in Express? I thought it was at the "final" folder, but the jampexe86's dont say dll and they are only a few KB big.
So, what exactly did you have to do to make it compile correctly?

JRHockney*
07-28-2006, 02:21 AM
Girl... lol,

A girl that likes Jedi academy and knows files and code well enough to do a tutorial for Compiling for VC++ Express?!!! Will you marry me?! LOL! :p

So, what exactly did you have to do to make it compile correctly?

I mostly just read Atska's tutorial in the link she posted except the parts she said to do differently here. If you want me to list it in detail for other people, I probably could when I have time.

razorace
07-28-2006, 03:11 PM
A detailed listing would be great. Maybe I could make changes to the files so that they wouldn't have to be done manually.

JRHockney*
07-29-2006, 03:24 AM
Hmm, maybe I'll just strings several parts of different posts together into one and add a few things since most of my info came from other people.

Darth_Tempust
08-03-2006, 12:28 PM
hey guys, i need help with using the JA SDK with visual C++ 2005 Express.

i'm very new to coding and stuff, and before i even try to edit things, i want to be able to compile the original.

i followed the tutorial, but i get:

c:\program files\microsoft visual studio 8\vc\include\math.h(454) : error C2059: syntax error : 'constant'

and i also get:

c:\documents and settings\{myaccountname}\desktop\sdk\codemp\game\q _shared.h(1242) : error C2059: syntax error : 'type'

and the link to the lib files is not working either.

can someone please help?

JRHockney*
08-03-2006, 02:02 PM
hey guys, i need help with using the JA SDK with visual C++ 2005 Express.

i'm very new to coding and stuff, and before i even try to edit things, i want to be able to compile the original.

i followed the tutorial, but i get:

c:\program files\microsoft visual studio 8\vc\include\math.h(454) : error C2059: syntax error : 'constant'

and i also get:

c:\documents and settings\{myaccountname}\desktop\sdk\codemp\game\q _shared.h(1242) : error C2059: syntax error : 'type'

and the link to the lib files is not working either.

can someone please help?

I'm not sure about the "constant" error, but that "type" error I got rid of by searching out "float powf ( float x, int y );" It can be found in q_shared.h line(1298). I followed atska's advice about adding "#undef powf" under float powf ( float x, int y ); but that didnt work, so I tried it above it like this

#undef powf
float powf ( float x, int y );

and eventually it worked. I forget what else I did. I just checked it now, and that entire section is in grey. I would look up this page a bit and read everything Atska says in her posts and in her links for other clues on what might be wrong.

I'm assuming you did this already, right?:

"In each project. Clic with right mouse button, go to properties

then, Configuration Properties / C/C++ / Command Line

and add this in the text area

/D _CRT_SECURE_NO_DEPRECATE
/D _CRT_NONSTDC_NO_DEPRECATE
/D _USE_32BIT_TIME_T /wd4996 /wd4005"

Darth_Tempust
08-04-2006, 12:27 AM
ok, i have done everything and now i get the .dll's! YAY!

thanx everyone!

Sushi_CW
08-04-2006, 01:01 AM
You probably need to set your library and header include paths to include the lib files that aren't working. They should be in the latest version of the Windows Platform SDK. This thread might help:
http://lucasforums.com/showthread.php?t=167685

Darth_Tempust
08-04-2006, 02:40 AM
i was thinking, since the SP SDK isn't ever coming out, why doesn't someone make an MP mod that is like JA's SP?

like, play everything thats in SP in MP. :P

this way, it would be more easier lol and we wouldn't need the SP SDK. :P

razorace
08-04-2006, 05:57 AM
OJP does have a CoOp mode that is a work in progress.

Darth_Tempust
08-04-2006, 08:40 AM
OJP does have a CoOp mode that is a work in progress.

what is a CoOP mode? what will it do?

sorry for sounding dumb lol.

Maxstate
08-04-2006, 10:26 AM
You know, no offense or anything but most people that "try" OJP ask the same questions. They fire it up, see there are almost no servers available and judge the game on that, it's frustrating.

Coop mode is playing single player maps online.

Sushi_CW
08-04-2006, 08:23 PM
CoOp is one of the gamemodes you can select in OJP, just like FFA or Duel. It lets you play on some of the SP maps in MP.

razorace
08-04-2006, 10:36 PM
CoOp = Cooperative Play. Meaning that multiple players can play thru a singleplayer map together.

Darth_Tempust
08-05-2006, 12:55 AM
CoOp = Cooperative Play. Meaning that multiple players can play thru a singleplayer map together.


ahh yeah, cool. :P

but what i meant was, someone making an MP mod that is exactly like SP. like, you watch the intro, go through objectives, see cutscenes, like everything thats in SP. and making it nothing to do with a server. have it purely to do with the players pc, nothing else. :P

this way, no one would ever need the SP source code. they would only need the source code of the MP mod (that is exactly like SP).

razorace
08-07-2006, 04:35 PM
Right, the CoOp is able to work with just one player and with the cutscenes functioning.

Darth_Tempust
08-09-2006, 10:42 AM
cool, can't wait til it's complete! :P

Darth_Tempust
09-08-2006, 03:28 AM
well, now i have a new problem. i don't get the jampgamex86.dll when i build the solution. can someone help?

i tried following the make a mod readme, but all i can do is debug and not get the .dll

i see other mods have their own jampgamex86.dll so it has to possible. :(

razorace
09-08-2006, 03:46 AM
Running the mod in debug just drops a debug compiled version of your .dlls in your debug folder. As for a compile with the final compile settings, it really depends on how you got it set up. Try looking around in your linker settings to see if you can figure out where the files are getting dumped.

Darth_Tempust
09-08-2006, 04:29 AM
i get the uix86.dll and the cgamex86.dll, but not the jampgamex86.dll. it's not anywhere. all i get are those 2 dll's and .lib files.

razorace
09-08-2006, 04:33 AM
well, then it's either not building the game side at all or you got it floating around on your harddrive somewhere.