1<?php
2
3$version = isset($_SERVER["argv"][1]) ? $_SERVER["argv"][1] : file_get_contents(dirname(__FILE__)."/../version");
4$archivename = 'phpfreechat-'.$version.'-setup.php';
5$pfcpath = dirname(__FILE__).'/phpfreechat-'.$version;
6if (!file_exists($pfcpath)) die("Dont find the directory $pfcpath");
7$phpinstaller_path = realpath(dirname(__FILE__).'/../contrib/installer.beta-5.1');
8include($phpinstaller_path.'/engine.inc.php');
9$phpi = new phpInstaller();
10$phpi->dataDir($phpinstaller_path.'/engine_data');
11$phpi->appName = 'phpFreeChat';
12$phpi->appVersion = $version;
13$phpi->addMetaFile('ss',$phpinstaller_path.'/createinstaller/data/installer.css','text/css')
14  or die('Can not find stylesheet');
15$phpi->ignore[] = '.svn';
16$phpi->addPage('Pre-Install Check',file_get_contents($phpinstaller_path.'/createinstaller/data/precheck.inc'));
17$phpi->addInstallerPages();
18$phpi->addPath($pfcpath);
19$phpi->generate($archivename);
20
21?>