Compiling the JS DLL

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Compiling the JS DLL

Post by giwo »

This has been a bit of an ongoing issue, so I thought I would see if anyone has some thoughts.

Firstly, since the inclusion of XML to the Spidermonkey engine, a fresh JS source update from the CVS will not compile. Maarc has already given me a fix for this issue in the form of a mak file with the proper includes for the XML stuff (thanks Maarc!!!).

Secondly, I seem unable to get NMAKE into the path. VS.net did this for me automatically on install, but by running VCVARS, I can't get it to re-set this. Thus no compile :(

Third, compiling using the VS.net IDE seems to force users to have the MSVC7.1 dll (something we don't want to force on users IMHO).

Any help with the second two issues?
Scott
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

The second I might be able to help with, but it depends on your version. When I need to compile it, I go to Start->Programs->MS VS.Net 2003->Tools->Command Prompt. It'll bust out a command prompt with the right vars set. Notably, it does this:

%comspec% /k "D:\App\Development\Microsoft Visual Studio .NET 2003\Common7\Tools\vsvars32.bat"

Interesting that's it's vsvars32, not vcvars32 nowadays....

As for the third, a few more details on what you're doing. Is there a SLN or DSP for it now? Once I know that, I might be able to take a guess. If I were guessing blind, however, I'd suggest it's something to do with debugging (not a release build, so it might have ties to the DLL), or it's linking dynamically to VC7's runtime, not staticly.
punt
VIP
Posts: 244
Joined: Wed Mar 24, 2004 7:46 pm
Has thanked: 0
Been thanked: 9 times

Post by punt »

MS states somewhere on there web site that programs are responsible for including the msvcr7X.dll.

Perhaps someday they will including the runtime library with the OS, but when I was investigating this back on WF, that was what I got. If you use VS Net 2003 (regardless if a NET program or not), you wind up distributing the dll. One either can use mingw or VC 6.
Maarc
Developer
Posts: 576
Joined: Sat Mar 27, 2004 6:22 am
Location: Fleet, UK
Has thanked: 0
Been thanked: 0
Contact:

Post by Maarc »

If I were a betting man, the reason you could use VC6 and not worry, is for the opposite reason. VC6 and it's runtime DLL (that's what the DLL is, the C run time lib for a more recent compiler, I found 24 copies on my machine) have been around for a long long time, and probably are bundled in modern OS's/service packs.

Though funnily enough, something, at least, installed it into my System directory.
giwo
Developer
Posts: 1780
Joined: Fri Jun 18, 2004 4:17 pm
Location: California
Has thanked: 0
Been thanked: 0

Post by giwo »

Sorry, had to bust that post out quickly while I was on break at school.

As for the VSVars, yeah, I noticed it has changed *shrug*. I am able to get it to set the vars for a single command prompt, is there any way for it to set those permanently in my environmental vars, or must I do that manually?

punt: thanks for shedding light on that, I still have VC6 installed on my desktop, so I suppose I will just compile the DLL with that rather than using .net to compile it.

Maarc: When opening the .mak file in VS.net, it will convert it and create a .sln (along with half a dozen other files) for it. Upon doing so (and setting a couple options) it compiles wonderfully, just requiring that DLL.

Thanks guys :)
Scott
Post Reply