예제 #1
0
        public static string BuildGameAction()
        {
            var target = The.UI.GetActiveTarget();

            AssetCooker.CookForTarget(target);
            return(BuildGame(target) ? null : "Can not BuildGame");
        }
예제 #2
0
        public static void CookMainBundleAction()
        {
            var target = The.UI.GetActiveTarget();

            AssetCooker.CookForTarget(
                target,
                new [] { CookingRulesBuilder.MainBundleName }
                );
        }
예제 #3
0
 public static string BuildAndRun(Target target)
 {
     AssetCooker.CookForTarget(target, The.UI.GetSelectedBundles());
     if (!BuildGame(target))
     {
         return("Can not BuildGame");
     }
     The.UI.ScrollLogToEnd();
     RunGame(target);
     return(null);
 }
예제 #4
0
        public static string BuildAndRunAction()
        {
            var target = The.UI.GetActiveTarget();

            AssetCooker.CookForTarget(target);
            if (!Actions.BuildGame(target))
            {
                return("Can not BuildGame");
            }
            return(null);
        }
예제 #5
0
 public static string BuildAndRun(Target target, string configuration)
 {
     AssetCooker.CookForTarget(target);
     if (!BuildGame(target, configuration))
     {
         return("Can not BuildGame");
     }
     The.UI.ScrollLogToEnd();
     RunGame(target.Platform, target.ProjectPath, configuration);
     return(null);
 }
예제 #6
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);
        }
예제 #7
0
        public static string RebuildGameAction()
        {
            var target = The.UI.GetActiveTarget();

            if (The.UI.AskConfirmation("Are you sure you want to rebuild the game?"))
            {
                CleanupGame(target);
                AssetCooker.CookForTarget(target);
                if (!BuildGame(target))
                {
                    return("Can not BuildGame");
                }
            }
            return(null);
        }
예제 #8
0
        public static void CookGameAssetsAction()
        {
            var target = The.UI.GetActiveTarget();

            AssetCooker.CookForTarget(target, The.UI.GetSelectedBundles());
        }