Closed Bug 368711 (vc9-runtime) Opened 18 years ago Closed 17 years ago

Need method for copying runtime DLLs when building with VC9/"Orcas"

Categories

(Firefox Build System :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: netrolller.3d, Assigned: netrolller.3d)

References

Details

Attachments

(2 files, 1 obsolete file)

Currently, we avoid errors related to the lack of the Microsoft Visual C/C++ 8 runtimes by installing the runtime DLLs (msvcr80.dll and msvcp80.dll) automatically if they are missing. However, Visual C/C++ 9 (codename "Orcas") uses two new DLLs, called msvcr90.dll and msvcp90.dll, that are not picked up by the build script. We can solve this problem in 2 ways: 
1. (the quick-and-easy way) Add msvcr90.dll and msvcp90.dll to the Win32 build's makefile.in file. (But we will have to do this with the new DLLs each time Microsoft releases a new version of the runtimes.)
2. (the preferred way) Since the DLL files have standard names (with the syntax "msvc"+<runtime type ("p" or "r")>+<runtime major+minor version>.dll), we can probably make a script that automatically copies the correct runtime DLLs, recognized by name.

Also, we have to work out the behaviour of the runtime copying script when the runtime files are present on the system, but of a different revision than the ones to be copied (e.g. VC8 RTM vs. VC8 SP1), so that it recognizes which version is newer. It is not desirable that versions built with VC8 SP1 don't install correctly on systems that have VC8 RTM runtimes. Probably we should also check the version of the DLLs, not just the name.
Well, we copy whatever version of the DLLs is in WIN32_REDIST_DIR. I don't think we want complicated checks. I think that for the time being we should just switch msvcr80 or msvcr90 based on _MSC_VER.
From build/win32/makefile.in:

>ifdef WIN32_REDIST_DIR
>
>ifeq (1400,$(_MSC_VER))
>REDIST_FILES = \
>	Microsoft.VC80.CRT.manifest \
>	msvcm80.dll \
>	msvcp80.dll \
>	msvcr80.dll \
>	$(NULL)
>endif

From this, it seems that this only works if we are using VS2005. We shouldn't hardcode the _MSC_VER to check against, and neither should we hardcode the DLL names. Maybe we want to generate the DLL names according to the version.
> From this, it seems that this only works if we are using VS2005. We shouldn't
> hardcode the _MSC_VER to check against, and neither should we hardcode the DLL

Why not? We don't need an infinitely flexible system, nor generated filenames. Just put another block in there for VC9 and be done with it!
OK, I'm making a patch for that. Is it OK to add my name after "Contributors"? (Currently there is nothing after that. Is this due to the current version being the "Initial Code"?)
Yes, that's fine. That is probably the reason, plus people don't update contributors religiously.
This patch makes sure that the runtime files are copied when building with VC9. _MSC_VER is checked against "1500" because cl.exe is now version 15 (it was 14 in VC8)
Assignee: nobody → netrolller.3d
Status: NEW → ASSIGNED
Attachment #253366 - Flags: review?(benjamin)
Comment on attachment 253366 [details] [diff] [review]
Make runtime DLL copying work in VC9 builds

Oops. CVS didn't recognize the Unicode caracter in my name. New patch coming.
Attachment #253366 - Attachment is obsolete: true
Attachment #253366 - Flags: review?(benjamin)
The same patch, converted to UTF8 so that there is no Unicode error.
Attachment #253368 - Flags: review?(benjamin)
Comment on attachment 253368 [details] [diff] [review]
Second try. Don't mess up unicode characters this time.

Will someone review this patch? It has been a week since the last change on this bug!
Attachment #253368 - Flags: review?
Comment on attachment 253368 [details] [diff] [review]
Second try. Don't mess up unicode characters this time.

See http://benjamin.smedbergs.us/blog/2007-02-05/micah-wilkes-smedberg/ . You might want to switch the review request to Ted Mielczarek (ted.mielczarek).
Attachment #253368 - Flags: review?
Attachment #253368 - Flags: review?(benjamin) → review?(ted.mielczarek)
Comment on attachment 253368 [details] [diff] [review]
Second try. Don't mess up unicode characters this time.

Building with VC9?  Has the world gone crazy?
r=me
Attachment #253368 - Flags: review?(ted.mielczarek) → review+
Could someone check in this patch on the trunk? I think this should be in there.
Whiteboard: [checkin needed]
Checked in:
mozilla/build/win32/Makefile.in  1.6

Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Just tested and we are still not really there yet. DLLs are copied to dist/bin, but not to dist/firefox and the final installer. Patch coming in the new post.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
The patch.
Attachment #257846 - Flags: review?(ted.mielczarek)
Attachment #257846 - Flags: review?(ted.mielczarek) → review+
Could this be checked in? I assume so, from the r+ flag.
Status: REOPENED → ASSIGNED
Whiteboard: [checkin needed]
mozilla/xpinstall/packager/packages-win  1.315
Status: ASSIGNED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Flags: in-testsuite-
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: