Exemplo n.º 1
0
        /**
         * Handle the plethora of environment variables required to remote to the Mac
         */
        static public void ConfigurePaths()
        {
            string MachineName = Environment.MachineName;

            XcodeDeveloperDir = Utilities.GetEnvironmentVariable("ue.XcodeDeveloperDir", "/Applications/Xcode.app/Contents/Developer/");

            // MacName=%ue4.iPhone_SigningServerName%
            MacName = Config.OverrideMacName != null ? Config.OverrideMacName : Utilities.GetEnvironmentVariable("ue.IOSSigningServer", "a1487");
            iPhone_SigningDevRootMac = Config.OverrideDevRoot != null ? Config.OverrideDevRoot : "/UE4/Builds";

            if (!Config.bUseRPCUtil)
            {
                bool Results = SSHCommandHelper.Command(MacName, "xcode-select --print-path", "/usr/bin");
                if (Results)
                {
                    XcodeDeveloperDir = (string)SSHCommandHelper.SSHReturn["CommandOutput"] + "/";
                    XcodeDeveloperDir = XcodeDeveloperDir.TrimEnd();
                }
            }

            // get the path to mirror into on the Mac
            string BinariesDir = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\.."));
            string Root        = Path.GetPathRoot(BinariesDir);
            string BranchPath  = MachineName + "/" + Root[0].ToString() + "/" + BinariesDir.Substring(Root.Length);

            BranchPath = BranchPath.Replace('\\', '/');

            // similar for the game path (strip off the D:\ tpe root)
            BinariesDir = Path.GetFullPath(Path.Combine(Config.BinariesDirectory, ".."));
            Root        = Path.GetPathRoot(BinariesDir);

            string GameBranchPath;

            if (Program.GameName == "UE4Game")
            {
                GameBranchPath = BranchPath;
            }
            else
            {
                GameBranchPath = MachineName + "/" + Root[0].ToString() + "/" + BinariesDir.Substring(Root.Length);
                GameBranchPath = GameBranchPath.Replace('\\', '/');
            }

            Console.WriteLine("BranchPath = {0} --- GameBranchPath = {1}", BranchPath, GameBranchPath);

            // generate the directories to recursively copy into later on
            MacStagingRootDir  = string.Format("{0}/{1}/" + Config.OSString, iPhone_SigningDevRootMac, GameBranchPath);
            MacStagingRootDir  = MacStagingRootDir.Replace("//", "/");
            MacBinariesDir     = string.Format("{0}/{1}/" + Config.OSString, iPhone_SigningDevRootMac, GameBranchPath);
            MacBinariesDir     = MacBinariesDir.Replace("//", "/");
            MacXcodeStagingDir = string.Format("{0}/{1}/" + Config.OSString + "/XcodeSupportFiles", iPhone_SigningDevRootMac, GameBranchPath);
            MacXcodeStagingDir = MacXcodeStagingDir.Replace("//", "/");

            MacMobileProvisionFilename = MachineName + "_UE4Temp.mobileprovision";
            MacSigningIdentityFilename = MachineName + "_UE4Temp.p12";
        }
Exemplo n.º 2
0
        /**
         * Handle the plethora of environment variables required to remote to the Mac
         */
        static public void ConfigurePaths()
        {
            string MachineName = Environment.MachineName;

            XcodeDeveloperDir = Utilities.GetEnvironmentVariable("ue.XcodeDeveloperDir", "/Applications/Xcode.app/Contents/Developer/");

            // MacName=%ue4.iPhone_SigningServerName%
            MacName = Config.OverrideMacName != null ? Config.OverrideMacName : Utilities.GetEnvironmentVariable("ue.IOSSigningServer", "a1487");
            iPhone_SigningDevRootMac = Config.OverrideDevRoot != null ? Config.OverrideDevRoot : "/UE4/Builds";

            // get the path to mirror into on the Mac
            string BinariesDir = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\.."));
            string Root        = Path.GetPathRoot(BinariesDir);
            string BranchPath  = MachineName + "/" + Root[0].ToString() + "/" + BinariesDir.Substring(Root.Length);

            BranchPath = BranchPath.Replace('\\', '/');

            // similar for the game path (strip off the D:\ tpe root)
            BinariesDir = Path.GetFullPath(Path.Combine(Config.BinariesDirectory, ".."));
            Root        = Path.GetPathRoot(BinariesDir);

            string GameBranchPath;

            if (Program.GameName == "UE4Game")
            {
                GameBranchPath = BranchPath;
            }
            else
            {
                GameBranchPath = MachineName + "/" + Root[0].ToString() + "/" + BinariesDir.Substring(Root.Length);
                GameBranchPath = GameBranchPath.Replace('\\', '/');
            }

            Console.WriteLine("BranchPath = {0} --- GameBranchPath = {1}", BranchPath, GameBranchPath);

            // generate the directories to recursively copy into later on
            MacStagingRootDir  = string.Format("{0}/{1}/IOS", iPhone_SigningDevRootMac, GameBranchPath);
            MacBinariesDir     = string.Format("{0}/{1}/IOS", iPhone_SigningDevRootMac, GameBranchPath);
            MacXcodeStagingDir = string.Format("{0}/{1}/IOS/XcodeSupportFiles", iPhone_SigningDevRootMac, GameBranchPath);

            MacMobileProvisionFilename = MachineName + "_UE4Temp.mobileprovision";

            CurrentBaseXCodeCommandLine = GetBaseXcodeCommandline();
        }