コード例 #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
<?php

require 'class.WindowsRegistry.php';
$winReg = new WindowsRegistry();
$winReg->ReadValue("HKEY_LOCAL_MACHINE\\Software\\OSAE\\DBSETTINGS", "DBCONNECTION");
$hostname = $winReg->ReadValue("HKEY_LOCAL_MACHINE\\Software\\OSAE\\DBSETTINGS", "DBCONNECTION");
$database = $winReg->ReadValue("HKEY_LOCAL_MACHINE\\Software\\OSAE\\DBSETTINGS", "DBNAME");
$username = $winReg->ReadValue("HKEY_LOCAL_MACHINE\\Software\\OSAE\\DBSETTINGS", "DBUSERNAME");
$password = $winReg->ReadValue("HKEY_LOCAL_MACHINE\\Software\\OSAE\\DBSETTINGS", "DBPASSWORD");
if ($hostname = 'localhost') {
    $hostname = '127.0.0.1';
}
mysql_connect($hostname, $username, $password) or die('Unable to connect!');
mysql_select_db($database);
?>