Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44242 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67603 invoked from network); 11 Jun 2009 11:40:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jun 2009 11:40:48 -0000 Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.156 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 72.14.220.156 fg-out-1718.google.com Received: from [72.14.220.156] ([72.14.220.156:24493] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A0/C9-12056-F3DE03A4 for ; Thu, 11 Jun 2009 07:40:47 -0400 Received: by fg-out-1718.google.com with SMTP id 22so1299238fge.0 for ; Thu, 11 Jun 2009 04:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MrK1kZcaMSQBO2Yp00aryTveqakKQmCzcy8h/E5prkw=; b=wU3Ct1+5YUtmfivpX016qcGPkQqIesUegGCxwhIVWUr5429gptxAn0I5FKMu8FsYbN 1qMBWrbQ7nwh9B4W484yiRoswD2Fpy2n8CyxlM2XROID+aSrDP4yHluJsmxsbGd3IPA/ tDxpImCzEPJ4eKl3PguFa2TSr2HBZNV2DWvpM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=FoNKUAl2hZ5hkA+VY5LHev7PksOPa2BkTRXNOJ0/Td0XRnCZUQ9EVJ71CG6XUFcVDJ cSdviUexTdjVI+vkHaH45Y3k5XhBDe0o+phhHppdA6mgIb82f7RHhRL0i3w3pZQUsrCv sJYSWUDJJ9qfq4JhEvtKx8uRpE7Wluk1xVLjc= MIME-Version: 1.0 Received: by 10.86.33.9 with SMTP id g9mr2145159fgg.66.1244720444096; Thu, 11 Jun 2009 04:40:44 -0700 (PDT) In-Reply-To: <4A308B2A.8080906@chiaraquartet.net> References: <4A2FD2F5.6010605@chiaraquartet.net> <4A2FE302.6010300@chiaraquartet.net> <4A308B2A.8080906@chiaraquartet.net> Date: Thu, 11 Jun 2009 13:40:44 +0200 Message-ID: To: Greg Beaver Cc: PHP Developers Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH] Re: [PHP-DEV] doing phar.phar on windows From: pierre.php@gmail.com (Pierre Joye) hi Greg, On Thu, Jun 11, 2009 at 6:42 AM, Greg Beaver wrote: > I suppose it would help to see the patch, no? > > Index: win32/build/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /repository/php-src/win32/build/Makefile,v > retrieving revision 1.35.2.1.2.6.2.12 > diff -u -r1.35.2.1.2.6.2.12 Makefile > --- win32/build/Makefile =A0 =A0 =A0 =A027 May 2009 01:46:48 -0000 =A0 = =A0 =A01.35.2.1.2.6.2.12 > +++ win32/build/Makefile =A0 =A0 =A0 =A011 Jun 2009 04:17:08 -0000 > @@ -128,7 +128,7 @@ > =A0 =A0 =A0 =A0-del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS= _ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip > =A0 =A0 =A0 =A0-del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRIN= G)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE= ).zip > =A0 =A0 =A0 =A0-del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZT= S_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip > - =A0 =A0 =A0 $(BUILD_DIR)\php.exe -d date.timezone=3DUTC -n win32/build/= mkdist.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(P= HP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHO= T_TEMPLATE)" > + =A0 =A0 =A0 $(BUILD_DIR)\php.exe -d date.timezone=3DUTC -n -dphar.reado= nly=3D0 win32/build/mkdist.php "$(BUILD_DIR)" "$(PHPDLL)" "$(SAPI_TARGETS)"= "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIS= T_FILES)" "$(SNAPSHOT_TEMPLATE)" > =A0 =A0 =A0 =A0cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING) > =A0 =A0 =A0 =A0-$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARC= HIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip . > =A0 =A0 =A0 =A0cd ..\.. > Index: win32/build/mkdist.php > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /repository/php-src/win32/build/mkdist.php,v > retrieving revision 1.13.4.1.2.11 > diff -u -r1.13.4.1.2.11 mkdist.php > --- win32/build/mkdist.php =A0 =A0 =A03 Jun 2009 01:14:58 -0000 =A0 =A0 = =A0 1.13.4.1.2.11 > +++ win32/build/mkdist.php =A0 =A0 =A011 Jun 2009 04:31:54 -0000 > @@ -393,6 +393,27 @@ > =A0 =A0 =A0 =A0closedir($directory_list); > =A0} > > +function make_phar_dot_phar($dist_dir) > +{ > + =A0if (!extension_loaded('phar')) return; > + =A0$path_to_php =3D $dist_dir; > + =A0$path_to_phar =3D realpath(__DIR__ . '/../../ext/phar'); > + =A0echo "Generating pharcommand.phar\n"; > + =A0$phar =3D new Phar($path_to_php . '/pharcommand.phar', 0, 'pharcomma= nd'); > + =A0foreach (new DirectoryIterator($path_to_phar . '/phar') as $file) { > + =A0 =A0if ($file->isDir() || $file =3D=3D 'phar.php') continue; > + =A0 =A0echo 'adding ', $file, "\n"; > + =A0 =A0$phar[(string) $file] =3D file_get_contents($path_to_phar. =A0'/= phar/' . $file); > + =A0} > + =A0$phar->setSignatureAlgorithm(Phar::SHA1); > + =A0$stub =3D file($path_to_phar . '/phar/phar.php'); > + =A0unset($stub[0]); // remove hashbang > + =A0$phar->setStub(implode('', $stub)); > + > + =A0echo "Creating phar.phar.bat\n"; > + =A0file_put_contents($path_to_php . '/phar.phar.bat', "%~dp0php.exe %~d= p0pharcommand.phar %1 %2 %3 %4 %5 %6 %7 %8 %9\r\n"); > +} > + > =A0if (!is_dir($test_dir)) { > =A0 =A0 =A0 =A0mkdir($test_dir); > =A0} > @@ -489,4 +510,5 @@ > =A0 =A0 =A0 =A0echo "WARNING: you don't have a snapshot template, your di= st will not be complete\n"; > =A0} > > +make_phar_dot_phar($dist_dir); > =A0?> Please commit, it looks good. I will test once it is committed as well. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org