Commits

Anonymous committed 37cc6c8

[xemacs-21-4-hg @ 2009-02-06 02:01:59 by vins]
Add support for Visual Studio 2005 manifests

Comments (0)

Files changed (3)

+2009-02-06  Vin Shelton  <acs@xemacs.org>
+
+	* xemacs.mak: Visual Studio 2005 support: add manifest to
+	executables.  Added compile flags for the Intel C Compiler.
+	* XEmacs.iss: Added MSVCR80.dll to support Visual Studio 2005.
+
 2008-12-28  Vin Shelton  <acs@xemacs.org>
 
 	* XEmacs 21.4.22 is released
 ; This script requires the Inno Setup pre-processor.
 ;
 ; Version History
+; 2009-01-29  Vin Shelton <acs@xemacs.org>    Add MSVCR80.dll, which is required by VS 2005 and needed at
+;                                             installation time by minitar.
 ; 2009-01-06  Vin Shelton <acs@xemacs.org>    Remove {#KitName} and {#XEmacs_Branch} and force the caller
 ;                                             to define the ReadMe file name and Setup file name directly.
 ; 2009-01-03  Vin Shelton <acs@xemacs.org>    Bump default version to 21.4.22.
 Source: "{#PkgSrc}\xemacs-base-*-pkg.tar"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
 ; minitar.exe and unpack.cmd are used to unpack the packages
 Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\i586-pc-win32\minitar.exe"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
+Source: "{#ExecSrc}\XEmacs-{#XEmacsVersion}\i586-pc-win32\MSVCR80.dll"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
 Source: "unpack.cmd"; DestDir: "{app}\xemacs-packages"; Flags: ignoreversion
 Source: "{#PkgSrc}\package-index.LATEST.gpg"; DestDir: "{app}";
 #ifndef QUICKIE_TEST
 COPY=xcopy /q
 COPYDIR=xcopy /q /e
 
+########################### Figure out current version of VC++.
+
+!if [if not exist $(OUTDIR) mkdir "$(OUTDIR)"]
+!endif
+!if [echo MSC_VER=_MSC_VER > $(OUTDIR)\vcversion.c]
+!endif
+!if [cl /nologo /EP $(OUTDIR)\vcversion.c > $(OUTDIR)\vcversion.tmp]
+!endif
+!include "$(OUTDIR)\vcversion.tmp"
+
+########################### Process the config.inc options.
+
 !include "config.inc"
 
 !if !defined(INFODOCK)
 
 !if $(USE_INTEL_COMPILER)
 CC=icl
-# Use static library if possible
-INTEL_LIBS=libircmt.lib libmmt.lib
-# Debugging requires DLL version of libm
-!if $(DEBUG_XEMACS)
+# The static math lib no longer works for building XEmacs as of version 11.0
+# of the Intel C Compiler, so always link with the dynamic version.
 INTEL_LIBS=libircmt.lib libmmd.lib
 !endif
-!endif
-
 #
 # Compiler command echo control. Define VERBOSECC=1 to get verbose compilation.
 #
 OPT=-Od -Zi
 !else
 OPT=-O2 -G5
+!if $(USE_INTEL_COMPILER)
+OPT=-Os -arch:ia32
+!endif
 !endif
 
 !if $(USE_CRTDLL)
 {$(LIB_SRC)}.c{$(LIB_SRC)}.exe :
 	cd $(LIB_SRC)
 	$(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** -link -incremental:no setargv.obj
+# If we're using Visual Studio 2005 or greater,
+# embed the manifest into the executable.
+!if $(MSC_VER) >= 1400
+	mt -manifest $@.manifest -outputresource:$@;1
+!endif
 	cd $(NT)
 
 # Individual dependencies
 $(LIB_SRC)/movemail.exe: $(LIB_SRC)/movemail.c $(LIB_SRC)/pop.c $(ETAGS_DEPS)
 	cd $(LIB_SRC)
 	$(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** wsock32.lib -link -incremental:no
+# If we're using Visual Studio 2005 or greater,
+# embed the manifest into the executable.
+!if $(MSC_VER) >= 1400
+	mt -manifest $@.manifest -outputresource:$@;1
+!endif
 	cd $(NT)
 
 $(LIB_SRC)/winclient.exe: $(LIB_SRC)/winclient.c
 	cd $(LIB_SRC)
 	$(CCV) -I. -I$(XEMACS)/src -I$(XEMACS)/nt/inc $(LIB_SRC_DEFINES) $(CFLAGS) -Fe$@ $** user32.lib -link -incremental:no
+# If we're using Visual Studio 2005 or greater,
+# embed the manifest into the executable.
+!if $(MSC_VER) >= 1400
+	mt -manifest $@.manifest -outputresource:$@;1
+!endif
 	cd $(NT)
 
 $(LIB_SRC)/minitar.exe : $(NT)/minitar.c
 	$(CCV) $(CFLAGS_NO_LIB) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) -MD -Fe$@ $** $(ZLIB_DIR)\zlib.lib -link -incremental:no
+# If we're using Visual Studio 2005 or greater,
+# embed the manifest into the executable.
+!if $(MSC_VER) >= 1400
+	mt -manifest $@.manifest -outputresource:$@;1
+!endif
 
 LIB_SRC_TOOLS = \
 	$(LIB_SRC)/etags.exe		\
 # Make the resource section read/write since almost all of it is the dump
 # data which needs to be writable.  This avoids having to copy it.
 	editbin -nologo -stack:0x800000 -section:.rsrc,rw xemacs.exe
+# If we're using Visual Studio 2005 or greater,
+# embed the manifest into the executable.
+!if $(MSC_VER) >= 1400
+	mt -manifest $@.manifest -outputresource:$@;1
+!endif
 	$(DEL) $(TEMACS_DIR)\xemacs.dmp
 !else
 	editbin -nologo -stack:0x800000 xemacs.exe