Commits

Anonymous committed 27d4c78

added windows compatibility stuff. to be reviewed.

Comments (0)

Files changed (6)

  **/
 
 header ("Content-Type: text/html; charset=UTF-8");
-
-$cwd = getcwd ()."/..";
-ini_set("include_path", $cwd."/php:".$cwd."/php/base:".$cwd."/var/php:.");
+require_once("../osdependencies.php");
+//$cwd = getcwd ()."/..";
+//ini_set("include_path", $cwd."/php:".$cwd."/php/base:".$cwd."/var/php:.");
 require_once ("privileges.php");
-require_once ("GameDB.inc.php");
+require_once ("../php/base/GameDB.inc.php");
 require_once ("../php/base/config.inc.php");
 ?>
 

brain/build-export.php

 <?php
 
-require_once ("config.inc.php");
-require_once ("functions.inc.php");
+require_once ("../php/base/config.inc.php");
+require_once ("../php/base/functions.inc.php");
 require_once ("../php/base/GameDB.inc.php");
 
 if (argc)

brain/unit-export.php

 
 // Don't push - this code is crude
 
-require_once ("config.inc.php");
-require_once ("functions.inc.php");
+require_once ("../php/base/config.inc.php");
+require_once ("../php/base/functions.inc.php");
 require_once ("../php/base/GameDB.inc.php");
 
 if (argc)
 // version of Selador available to your users. So if you have changed
 // the code, don't just link back to the project web page (unless of
 // course you have checked your changes back in :)
-
-$cwd = getcwd ();
-ini_set("include_path", $cwd."/php:".$cwd."/php/base:".$cwd."/var/php:.");
-
+require_once("osdependencies.php");
 require_once ("config.inc.php");
 
 @session_start ();
 // the code, don't just link back to the project web page (unless of
 // course you have checked your changes back in :)
 
-$cwd = getcwd ();
-ini_set("include_path", $cwd."/php:".$cwd."/php/base:".$cwd."/var/php:.");
+require_once("osdependencies.php");
 
 require_once ("config.inc.php");
 

php/base/user.inc.php

 // Setup the include path automagically
 // First we need to check if our paths are already in the include path
 $incpath = ini_get ("include_path");
-
+require_once("osdependencies.php");
 if (!strstr ($cwd, BASE_PATH))
 {
-	ini_set ("include_path", BASE_PATH."php:".BASE_PATH."php/base:".BASE_PATH."var/php:/usr/share/php:.");
+  //ini_set("include_path", $cwd."/php".SEPARATOR.$cwd."/php/base".SEPARATOR.$cwd."/var/php".SEPARATOR.".");
+	ini_set ("include_path", BASE_PATH."php".SEPARATOR.BASE_PATH."php/base".SEPARATOR.BASE_PATH."var/php".SEPARATOR."/usr/share/php".SEPARATOR.".");
 }
 include_once ("unitmap.php");