getConf('home.url') . '/' . $MIOLO->getConf('options.dispatch'); $form = new MForm('Install MIOLO'); $form->defaultButton = true; if ( Form::getFormValue('step3') ) { $form->setTitle(_M('Install Miolo - Step 3/3') ); $dest = Form::getFormValue('txtDestination'); $url = Form::getFormValue('txtAddress'); //copies miolo to target install directory MUtil::copyDirectory($MIOLO->GetAbsolutePath(),$dest); // generate miolo.conf $data['home.miolo' ] = $dest; $data['home.classes' ] = $dest . '/classes'; $data['home.modules' ] = $dest . '/modules'; $data['home.etc' ] = $dest . '/etc'; $data['home.logs' ] = $dest . '/var/log'; $data['home.trace' ] = $dest . '/var/trace'; $data['home.db' ] = $dest . '/var/db'; $data['home.html' ] = $dest . '/html'; $data['home.themes' ] = $dest . '/classes/ui/themes'; $data['home.extensions' ] = $dest . '/extensions'; $data['home.reports' ] = $dest . '/var/reports'; $data['home.images' ] = $dest . '/ui/images'; $data['home.url' ] = $url; $data['home.url_themes' ] = '/themes'; $data['home.url_reports' ] = '/reports'; $data['home.module.themes'] = '/ui/themes'; $data['home.module.html' ] = '/html'; $data['home.module.images'] = '/html/images'; $data['namespace.core' ] = '/classes'; $data['namespace.service' ] = '/classes/services'; $data['namespace.ui' ] = '/classes/ui'; $data['namespace.themes' ] = '/ui/themes'; $data['namespace.extensions'] = '/classes/extensions'; $data['namespace.controls' ] = '/ui/controls'; $data['namespace.database' ] = '/classes/database'; $data['namespace.utils' ] = '/classes/utils'; $data['namespace.modules' ] = '/modules'; $data['theme.module' ] = null; $data['theme.main' ] = 'miolo2'; $data['theme.lookup' ] = 'miolo2'; $data['theme.title' ] = 'Miolo Web Application'; $data['theme.company'] = 'MIOLO FRAMEWORK'; $data['theme.system' ] = 'version 2.0 - rc1'; $data['theme.logo' ] = 'logo_miolo.png'; $data['theme.email' ] = 'admin@miolo2.localhost'; $data['theme.options.close' ] = 'true'; $data['theme.options.minimize'] = 'true'; $data['theme.options.help' ] = 'true'; $data['theme.options.move' ] = 'true'; $data['options.startup' ] = 'common'; $data['options.common' ] = 'common'; $data['options.scramble' ] = '0'; $data['options.scramble.password' ] = 'password'; $data['options.dispatch' ] = 'index.php'; $data['options.url.style' ] = '0'; $data['options.index' ] = 'index.php'; $data['options.mainmenu' ] = '3'; $data['options.mainmenu.style' ] = 'office2003'; $data['options.mainmenu.clickopen'] = 'false'; $data['options.dbsession' ] = '0'; $data['options.authmd5' ] = '0'; $data['options.debug' ] = '1'; $data['options.autocomplete_alert'] = null; $data['options.dump.peer' ] = '127.0.0.1'; $data['options.dump.profile' ] = 'false'; $data['options.dump.uses' ] = 'false'; $data['options.dump.trace' ] = 'false'; $data['options.dump.handlers'] = 'false'; $data['options.loading.show' ] = 'true'; $data['options.loading.generating'] = 'true'; $data['options.performance.uri_images' ] = null; $data['options.performance.enable_ajax'] = null; $data['i18n.locale' ] = $dest . '/locale'; $data['i18n.language'] = 'pt_BR'; $data['mad.module'] = 'admin'; $data['mad.classes.access' ] = 'access'; $data['mad.classes.group' ] = 'group'; $data['mad.classes.log' ] = 'log'; $data['mad.classes.session' ] = 'session'; $data['mad.classes.transaction'] = 'transaction'; $data['mad.classes.user' ] = 'user'; $data['login.module'] = 'admin'; $data['login.class' ] = 'MAuthDb'; $data['login.check' ] = 'false'; $data['login.shared'] = 'true'; $data['login.auto' ] = '1'; $data['session.handler'] = 'file'; $data['session.timeout'] = '300'; $data['db.miolo.system' ] = 'sqlite'; $data['db.miolo.host' ] = 'localhost'; $data['db.miolo.name' ] = $dest . '/var/db/miolo.sqlite'; $data['db.miolo.user' ] = Form::getFormValue('txtUserName'); $data['db.miolo.password'] = Form::getFormValue('txtPassword'); $data['logs.level' ] = '2'; $data['logs.handler'] = 'socket'; $data['logs.peer' ] = '0'; $data['logs.port' ] = '0'; file_put_contents($dest . '/etc/miolo.conf', MConfigLoader::generateConfigXML($data) ); $dataAdmin['db.admin.system' ] = 'sqlite'; $dataAdmin['db.admin.host' ] = 'localhost'; $dataAdmin['db.admin.name' ] = $dest . '/modules/admin/sql/admin.sqlite'; $dataAdmin['db.admin.user' ] = Form::getFormValue('txtUserName'); $dataAdmin['db.admin.password'] = Form::getFormValue('txtPassword'); $xml=MConfigLoader::generateConfigXML($dataAdmin, 'admin'); file_put_contents($dest . '/modules/admin/etc/module.conf', $xml); $theme->clearContent(); $messageInfo = "
Finished! |
Miolo 2 was successfully installed! Please create the following VirtualHost in your apache conf. |
Remember to update your hosts information, otherways you'll not be able to access the new host. |