|
@@ -48,6 +48,7 @@ class Project
|
|
|
public $libsIgnore; // Ignore Specific Default Libraries
|
|
|
public $lib_dirs; // Additional library search paths
|
|
|
public $lib_includes; // libs to include (generated by modules)
|
|
|
+ public $fileCopyPaths; // Source and desitnation (relative to project) paths of files to copy into project
|
|
|
public $additionalExePath; // Additional section to inject into executable path
|
|
|
public $dependencies; // Projects this project depends on
|
|
|
public $references; // for managed projects, references to required assemblies
|
|
@@ -87,6 +88,7 @@ class Project
|
|
|
$this->libsIgnore = array();
|
|
|
$this->lib_dirs = array();
|
|
|
$this->lib_includes = array();
|
|
|
+ $this->fileCopyPaths = array();
|
|
|
$this->outputs = array();
|
|
|
$this->dependencies = array();
|
|
|
$this->disabledWarnings = array();
|
|
@@ -570,6 +572,42 @@ class Project
|
|
|
$this->includes = $saved_includes;
|
|
|
$this->lib_dirs = $saved_lib_dirs;
|
|
|
}
|
|
|
+
|
|
|
+ // Copy any files into the project
|
|
|
+ foreach( $this->fileCopyPaths as $paths )
|
|
|
+ {
|
|
|
+ $source = $paths[0];
|
|
|
+ $dest = $paths[1];
|
|
|
+
|
|
|
+ // We need forward slashes for paths.
|
|
|
+ $source = str_replace( "\\", "/", $source);
|
|
|
+ $dest = str_replace( "\\", "/", $dest);
|
|
|
+
|
|
|
+ // Remove trailing slashes.
|
|
|
+ $source = rtrim($source, " /");
|
|
|
+ $dest = rtrim($dest, " /");
|
|
|
+
|
|
|
+ // Remove any beginning slash from the destination
|
|
|
+ $dest = ltrim($dest, " /");
|
|
|
+
|
|
|
+ // Build full destination path
|
|
|
+ $fullDest = $base_dir . "/" . $dest;
|
|
|
+
|
|
|
+ echo( " o Copying file " . $source . " to " . $fullDest . "\n" );
|
|
|
+ if(!copy($source, $fullDest))
|
|
|
+ {
|
|
|
+ trigger_error(
|
|
|
+ "\n*******************************************************************".
|
|
|
+ "\n".
|
|
|
+ "\n Unable to copy required file for project!".
|
|
|
+ "\n".
|
|
|
+ "Source file: " . $source . "\n" .
|
|
|
+ "Destination file: " . $fullDest . "\n" .
|
|
|
+ "\n".
|
|
|
+ "\n*******************************************************************".
|
|
|
+ "\n", E_USER_ERROR );
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|