예제 #1
0
 public override string ToString()
 {
     if (Child == null)
     {
         return(FileReference.ToString());
     }
     return(FileReference + " [" + Child.Filename + "]");
 }
예제 #2
0
    private static string GetMsBuildExe(TargetPlatformData TargetData)
    {
        if (TargetData.Platform == UnrealTargetPlatform.Win64)
        {
            return(MsBuildExe.ToString());
        }

        throw new AutomationException(String.Format("Non-MSBuild or unsupported platform '{0}' supplied to GetMsBuildExe", TargetData.ToString()));
    }
예제 #3
0
 /// <summary>
 /// Summarize this fragment for the debugger
 /// </summary>
 /// <returns>String representation of this fragment for the debugger</returns>
 public override string ToString()
 {
     if (Location != null)
     {
         return(Location.ToString());
     }
     else if (MarkupMax == 0)
     {
         return(File.ToString());
     }
     else
     {
         return(String.Format("{0}: {1}-{2}", File.ToString(), File.Markup[MarkupMin].Location.LineIdx + 1, File.Markup[MarkupMax - 1].EndLocation.LineIdx + 1));
     }
 }
예제 #4
0
 /// <summary>
 /// Converts a source file to a string for debugging
 /// </summary>
 /// <returns>The full path to the file</returns>
 public override string ToString()
 {
     return(Location.ToString());
 }
예제 #5
0
 public override string ToString()
 {
     return(File.ToString());
 }
    void StageBootstrapExecutable(DeploymentContext SC, string ExeName, string TargetFile, string StagedRelativeTargetPath, string StagedArguments)
    {
        // create a temp script file location
        DirectoryReference IntermediateDir  = DirectoryReference.Combine(SC.ProjectRoot, "Intermediate", "Staging");
        FileReference      IntermediateFile = FileReference.Combine(IntermediateDir, ExeName);

        DirectoryReference.CreateDirectory(IntermediateDir);

        // make sure slashes are good
        StagedRelativeTargetPath = StagedRelativeTargetPath.Replace("\\", "/");

        // make contents
        StringBuilder Script = new StringBuilder();
        string        EOL    = "\n";

        Script.Append("#!/bin/sh" + EOL);
        // allow running from symlinks
        Script.AppendFormat("UE4_TRUE_SCRIPT_NAME=$(echo \\\"$0\\\" | xargs readlink -f)" + EOL);
        Script.AppendFormat("UE4_PROJECT_ROOT=$(dirname \"$UE4_TRUE_SCRIPT_NAME\")" + EOL);
        Script.AppendFormat("chmod +x \"$UE4_PROJECT_ROOT/{0}\"" + EOL, StagedRelativeTargetPath);
        Script.AppendFormat("\"$UE4_PROJECT_ROOT/{0}\" {1} \"$@\" " + EOL, StagedRelativeTargetPath, StagedArguments);

        // write out the
        FileReference.WriteAllText(IntermediateFile, Script.ToString());

        if (Utils.IsRunningOnMono)
        {
            var Result = CommandUtils.Run("sh", string.Format("-c 'chmod +x \"{0}\"'", IntermediateFile.ToString().Replace("'", "'\"'\"'")));
            if (Result.ExitCode != 0)
            {
                throw new AutomationException(string.Format("Failed to chmod \"{0}\"", IntermediateFile));
            }
        }

        SC.StageFile(StagedFileType.NonUFS, IntermediateFile, new StagedFileReference(ExeName));
    }