CustomActions should be statically linked with MSVCRT

Change-Id: I100b7ff7e3aa505098ce8b3333d1aa8faca50370
This commit is contained in:
Andras Timar 2013-02-17 12:22:01 +01:00
parent 850b4c7e2d
commit c13c500630
14 changed files with 143 additions and 14 deletions

View file

@ -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:

View file

@ -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 \
))

View file

@ -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 \
))

View file

@ -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 \

View file

@ -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:

View file

@ -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 \

View file

@ -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 \
))

View file

@ -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 \

View file

@ -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 \

View file

@ -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:

View file

@ -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 \
))

View file

@ -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 \
))

View file

@ -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 );

View file

@ -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(