[krbdev.mit.edu #3642] changes for embedding manifest into dlls and exes

Qing Dong via RT rt-comment at krbdev.mit.edu
Fri Apr 14 15:38:45 EDT 2006


--- trunk\src\config\win-pre.in	Fri Apr 14 17:05:21 2006
+++ c:\pismere\athena\auth\krb5\src\config\win-pre.in	Wed Apr 12 21:01:09 2006
@@ -144,6 +144,13 @@
 DEBUGOPT=/ZI
 !endif
 
+#if the compiler is vstudio 8, generate manifest
+!if exists("$(VCINSTALLDIR)\..\..\MICROSOFT VISUAL STUDIO 8")
+CCLINKOPTION = $(CCLINKOPTION) /MANIFEST
+_VC_MANIFEST_EMBED_EXE = if exist $*.exe.manifest mt.exe -manifest $*.exe.manifest -outputresource:$*.exe;1
+_VC_MANIFEST_EMBED_DLL = if exist $*.dll.manifest mt.exe -manifest $*.dll.manifest -outputresource:$*.dll;2
+!endif 
+
 # /ZI gives better debug info in each object file (MSVC 6.0 or higher).
 # /Zi gives debug info in each object file.
 # /Gs Avoid stack probes (they don't seem to work anyway)


--- trunk\src\config\win-post.in	Fri Apr 14 17:05:21 2006
+++ c:\pismere\athena\auth\krb5\src\config\win-post.in	Mon Apr 10 19:43:14 2006
@@ -107,4 +107,5 @@
 	$(RM) .\$(OUTPRE)*.lib .\$(OUTPRE)*.pdb
 	$(RM) .\$(OUTPRE)*.exp .\$(OUTPRE)*.map
 	$(RM) .\$(OUTPRE)*.idb .\$(OUTPRE)*.ilk
+	$(RM) .\$(OUTPRE)*.manifest
 !endif


--- trunk\src\Makefile.in	Fri Apr 14 17:06:01 2006
+++ c:\pismere\athena\auth\krb5\src\Makefile.in	Mon Apr 10 19:47:44 2006
@@ -159,6 +159,7 @@
 #
 ##DOS##$(WCONFIG_EXE): outpre-dir wconfig.c
 ##DOS##	$(CC) -Fe$@ -Fo$*.obj wconfig.c $(CCLINKOPTION)
+##DOS## $(_VC_MANIFEST_EMBED_EXE)
 
 ##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
 

--- trunk\src\util\windows\Makefile.in	Fri Apr 14 17:05:55 2006
+++ c:\pismere\athena\auth\krb5\src\util\windows\Makefile.in	Mon Apr 10 20:07:59 2006
@@ -4,6 +4,8 @@
 
 $(OUTPRE)libecho.exe: $(OUTPRE)libecho.obj
 	link -out:$@ $** $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
+	
 
 $(OUTPRE)getopt.lib: $(OUTPRE)getopt.obj $(OUTPRE)getopt_long.obj
 	lib -out:$@ $**
@@ -11,4 +13,4 @@
 install-windows::
 
 clean-windows::
-	$(RM) $(OUTPRE)*.res $(OUTPRE)*.map $(OUTPRE)*.obj $(OUTPRE)*.exe
+	$(RM) $(OUTPRE)*.res $(OUTPRE)*.map $(OUTPRE)*.obj $(OUTPRE)*.exe $(OUTPRE)*.manifest


--- trunk\src\windows\wintel\Makefile.in	Fri Apr 14 17:04:22 2006
+++ c:\pismere\athena\auth\krb5\src\windows\wintel\Makefile.in	Tue Apr 11 20:50:22 2006
@@ -35,6 +35,7 @@
 $(OUTPRE)telnet.exe: telnet.def $(OBJS) $(XOBJS) $(LIBS)
 	$(LINK) $(LFLAGS) /map:$*.map /out:$@ $(OBJS) $(XOBJS) \
 	  $(LIBS) $(SYSLIBS) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 install::
 	copy $(OUTPRE)telnet.exe $(DESTDIR)
--- trunk\src\windows\cns\Makefile.in	Fri Apr 14 17:04:23 2006
+++ c:\pismere\athena\auth\krb5\src\windows\cns\Makefile.in	Tue Apr 11 20:07:35 2006
@@ -55,6 +55,7 @@
 $(OUTPRE)$(NAME).exe: $(NAME).def $(OBJS) $(XOBJS) $(LIBS)
 	$(LINK) $(LFLAGS) /map:$*.map /out:$@ $(OBJS) $(XOBJS) \
 	  $(LIBS) $(SYSLIBS) $(SCLIB)
+				$(_VC_MANIFEST_EMBED_EXE)
 
 install::
 	$(CP) $(OUTPRE)$(NAME).exe $(DESTDIR)
--- trunk\src\windows\gina\Makefile.in	Fri Apr 14 17:04:55 2006
+++ c:\pismere\athena\auth\krb5\src\windows\gina\Makefile.in	Tue Apr 11 21:04:09 2006
@@ -28,6 +28,7 @@
 $(OUTPRE)kgina.dll: $(OBJS) $(KLIB) $(CLIB)
 	link $(WINDLLFLAGS) -def:gina.def -out:$*.dll \
 	   $** $(WINLIBS) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_DLL)
 
 $(OUTPRE)ginastub.obj: ginastub.h
 
--- trunk\src\windows\ms2mit\Makefile.in	Tue Jan 24 20:48:31 2006
+++ c:\pismere\athena\auth\krb5\src\windows\ms2mit\Makefile.in	Tue Apr 11 21:07:44 2006
@@ -13,9 +13,11 @@
 
 $(OUTPRE)ms2mit.exe: $(OUTPRE)ms2mit.obj
     link $(EXE_LINKOPTS) -out:$@ $(OUTPRE)ms2mit.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj user32.lib advapi32.lib $(KLIB) $(CLIB)
+    $(_VC_MANIFEST_EMBED_EXE)
 
 $(OUTPRE)mit2ms.exe: $(OUTPRE)mit2ms.obj
     link $(EXE_LINKOPTS) -out:$@ $(OUTPRE)mit2ms.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj user32.lib advapi32.lib $(KLIB) $(CLIB)
+    $(_VC_MANIFEST_EMBED_EXE)
 
 install::
 	copy $(OUTPRE)ms2mit.exe $(DESTDIR)

--- trunk\src\windows\kfwlogon\Makefile.in	Fri Apr 14 17:04:23 2006
+++ c:\pismere\athena\auth\krb5\src\windows\kfwlogon\Makefile.in	Tue Apr 11 21:10:33 2006
@@ -24,10 +24,10 @@
 
 $(OUTPRE)kfwlogon.dll: $(OUTPRE)kfwlogon.obj $(OUTPRE)kfwcommon.obj $(OUTPRE)kfwlogon.res
     link $(DLL_LINKOPTS) -out:$@ $(OUTPRE)kfwlogon.obj $(OUTPRE)kfwcommon.obj -entry:DllEntryPoint -def:kfwlogon.def $(SYSLIBS) $(KLIB) $(CLIB) $(SCLIB)
-
+	$(_VC_MANIFEST_EMBED_DLL)
 $(OUTPRE)kfwcpcc.exe: $(OUTPRE)kfwcpcc.obj $(OUTPRE)kfwcommon.obj $(OUTPRE)kfwcpcc.res
     link $(EXE_LINKOPTS) -out:$@ $(OUTPRE)kfwcpcc.obj $(OUTPRE)kfwcommon.obj $(SYSLIBS) $(KLIB) $(CLIB) $(SCLIB)
-
+	$(_VC_MANIFEST_EMBED_EXE)
 install::
         copy $(OUTPRE)kfwlogon.dll $(DESTDIR)
         copy $(OUTPRE)kfwcpcc.exe  $(DESTDIR)


--- trunk\src\lib\Makefile.in	Fri Apr 14 17:05:52 2006
+++ c:\pismere\athena\auth\krb5\src\lib\Makefile.in	Tue Apr 11 20:17:12 2006
@@ -101,6 +101,7 @@
 ##WIN32##$(SLIB): $(SDEF) $(SLIBS) $(SGLUE) $(SRES)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(SDEF) -out:$*.dll \
 ##WIN32##	  $(SLIBS) $(SGLUE) $(SRES) $(WINLIBS) $(SCLIB)
+##WIN32##        $(_VC_MANIFEST_EMBED_DLL)
 ##WIN32##$(SDEF): ..\util\support\libkrb5support.exports
 ##WIN32##	echo EXPORTS > $(SDEF).new
 ##WIN32##	type ..\util\support\libkrb5support.exports >> $(SDEF).new
@@ -110,22 +111,27 @@
 ##WIN32##$(CLIB): $(CDEF) $(CLIBS) $(CGLUE) $(CRES) $(SLIB)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(CDEF) -out:$*.dll \
 ##WIN32##	  $(CLIBS) $(CGLUE) $(CRES) $(SLIB) $(WINLIBS) $(SCLIB)
+##WIN32##	$(_VC_MANIFEST_EMBED_DLL)
 
 ##WIN32##$(PLIB): $(PDEF) $(PLIBS) $(PGLUE) $(PRES) $(CLIB) $(SLIB)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(PDEF) -out:$*.dll \
 ##WIN32##	  $(PLIBS) $(PGLUE) $(PRES) $(CLIB) $(SLIB) $(WINLIBS)
+##WIN32##	$(_VC_MANIFEST_EMBED_DLL)
 
 ##WIN32##$(KLIB): $(KDEF) $(KLIBS) $(KGLUE) $(KRES) $(CLIB) $(SLIB) $(MITLIBS) $(DNSLIBS)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(KDEF) -out:$*.dll \
 ##WIN32##	  $(KLIBS) $(KGLUE) $(KRES) $(CLIB) $(SLIB) $(MITLIBS) $(DNSLIBS) $(WINLIBS) $(SCLIB)
+##WIN32##	$(_VC_MANIFEST_EMBED_DLL)
 
 ##WIN32##$(GLIB): $(GDEF) $(GLIBS) $(GGLUE) $(GRES) $(KLIB) $(CLIB) $(SLIB)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(GDEF) -out:$*.dll \
 ##WIN32##	  $(GLIBS) $(GGLUE) $(GRES) $(KLIB) $(CLIB) $(SLIB) $(WINLIBS) $(SCLIB)
+##WIN32##		$(_VC_MANIFEST_EMBED_DLL)
 
 ##WIN32##$(K4LIB): $(K4DEF) $(K4LIBS) $(K4GLUE) $(K4RES) $(KLIB) $(CLIB) $(PLIB)
 ##WIN32##	link $(WINDLLFLAGS) -def:$(K4DEF) -out:$*.dll \
 ##WIN32##	  $(K4LIBS) $(K4GLUE) $(K4RES) $(KLIB) $(CLIB) $(PLIB) $(WINLIBS) $(SCLIB)
+##WIN32##  	$(_VC_MANIFEST_EMBED_DLL)
 
 ##WIN32##$(K5_GLUE): win_glue.c
 ##WIN32##	$(CC) $(ALL_CFLAGS) $(MITFLAGS) /c /DKRB5=1 /Fo$@ $**


--- trunk\src\windows\identity\config\Makefile.w32	Fri Apr 14 17:04:43 2006
+++ c:\pismere\athena\auth\krb5\src\windows\identity\config\Makefile.w32	Wed Apr 12 18:30:52 2006
@@ -244,6 +244,13 @@
 khldllconflags=$(khldllconflags) $(conlibsdll)
 !endif
 
+#if the compiler is vstudio 8, generate manifest
+!if exists("$(VCINSTALLDIR)\..\..\MICROSOFT VISUAL STUDIO 8")
+_VC_MANIFEST_EMBED_EXE = if exist $*.exe.manifest mt.exe -manifest $*.exe.manifest -outputresource:$*.exe;1
+_VC_MANIFEST_EMBED_DLL = if exist $*.dll.manifest mt.exe -manifest $*.dll.manifest -outputresource:$*.dll;2
+!endif 
+
+
 C2OBJ=$(CC) $(khcflags) $(KH_AUXCFLAGS) /Fo"$@" /c $**
 
 EXECONLINK=$(LINK) /NOLOGO $(khlconflags) /OUT:$@ $**

--- trunk\src\windows\identity\nidmgrdll\Makefile	Fri Apr 14 17:04:44 2006
+++ c:\pismere\athena\auth\krb5\src\windows\identity\nidmgrdll\Makefile	Wed Apr 12 18:38:00 2006
@@ -113,6 +113,7 @@
 
 $(DLLFILE): $(OBJFILES) $(RESFILES)
 	$(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_DLL)
 
 all: mkdirs $(DLLFILE)
 
--- trunk\src\windows\identity\ui\Makefile	Fri Apr 14 17:04:50 2006
+++ c:\pismere\athena\auth\krb5\src\windows\identity\ui\Makefile	Wed Apr 12 19:43:01 2006
@@ -97,6 +97,7 @@
 
 $(EXEFILE): $(OBJFILES) $(RESFILES) $(LIBFILES)
 	$(EXEGUILINK) $(SDKLIBFILES) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 all: mkdirs $(EXEFILE) $(MANIFESTFILE)
 
--- trunk\src\windows\identity\plugins\krb4\Makefile	Fri Apr 14 17:04:26 2006
+++ c:\pismere\athena\auth\krb5\src\windows\identity\plugins\krb4\Makefile	Thu Apr 13 19:51:59 2006
@@ -70,6 +70,7 @@
 
 $(DLLFILE): $(OBJFILES) $(VERRESFILE) $(MSGRESFILE)
 	$(DLLGUILINK) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_DLL)
 
 all: mkdirs $(MSGRESFILE) $(DLLFILE) lang
 
--- trunk\src\windows\identity\plugins\krb5\Makefile	Fri Apr 14 17:04:29 2006
+++ c:\pismere\athena\auth\krb5\src\windows\identity\plugins\krb5\Makefile	Thu Apr 13 19:52:38 2006
@@ -74,6 +74,7 @@
 
 $(DLLFILE):  $(OBJFILES) $(VERRESFILE) 
 	$(DLLGUILINK) $(MSGRESFILE) $(LIBFILES) $(SDKLIBFILES) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_DLL)
 
 $(MSGRESFILE): $(OBJ)\krb5_msgs.rc
 

 
--- trunk\src\clients\kcpytkt\Makefile.in	Tue Jan 24 20:49:07 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kcpytkt\Makefile.in	Wed Apr 12 20:30:51 2006
@@ -15,6 +15,7 @@
 
 $(OUTPRE)kcpytkt.exe: $(OUTPRE)kcpytkt.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) /out:$@ $**
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) kcpytkt.o kcpytkt

--- trunk\src\clients\kdeltkt\Makefile.in	Tue Jan 24 20:49:03 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kdeltkt\Makefile.in	Wed Apr 12 20:31:21 2006
@@ -15,6 +15,7 @@
 
 $(OUTPRE)kdeltkt.exe: $(OUTPRE)kdeltkt.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) /out:$@ $**
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) kdeltkt.o kdeltkt

--- trunk\src\clients\kdestroy\Makefile.in	Fri Apr 14 17:05:05 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kdestroy\Makefile.in	Wed Apr 12 20:19:40 2006
@@ -15,6 +15,7 @@
 
 $(OUTPRE)kdestroy.exe: $(OUTPRE)kdestroy.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) -out:$@ $**
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) kdestroy.o kdestroy

--- trunk\src\clients\kinit\Makefile.in	Fri Apr 14 17:05:07 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kinit\Makefile.in	Wed Apr 12 20:20:08 2006
@@ -18,6 +18,7 @@
 
 $(OUTPRE)kinit.exe: $(OUTPRE)kinit.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.lib $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** advapi32.lib
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) kinit.o kinit

--- trunk\src\clients\klist\Makefile.in	Fri Apr 14 17:05:06 2006
+++ c:\pismere\athena\auth\krb5\src\clients\klist\Makefile.in	Thu Apr 13 21:11:18 2006
@@ -17,6 +17,7 @@
 
 $(OUTPRE)klist.exe: $(OUTPRE)klist.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.lib $(SLIB) $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) klist.o klist

--- trunk\src\clients\kpasswd\Makefile.in	Fri Apr 14 17:05:06 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kpasswd\Makefile.in	Wed Apr 12 20:20:33 2006
@@ -28,3 +28,4 @@
 
 $(OUTPRE)kpasswd.exe: $(OUTPRE)kpasswd.obj $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)

--- trunk\src\clients\kvno\Makefile.in	Fri Apr 14 17:05:07 2006
+++ c:\pismere\athena\auth\krb5\src\clients\kvno\Makefile.in	Wed Apr 12 20:29:47 2006
@@ -15,6 +15,7 @@
 
 $(OUTPRE)kvno.exe: $(OUTPRE)kvno.obj $(BUILDTOP)\util\windows\$(OUTPRE)getopt.obj $(KLIB) $(CLIB)
 	link $(EXE_LINKOPTS) /out:$@ $**
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) kvno.o kvno


--- trunk\src\appl\gss-sample\Makefile.in	Fri Apr 14 17:05:00 2006
+++ c:\pismere\athena\auth\krb5\src\appl\gss-sample\Makefile.in	Thu Apr 13 21:11:14 2006
@@ -21,9 +21,11 @@
 
 $(OUTPRE)gss-server.exe: $(OUTPRE)gss-server.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 $(OUTPRE)gss-client.exe: $(OUTPRE)gss-client.obj $(OUTPRE)gss-misc.obj $(GLIB) $(KLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) gss-server gss-client


--- trunk\src\appl\gssftp\ftp\Makefile.in	Fri Apr 14 17:04:58 2006
+++ c:\pismere\athena\auth\krb5\src\appl\gssftp\ftp\Makefile.in	Thu Apr 13 21:11:13 2006
@@ -38,6 +38,7 @@
 
 $(OUTPRE)ftp.exe: $(OBJS) $(GLIB) $(KLIB)
 	link $(EXE_LINKOPTS) -out:$@ $** ws2_32.lib advapi32.lib $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 clean-unix::
 	$(RM) ftp


--- trunk\src\krb524\Makefile.in	Fri Apr 14 17:05:53 2006
+++ c:\pismere\athena\auth\krb5\src\krb524\Makefile.in	Thu Apr 13 21:11:54 2006
@@ -88,9 +88,11 @@
 
 $(K524LIB): $(OUTPRE)krb524.$(OBJEXT) $(OUTPRE)libinit.$(OBJEXT) $(KLIB) $(CLIB)
 	link $(DLL_LINKOPTS) -def:$(K524DEF) -out:$*.dll $** $(WINLIBS)
+	$(_VC_MANIFEST_EMBED_DLL)
 
 $(OUTPRE)k524init.exe: $(OUTPRE)k524init.$(OBJEXT) $(KLIB) $(K4LIB) $(CLIB) $(BUILDTOP)\util\windows\$(OUTPRE)getopt.lib
 	link $(EXE_LINKOPTS) -out:$@ $** $(WINLIBS) $(SCLIB)
+	$(_VC_MANIFEST_EMBED_EXE)
 
 install-unix::
 	$(INSTALL_PROGRAM) krb524d $(DESTDIR)$(SERVER_BINDIR)/krb524d




More information about the krb5-bugs mailing list