Re: Re: Window Build Patch - Check for grep and sed

From: Date: Wed, 28 Feb 2007 12:33:32 +0000
Subject: Re: Re: Window Build Patch - Check for grep and sed
References: 1 2 3 4 5 6  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-3744@lists.php.net to get a copy of this message
It's that 'should'.... I promise I'll get onto it this week, sorry it's been a bit hectic here lately (when isn't it?) - Steph
Round six - last one...don't kill me steph This patch adds support for msvc 8 (2005) "out of the box" - it fixes deprecated compiler flags and adds manifest packing (copied straight from php5...) If you could take the time to look them over so we can get them into cvs that would be great, steph. None of them should affect the msvc6 build in any way.
--------------------------------------------------------------------------------
Index: config.w32.in =================================================================== RCS file: /repository/php-gtk/win32/config.w32.in,v retrieving revision 1.12 diff -u -r1.12 config.w32.in --- config.w32.in 17 Jun 2006 14:47:08 -0000 1.12 +++ config.w32.in 28 Feb 2007 02:33:08 -0000 @@ -14,6 +14,9 @@ PATH_PROG('link', WshShell.Environment("Process").Item("PATH"), "LD"); PATH_PROG('nmake'); +// Try locating manifest tool +PATH_PROG('mt', WshShell.Environment("Process").Item("PATH"), "MT"); + // we don't want to define LIB, as that will override the default library path set in that env var PATH_PROG('lib', null, 'MAKE_LIB'); PATH_PROG('php'); @@ -81,22 +84,32 @@ DEFINE("LIBS", "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib"); if (PHP_GTK_DEBUG == "yes") { - DEFINE("CFLAGS", "/nologo /LDd /MDd /Gm /ZI /GZ /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=1 /D PHP_WIN32 /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL"); + DEFINE("CFLAGS", "/nologo /LDd /MDd /Gm /EHsc /ZI /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=1 /D PHP_WIN32 /D WIN32 /D _DEBUG /D _WINDOWS /D _MBCS /D _USRDLL"); ADD_FLAG("LDFLAGS", "/debug"); } else { - DEFINE("CFLAGS", "/nologo /MD /W3 /GX /O2 /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=0 /D PHP_WIN32 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL"); + DEFINE("CFLAGS", "/nologo /MD /W3 /EHsc /O2 /I . /I ..\\ /I ..\\.. /I main /I ..\\main /I ext /I ..\\ext /I ..\\php5\\main /I ..\\php5\\Zend /I ..\\php5\\TSRM /D ZEND_WIN32 /D ZTS=1 /D ZEND_DEBUG=0 /D PHP_WIN32 /D WIN32 /D NDEBUG /D _WINDOWS /D _MBCS /D _USRDLL"); } if (VCVERS < 14) { // Enable automatic precompiled headers ADD_FLAG('CFLAGS', '/YX /c'); + if (PHP_GTK_DEBUG == "yes") + { + // Set some debug/release specific options + ADD_FLAG('CFLAGS', ' /GZ '); + } } if (VCVERS >= 14) { // fun stuff: MS deprecated ANSI stdio and similar functions - disable warnings // GS hardens the binary against buffer overruns ADD_FLAG('CFLAGS', '/GS /wd4996 '); + if (PHP_GTK_DEBUG == "yes") + { + // Set some debug/release specific options + ADD_FLAG('CFLAGS', ' /RTC1 '); + } } if (PHP_GTK_PHP_BUILD == 'no') { Index: confutils.js =================================================================== RCS file: /repository/php-gtk/win32/confutils.js,v retrieving revision 1.19 diff -u -r1.19 confutils.js --- confutils.js 17 Jul 2006 17:00:09 -0000 1.19 +++ confutils.js 28 Feb 2007 02:30:23 -0000 @@ -668,6 +668,7 @@ MFO.WriteLine("$(BUILD_DIR)\\" + dllname + ": $(" + EXT + "_GLOBAL_OBJS)" + res_var); MFO.WriteLine("\t" + ld + " /out:$(BUILD_DIR)\\" + dllname + " $(" + EXT + "_LDFLAGS)" + dllflags + " $(LDFLAGS) $(" + EXT + "_GLOBAL_OBJS) $(LIBS_" + EXT + ")" + dep_libs + " $(LIBS)" + res_var); + MFO.WriteLine("\t-@$(_VC_MANIFEST_EMBED_DLL)"); MFO.WriteBlankLines(1); MFO.WriteLine(dllname + ": $(BUILD_DIR)\\" + dllname); @@ -968,6 +969,16 @@ MF.WriteLine(keys[i] + "=" + configure_subst.Item(keys[i]) + " "); } + MF.WriteLine("!if $(MT) == \"\""); + MF.WriteBlankLines(1); + MF.WriteLine("_VC_MANIFEST_EMBED_DLL="); + MF.WriteBlankLines(1); + MF.WriteLine("!else"); + MF.WriteBlankLines(1); + MF.WriteLine("_VC_MANIFEST_EMBED_DLL= $(MT) -nologo -manifest $@.manifest -outputresource:$@;2"); + MF.WriteBlankLines(1); + MF.WriteLine("!endif"); + MF.WriteBlankLines(1); MF.WriteLine("all: $(EXT_TARGETS)");
--------------------------------------------------------------------------------
-- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.gtk.dev (#3744) next »