<?php
if ($_SERVER['REQUEST_URI'] != '/' and substr($_SERVER['REQUEST_URI'], -1) == '/') {
header('Location: http://'.$_SERVER['HTTP_HOST'].rtrim($_SERVER['REQUEST_URI'],'/'));
}
require_once( "r3.php" );
require_once( "stickleback/PluginRegistry.php" );
// allows local running
/* This file is parsed and the paths below are replaced by InstallGui with actual values */
$filepath='@R3HOME_TO_BE_REPLACED@';
$staticpath='@STATICPATH_TO_BE_REPLACED@';
$myargv=array();
if ( isset( $argv ) ) {
$myargv=$argv;
array_shift( $myargv );
}
/* The @STRINGS@ are broken so the replacing will only find the values above literally */
if ( $filepath != '@'.'R3HOME_TO_BE_REPLACED@' ) {
r3::setR3Home(new r3_util_FilePath( $filepath ) );
}
if ( $staticpath == '@'.'STATICPATH_TO_BE_REPLACED@' ) {
$fileobj = new r3_util_FilePath(sys_get_temp_dir() , 'r3static');
$staticpath = $fileobj->toString();
}
$staticname="r3static";
$fileobj = new r3_util_FilePath($staticpath, $staticname);
r3::runGuiCommand( $fileobj->toString(), $staticname, $myargv );
?>