Exemplo n.º 1
0
        public override bool PrepTargetForDeployment(UEBuildTarget InTarget)
        {
            string InAppName = InTarget.AppName;

            Log.TraceInformation("Prepping {0} for deployment to {1}", InAppName, InTarget.Platform.ToString());
            System.DateTime PrepDeployStartTime = DateTime.UtcNow;

            string TargetFilename      = RulesCompiler.GetTargetFilename(InAppName);
            string ProjectSourceFolder = new FileInfo(TargetFilename).DirectoryName + "/";

            string RelativeTargetDirectory;
            string EngineSourceRelativeBinaryPath;

            UWPProjectGenerator.GetTargetUWPPaths(InAppName, InTarget.Rules, out EngineSourceRelativeBinaryPath, out RelativeTargetDirectory);

            PrepForUATPackageOrDeploy(InAppName, InTarget.ProjectDirectory, InTarget.OutputPath, BuildConfiguration.RelativeEnginePath, false, "");

            // TODO - richiem - restore this if we find that it's needed.
            //Log.TraceInformation("...copying the CELL dll...");
            //string CELLPath = "../../../Engine/Source/" + UEBuildConfiguration.UEThirdPartySourceDirectory + "CELL/lib/win64/";
            //string CELLPathRelease = CELLPath + "Release/";
            //string CELLDllRelease = "CommonEventLoggingLibrary.dll";
            //string CELLPathDebug = CELLPath + "Debug/";
            //string CELLDllDebug = "CommonEventLoggingLibraryd.dll";

            //CopyFile(EngineSourceRelativeBinaryPath + CELLPathRelease + CELLDllRelease, EngineSourceRelativeBinaryPath + CELLDllRelease, true);
            //CopyFile(EngineSourceRelativeBinaryPath + CELLPathDebug + CELLDllDebug, EngineSourceRelativeBinaryPath + CELLDllDebug, true);

            //string XSAPIPath            = EngineSourceRelativeBinaryPath + "../../../Engine/Source/ThirdParty/XSAPI/lib/";
            //string XboxServicesConfig   = "xboxservices.config";
            //string DesktopLogin         = "******";

            //Log.TraceInformation("...copying xboxservices.config");
            //CopyFile(XSAPIPath + XboxServicesConfig, EngineSourceRelativeBinaryPath + XboxServicesConfig, true);
            //Log.TraceInformation("...copying DesktopLogin.exe...");
            //CopyFile(XSAPIPath + DesktopLogin, EngineSourceRelativeBinaryPath + DesktopLogin, true);

            // TODO - richiem - restore this if we find that it's needed.
            //if (InTarget.Configuration == UnrealTargetConfiguration.Development)
            //{
            //    Log.TraceInformation("...copying AutoLogin...");
            //    string AutoLoginPath    = EngineSourceRelativeBinaryPath + "../../../Engine/Source/Tools/AutoLogin/";
            //    string AutoLoginDLL     = "AutoLogin.dll";
            //    string AutoLoginBat     = "AutoLogin.bat";
            //    CopyFile(AutoLoginPath + "bin/Debug/" + AutoLoginDLL, EngineSourceRelativeBinaryPath + AutoLoginDLL, true);
            //    CopyFile(AutoLoginPath + AutoLoginBat, EngineSourceRelativeBinaryPath + AutoLoginBat, true);
            //}



            // Log out the time taken to deploy...
            double PrepDeployDuration = (DateTime.UtcNow - PrepDeployStartTime).TotalSeconds;

            Log.TraceInformation("UWP deployment preparation took {0:0.00} seconds", PrepDeployDuration);

            return(true);
        }
Exemplo n.º 2
0
        public static void GetTargetUWPPaths(string InTargetName, TargetRules InTargetRules,
                                             out string OutEngineSourceRelativeBinaryPath, out string OutRelativeTargetPath)
        {
            OutEngineSourceRelativeBinaryPath = "";
            OutRelativeTargetPath             = "";

            string TargetFilename = RulesCompiler.GetTargetFilename(InTargetName);

            string ProjectSourceFolder = new FileInfo(TargetFilename).DirectoryName;

            string EnginePath             = Path.Combine(ProjectFileGenerator.EngineRelativePath);
            string EngineSourcePath       = Path.Combine(EnginePath, "Source");
            string RelativeTargetFilename = Utils.MakePathRelativeTo(TargetFilename, EngineSourcePath);

            if ((RelativeTargetFilename.StartsWith("..") == false) && (RelativeTargetFilename.Contains(":") == false))
            {
                // This target must be UNDER Engine/Source...
                RelativeTargetFilename = Path.Combine(EngineSourcePath, RelativeTargetFilename);
            }
            RelativeTargetFilename = RelativeTargetFilename.Replace("\\", "/");
            EnginePath             = EnginePath.Replace("\\", "/");

            Int32 LastSourceIdx = RelativeTargetFilename.LastIndexOf("Source");

            if (LastSourceIdx != -1)
            {
                RelativeTargetFilename = RelativeTargetFilename.Substring(0, LastSourceIdx);
            }
            else
            {
                RelativeTargetFilename = "";
            }

            OutRelativeTargetPath = RelativeTargetFilename;

            if (InTargetRules.bOutputToEngineBinaries)
            {
                RelativeTargetFilename = EnginePath;
            }
            OutEngineSourceRelativeBinaryPath = Path.Combine(RelativeTargetFilename, "Binaries/UWP/");
            OutEngineSourceRelativeBinaryPath = OutEngineSourceRelativeBinaryPath.Replace("\\", "/");
        }