Mod's to better support win32 if perl exists.
This commit is contained in:
parent
850a746ed2
commit
14bb8f337c
1 changed files with 17 additions and 7 deletions
|
@ -30,17 +30,24 @@
|
||||||
# Flight Gear Version
|
# Flight Gear Version
|
||||||
$version_major = "0";
|
$version_major = "0";
|
||||||
|
|
||||||
|
$path = "";
|
||||||
|
|
||||||
# name of Flight Gear executable
|
# name of Flight Gear executable
|
||||||
$program = "fg" . $version_major;
|
@programs = ( "fg" . $version_major, "fg" . $version_major . ".exe" );
|
||||||
|
|
||||||
# see if we can find the executable
|
# see if we can find the executable
|
||||||
|
while ( $path eq "" && ($program = shift(@programs)) ) {
|
||||||
|
print "$program\n";
|
||||||
|
|
||||||
if ( -x "./Main/$program" ) {
|
if ( -x "./Main/$program" ) {
|
||||||
$path = "./Main/$program";
|
$path = "./Main/$program";
|
||||||
} elsif ( -x "./$program" ) {
|
} elsif ( -x "./$program" ) {
|
||||||
$path = "./$program";
|
$path = "./$program";
|
||||||
} else {
|
|
||||||
die "Cannot locate $program\n";
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
die "Cannot locate program.\n" if ( $path eq "" );
|
||||||
|
|
||||||
|
|
||||||
# set the FG_ROOT environment variable if it hasn't already been set.
|
# set the FG_ROOT environment variable if it hasn't already been set.
|
||||||
if ( $ENV{FG_ROOT} eq "" ) {
|
if ( $ENV{FG_ROOT} eq "" ) {
|
||||||
|
@ -59,6 +66,9 @@ exec("$path @ARGV");
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# $Log$
|
# $Log$
|
||||||
|
# Revision 1.4 1998/03/09 22:52:38 curt
|
||||||
|
# Mod's to better support win32 if perl exists.
|
||||||
|
#
|
||||||
# Revision 1.3 1998/02/16 16:17:34 curt
|
# Revision 1.3 1998/02/16 16:17:34 curt
|
||||||
# Minor tweaks.
|
# Minor tweaks.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue