[zi-cvs] packages/com.zzoss.zic dev_package_archive.php,NONE,1.1 dev_package.php,1.2,1.3 package.xml,1.12,1.13

Sandro Zic <[email protected]> Wed, 14 Apr 2004 11:13:51 +0000
Newsgroups gmane.comp.php.zzoss.installer.cvs
Message-ID <[email protected]>
Update of /cvsroot/zzossinstaller/packages/com.zzoss.zic
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8372/com.zzoss.zic

Modified Files:
	dev_package.php package.xml 
Added Files:
	dev_package_archive.php 
Log Message:
GUI to create package .tgz

--- NEW FILE: dev_package_archive.php ---
<?php   
    /*
    Copyright (C) 2001-2004 ZZOSS GbR, http://www.zzoss.com

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) any later version.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    /**
    @version $Id: dev_package_archive.php,v 1.1 2004/04/14 11:13:49 ordnas Exp $
    @copyright Copyright &copy; 2001-2004 ZZ/OSS GbR, http://www.zzoss.com
    @license http://opensource.org/licenses/lgpl-license.php GNU Lesser General Public License
    */

	// execute init file
	require_once 'inc/init.php';
    
    function zi_process()
    {
        require_once 'ZZOSS_Package/Package.php';
        
        $pkg_tgz = ZZOSS_Package::createPkgArchive(
                        $_REQUEST['ZI_VALUES']['pkg_src_dir'],
                        System::mktemp('-d')
                        );
        
        require_once 'HTTP/Download.php';
        $dl = &new HTTP_Download();
        $dl->setFile($pkg_tgz);
        $dl->setContentDisposition(HTTP_DOWNLOAD_ATTACHMENT, basename($pkg_tgz));
        $dl->setContentType('application/octet-stream');
        $dl->send();
    }
    
    include 'themes/'.$GLOBALS['ZI']['theme'].'/header.php';
    ?>
    <h1>Create Package Archive</h1>

    <?php
    // installer widget class
	require_once 'ZZOSS_Installer/Widget.php';
	$zi_widget = new ZZOSS_InstallerWidget;
	if(isset($zi_errors)){
        $zi_widget->setErrors($zi_errors);
    }
    ?>
    <table class="form">
    <?php
    echo $zi_widget->add('path', 'Source Directory', 'pkg_src_dir', array('validation' => 'not empty'));
    ?>
    </table>
    <?php
    $zi_buttons['back'] = 'dev_package.php'.zi_form_querystr();
    $zi_buttons['ok'] = $_SERVER['PHP_SELF'];
    
	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';
?>
Index: package.xml
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/package.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** package.xml	13 Apr 2004 10:24:30 -0000	1.12
--- package.xml	14 Apr 2004 11:13:49 -0000	1.13
***************
*** 66,73 ****
--- 66,75 ----
      <file role="php" baseinstalldir="" name="dev_index.php"/>
      <file role="php" baseinstalldir="" name="dev_package.php"/>
+     <file role="php" baseinstalldir="" name="dev_package_archive.php"/>
      <file role="php" baseinstalldir="" name="dev_package_xml.php"/>
      <file role="php" baseinstalldir="" name="dev_plugin.php"/>
      <file role="php" baseinstalldir="" name="dev_reset_data.php"/>
      <file role="php" baseinstalldir="" name="distribution_download.php"/>
+     <file role="php" baseinstalldir="" name="download.php"/>
      <file role="php" baseinstalldir="" name="help.php"/>
      <file role="php" baseinstalldir="" name="index.php"/>

Index: dev_package.php
===================================================================
RCS file: /cvsroot/zzossinstaller/packages/com.zzoss.zic/dev_package.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dev_package.php	5 Mar 2004 14:25:25 -0000	1.2
--- dev_package.php	14 Apr 2004 11:13:48 -0000	1.3
***************
*** 37,40 ****
--- 37,43 ----
  <p>[<a href="dev_package_xml.php?mode=dev" title="Create package.xml">Create package.xml</a>]</p>
  <p>Create a package.xml descriptor.</p>
+ 
+ <p>[<a href="dev_package_archive.php?mode=dev" title="Create package archive">Create package archive</a>]</p>
+ <p>Create the archive (.tgz) of a package.</p>
  <?php
  	include 'themes/'.$GLOBALS['ZI']['theme'].'/footer.php';



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click