[opendemo-cvs] CVS: opendemo/tools/odcut odcutgui.pm,1.43,1.44
Status: Beta
Brought to you by:
girlich
From: Uwe G. <gi...@us...> - 2004-10-26 17:53:21
|
Update of /cvsroot/opendemo/opendemo/tools/odcut In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22170 Modified Files: odcutgui.pm Log Message: Remove shell between pwrap.pl and quake3.x86 by changing the directory, calling quake3.x86 directly and changing back. Introduce new variables for the game directory. Index: odcutgui.pm =================================================================== RCS file: /cvsroot/opendemo/opendemo/tools/odcut/odcutgui.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** odcutgui.pm 25 Oct 2004 17:07:35 -0000 1.43 --- odcutgui.pm 26 Oct 2004 17:53:11 -0000 1.44 *************** *** 603,608 **** # TODO make this configurable if (!exists $self->{"game_executable"}) { ! $self->{"game_executable"} = "/home/uwe/games/q3a/game/linuxq3apoint-1.32b-2/quake3"; } if (!exists $self->{"game_opendemo"}) { --- 603,611 ---- # TODO make this configurable + if (!exists $self->{"game_dir"}) { + $self->{"game_dir"} = "/home/uwe/games/q3a/game/linuxq3apoint-1.32b-2"; + } if (!exists $self->{"game_executable"}) { ! $self->{"game_executable"} = $self->{"game_dir"} . "/quake3.x86"; } if (!exists $self->{"game_opendemo"}) { *************** *** 627,631 **** # $self->{"game_opendemo"}; my @command = [ ! "../pwrap.pl", $self->{"game_executable"}, "+set", "fs_game", $self->{"game_opendemo"} --- 630,634 ---- # $self->{"game_opendemo"}; my @command = [ ! Cwd::getcwd() . "/../pwrap.pl", $self->{"game_executable"}, "+set", "fs_game", $self->{"game_opendemo"} *************** *** 634,638 **** --- 637,646 ---- $self->{"odgame"} = odprocess->new($self); $self->{"odgame"}->Redirect(); + # Make sure the external binary will be started in the right directory. + my $prevdir=Cwd::getcwd(); + chdir $self->{"game_dir"}; $self->{"odgame_pid"} = Wx::ExecuteArgs( @command, 0, $self->{"odgame"} ); + # Go back to the old directory. + chdir $prevdir; # Timer *************** *** 937,944 **** $self->{TIMER}->Start($waitsec * 1000.0, 1); if ($self->{TIMER}->IsRunning == 0) { ! printf STDERR "but not running any more.\n"; ! } ! else { ! printf STDERR "OK.\n"; } } --- 945,949 ---- $self->{TIMER}->Start($waitsec * 1000.0, 1); if ($self->{TIMER}->IsRunning == 0) { ! printf STDERR "Timer is not running.\n"; } } *************** *** 983,987 **** my $self = $process->{"object"}; $self->OnProcessEnd(); ! sprintf STDERR "Process '$pid' terminated with status $status"; } --- 988,992 ---- my $self = $process->{"object"}; $self->OnProcessEnd(); ! printf STDERR "Process '$pid' terminated with status $status"; } |