Forums

Discussions of the easy to use open source game control panel.

You are not logged in.

Announcement

Welcome on board ! We are very proud to present you our forums powered by FluxBB ! Please Register, do not forget to read carefully Forum Rules and feel free to Contact Us if you see any problems. Finally, take part in site life !

#1 2014-08-23 17:27:05

Shooting King
Member
Registered: 2014-08-23
Posts: 8

How does BGP copy Files to $gameServerPath in gameinstalled.php

How does BGP copy gameFiles from cache to $gameServerPath, when gameserver is created, automatically ?
All i see in gameinstaller.php is

[== PHP ==]
public function makeGameServer( )
	{
		if ( $this->gameSet ) {
			if ( (!empty( $this->repoPath )) && (!empty($this->gameServerPath)) ) {
				if (!empty( $this->actions )) {

					$query = "echo \"Status: GameInstaller::makeGameServer( ) Initialized ".date("Y-m-d H:i:s")."\" > ".$this->gameServerPath.'.cacheinfo ; ';

					foreach ($this->actions['installGame'] as $action => $values) {
						$queryParts = $this->buildQuery( $action, $values, 'installGame' );

						if ($queryParts == FALSE) {
							return FALSE;
						}

						$query .= $queryParts;
					}

					// Log Once Finished...
					$query .= "echo \"Status: GameInstaller::makeGameServer( ) Completed\" >> ".$this->gameServerPath.'.cacheinfo ; ';
					$query .= "echo \"mtime: $(date +%s)\" >> ".$this->gameServerPath.'.cacheinfo ; ';

					$query .= "rm ".$this->gameServerPath.'.cachescript ; '; // Delete install script at the end
					$query .= "rm ".$this->gameServerPath.'.cacheuid ; '; // Delete screen uid

					$execute = $this->executeQuery( $query, 'installGame' );

					return $execute;
				}
			}
		}

		return FALSE;
	}

Its only executing the actions defined in <game>/manifest.xml file.

Last edited by Shooting King (2014-08-25 13:37:40)

Offline

Board footer

Powered by FluxBB