Revision
34
Author
emsmith
Date
2006-11-30 11:32:40 -0800 (Thu, 30 Nov 2006)

Log Message

Move and alter run so it just sets up generic environment - CC_Main will parse argv and set up needed items

Added Paths

Removed Paths

Diff

Copied: desktop/trunk/run.php (from rev 33, desktop/trunk/writer/run.php) (33 => 34)


--- desktop/trunk/writer/run.php	2006-11-30 19:28:08 UTC (rev 33)
+++ desktop/trunk/run.php	2006-11-30 19:32:40 UTC (rev 34)
@@ -0,0 +1,40 @@
+#!/usr/bin/php
+<?php
+/**
+ * run.php - sets up the callicore environment
+ *
+ * can be run via the shebang line on *nix systems - windows users can either
+ * associate the file extension with the php cli or create a shortcut
+ * C:\WINDOWS\system32\cmd.exe /k "C:\Program Files\php-gtk\php.exe"  run.php (for dos window)
+ * or "C:\Program Files\php-gtk\php-win.exe" run.php (your php cli locations may vary)
+ * you should pass an arg that is the name of the callicore program you want to run
+ * e.g. run.php writer
+ *
+ * This is released under the GPL, see docs/license.txt for details
+ *
+ * @author       Elizabeth Smith <emsmith@callicore.net>
+ * @copyright    Elizabeth Smith (c)2006
+ * @link         http://callicore.net/writer
+ * @license      http://www.opensource.org/licenses/gpl-license.php GPL
+ * @version      $Id$
+ * @since        Php 5.2.0
+ * @package      callicore
+ * @subpackage   writer
+ * @category     bin
+ * @filesource
+ */
+
+/**
+ * global defines for the duration of the program
+ * I got tired of typing DIRECTORY_SEPARATOR all the time
+ * also finds the callicore program files root directory because cwd may vary
+ */
+define('DS', DIRECTORY_SEPARATOR, TRUE);
+define('EOL', PHP_EOL, TRUE);
+define('DIR', dirname(__FILE__) . DS, TRUE);
+
+include(DIR . 'lib' . DS . 'main.class.php');
+
+new CC_Main();
+Gtk::main();
+?>
\ No newline at end of file

Deleted: desktop/trunk/writer/run.php (33 => 34)


--- desktop/trunk/writer/run.php	2006-11-30 19:28:08 UTC (rev 33)
+++ desktop/trunk/writer/run.php	2006-11-30 19:32:40 UTC (rev 34)
@@ -1,71 +0,0 @@
-#!/usr/bin/php
-<?php
-/**
- * run.php - sets up the writer environment
- *
- * can be run via the shebang line on *nix systems - windows users can either
- * associate the file extension with the php cli or create a shortcut
- * C:\WINDOWS\system32\cmd.exe /k "C:\Program Files\php-gtk\php.exe"  run.php (for dos window)
- * or "C:\Program Files\php-gtk\php-win.exe" run.php (your php cli locations may vary)
- *
- * This is released under the GPL, see docs/license.txt for details
- *
- * @author       Elizabeth Smith <emsmith@callicore.net>
- * @copyright    Elizabeth Smith (c)2006
- * @link         http://callicore.net/writer
- * @license      http://www.opensource.org/licenses/gpl-license.php GPL
- * @version      $Id$
- * @since        Php 5.2.0
- * @package      callicore
- * @subpackage   writer
- * @category     bin
- * @filesource
- */
-
-/**
- * global defines for the duration of the program
- * I got tired of typing directory_separator all the time
- * also finds the program root directory because cwd may vary
- */
-define('DS', DIRECTORY_SEPARATOR, TRUE);
-define('EOL', PHP_EOL, TRUE);
-define('DIR', dirname(__FILE__) . DS, TRUE);
-
-include(DIR . 'lib' . DS . 'main.class.php');
-
-/**
- * function __autoload
- *
- * overrides php's basic autoload - we use this because you shouldn't have
- * a different autoload defined right now
- *
- * @param string $class class to include
- * @return bool
- */
-function __autoload($class)
-{
-	preg_match_all('/[A-Z][a-z0-9_]*/', $class, $matches);
-	$array = array_map('strtolower', $matches[0]);
-	unset($matches, $class);
-	$file = array_pop($array) . '.class.php';
-	if(!empty($array))
-	{
-		$array[] = '';
-	}
-	$file = DIR . 'lib' . DS . implode(DS, $array) . $file;
-	if(file_exists($file))
-	{
-		include $file;
-		unset($array, $file);
-		return TRUE;
-	}
-	else
-	{
-		unset($array, $file);
-		return FALSE;
-	}
-}
-
-new Main();
-Gtk::main();
-?>
\ No newline at end of file