function doInstall()
 {
     // step 1: install the admin database;
     // step 2: install the user App;
     // step 3: redirect the Admin/Index/index;
     // check if the Admin app had install
     if (!is_app_installed('Admin')) {
         // TODO : install it self first
         $res = install_app('Admin');
         //TODO : push the Admin data into Admin
         $res = regist_app('Admin');
         $res = install_app('User');
         $res = regist_app('User');
         $res = install_app('Attach');
         $res = regist_app('Attach');
         $res = $this->_registAdminUser();
         // TODO : redirect to the login html
         //exit('Admin install finish');
         $this->success(L('install_app_success'), U('Admin/Public/index'));
     } else {
         exit(L('err_install_app_fail'));
     }
 }
 private function _doUnInstallApp($name)
 {
     if (isset($name) && is_app_installed($name)) {
         $res = unregist_app($name);
         uninstall_app($name);
         if ($res) {
             $this->success(L('msg_uninstall_app_success'), U('Admin/Admin/index'));
         } else {
             $this->error(L('err_uninstall_app_fail'));
         }
     }
 }