Changeset 93 for trunk/www/Application/Model/Emulator.php
- Timestamp:
- Aug 15, 2013, 11:17:26 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/Application/Model/Emulator.php
r78 r93 9 9 var $Task; 10 10 11 function __construct($ Database, $Id)11 function __construct($System, $Id) 12 12 { 13 $this->Database = $Database;14 $this->Task = new Task($ Database);13 parent::__construct($System); 14 $this->Task = new Task($System); 15 15 $this->Id = $Id; 16 16 $DbResult = $this->Database->query('SELECT * FROM `Emulator` WHERE `Id`='.$Id); … … 35 35 function Download() 36 36 { 37 global $Config;38 39 37 $this->Lock(); 40 38 $this->Task->Add('Stažení emulátoru', array( 41 39 'php www/shell.php EmulatorLock '.$this->Id, 42 'mkdir '.$ Config['BaseDir'].'emulator/'.$this->Id.'/',43 'cd '.$ Config['BaseDir'].'emulator/'.$this->Id.'/',40 'mkdir '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/', 41 'cd '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/', 44 42 'git clone git://github.com/mangos/mangos.git source', 45 43 'cd source', … … 55 53 function Compile() 56 54 { 57 global $Config;58 59 55 $this->Lock(); 60 56 $this->Task->Add('Překlad emulátoru', array( 61 57 'php www/shell.php EmulatorLock '.$this->Id, 62 'cd '.$ Config['BaseDir'].'emulator/'.$this->Id.'/source',58 'cd '.$this->Config['BaseDir'].'emulator/'.$this->Id.'/source', 63 59 'autoreconf -ifv', 64 60 'mkdir objdir', 65 61 'cd objdir', 66 'export CFLAGS="-g -ggdb '.$ Config['CompilerParameters'].'"',67 'export CXXFLAGS="-g -ggdb '.$ Config['CompilerParameters'].'"',68 '../configure --prefix='.$ Config['BaseDir'].'emulator/'.$this->Id.'/ --enable-cli --enable-ra',62 'export CFLAGS="-g -ggdb '.$this->Config['CompilerParameters'].'"', 63 'export CXXFLAGS="-g -ggdb '.$this->Config['CompilerParameters'].'"', 64 '../configure --prefix='.$this->Config['BaseDir'].'emulator/'.$this->Id.'/ --enable-cli --enable-ra', 69 65 'make', 70 66 'make install', … … 99 95 } 100 96 } 101 102 ?>
Note:
See TracChangeset
for help on using the changeset viewer.