Esempio n. 1
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
/*
 * Created on Aug 16, 2005
 *
 * SureInvoice version file for application installer
 */
$base_path = realpath(dirname(__FILE__) . '/../');
$versions = new VersionSet();
$versions->collectData('db_user', 'Database Username', 'text', 'root');
$versions->collectData('db_password', 'Database Password', 'text', '');
$versions->collectData('db_server', 'Database Server', 'text', 'localhost');
$versions->collectData('db_port', 'Database Port', 'text', '3306');
$versions->collectData('db_database', 'Database Name', 'text', '');
// 0.0 Release (All Required Tests and Actions)
$version_0_0 = new Version('0.0');
$version_0_0->addTest('PHPVersionOver', array('4.3.0'));
$version_0_0->addTest('PHPExtension', array('mysql', 'curl'));
$version_0_0->addTest('WritableLocation', array($base_path . '/includes/global_config.php', $base_path . '/installer/tmp'));
$version_0_0->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.1.0'));
$version_0_0->addAction('AcceptText', array($base_path . '/LICENSE'));
$version_0_0->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array($base_path . '/includes/global_config.php.dist' => $base_path . '/includes/global_config.php'), 'fields' => array('INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password')));
$versions->add($version_0_0);
// 0.2 Release
$version_0_2 = new Version('0.2');