When using the VC++2005 also known as VC++8.0, Microsoft
introduced the use of manifest files. These either need
to be shiped around with the dll and exe files or then can
be included in the file as an additional resource.

Attached are changes to the Makefile.mak for OpenSC.
(The Makefile.mak files in engine_pkcs11 and libp11 need a
similiar change.)

After the link of very exe or dll a line like this is added.

    if EXIST [EMAIL PROTECTED] mt -manifest [EMAIL PROTECTED] 
-outputresource:$@;1

If using some other comipiler which does not produce the manifest
files the if EXIST will skip the running of the mt command and the
build should continue as normal. For exe files the last digit is a 1,
for dll files it is a 2.

OpenSSL-0.9.8 in their util/pl/VC-32.pl file adds a similiar
line to nt.mak and ntdll.mak files for each exe and dll.

Thnaks.


--

 Douglas E. Engert  <[EMAIL PROTECTED]>
 Argonne National Laboratory
 9700 South Cass Avenue
 Argonne, Illinois  60439
 (630) 252-5444
Index: src/tools/Makefile.mak
===================================================================
--- src/tools/Makefile.mak      (revision 3004)
+++ src/tools/Makefile.mak      (working copy)
@@ -18,6 +18,7 @@
         ..\common\common.lib ..\scconf\scconf.lib ..\libopensc\opensc.lib \
         ..\pkcs15init\pkcs15init.lib ..\pkcs11\libpkcs11.lib \
         $(TOPDIR)\win32\version.res $(OPENSSL_LIB) $(LIBLTDL) gdi32.lib
+               if EXIST [EMAIL PROTECTED] mt -manifest [EMAIL PROTECTED] 
-outputresource:$@;1
 
 netkey-tool.exe: netkey-tool.c
        cl $(COPTS) /c netkey-tool.c
@@ -25,3 +26,4 @@
         ..\common\common.lib ..\scconf\scconf.lib ..\libopensc\opensc.lib \
         ..\pkcs15init\pkcs15init.lib ..\pkcs11\libpkcs11.lib \
         $(TOPDIR)\win32\version.res $(OPENSSL_LIB) $(LIBLTDL) gdi32.lib
+               if EXIST netkey-tool.exe.manifest mt -manifest 
netkey-tool.exe.manifest -outputresource:netkey-tool.exe;1
Index: src/pkcs11/Makefile.mak
===================================================================
--- src/pkcs11/Makefile.mak     (revision 3004)
+++ src/pkcs11/Makefile.mak     (working copy)
@@ -22,9 +22,11 @@
 
 $(TARGET): $(OBJECTS) ..\libopensc\opensc.lib ..\scconf\scconf.lib 
..\pkcs15init\pkcs15init.lib ..\common\common.lib
        link $(LINKFLAGS) /dll /out:$(TARGET) $(OBJECTS) 
..\libopensc\opensc.lib ..\scconf\scconf.lib ..\pkcs15init\pkcs15init.lib 
..\common\common.lib winscard.lib $(OPENSSL_LIB) $(LIBLTDL) gdi32.lib
+       if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest 
-outputresource:$(TARGET);2
 
 $(TARGET2): $(OBJECTS2)
        lib /nologo /machine:ix86 /out:$(TARGET2) $(OBJECTS2) $(LIBLTDL_LIB)
 
 $(TARGET3): $(OBJECTS3) ..\libopensc\opensc.lib
        link $(LINKFLAGS) /dll /out:$(TARGET3) $(OBJECTS3) 
..\libopensc\opensc.lib $(OPENSSL_LIB) $(LIBLTDL_LIB) gdi32.lib advapi32.lib
+       if EXIST $(TARGET3).manifest mt -manifest $(TARGET3).manifest 
-outputresource:$(TARGET3);2
Index: src/tests/Makefile.mak
===================================================================
--- src/tests/Makefile.mak      (revision 3004)
+++ src/tests/Makefile.mak      (working copy)
@@ -15,4 +15,5 @@
        cl $(COPTS) /c $<
         link $(LINKFLAGS) /pdb:$*.pdb /out:$@ $*.obj sc-test.obj print.obj \
         ..\common\common.lib ..\libopensc\opensc.lib 
$(TOPDIR)\win32\version.res
+       if EXIST [EMAIL PROTECTED] mt -manifest [EMAIL PROTECTED] 
-outputresource:$@;1
 
Index: src/pkcs15init/Makefile.mak
===================================================================
--- src/pkcs15init/Makefile.mak (revision 3004)
+++ src/pkcs15init/Makefile.mak (working copy)
@@ -18,3 +18,4 @@
 $(TARGET): $(OBJECTS)
        perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
        link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) 
$(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib ..\libopensc\opensc.lib 
winscard.lib $(OPENSSL_LIB) gdi32.lib $(LIBLTDL_LIB)
+       if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest 
-outputresource:$(TARGET);2
Index: src/libopensc/Makefile.mak
===================================================================
--- src/libopensc/Makefile.mak  (revision 3004)
+++ src/libopensc/Makefile.mak  (working copy)
@@ -44,3 +44,4 @@
 $(TARGET): $(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib
        perl $(TOPDIR)\win32\makedef.pl $*.def $* $(OBJECTS)
        link $(LINKFLAGS) /dll /def:$*.def /implib:$*.lib /out:$(TARGET) 
$(OBJECTS) ..\scconf\scconf.lib ..\common\common.lib winscard.lib 
$(OPENSSL_LIB) gdi32.lib $(LIBLTDL_LIB) advapi32.lib
+       if EXIST $(TARGET).manifest mt -manifest $(TARGET).manifest 
-outputresource:$(TARGET);2
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to