コード例 #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
ファイル: init.php プロジェクト: vt77/phptinymvc
<?php

global $settings;
$classesincludedirs = array();
addIncludePath('classes');
function __autoload($class_name)
{
    global $classesincludedirs;
    $classfilename = str_replace('\\', DIRECTORY_SEPARATOR, $class_name) . '.class.php';
    foreach ($classesincludedirs as $dir) {
        $filename = $dir . DIRECTORY_SEPARATOR . $classfilename;
        if (file_exists($filename)) {
            include $filename;
        }
    }
}
function addIncludePath($path)
{
    global $classesincludedirs;
    $absolutepath = PHPTINYMVC_HOME . DIRECTORY_SEPARATOR . $path;
    array_push($classesincludedirs, $absolutepath);
}
function debug($msg, $level)
{
    global $debug;
    if ($level < $debug) {
        echo sprintf("[%s][DEBUG]%s\n", @date('Y-m-d H:i:s'), $msg);
    }
}
コード例 #3
0
ファイル: process.php プロジェクト: uhtoff/eCRF
         header('Cache-Control: max-age=0');
         // output the file
         echo $output;
         exit;
     }
     break;
 case 'locksite':
     if (isset($_POST['lockSite'])) {
         $centre = new Centre($user->getCentre());
         $centre->lockSite();
         $_SESSION['message'] = "You have locked your site for data entry, you may now download your data from Admin->Download your data";
     }
     break;
 case 'certs':
     addIncludePath('/addons/tfpdf');
     addIncludePath('/addons/fpdi');
     // Check first for if the confirmation code is being issued
     $certificate = "lead";
     $name = $user->forename . ' ' . $user->surname;
     // map FPDF to tFPDF so FPDF_TPL can extend it
     class FPDF extends tFPDF
     {
         protected $_tplIdx;
     }
     $pdf = new FPDI();
     if ($user->getPrivilege() <= 10) {
         $source = "docs/certificatelead.pdf";
     } else {
         $source = "docs/certificate.pdf";
     }
     $pagecount = $pdf->setSourceFile($source);
コード例 #4
0
ファイル: Torque3D.php プロジェクト: RasterCode/Torque3D
 static function beginConfig($platform, $projectName)
 {
     setPlatform($platform);
     beginProject($projectName, self::$sharedConfig);
     self::includeDefaultLibs();
     $ext = "DLL";
     if (Generator::$platform == "mac") {
         $ext = "Bundle";
     }
     //some platforms will not want a shared config
     if (Generator::$platform == "360" || Generator::$platform == "ps3") {
         self::$sharedConfig = false;
     }
     //begin either a shared lib config, or a static app config
     if (self::$sharedConfig) {
         beginSharedLibConfig(getGameProjectName() . ' ' . $ext, '{C0FCDFF9-E125-412E-87BC-2D89DB971CAB}', 'game', getGameProjectName());
     } else {
         beginAppConfig(getGameProjectName(), '{C0FCDFF9-E125-412E-87BC-2D89DB971CAB}', 'game', getGameProjectName());
     }
     /// Prefs
     addProjectDefine('TORQUE_SHADERGEN');
     addProjectDefine('TORQUE_UNICODE');
     if (self::$sharedConfig) {
         addProjectDefine('TORQUE_SHARED');
     }
     /// For OPCODE
     addProjectDefine('BAN_OPCODE_AUTOLINK');
     addProjectDefine('ICE_NO_DLL');
     addProjectDefine('TORQUE_OPCODE');
     // For libTomCrypt
     addProjectDefine('LTC_NO_PROTOTYPES');
     // Additional includes
     addIncludePath("../../game/shaders");
     addLibIncludePath("lmng");
     addLibIncludePath("lpng");
     addLibIncludePath("ljpeg");
     addLibIncludePath("lungif");
     addLibIncludePath("zlib");
     addLibIncludePath("tinyxml");
     addLibIncludePath("opcode");
     addLibIncludePath("squish");
     addLibIncludePath('convexDecomp');
     if (Generator::$platform != "360" && Generator::$platform != "ps3") {
         addLibIncludePath("libvorbis/include");
         addLibIncludePath("libogg/include");
         addLibIncludePath("libtheora/include");
     }
     // Modules
     includeModule('core');
     includeModule('dsound');
     //includeModule( 'fmod'); // FMOD support removed until made as a 3rd party library
     includeModule('T3D');
     includeModule('advancedLighting');
     includeModule('basicLighting');
     includeModule('collada');
     if (Generator::$platform != "360" && Generator::$platform != "ps3") {
         includeModule('vorbis');
         includeModule('theora');
     }
     if (Generator::$platform == "mac" || Generator::$platform == "win32") {
         includeModule('openal');
     }
     // Dependencies
     addProjectDependency('lmng');
     addProjectDependency('lpng');
     addProjectDependency('lungif');
     addProjectDependency('ljpeg');
     addProjectDependency('zlib');
     addProjectDependency('tinyxml');
     addProjectDependency('opcode');
     addProjectDependency('squish');
     addProjectDependency('collada_dom');
     addProjectDependency('pcre');
     addProjectDependency('convexDecomp');
     if (Generator::$platform != "360" && Generator::$platform != "ps3") {
         addProjectDependency('libvorbis');
         addProjectDependency('libogg');
         addProjectDependency('libtheora');
     }
     if (Generator::$platform == "mac") {
         addProjectDefine('__MACOSX__');
         addProjectDefine('LTM_DESC');
     }
     if (Generator::$platform == "win32") {
         setProjectModuleDefinitionFile('../../' . getLibSrcDir() . 'Torque3D/msvc/torque3d.def');
         addProjectDefine('UNICODE');
         addProjectDefine('INITGUID');
         addProjectDefine('_CRT_SECURE_NO_DEPRECATE');
         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('d3d9.lib');
         addProjectLibInput('d3dx9.lib');
         addProjectLibInput('DxErr.lib');
         addProjectLibInput('ole32.lib');
         addProjectLibInput('shell32.lib');
         addProjectLibInput('oleaut32.lib');
         addProjectLibInput('version.lib');
     }
     // Include project specific sources in the project/buildFiles/config/projectCode.conf
     $projectCode = realpath($argv[1]) . "/buildFiles/config/projectCode.conf";
     echo "\n   - Loading project code configuration from " . $projectCode . "\n";
     include $projectCode;
 }
コード例 #5
0
ファイル: setup.php プロジェクト: uhtoff/eCRF
<?php

if (count(get_included_files()) == 1) {
    exit("Direct access not permitted.");
}
if (php_sapi_name() === 'cli') {
    $path = '.';
} else {
    $path = $_SERVER['DOCUMENT_ROOT'];
}
require $path . '/libs/serverconfig.php';
addIncludePath('/classes');
addIncludePath('/addons');
$trial = 'PRISM';
Config::set('userdb', $db);
Config::set('database', $db);
Config::set('trial', $trial);
Config::set('idName', 'PRISM ID');
if (!DB::setDB($db)) {
    exit('Unable to set database');
}
require 'ecrflib.php';
require 'mainlib.php';
session_name('PRISM');
コード例 #6
0
ファイル: api.php プロジェクト: bpjohnson/simple-rest-api
<?php

error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT ^ E_WARNING ^ E_DEPRECATED);
ini_set('display_errors', 1);
ini_set('always_populate_raw_post_data', 1);
$configFile = '../config/config.inc';
include_once "./alib/alib.inc";
global $debug, $config;
addIncludePath('./alib');
addIncludePath('./');
addIncludePath('../..');
addIncludePath('../api', true);
addIncludePath('../config', true);
include_once './alib/iuser.inc';
include_once './functions.inc';
include_once './login.inc';
include_once '../config/smartObjectDefs.inc';
include_once './alib/aWidget.inc';
include_once './alib/anAPI.inc';
#date_default_timezone_set('America/New_York');
try {
    // Connect to the db:
    if (!is_object($db)) {
        $db = new idb($config->mainDB);
        if ($config->mainDB != $config->userDB) {
            $userdb = new idb($config->userDB);
        } else {
            $userdb = $db;
        }
    }
    $login = new $config->loginModule();
コード例 #7
0
ファイル: index.php プロジェクト: twelvefootguru/anApp
<?php

//error_reporting(E_ALL);
//ini_set('display_errors',1);
ini_set('always_populate_raw_post_data', 1);
$configFile = 'common/config.inc';
include_once "./alib/alib.inc";
global $debug, $config;
addIncludePath('./alib');
addIncludePath('./common');
addIncludePath('./php', TRUE);
include_once '../alib/iuser.inc';
include_once './common/functions.inc';
include_once './common/login.inc';
include_once './common/smartObjectDefs.inc';
// Connect to the db:
if (!is_object($db)) {
    $db = new idb($config->mainDB);
}
D::log('db');
D::v($db);
$login = new $config->loginModule();
if ($login->loggedIn || $config->allowNonLoggedIn) {
    global $user, $broker;
    $broker = new broker();
} elseif (stristr($_SERVER['REQUEST_URI'], 'api')) {
    $api = new publicAPI();
} else {
    $template = new template($config->loginTemplate);
    $template->set('title', $config->defaultTitle);
    $template->set('appName', $config->appName);