public function __construct() { $this->basedir = realpath(dirname(__FILE__)); if (is_executable("{$this->basedir}/../bin/pawncc.exe")) { $this->pawncc_path = realpath("{$this->basedir}/../bin/pawncc.exe"); } if (!isset(self::$compiler_args)) { self::$compiler_args = array_fill_keys(explode(' ', 'A a C c D d e H i l o O p r S s t v w X XD \\ ^ ;+ (+ ;- (- ; ('), true); } $this->is_windows = strpos(PHP_OS, 'WIN') !== false; if (!$this->is_windows) { $path = getenv('PATH'); if (empty($path)) { trigger_error('Unable to read environment variable PATH.', E_USER_ERROR); } $path = explode(':', $path); $path[] = '/opt/local/bin'; $path[] = '/opt/local/sbin'; foreach ($path as $search_path) { if (@is_executable("{$search_path}/wine")) { $this->wine_dir = $search_path; break; } } if ($this->wine_dir == null) { trigger_error('Unable to locate Wine. Make sure it\'s installed.', E_USER_ERROR); } } }