echo '<div style="height:30em;overflow:auto;border:inset 1px grey;"><pre>'; //template files if (!$phpi->addMetaFile('ss', 'createinstaller/data/installer.css', 'text/css', $replace)) { die('Could not add main.css to installer.<br />'); } foreach (gpv('packages') as $v) { var_export($v); if (isset($v['url']) && isset($v['path'])) { //$phpi->generatedata($v['path']); $phpi->addPathDownload($v['url'], $v['to']); } else { if (isset($v['url'])) { $phpi->addPathDownload($v['url'], $v['to'], $v['type']); } else { if (isset($v['path'])) { $phpi->addPath($v['path'], $v['to']); } } } } //$phpi->addPath(gpv('rootpath')); $phpi->addPage('Pre-installation Check', file_get_contents('createinstaller/data/precheck.inc')); //license page if (gpv('step_license')) { if ($phpi->addMetaFile('license', 'createinstaller/data/license.html', 'text/html')) { $phpi->addPage('License', file_get_contents('createinstaller/data/license.inc'), array(), array('disabled' => true)); } else { $phpi->message('The license could not be added. Check the file ' . $lPath . '.'); } } if (!$phpi->addMetaFile('unknown', 'createinstaller/data/unknown.gif', 'image/gif')) {
<?php $version = isset($_SERVER["argv"][1]) ? $_SERVER["argv"][1] : file_get_contents(dirname(__FILE__) . "/../version"); $archivename = 'phpfreechat-' . $version . '-setup.php'; $pfcpath = dirname(__FILE__) . '/phpfreechat-' . $version; if (!file_exists($pfcpath)) { die("Dont find the directory {$pfcpath}"); } $phpinstaller_path = realpath(dirname(__FILE__) . '/../contrib/installer.beta-5.1'); include $phpinstaller_path . '/engine.inc.php'; $phpi = new phpInstaller(); $phpi->dataDir($phpinstaller_path . '/engine_data'); $phpi->appName = 'phpFreeChat'; $phpi->appVersion = $version; $phpi->addMetaFile('ss', $phpinstaller_path . '/createinstaller/data/installer.css', 'text/css') or die('Can not find stylesheet'); $phpi->ignore[] = '.svn'; $phpi->addPage('Pre-Install Check', file_get_contents($phpinstaller_path . '/createinstaller/data/precheck.inc')); $phpi->addInstallerPages(); $phpi->addPath($pfcpath); $phpi->generate($archivename);
$dataDir = realpath(dirname(__FILE__) . '/../engine_data'); $phpi->dataDir($dataDir); $phpi->appName = 'PHP Installer Generator'; $phpi->appVersion = 'beta-6'; $phpi->compress = true; $phpi->ignore[] = '/installer.php'; $phpi->ignore[] = '/phpinstaller/'; $phpi->ignore[] = '/fanwork/'; $phpi->ignore[] = 'tests'; echo '<pre>'; //template files if (!$phpi->addMetaFile('ss', '../createinstaller/data/installer.css', 'text/css', $replace)) { $phpi->message('Could not add installer.css to installer.'); die('</pre>'); } $phpi->addPath(realpath(dirname(__FILE__) . "/..")); $phpi->addPage('Pre-installation Check', file_get_contents('../createinstaller/data/precheck.inc')); //generate the license page //first try to add the license file, than the license page if ($phpi->addMetaFile('license', '../createinstaller/data/license.html', 'text/html')) { $phpi->addPage('License', file_get_contents('../createinstaller/data/license.inc'), array(), array('disabled' => true)); } else { $phpi->message('The license could not be added.'); die('</pre>'); } //add the unknown image if (!$phpi->addMetaFile('unknown', '../createinstaller/data/unknown.gif', 'image/gif')) { $phpi->message('The unknown status image could not be added.'); die('</pre>'); } if (!$phpi->addMetaFile('hb', '../createinstaller/data/installer.jpg', 'image/jpeg')) {
break; case 4: echo '[<span style="color:green;"> dir </span>]'; break; case 5: echo '[<span style="color:green;"> done </span>]'; break; } echo '</div>'; } echo '<div style="height:30em;overflow:auto;border:inset 1px grey;"><pre>'; //template files if (!$phpi->addMetaFile('ss', '../createinstaller/data/installer.css', 'text/css', $replace)) { die('Could not add main.css to installer.<br />'); } $phpi->addPath(dirname(__FILE__) . '/..'); //add the directory below this one $phpi->addPage('Pre-installation Check', file_get_contents('../createinstaller/data/precheck.inc')); //license page if ($phpi->addMetaFile('license', '../createinstaller/data/license.html', 'text/html')) { $phpi->addPage('License', file_get_contents('../createinstaller/data/license.inc'), array(), array('disabled' => true)); } else { $phpi->message('The license could not be added. Check the file ' . $lPath . '.'); die('</pre></div>'); } if (!$phpi->addMetaFile('unknown', '../createinstaller/data/unknown.gif', 'image/gif')) { $phpi->message('The license could not be added. Check the file ' . $lPath . '.'); die('</pre></div>'); } if (!$phpi->addMetaFile('hb', '../createinstaller/data/installer.jpg', 'image/jpeg')) { $phpi->message('The license could not be added. Check the file ' . $lPath . '.');