Example #1
0
 static function endProjectConfig($type)
 {
     //echo( "PT: " .$type. ":".self::$project_cur->type . "\n");
     if (self::$project_cur) {
         if (self::$project_cur->type == $type) {
             echo "      - end project " . self::$project_cur->name . "\n";
             // Set project outputs
             self::$project_cur->outputs = BuildTarget::getInstances();
             // Allow project to optimize and validate state, etc
             self::$project_cur->validate();
             // Bit of flummery from original code, not sure what it is supposed to do -- neo
             if ($type == Project::$TYPE_LIB) {
                 // Merge lib includes to global lib include array
                 self::$app_lib_includes = array_merge(self::$app_lib_includes, self::$project_cur->includes);
             } else {
                 if ($type == Project::$TYPE_SHARED_LIB) {
                     // Merge lib includes into app include list
                     self::$app_lib_includes = array_merge(self::$app_lib_includes, self::$project_cur->includes);
                 } else {
                     if ($type == Project::$TYPE_ACTIVEX) {
                         // Merge lib includes into app include list
                         self::$app_lib_includes = array_merge(self::$app_lib_includes, self::$project_cur->includes);
                     } else {
                         if ($type == Project::$TYPE_SAFARI) {
                             // Merge lib includes into app include list
                             self::$app_lib_includes = array_merge(self::$app_lib_includes, self::$project_cur->includes);
                         } else {
                             if ($type == Project::$TYPE_SHARED_APP) {
                                 // Merge lib includes into app include list
                                 self::$app_lib_includes = array_merge(self::$app_lib_includes, self::$project_cur->includes);
                             } else {
                                 if ($type == Project::$TYPE_APP) {
                                     // Merge lib includes into app include list
                                     self::$project_cur->addIncludes(self::$app_lib_includes);
                                 }
                             }
                         }
                     }
                 }
             }
             // Clear out sucker
             $p = self::$project_cur;
             self::$project_cur = null;
             // Now include any libraries included in the modules
             foreach ($p->lib_includes as $libName) {
                 require T3D_Generator::getGeneratorLibsPath() . $libName . '.conf';
             }
         } else {
             trigger_error("T3D_Generator::endProjectConfig() - closing type mismatch!", E_USER_ERROR);
         }
     } else {
         trigger_error("T3D_Generator::endProjectConfig() - no currently open project!", E_USER_ERROR);
     }
 }