コード例 #1
0
 function process($project)
 {
     $windowsRegistry = new WindowsRegistry();
     $MozillaVersion = $windowsRegistry->ReadValue('HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\Mozilla Firefox', 'CurrentVersion', TRUE);
     $MozillaExe = $windowsRegistry->ReadValue('HKEY_LOCAL_MACHINE\\SOFTWARE\\Mozilla\\Mozilla Firefox\\' . $MozillaVersion . '\\Main', 'PathToExe', TRUE);
     // FireFox registry settings
     $MozillaKey = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\MozillaPlugins\\@';
     $html = 'file://' . getcwd() . '/game/web/sample.html';
     $html = str_replace("\\", "/", $html);
     $html = str_replace(" ", "%20", $html);
     $project->commandRelease = $MozillaExe;
     $project->commandDebug = $MozillaExe;
     $project->commandOptimized = $MozillaExe;
     $project->argsRelease = $html;
     $project->argsDebug = $html;
     $project->argsOptimized = $html;
     //$windowsRegistry->WriteValue($MozillaKey.$this->COMPANYKEY.'/'.$this->PLUGIN, 'Path', $this->GAMEFOLDER.$this->PLUGINNAME.'.dll');
     //$windowsRegistry->WriteValue($MozillaKey.$this->COMPANYKEY.'/'.$this->PLUGIN, 'ProductName', $this->PRODUCTNAME);
     //$windowsRegistry->WriteValue($MozillaKey.$this->COMPANYKEY.'/'.$this->PLUGIN, 'Vendor', $this->COMPANY);
     //$windowsRegistry->WriteValue($MozillaKey.$this->COMPANYKEY.'/'.$this->PLUGIN, 'Version', $this->VERSION);
     //$windowsRegistry->WriteValue($MozillaKey.$this->COMPANYKEY.'/'.$this->PLUGIN.'\\MimeTypes\\application/'.$this->MIMETYPE, 'Description', $this->DESCRIPTION);
     unset($windowsRegistry);
     $this->processTemplates();
     setProjectModuleDefinitionFile('../../../web/source/npplugin/windows/npWebGamePlugin.def');
     /// Prefs
     addProjectDefine('TORQUE_SHADERGEN');
     addProjectDefine('TORQUE_SHARED');
     addProjectDefine('TORQUE_WEBDEPLOY');
     // Firefox
     addProjectDefine('FIREFOXPLUGIN_EXPORTS');
     addProjectDefine('MOZILLA_STRICT_API');
     addProjectDefine('XP_WIN');
     addProjectDefine('WIN32');
     addProjectDefine('_WINDOWS');
     addProjectDefine('_USRDLL');
     addSrcDir('../web/source/common');
     addSrcDir('../web/source/npplugin');
     addSrcDir('../web/source/npplugin/windows');
     // Additional includes
     addIncludePath("../../web/source/npplugin/windows");
     addProjectLibDir(getAppLibSrcDir() . 'SDL/win32');
     addProjectLibDir(getAppLibSrcDir() . 'unicode');
     // addProjectLibDir( getAppLibSrcDir() . 'mozilla/lib' );
     addProjectLibInput('COMCTL32.LIB');
     addProjectLibInput('COMDLG32.LIB');
     addProjectLibInput('USER32.LIB');
     addProjectLibInput('ADVAPI32.LIB');
     addProjectLibInput('GDI32.LIB');
     addProjectLibInput('WINMM.LIB');
     addProjectLibInput('WSOCK32.LIB');
     addProjectLibInput('vfw32.lib');
     addProjectLibInput('Imm32.lib');
     addProjectLibInput('UnicoWS.lib');
     addProjectLibInput('opengl32.lib');
     addProjectLibInput('glu32.lib');
     addProjectLibInput('ole32.lib');
     addProjectLibInput('shell32.lib');
     addProjectLibInput('oleaut32.lib');
     addProjectLibInput('version.lib');
 }
コード例 #2
0
ファイル: Project.php プロジェクト: tainer32/Torque3D
 private function setTemplateParams($tpl, $output, &$projectFiles)
 {
     // Set the template delimiters
     $tpl->left_delimiter = $output->ldelim ? $output->ldelim : '{';
     $tpl->right_delimiter = $output->rdelim ? $output->rdelim : '}';
     $gameProjectName = getGameProjectName();
     // Evaluate template into a file.
     $tpl->assign_by_ref('projSettings', $this);
     $tpl->assign_by_ref('projOutput', $output);
     $tpl->assign_by_ref('fileArray', $projectFiles);
     $tpl->assign_by_ref('projName', $this->name);
     $tpl->assign_by_ref('projOutName', $this->outputName);
     $tpl->assign_by_ref('gameFolder', $this->game_dir);
     $tpl->assign_by_ref('GUID', $this->guid);
     $tpl->assign_by_ref('projDefines', $this->defines);
     $tpl->assign_by_ref('projDisabledWarnings', $this->disabledWarnings);
     $tpl->assign_by_ref('projIncludes', $this->includes);
     $tpl->assign_by_ref('projLibs', $this->libs);
     $tpl->assign_by_ref('projLibsDebug', $this->libsDebug);
     $tpl->assign_by_ref('projLibsIgnore', $this->libsIgnore);
     $tpl->assign_by_ref('projLibDirs', $this->lib_dirs);
     $tpl->assign_by_ref('projDepend', $this->dependencies);
     $tpl->assign_by_ref('gameProjectName', $gameProjectName);
     $tpl->assign_by_ref('projModuleDefinitionFile', $this->moduleDefinitionFile);
     $tpl->assign_by_ref('projSubSystem', $this->projSubSystem);
     if (T3D_Generator::$useDLLRuntime) {
         // /MD and /MDd
         $tpl->assign('projRuntimeRelease', 2);
         $tpl->assign('projRuntimeDebug', 3);
     } else {
         // /MT and /MTd
         $tpl->assign('projRuntimeRelease', 0);
         $tpl->assign('projRuntimeDebug', 1);
     }
     if (!$this->commandDebug && ($this->isSharedLib() || $this->isSharedApp())) {
         $command = "\$(TargetDir)\\" . $this->outputName;
         $tpl->assign('commandDebug', $command . "_DEBUG.exe");
         $tpl->assign('commandRelease', $command . ".exe");
         $tpl->assign('commandOptimized', $command . "_OPTIMIZEDDEBUG.exe");
     } else {
         $tpl->assign_by_ref('commandDebug', $this->commandDebug);
         $tpl->assign_by_ref('commandRelease', $this->commandRelease);
         $tpl->assign_by_ref('commandOptimized', $this->commandOptimized);
     }
     $tpl->assign_by_ref('argsDebug', $this->argsDebug);
     $tpl->assign_by_ref('argsRelease', $this->argsRelease);
     $tpl->assign_by_ref('argsOptimized', $this->argsOptimized);
     $ptypes = array();
     $projectDepends = array();
     foreach ($this->dependencies as $pname) {
         $p = T3D_Generator::lookupProjectByName($pname);
         $projectDepends[$pname] = $p;
         if ($p) {
             $ptypes[$pname] = $p->isSharedLib() || $p->isSafari();
         }
     }
     $tpl->assign_by_ref('projTypes', $ptypes);
     $tpl->assign_by_ref('projectDepends', $projectDepends);
     // Assign some handy paths for the template to reference
     $tpl->assign('projectOffset', $output->project_rel_path);
     if (T3D_Generator::$absPath) {
         $tpl->assign('srcDir', T3D_Generator::$absPath . "/" . str_replace("../", "", getAppEngineSrcDir()));
     } else {
         $tpl->assign('srcDir', $output->project_rel_path . getAppEngineSrcDir());
     }
     if (T3D_Generator::$absPath) {
         $tpl->assign('libDir', T3D_Generator::$absPath . "/" . str_replace("../", "", getAppLibSrcDir()));
     } else {
         $tpl->assign('libDir', $output->project_rel_path . getAppLibSrcDir());
     }
     if (T3D_Generator::$absPath) {
         $tpl->assign('binDir', T3D_Generator::$absPath . "/" . str_replace("../", "", getAppEngineBinDir()));
     } else {
         $tpl->assign('binDir', $output->project_rel_path . getAppEngineBinDir());
     }
     $tpl->assign('uniformOutputFile', $this->uniformOutputFile);
 }