diff --git a/jdk/make/common/Defs-windows.gmk b/jdk/make/common/Defs-windows.gmk index 19a7f6a6f75..63f19d3e794 100644 --- a/jdk/make/common/Defs-windows.gmk +++ b/jdk/make/common/Defs-windows.gmk @@ -365,10 +365,6 @@ ifeq ($(CC_VERSION),msvc) # LFLAGS are the flags given to $(LINK) and used to build the actual DLL file BASELFLAGS = -nologo /opt:REF /incremental:no -ifdef MT - # VS2005, VS2008, and beyond: ask LINK to generate manifests for .dll & .exe - BASELFLAGS += /manifest -endif LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION)) LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION)) diff --git a/jdk/make/common/Library.gmk b/jdk/make/common/Library.gmk index 71758275689..c70d0c4daf7 100644 --- a/jdk/make/common/Library.gmk +++ b/jdk/make/common/Library.gmk @@ -159,9 +159,6 @@ else # LIBRARY # build it into $(OBJDIR) so that the other generated files get put # there, then copy just the DLL (and MAP file) to the requested directory. # -# In VS2005 or VS2008 the link command creates a .manifest file that we want -# to insert into the linked artifact so we do not need to track it separately. -# Use ";#2" for .dll and ";#1" for .exe in the MT command below: $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf @$(prep-target) @$(MKDIR) -p $(OBJDIR) @@ -169,9 +166,6 @@ $(ACTUAL_LIBRARY):: $(OBJDIR)/$(LIBRARY).lcf -map:$(OBJDIR)/$(LIBRARY).map \ $(LFLAGS) @$(OBJDIR)/$(LIBRARY).lcf \ $(OTHER_LCF) $(JAVALIB) $(LDLIBS) -ifdef MT - $(MT) /manifest $(OBJDIR)/$(@F).manifest /outputresource:$(OBJDIR)/$(@F);#2 -endif $(CP) $(OBJDIR)/$(@F) $@ $(install-module-file) $(CP) $(OBJDIR)/$(LIBRARY).map $(@D) diff --git a/jdk/make/common/Program.gmk b/jdk/make/common/Program.gmk index 005236149d6..751f0fe6898 100644 --- a/jdk/make/common/Program.gmk +++ b/jdk/make/common/Program.gmk @@ -142,10 +142,15 @@ else STACK_SIZE=1048576 endif -# In VS2005 or VS2008 the link command creates a .manifest file that we want -# to insert into the linked artifact so we do not need to track it separately. +IMVERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER) +$(OBJDIR)/$(PROGRAM).exe.manifest: $(JDK_TOPDIR)/src/windows/resource/java.manifest + @$(prep-target) + $(SED) 's%IMVERSION%$(IMVERSION)%g;s%PROGRAM%$(PROGRAM)%g' $< > $@ + +# We used a hand-crafted manifest file for all executables. +# It is tweaked to embed the build number and executable name. # Use ";#2" for .dll and ";#1" for .exe in the MT command below: -$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) +$(OBJDIR)/$(PROGRAM)$(EXE_SUFFIX):: $(OBJDIR)/$(PROGRAM).lcf $(FILES_o) $(JLI_LCF) $(OBJDIR)/$(PROGRAM).exe.manifest @$(prep-target) @set -- $?; \ $(ECHO) Rebuilding $@ because of $$1 $$2 $$3 $$4 $$5 $$6 $${7:+...}; diff --git a/jdk/src/windows/resource/java.manifest b/jdk/src/windows/resource/java.manifest index 61ec5999e19..e5b44609820 100644 --- a/jdk/src/windows/resource/java.manifest +++ b/jdk/src/windows/resource/java.manifest @@ -1,12 +1,15 @@ - + -AWT +Java(TM) SE PROGRAM process + + + + + + + + + + + + + + true + + +