From 08d7abb8fb9ac1e5a3f2d68d528f59f762ff7eac Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 29 Oct 2009 23:21:23 +0000 Subject: [PATCH] version numbers on plugin dll's --- direct/src/plugin_activex/P3DActiveX.inf | 24 ++++++- .../{P3DActiveX.rc => P3DActiveX.rc.pp} | 69 +++++++++++-------- direct/src/plugin_activex/Sources.pp | 2 + direct/src/plugin_npapi/Sources.pp | 3 + direct/src/plugin_npapi/nppanda3d.rc | 42 ----------- dtool/Package.pp | 7 ++ 6 files changed, 76 insertions(+), 71 deletions(-) rename direct/src/plugin_activex/{P3DActiveX.rc => P3DActiveX.rc.pp} (64%) mode change 100644 => 100755 delete mode 100644 direct/src/plugin_npapi/nppanda3d.rc diff --git a/direct/src/plugin_activex/P3DActiveX.inf b/direct/src/plugin_activex/P3DActiveX.inf index cffb1d3f41..3ec50e6282 100644 --- a/direct/src/plugin_activex/P3DActiveX.inf +++ b/direct/src/plugin_activex/P3DActiveX.inf @@ -1,6 +1,9 @@ [Add.Code] P3DActiveX.ocx=P3DActiveX.ocx P3DActiveX.inf=P3DActiveX.inf +mfc71.dll=mfc71.dll +msvcr71.dll=msvcr71.dll +msvcp71.dll=msvcp71.dll [P3DActiveX.ocx] file=thiscab @@ -9,4 +12,23 @@ RegisterServer=yes FileVersion=1,0,0,0 [P3DActiveX.inf] -file=thiscab \ No newline at end of file +file=thiscab + +[mfc71.dll] +file=thiscab +DestDir=11 +RegisterServer=yes +FileVersion=7,10,3077,0 + +[msvcr71.dll] +file=thiscab +DestDir=11 +RegisterServer=yes +FileVersion=7,10,3052,4 + +[msvcp71.dll] +file=thiscab +DestDir=11 +RegisterServer=yes +FileVersion=7,10,3077,0 + diff --git a/direct/src/plugin_activex/P3DActiveX.rc b/direct/src/plugin_activex/P3DActiveX.rc.pp old mode 100644 new mode 100755 similarity index 64% rename from direct/src/plugin_activex/P3DActiveX.rc rename to direct/src/plugin_activex/P3DActiveX.rc.pp index 5fda0e1288..d8ca898886 --- a/direct/src/plugin_activex/P3DActiveX.rc +++ b/direct/src/plugin_activex/P3DActiveX.rc.pp @@ -1,27 +1,38 @@ +// +// P3DActiveX.rc.pp +// +// This file defines the script to auto-generate P3DActiveX.rc at +// ppremake time. We use this to fill in the DLL version correctly. +// + +#output P3DActiveX.rc notouch +/$[]/#### Generated automatically by $[PPREMAKE] $[PPREMAKE_VERSION] from $[notdir $[THISFILENAME]]. +/$[]/################################# DO NOT EDIT ########################### + // Microsoft Visual C++ generated resource script. // -#include "resource.h" +#$[]include "resource.h" -#define APSTUDIO_READONLY_SYMBOLS +#$[]define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxres.h" +#$[]include "afxres.h" ///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS +#$[]undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 +#$[]if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#$[]ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 +#$[]pragma code_page(1252) +#$[]endif //_WIN32 -#ifdef APSTUDIO_INVOKED +#$[]ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE @@ -34,7 +45,7 @@ END 2 TEXTINCLUDE BEGIN - "#include ""afxres.h""\r\n" + "#$[]include ""afxres.h""\r\n" "\0" END @@ -44,7 +55,7 @@ BEGIN "\0" END -#endif // APSTUDIO_INVOKED +#$[]endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -53,14 +64,14 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 + FILEVERSION $[P3D_PLUGIN_DLL_COMMA_VERSION] + PRODUCTVERSION $[P3D_PLUGIN_DLL_COMMA_VERSION] FILEFLAGSMASK 0x3fL -#ifdef _DEBUG +#$[]ifdef _DEBUG FILEFLAGS 0x1L -#else +#$[]else FILEFLAGS 0x0L -#endif +#$[]endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L @@ -69,15 +80,14 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "CompanyName", "Disney" - VALUE "FileDescription", "P3D ActiveX " - VALUE "FileVersion", "1.0.0.1" - VALUE "InternalName", "P3DActiveX.ocx" - VALUE "LegalCopyright", "Disney (c). All rights reserved." + VALUE "FileDescription", "Runs 3-D games and interactive applets\0" + VALUE "FileVersion", "$[P3D_PLUGIN_DLL_DOT_VERSION]" + VALUE "LegalTrademarks", "\0" + VALUE "FileOpenName", "Panda3D applet\0" VALUE "OLESelfRegister", "\0" VALUE "OriginalFilename", "P3DActiveX.ocx" - VALUE "ProductName", "Disney P3D" - VALUE "ProductVersion", "1.0.0.1" + VALUE "ProductName", "Panda3D Game Engine Plug-in $[P3D_PLUGIN_VERSION_STR]\0" + VALUE "ProductVersion", "$[P3D_PLUGIN_DLL_DOT_VERSION]" END END BLOCK "VarFileInfo" @@ -113,7 +123,7 @@ END // DESIGNINFO // -#ifdef APSTUDIO_INVOKED +#$[]ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_PROPPAGE_P3DACTIVEX, DIALOG @@ -124,7 +134,7 @@ BEGIN BOTTOMMARGIN, 55 END END -#endif // APSTUDIO_INVOKED +#$[]endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -143,12 +153,12 @@ BEGIN IDS_P3DACTIVEX_PPG_CAPTION "General" END -#endif // English (U.S.) resources +#$[]endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// -#ifndef APSTUDIO_INVOKED +#$[]ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. @@ -156,5 +166,8 @@ END 1 TYPELIB "P3DActiveX.tlb" ///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED +#$[]endif // not APSTUDIO_INVOKED + + +#end P3DActiveX.rc diff --git a/direct/src/plugin_activex/Sources.pp b/direct/src/plugin_activex/Sources.pp index 41e1f9a58f..e21314b2ba 100755 --- a/direct/src/plugin_activex/Sources.pp +++ b/direct/src/plugin_activex/Sources.pp @@ -36,3 +36,5 @@ #define INSTALL_HEADERS #end lib_target + +#include $[THISDIRPREFIX]P3DActiveX.rc.pp diff --git a/direct/src/plugin_npapi/Sources.pp b/direct/src/plugin_npapi/Sources.pp index e094f78f3c..5f45b77ec8 100644 --- a/direct/src/plugin_npapi/Sources.pp +++ b/direct/src/plugin_npapi/Sources.pp @@ -54,3 +54,6 @@ #define INSTALL_HEADERS #end lib_target + + +#include $[THISDIRPREFIX]nppanda3d.rc.pp diff --git a/direct/src/plugin_npapi/nppanda3d.rc b/direct/src/plugin_npapi/nppanda3d.rc deleted file mode 100644 index b4e2bb4a23..0000000000 --- a/direct/src/plugin_npapi/nppanda3d.rc +++ /dev/null @@ -1,42 +0,0 @@ -// This resource file is required on Windows to load the appropriate -// text into the DLL, so Mozilla will recognize the DLL as a plugin. -// It also defines the MIME type supported by the plugin. - -#define APSTUDIO_READONLY_SYMBOLS -#include "winresrc.h" -#undef APSTUDIO_READONLY_SYMBOLS - - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "FileDescription", "Runs 3-D games and interactive applets\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "LegalTrademarks", "\0" - VALUE "MIMEType", "application/x-panda3d\0" - VALUE "FileExtents", "p3d\0" - VALUE "FileOpenName", "Panda3D applet\0" - VALUE "OriginalFilename", "nppanda3d.dll\0" - VALUE "ProductName", "Panda3D Game Engine Plug-in\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END diff --git a/dtool/Package.pp b/dtool/Package.pp index 097d3c1f14..617f4c27bd 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -36,6 +36,13 @@ #define P3D_PLUGIN_MAJOR_VERSION $[word 1,$[P3D_PLUGIN_VERSION]] #define P3D_PLUGIN_MINOR_VERSION $[word 2,$[P3D_PLUGIN_VERSION]] #define P3D_PLUGIN_SEQUENCE_VERSION $[word 3,$[P3D_PLUGIN_VERSION]] +#define P3D_PLUGIN_VERSION_STR $[P3D_PLUGIN_MAJOR_VERSION].$[P3D_PLUGIN_MINOR_VERSION].$[P3D_PLUGIN_SEQUENCE_VERSION]$[if $[not $[PANDA_OFFICIAL_VERSION]],c] + +// The plugin version as a dot-delimited integer quad, according to MS +// conventions for DLL version numbers. +#define P3D_PLUGIN_DLL_DOT_VERSION $[word 1,$[P3D_PLUGIN_VERSION]].$[word 2,$[P3D_PLUGIN_VERSION]].$[word 3,$[P3D_PLUGIN_VERSION]].$[if $[PANDA_OFFICIAL_VERSION],1000,0] +// The same thing as a comma-delimited quad. +#define P3D_PLUGIN_DLL_COMMA_VERSION $[word 1,$[P3D_PLUGIN_VERSION]],$[word 2,$[P3D_PLUGIN_VERSION]],$[word 3,$[P3D_PLUGIN_VERSION]],$[if $[PANDA_OFFICIAL_VERSION],1000,0] // What is the name of this source tree? #if $[eq $[PACKAGE],]