forked from osmocom/wireshark
Windows: Remove support for MSVC older than VS2015
Cleanup the support for older versions of Visual Studio Change-Id: Ieb97d56e9bff6a5902433e8d99b27276bc7034f7 Reviewed-on: https://code.wireshark.org/review/26247 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
c37eeafe81
commit
5b079291c4
|
@ -288,21 +288,12 @@ endif()
|
|||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
||||
if (MSVC10)
|
||||
set(MSC_VER_REQUIRED 1600)
|
||||
elseif(MSVC11)
|
||||
set(MSC_VER_REQUIRED 1700)
|
||||
elseif(MSVC12)
|
||||
set(MSC_VER_REQUIRED 1800)
|
||||
elseif(MSVC14)
|
||||
set(MSC_VER_REQUIRED 1900)
|
||||
else()
|
||||
if ((MSVC_VERSION LESS "1900") OR (MSVC_VERSION GREATER_EQUAL "2000"))
|
||||
message(FATAL_ERROR "You are using an unsupported version of MSVC")
|
||||
endif()
|
||||
|
||||
add_definitions(
|
||||
/DWIN32_LEAN_AND_MEAN
|
||||
"/DMSC_VER_REQUIRED=${MSC_VER_REQUIRED}"
|
||||
/D_CRT_SECURE_NO_DEPRECATE
|
||||
# NOMINMAX keeps windows.h from defining "min" and "max" via windef.h.
|
||||
# This avoids conflicts with the C++ standard library.
|
||||
|
|
|
@ -114,9 +114,6 @@ if(MSVC_VERSION GREATER_EQUAL 1910)
|
|||
elseif(MSVC_VERSION GREATER_EQUAL 1900)
|
||||
set(_ws_vcredist_subdir "vcredist_MSVC2015")
|
||||
set(_ms_vcredist_subdir "redist/1033")
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1800)
|
||||
set(_ws_vcredist_subdir "vcredist_MSVC2013")
|
||||
set(_ms_vcredist_subdir "redist/1033")
|
||||
endif()
|
||||
|
||||
find_program(VCREDIST_EXE "${_vcredist_name}"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
!define STAGING_DIR "@STAGING_DIR@"
|
||||
!define WIRESHARK_TARGET_PLATFORM @WIRESHARK_TARGET_PLATFORM@
|
||||
!define TARGET_MACHINE @TARGET_MACHINE@
|
||||
!define MSC_VER_REQUIRED @MSC_VER_REQUIRED@
|
||||
!define WIRESHARK_LIB_DIR "@WIRESHARK_LIB_DIR@"
|
||||
!define WINPCAP_PACKAGE_VERSION @WINPCAP_PACKAGE_VERSION@
|
||||
!define PCAP_DISPLAY_VERSION @PCAP_DISPLAY_VERSION@
|
||||
|
@ -24,7 +23,6 @@
|
|||
!endif
|
||||
!define PRODUCT_VERSION @PRODUCT_VERSION@
|
||||
|
||||
!define MSVCR_DLL "@MSVCR_DLL@"
|
||||
!define VCREDIST_EXE "@VCREDIST_EXE@"
|
||||
|
||||
!define USER_GUIDE_DIR "@USER_GUIDE_DIR@"
|
||||
|
|
|
@ -415,10 +415,6 @@ Var WINPCAP_UNINSTALL ;declare variable for holding the value of a registry key
|
|||
Var USBPCAP_UNINSTALL ;declare variable for holding the value of a registry key
|
||||
;Var WIRESHARK_UNINSTALL ;declare variable for holding the value of a registry key
|
||||
|
||||
!ifdef VCREDIST_EXE
|
||||
Var VCREDIST_FLAGS ; silent vs passive, norestart
|
||||
!endif
|
||||
|
||||
Section "-Required"
|
||||
;-------------------------------------------
|
||||
|
||||
|
@ -453,39 +449,21 @@ File "${STAGING_DIR}\dumpcap.html"
|
|||
File "${STAGING_DIR}\extcap.html"
|
||||
|
||||
; C-runtime redistributable
|
||||
!ifdef VCREDIST_EXE
|
||||
; vcredist_x64.exe - copy and execute the redistributable installer
|
||||
; vcredist_x64.exe or vc_redist_x86.exe - copy and execute the redistributable installer
|
||||
File "${VCREDIST_EXE}"
|
||||
; If the user already has the redistributable installed they will see a
|
||||
; Big Ugly Dialog by default, asking if they want to uninstall or repair.
|
||||
; Ideally we should add a checkbox for this somewhere. In the meantime,
|
||||
; just do a "passive+norestart" install for MSVC 2010 and later and a
|
||||
; "silent" install otherwise.
|
||||
; just do a "quiet" install.
|
||||
|
||||
; http://blogs.msdn.com/b/astebner/archive/2010/10/20/10078468.aspx
|
||||
; http://allthingsconfigmgr.wordpress.com/2013/12/17/visual-c-redistributables-made-simple/
|
||||
; "!if ${MSVC_VER_REQUIRED} >= 1600" doesn't work.
|
||||
!searchparse /noerrors ${MSVC_VER_REQUIRED} "1600" VCREDIST_FLAGS_Q_NORESTART
|
||||
!ifdef VCREDIST_FLAGS_Q_NORESTART
|
||||
StrCpy $VCREDIST_FLAGS "/q /norestart"
|
||||
!else ; VCREDIST_FLAGS_Q_NORESTART
|
||||
StrCpy $VCREDIST_FLAGS "/install /quiet /norestart"
|
||||
!endif ; VCREDIST_FLAGS_Q_NORESTART
|
||||
|
||||
ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" $VCREDIST_FLAGS' $0
|
||||
; http://asawicki.info/news_1597_installing_visual_c_redistributable_package_from_command_line.html
|
||||
ExecWait '"$INSTDIR\vcredist_${TARGET_MACHINE}.exe" /install /quiet /norestart' $0
|
||||
DetailPrint "vcredist_${TARGET_MACHINE} returned $0"
|
||||
IntCmp $0 3010 redistReboot redistNoReboot
|
||||
redistReboot:
|
||||
SetRebootFlag true
|
||||
redistNoReboot:
|
||||
Delete "$INSTDIR\vcredist_${TARGET_MACHINE}.exe"
|
||||
!else
|
||||
!ifdef MSVCR_DLL
|
||||
; msvcr*.dll (MSVC V7 or V7.1) - simply copy the dll file
|
||||
!echo "IF YOU GET AN ERROR HERE, check the CMAKE_GENERATOR setting"
|
||||
File "${MSVCR_DLL}"
|
||||
!endif ; MSVCR_DLL
|
||||
!endif ; VCREDIST_EXE
|
||||
|
||||
|
||||
; global config files - don't overwrite if already existing
|
||||
|
|
|
@ -106,8 +106,6 @@ if(MSVC_VERSION GREATER_EQUAL 1910)
|
|||
set (MSVC_CRT_VERSION "VC141")
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1900)
|
||||
set (MSVC_CRT_VERSION "VC140")
|
||||
elseif(MSVC_VERSION GREATER_EQUAL 1800)
|
||||
set (MSVC_CRT_VERSION "VC120")
|
||||
endif()
|
||||
|
||||
set(MERGE_MODULE "Microsoft_${MSVC_CRT_VERSION}_CRT_${TARGET_MACHINE}.msm")
|
||||
|
|
Loading…
Reference in New Issue