fix some remaining MSVC != V6 issues:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 13 Jan 2007 00:59:39 +0000 (00:59 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 13 Jan 2007 00:59:39 +0000 (00:59 +0000)
- add redistributables (msvcr*.dll) to the NSIS installer (depending on MSVC_VARIANT)
- split MSVC2006 and MSVC2006EE (Express Edition) settings in config.nmake, as redistributable settings for NSIS are different
- remove Platform SDK setting from config.nmake, it's not needed

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20411 f5534014-38df-0310-8fa8-9805f1628bb7

config.nmake
packaging/nsis/Makefile.nmake
packaging/nsis/wireshark.nsi

index 9996bfa72d124837334fb4e8933ce45e5f013b14..e8e34a2370c465501c3267aa901c5613e90067c8 100644 (file)
@@ -52,7 +52,7 @@ MSVC_VARIANT=MSVC6
 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
 #MSVC_VARIANT=MSVC2002
 
-# "Microsoft .Net Framework SDK Version 1.0" - EXPERIMENTAL
+# "Microsoft .Net Framework SDK Version 1.0" - WORKS
 # needs additional Platform SDK installation
 # Visual C++ 7.0, _MSC_VER 1300, msvcr70.dll
 #MSVC_VARIANT=DOTNET10
@@ -67,26 +67,19 @@ MSVC_VARIANT=MSVC6
 #MSVC_VARIANT=DOTNET11
 
 # "Microsoft Visual Studio 2005" - WORKS
+# Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
+MSVC_VARIANT=MSVC2005
+
 # "Microsoft Visual C++ 2005 Express Edition" - WORKS
-# The "Express Edition" needs additional Platform SDK installation
+# needs additional Platform SDK installation
 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
-#MSVC_VARIANT=MSVC2005
+#MSVC_VARIANT=MSVC2005EE
 
 # "Microsoft .Net Framework 2.0 SDK" - WORKS
 # needs additional Platform SDK installation
 # Visual C++ 8.0, _MSC_VER 1400, msvcr80.dll
 #MSVC_VARIANT=DOTNET20
 
-#
-# Optional: Microsoft Platform SDK.
-# (Mandatory for some MSVC_VARIANTs, see above)
-#
-# If you don't have the PSDK, comment this line out, so that 
-# PLATFORM_SDK_DIR isn't defined.
-#
-# If you have installed a platform SDK, set this to the directory where it reside
-#PLATFORM_SDK_DIR=$(PROGRAM_FILES)\Microsoft Platform SDK for Windows Server 2003 R2
-
 
 
 ##### Libraries #####
@@ -408,7 +401,7 @@ MAKENSIS="$(PROGRAM_FILES)\nsis\makensis.exe"
 #
 !IF "$(MSVC_VARIANT)" == "MSVC6" || "$(MSVC_VARIANT)" == "MSVC2002" || "$(MSVC_VARIANT)" == "DOTNET10" || "$(MSVC_VARIANT)" == "MSVC2003" || "$(MSVC_VARIANT)" == "DOTNET11"
 LOCAL_CFLAGS=/Zi /W3 /MD
-!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "DOTNET20"
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005" || "$(MSVC_VARIANT)" == "MSVC2005EE" || "$(MSVC_VARIANT)" == "DOTNET20"
 LOCAL_CFLAGS=/Zi /W3 /MD /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 !ELSE
 !ERROR MSVC_VARIANT unknown
@@ -457,6 +450,53 @@ INSTALL2_DIR=wireshark-gtk2
 
 
 
+##### C-Runtime Redistributable #####
+#
+# The C-Runtime since Version 7 must be shipped together with 
+# the program installer, to avoid missing msvcr*.dll files on
+# the target machine.
+#
+# The location of these files differ on the various compiler 
+# packages, the following will use the default paths depending
+# on the package version.
+#
+!IF "$(MSVC_VARIANT)" == "MSVC6"
+# msvcrt.dll will already be available on target machines - nothing additional to install
+
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2002"
+# you probably need to tweak this directory if you don't use the professional edition!
+MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET\Visual Studio .NET Professional - English\msvcr70.dll
+
+!ELSEIF "$(MSVC_VARIANT)" == "DOTNET10"
+# no redistributable available for this package!
+
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2003"
+# you probably need to tweak this directory if you don't use the professional edition!
+MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio .NET 2003\Visual Studio .NET Professional 2003 - English\msvcr71.dll
+
+!ELSEIF "$(MSVC_VARIANT)" == "DOTNET11"
+# no redistributable available for this package!
+
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005"
+MSVCR_DLL=$(PROGRAM_FILES)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT\*.*
+
+!ELSEIF "$(MSVC_VARIANT)" == "MSVC2005EE"
+# you need to download the redistributable package vcredist_x86.exe from Microsoft first,
+# and copy it to the lib folder!!!
+VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
+
+!ELSEIF "$(MSVC_VARIANT)" == "DOTNET20"
+# you need to download the redistributable package vcredist_x86.exe from Microsoft first,
+# and copy it to the lib folder!!!
+VCREDIST_EXE=$(WIRESHARK_LIBS)\vcredist_x86.exe
+
+!ELSE
+!ERROR MSVC_VARIANT unknown
+!ENDIF
+
+
+
+
 ##############################################################################
 #
 # You should not have to change anything below this comment.
index c50181d8c6de3d51843542db0f0aace2478997e5..924f4966ed0f6150c61a84ab34582d64e8972e73 100644 (file)
@@ -106,6 +106,12 @@ $(DEST)-setup-$(VERSION).exe : $(NSI) $(DELIVERABLES) Makefile.nmake
        $(MAKENSIS) \
        /DDEST=$(DEST) \
        /DMSVC_VARIANT=$(MSVC_VARIANT) \
+!IFDEF MSVCR_DLL
+       /DMSVCR_DLL="$(MSVCR_DLL)" \
+!ENDIF
+!IFDEF VCREDIST_EXE
+       /DVCREDIST_EXE="$(VCREDIST_EXE)" \
+!ENDIF
 !IF "$(ENABLE_LIBWIRESHARK)" != ""
        /DENABLE_LIBWIRESHARK=$(ENABLE_LIBWIRESHARK) \
 !ENDIF
index 712a447237d8c235a5b8467e3bbe5330d75d1ec1..b22e74121771aba4e2340a5d9db4cec3ddc1b590 100644 (file)
@@ -348,18 +348,41 @@ File "..\..\dumpcap.exe"
 File "..\..\doc\dumpcap.html"
 File "..\..\example_snmp_users_file"
 
-; manifest files needed for MSVC2005 / .NET SDK 2.0
+; manifest files needed for MSVC2005 / MSVC2005EE / DOTNET20
 !if ${MSVC_VARIANT} == "MSVC2005"
 File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll.manifest"
 File "..\..\*.manifest"
 File "${ZLIB_DIR}\zlib1.dll.manifest"
 !endif
+!if ${MSVC_VARIANT} == "MSVC2005EE"
+File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll.manifest"
+File "..\..\*.manifest"
+File "${ZLIB_DIR}\zlib1.dll.manifest"
+!endif
 !if ${MSVC_VARIANT} == "DOTNET20"
 File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll.manifest"
 File "..\..\*.manifest"
 File "${ZLIB_DIR}\zlib1.dll.manifest"
 !endif
 
+; C-runtime redistributable 
+!ifdef VCREDIST_EXE
+; vcredist_x86.exe (MSVC V8) - copy and execute the redistributable installer
+File "${VCREDIST_EXE}"
+ExecWait '"$INSTDIR\vcredist_x86.exe"' $0
+DetailPrint "vcredist_x86 returned $0"
+!else
+!ifdef MSVCR_DLL
+; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file
+File "${MSVCR_DLL}"
+!else
+!if ${MSVC_VARIANT} != "MSVC6"
+!error "C-Runtime redistributable for this package not available / not redistributable!"
+!endif
+!endif ; MSVCR_DLL
+!endif ; VCREDIST_EXE
+
+
 ; global config files - don't overwrite if already existing 
 ;IfFileExists cfilters dont_overwrite_cfilters
 File "..\..\cfilters"