Windows: Build and validate manifests

Fix manifests to include manifestVersion attribute and introduce an
application manifest.  The application manifest will be included in
the eventual SDK so that applications that depend on Heimdal can
correctly reference the Heimdal assemblies.
This commit is contained in:
Asanka Herath
2010-07-09 00:17:34 -04:00
parent 0730c0b98f
commit 4ea2e07b21
4 changed files with 63 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
<?xml version="1" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name=""
processorArchitecture="@cpu@"
version="1.0.0.0" />
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="@krbname@"
language="*"
processorArchitecture="@cpu@"
version="@krbversion@"
publickeytoken="@pkt@" />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="@gssname@"
language="*"
processorArchitecture="@cpu@"
version="@gssversion@"
publickeytoken="@pkt@" />
</dependentAssembly>
</dependency>
</assembly>

View File

@@ -1,5 +1,5 @@
<?xml version="1" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="@name@"
processorArchitecture="@cpu@"
version="@version@"
@@ -8,6 +8,7 @@
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="@krbname@"
language="*"
processorArchitecture="@cpu@"
version="@krbversion@"
publickeytoken="@pkt@" />

View File

@@ -1,5 +1,5 @@
<?xml version="1" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1">
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="@name@"
processorArchitecture="@cpu@"
version="@version@"

View File

@@ -33,6 +33,14 @@ RELDIR=packages\windows\assembly
!include ../../../windows/NTMakefile.w32
! if "$(CPU)"=="i386" || "$(CPU)"=="x86"
MCPU=x86
! elseif "$(CPU)"=="AMD64"
MCPU=amd64
! else
! error Unknown CPU
! endif
# CODESIGN_PKT should be set to the public key token of the code
# signing certificate in use. You can use :
#
@@ -63,7 +71,7 @@ $(ASMKRBDIR)\$(ASMKRBMAN).nohash: Heimdal.Kerberos.manifest.in
$(ASMKRBDIR)\$(ASMKRBMAN) $(ASMKRBDIR)\$(ASMKRBMAN).cdf: \
$(ASMKRBDIR)\$(ASMKRBMAN).nohash $(ASMKRBBINS)
$(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN).nohash -out:$@ -hashupdate -makecdfs
$(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN).nohash -out:$(ASMKRBDIR)\$(ASMKRBMAN) -hashupdate -makecdfs
$(ASMKRBDIR)\$(ASMKRBNAME).cat: $(ASMKRBDIR)\$(ASMKRBMAN).cdf
cd $(ASMKRBDIR)
@@ -86,6 +94,9 @@ clean::
{$(BINDIR)}.dll{$(ASMKRBDIR)}.dll:
$(CP) $< $@
test::
$(MT) -manifest $(ASMKRBDIR)\$(ASMKRBMAN) -validate_manifest
# ----------------------------------------------------------------------
# Heimdal.GSSAPI Assembly
@@ -128,6 +139,30 @@ clean::
{$(BINDIR)}.dll{$(ASMGSSDIR)}.dll:
$(CP) $< $@
test::
$(MT) -manifest $(ASMGSSDIR)\$(ASMGSSMAN) -validate_manifest
# ----------------------------------------------------------------------
# Application manifests
APPMANIFEST=$(INCDIR)\Heimdal.Application.$(MCPU).manifest
all:: $(APPMANIFEST)
clean::
$(RM) $(APPMANIFEST)
$(APPMANIFEST): Heimdal.Application.manifest.in
$(SED) -e "s,[@]gssname[@],$(ASMGSSNAME),g" \
-e "s,[@]gssversion[@],$(ASMGSSVER),g" \
-e "s,[@]krbname[@],$(ASMKRBNAME),g" \
-e "s,[@]krbversion[@],$(ASMKRBVER),g" \
-e "s,[@]cpu[@],$(MCPU),g" \
-e "s,[@]pkt[@],$(CODESIGN_PKT),g" < $** > $@
test::
$(MT) -manifest $(APPMANIFEST) -validate_manifest
# ----------------------------------------------------------------------
.SUFFIXES: .dll
@@ -140,11 +175,3 @@ mk-asm-dirs:
$(MKDIR) $(ASMGSSDIR)
! endif
! if "$(CPU)"=="i386" || "$(CPU)"=="x86"
MCPU=x86
! elseif "$(CPU)"=="AMD64"
MCPU=amd64
! else
! error Unknown CPU
! endif