示例#1
0
        public static string UpdateXCodeProjectAction()
        {
            var target = The.UI.GetActiveTarget();

            if (target.Platform != TargetPlatform.iOS)
            {
                UserInterface.Instance.ExitWithErrorIfPossible();
                return("Error updating XCode project: active target must target iOS platform.");
            }
            if (The.Workspace.ProjectJson.GetValue <bool>("XCodeProject/DoSvnUpdate"))
            {
                Subversion.Update(GetXCodeProjectFolder());
            }
            AssetCooker.CookForTarget(
                target,
                new [] { CookingRulesBuilder.MainBundleName }
                );
            var solutionPath = The.Workspace.GetSolutionFilePath(TargetPlatform.iOS);
            var builder      = new SolutionBuilder(TargetPlatform.iOS, solutionPath);
            var output       = new StringBuilder();

            builder.Clean();
            if (builder.Build(output))
            {
                The.UI.ScrollLogToEnd();
                string allText = output.ToString();
                var    appPath = GetGeneratedAppPath(allText);
                foreach (var line in allText.Split('\n'))
                {
                    if (line.Contains("/bin/mtouch"))
                    {
                        var mtouch = line;
                        GenerateUnsignedBinary(target, mtouch);
                        var dstPath = GetXCodeProjectDataFolder();
                        CopyContent(appPath, dstPath);
                        CopyDSYM(appPath, Path.GetDirectoryName(dstPath));
                    }
                }
            }
            else
            {
                UserInterface.Instance.ExitWithErrorIfPossible();
                return("Build system has returned error");
            }
            if (The.Workspace.ProjectJson.GetValue <bool>("XCodeProject/DoSvnCommit"))
            {
                Subversion.Commit(GetXCodeProjectFolder(), "");
            }
            return(null);
        }
示例#2
0
 public void SvnUpdate()
 {
     Subversion.Update(Path.GetDirectoryName(The.Workspace.GetLimeCsprojFilePath()));
     Subversion.Update(Path.GetDirectoryName(projectDirectory));
 }
示例#3
0
 public void SvnUpdate(Target target)
 {
     Subversion.Update(Path.GetDirectoryName(The.Workspace.GetLimeCsprojFilePath(target.Platform)));
     Subversion.Update(Path.GetDirectoryName(projectDirectory));
 }