diff --git a/setup_native/Library_instooofiltmsi.mk b/setup_native/Library_instooofiltmsi.mk index 0c744845a28e..677e59003b17 100644 --- a/setup_native/Library_instooofiltmsi.mk +++ b/setup_native/Library_instooofiltmsi.mk @@ -9,14 +9,27 @@ $(eval $(call gb_Library_Library,instooofiltmsi)) -ifeq ($(COM),MSC) +$(eval $(call gb_Library_add_defs,instooofiltmsi,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,instooofiltmsi,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,instooofiltmsi,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/indexingfilter/instooofiltmsi.def \ + /NODEFAULTLIB \ )) -endif $(eval $(call gb_Library_add_exception_objects,instooofiltmsi,\ setup_native/source/win32/customactions/indexingfilter/restartindexingservice \ )) +$(eval $(call gb_Library_use_system_win32_libs,instooofiltmsi,\ + libcmt \ + libcpmt \ + kernel32 \ +)) + # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_jfregca.mk b/setup_native/Library_jfregca.mk index d3eea27b47d7..c213e81d1eb2 100644 --- a/setup_native/Library_jfregca.mk +++ b/setup_native/Library_jfregca.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,jfregca)) +$(eval $(call gb_Library_add_defs,jfregca,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,jfregca,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,jfregca,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/javafilter/jfregca.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,jfregca,\ @@ -18,6 +27,9 @@ $(eval $(call gb_Library_add_exception_objects,jfregca,\ )) $(eval $(call gb_Library_use_system_win32_libs,jfregca,\ + libcmt \ + libcpmt \ + kernel32 \ msi \ advapi32 \ )) diff --git a/setup_native/Library_qslnkmsi.mk b/setup_native/Library_qslnkmsi.mk index 04dd1fb62334..7f7bbb32d8bd 100644 --- a/setup_native/Library_qslnkmsi.mk +++ b/setup_native/Library_qslnkmsi.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,qslnkmsi)) +$(eval $(call gb_Library_add_defs,qslnkmsi,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,qslnkmsi,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,qslnkmsi,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/quickstarter/qslnkmsi.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,qslnkmsi,\ @@ -22,7 +31,11 @@ $(eval $(call gb_Library_use_static_libraries,qslnkmsi,\ )) $(eval $(call gb_Library_use_system_win32_libs,qslnkmsi,\ - msi \ + libcmt \ + libcpmt \ + msi \ + kernel32 \ + user32 \ advapi32 \ shell32 \ )) diff --git a/setup_native/Library_reg4allmsdoc.mk b/setup_native/Library_reg4allmsdoc.mk index 6c0b241cf204..69f39030a0b1 100644 --- a/setup_native/Library_reg4allmsdoc.mk +++ b/setup_native/Library_reg4allmsdoc.mk @@ -12,10 +12,16 @@ $(eval $(call gb_Library_Library,reg4allmsdoc)) $(eval $(call gb_Library_add_defs,reg4allmsdoc,\ -DUNICODE \ -D_UNICODE \ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,reg4allmsdoc,\ + /MT \ )) $(eval $(call gb_Library_add_ldflags,reg4allmsdoc,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsdoc.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,reg4allmsdoc,\ @@ -23,6 +29,8 @@ $(eval $(call gb_Library_add_exception_objects,reg4allmsdoc,\ )) $(eval $(call gb_Library_use_system_win32_libs,reg4allmsdoc,\ + libcmt \ + libcpmt \ msi \ kernel32 \ user32 \ diff --git a/setup_native/Library_regactivex.mk b/setup_native/Library_regactivex.mk index e48a2822f5c2..4f561a5084c4 100644 --- a/setup_native/Library_regactivex.mk +++ b/setup_native/Library_regactivex.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,regactivex)) +$(eval $(call gb_Library_add_defs,regactivex,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,regactivex,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,regactivex,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/regactivex/regactivex.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,regactivex,\ @@ -18,7 +27,10 @@ $(eval $(call gb_Library_add_exception_objects,regactivex,\ )) $(eval $(call gb_Library_use_system_win32_libs,regactivex,\ - msi \ + libcmt \ + libcpmt \ + kernel32 \ + msi \ )) # vim: set noet sw=4 ts=4: diff --git a/setup_native/Library_regpatchactivex.mk b/setup_native/Library_regpatchactivex.mk index 2a48e4b0d5b5..bd2669d5fade 100644 --- a/setup_native/Library_regpatchactivex.mk +++ b/setup_native/Library_regpatchactivex.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,regpatchactivex)) +$(eval $(call gb_Library_add_defs,regpatchactivex,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,regpatchactivex,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,regpatchactivex,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/regpatchactivex/regpatchactivex.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,regpatchactivex,\ @@ -18,7 +27,9 @@ $(eval $(call gb_Library_add_exception_objects,regpatchactivex,\ )) $(eval $(call gb_Library_use_system_win32_libs,regpatchactivex,\ - msi \ + libcmt \ + libcpmt \ + msi \ kernel32 \ user32 \ advapi32 \ diff --git a/setup_native/Library_sdqsmsi.mk b/setup_native/Library_sdqsmsi.mk index ac7f5cc4f1b3..73758358fde8 100644 --- a/setup_native/Library_sdqsmsi.mk +++ b/setup_native/Library_sdqsmsi.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,sdqsmsi)) +$(eval $(call gb_Library_add_defs,sdqsmsi,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,sdqsmsi,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,sdqsmsi,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/quickstarter/sdqsmsi.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,sdqsmsi,\ @@ -22,7 +31,11 @@ $(eval $(call gb_Library_use_static_libraries,sdqsmsi,\ )) $(eval $(call gb_Library_use_system_win32_libs,sdqsmsi,\ + libcmt \ + libcpmt \ msi \ + kernel32 \ + user32 \ advapi32 \ shell32 \ )) diff --git a/setup_native/Library_sellangmsi.mk b/setup_native/Library_sellangmsi.mk index 41b6fae897c9..8219e6d6ada1 100644 --- a/setup_native/Library_sellangmsi.mk +++ b/setup_native/Library_sellangmsi.mk @@ -10,11 +10,16 @@ $(eval $(call gb_Library_Library,sellangmsi)) $(eval $(call gb_Library_add_defs,sellangmsi,\ - -D_STLP_USE_STATIC_LIB \ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,sellangmsi,\ + /MT \ )) $(eval $(call gb_Library_add_ldflags,sellangmsi,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/sellang/sellang.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,sellangmsi,\ @@ -23,7 +28,9 @@ $(eval $(call gb_Library_add_exception_objects,sellangmsi,\ )) $(eval $(call gb_Library_use_system_win32_libs,sellangmsi,\ - msi \ + libcmt \ + libcpmt \ + msi \ kernel32 \ user32 \ advapi32 \ diff --git a/setup_native/Library_shlxtmsi.mk b/setup_native/Library_shlxtmsi.mk index d124e762c7a6..a6037029094c 100644 --- a/setup_native/Library_shlxtmsi.mk +++ b/setup_native/Library_shlxtmsi.mk @@ -11,8 +11,17 @@ $(eval $(call gb_Library_Library,shlxtmsi)) $(eval $(call gb_Library_use_external,shlxtmsi,boost_headers)) +$(eval $(call gb_Library_add_defs,shlxtmsi,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,shlxtmsi,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,shlxtmsi,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,shlxtmsi,\ @@ -32,7 +41,10 @@ $(eval $(call gb_Library_use_static_libraries,shlxtmsi,\ )) $(eval $(call gb_Library_use_system_win32_libs,shlxtmsi,\ - msi \ + libcmt \ + libcpmt \ + msi \ + kernel32 \ advapi32 \ shell32 \ psapi \ diff --git a/setup_native/Library_sn_tools.mk b/setup_native/Library_sn_tools.mk index 6a26601b9584..da93c89b9d63 100644 --- a/setup_native/Library_sn_tools.mk +++ b/setup_native/Library_sn_tools.mk @@ -9,8 +9,17 @@ $(eval $(call gb_Library_Library,sn_tools)) +$(eval $(call gb_Library_add_defs,sn_tools,\ + -U_DLL \ +)) + +$(eval $(call gb_Library_add_cxxflags,sn_tools,\ + /MT \ +)) + $(eval $(call gb_Library_add_ldflags,sn_tools,\ /DEF:$(SRCDIR)/setup_native/source/win32/customactions/tools/sn_tools.def \ + /NODEFAULTLIB \ )) $(eval $(call gb_Library_add_exception_objects,sn_tools,\ @@ -22,8 +31,11 @@ $(eval $(call gb_Library_use_static_libraries,sn_tools,\ )) $(eval $(call gb_Library_use_system_win32_libs,sn_tools,\ - msi \ - advapi32 \ + libcmt \ + libcpmt \ + kernel32 \ + msi \ + advapi32 \ )) # vim: set noet sw=4 ts=4: diff --git a/setup_native/StaticLibrary_quickstarter.mk b/setup_native/StaticLibrary_quickstarter.mk index 1cd916c2d2f7..399f6afe5b0a 100644 --- a/setup_native/StaticLibrary_quickstarter.mk +++ b/setup_native/StaticLibrary_quickstarter.mk @@ -9,6 +9,14 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,quickstarter)) +$(eval $(call gb_StaticLibrary_add_defs,quickstarter,\ + -U_DLL \ +)) + +$(eval $(call gb_StaticLibrary_add_cxxflags,quickstarter,\ + /MT \ +)) + $(eval $(call gb_StaticLibrary_add_exception_objects,quickstarter,\ setup_native/source/win32/customactions/quickstarter/quickstarter \ )) diff --git a/setup_native/StaticLibrary_seterror.mk b/setup_native/StaticLibrary_seterror.mk index 9ba8c3cb0ff5..bb6ccf922287 100644 --- a/setup_native/StaticLibrary_seterror.mk +++ b/setup_native/StaticLibrary_seterror.mk @@ -9,6 +9,14 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,seterror)) +$(eval $(call gb_StaticLibrary_add_defs,seterror,\ + -U_DLL \ +)) + +$(eval $(call gb_StaticLibrary_add_cxxflags,seterror,\ + /MT \ +)) + $(eval $(call gb_StaticLibrary_add_exception_objects,seterror,\ setup_native/source/win32/customactions/tools/seterror \ )) diff --git a/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx b/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx index d40d378bfadb..22732480bd53 100644 --- a/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx +++ b/setup_native/source/win32/customactions/quickstarter/shutdown_quickstart.cxx @@ -27,7 +27,7 @@ static BOOL CALLBACK EnumWindowsProc( HWND hWnd, LPARAM lParam ) int nCharsCopied = GetClassName( hWnd, szClassName, sizeof( szClassName ) ); - if ( nCharsCopied && !stricmp( QUICKSTART_CLASSNAMEA, szClassName ) ) + if ( nCharsCopied && !_stricmp( QUICKSTART_CLASSNAMEA, szClassName ) ) { DWORD dwProcessId; @@ -36,7 +36,7 @@ static BOOL CALLBACK EnumWindowsProc( HWND hWnd, LPARAM lParam ) std::string sImagePath = GetProcessImagePath( dwProcessId ); std::string sOfficeImageDir = GetOfficeInstallationPath( hMSI ) + "program\\"; - if ( !strnicmp( sImagePath.c_str(), sOfficeImageDir.c_str(), sOfficeImageDir.length() ) ) + if ( !_strnicmp( sImagePath.c_str(), sOfficeImageDir.c_str(), sOfficeImageDir.length() ) ) { UINT uMsgShutdownQuickstart = RegisterWindowMessageA( SHUTDOWN_QUICKSTART_MESSAGEA ); diff --git a/setup_native/source/win32/customactions/shellextensions/iconcache.cxx b/setup_native/source/win32/customactions/shellextensions/iconcache.cxx index 6e87a843e39b..e037074b2220 100644 --- a/setup_native/source/win32/customactions/shellextensions/iconcache.cxx +++ b/setup_native/source/win32/customactions/shellextensions/iconcache.cxx @@ -69,12 +69,12 @@ extern "C" UINT __stdcall RebuildShellIconCache(MSIHANDLE) if ( !iSize ) { iSize = GetSystemMetrics( SM_CXICON ); - itoa( iSize, szValue, 10 ); + _itoa_s( iSize, szValue, 256, 10 ); cbValue = strlen( szValue ) + 1; dwType = REG_SZ; } - itoa( iSize + 1, szTempValue, 10 ); + _itoa_s( iSize + 1, szTempValue, 256, 10 ); lError = RegSetValueEx( hKey, TEXT("Shell Icon Size"), 0, dwType, (LPBYTE)szTempValue, strlen( szTempValue ) + 1 ); LRESULT lResult = SendMessageTimeout(