3 #---------------------------------------------------------------------------
4 # runfg -- front end for setting up the FG_ROOT env variable and launching
7 # Written by Curtis Olson, started September 1997.
9 # Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version.
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 # (Log is kept at end of this file)
27 #---------------------------------------------------------------------------
33 # name of Flight Gear executable
34 $program = "fg" . $version_major;
36 # see if we can find the executable
37 if ( -x "./Main/$program" ) {
38 $path = "./Main/$program";
39 } elsif ( -x "./$program" ) {
42 die "Cannot locate $program\n";
45 # set the FG_ROOT environment variable if it hasn't already been set.
46 if ( $ENV{FG_ROOT} eq "" ) {
47 # look for a file called fgtop as a place marker
50 } elsif ( -e "../fgtop" ) {
56 print "Running $path @ARGV\n";
60 #---------------------------------------------------------------------------
62 # Revision 1.3 1998/02/16 16:17:34 curt
65 # Revision 1.2 1998/01/27 00:47:43 curt
66 # Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
67 # system and commandline/config file processing code.
69 # Revision 1.1 1997/10/28 18:47:27 curt