Beispiel #1
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            bool bStepRegistered = false;

            if (IgorDistributionCommon.RunDistributionStepsThisJob())
            {
                if (IgorJobConfig.GetStringParam(UploadToFTPFlag) != "" &&
                    (IgorJobConfig.IsBoolParamSet(UploadToFTPNoEnvFlag) ||
                     (IgorJobConfig.GetStringParam(UploadToFTPEnvToggleFlag) != "" && IgorRuntimeUtils.GetEnvVariable(IgorJobConfig.GetStringParam(UploadToFTPEnvToggleFlag)) == "true")))
                {
                    StepHandler.RegisterJobStep(UploadToFTPStep, this, UploadToFTP);

                    bStepRegistered = true;
                }

                if (IgorJobConfig.IsBoolParamSet(UploadToFTPNoEnvFlag) || IgorJobConfig.GetStringParam(UploadToFTPEnvToggleFlag) != "")
                {
                    StepHandler.RegisterJobStep(IgorBuildCommon.PreBuildCleanupStep, this, Cleanup);

                    bStepRegistered = true;
                }

                if (bStepRegistered)
                {
                    IgorCore.SetModuleActiveForJob(this);
                }
            }
        }
Beispiel #2
0
        public virtual bool BuildOculus()
        {
            List <string> BuiltDesktopFiles = new List <string>();

            BuiltDesktopFiles.AddRange(IgorCore.GetModuleProducts());

            string OculusDirectToRiftFilename = "";

            foreach (string CurrentFile in BuiltDesktopFiles)
            {
                if (CurrentFile.EndsWith(".exe"))
                {
                    OculusDirectToRiftFilename = CurrentFile.Replace(".exe", "_DirectToRift.exe");
                }
            }

            if (File.Exists(OculusDirectToRiftFilename))
            {
                BuiltDesktopFiles.Add(OculusDirectToRiftFilename);
            }

            IgorCore.SetNewModuleProducts(BuiltDesktopFiles);

            return(true);
        }
Beispiel #3
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(IgorBuildCommon.BuildFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                bool bWindows = false;
                bool bOSX     = false;
                bool bLinux   = false;

                JobBuildTarget = GetBuildTargetForCurrentJob(out bWindows, out bOSX, out bLinux);

                if (bOSX)
                {
                    StepHandler.RegisterJobStep(IgorBuildCommon.SwitchPlatformStep, this, SwitchPlatforms);
                    StepHandler.RegisterJobStep(IgorBuildCommon.BuildStep, this, BuildOSX);
                }
                else if (bWindows)
                {
                    StepHandler.RegisterJobStep(IgorBuildCommon.SwitchPlatformStep, this, SwitchPlatforms);
                    StepHandler.RegisterJobStep(IgorBuildCommon.BuildStep, this, BuildWindows);
                }
                else if (bLinux)
                {
                    StepHandler.RegisterJobStep(IgorBuildCommon.SwitchPlatformStep, this, SwitchPlatforms);
                    StepHandler.RegisterJobStep(IgorBuildCommon.BuildStep, this, BuildLinux);
                }
            }
        }
Beispiel #4
0
        public static void ZipFilesMac(IIgorModule ModuleInst, List <string> FilesToZip, string ZipFilename, bool bUpdateBuildProducts, string RootDir)
        {
            string ZipParams = "-r \"" + ZipFilename + "\" ";

            foreach (string CurrentFile in FilesToZip)
            {
                ZipParams += "\"" + CurrentFile + "\" ";
            }

            string ZipOutput = "";
            string ZipError  = "";

            if (IgorRuntimeUtils.RunProcessCrossPlatform(ModuleInst, "zip", "", ZipParams, Path.GetFullPath(RootDir), "Zipping the files", true) == 0)
            {
                IgorDebug.Log(ModuleInst, "Zip file " + ZipFilename + " created successfully!\nOutput:\n" + ZipOutput + "\nError\n" + ZipError);

                if (bUpdateBuildProducts)
                {
                    List <string> NewProducts = new List <string>();

                    NewProducts.Add(ZipFilename);

                    IgorCore.SetNewModuleProducts(NewProducts);
                }
            }
        }
Beispiel #5
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(IgorBuildCommon.BuildFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                string Platform = IgorJobConfig.GetStringParam(IgorBuildCommon.PlatformFlag);

                bool bIOS = false;

                if (Platform == "iOS")
                {
#if UNITY_5
                    JobBuildTarget = BuildTarget.iOS;
#else
                    JobBuildTarget = BuildTarget.iPhone;
#endif
                    bIOS = true;

                    StepHandler.RegisterJobStep(IgorBuildCommon.SwitchPlatformStep, this, SwitchPlatforms);
                    StepHandler.RegisterJobStep(IgorBuildCommon.BuildStep, this, BuildiOS);
                    StepHandler.RegisterJobStep(FixupXCodeProjStep, this, FixupXCodeProj);
                    StepHandler.RegisterJobStep(BuildXCodeProjStep, this, BuildXCodeProj);
                }
            }
        }
        public virtual bool UpdateAndroidProj()
        {
            List <string> BuildProducts = IgorCore.GetModuleProducts();

            if (IgorAssert.EnsureTrue(this, BuildProducts.Count > 0, "Attempting to update the Android project, but one was not generated in the build phase!"))
            {
                string RootJavaPluginSource = Path.Combine("Assets", Path.Combine("Plugins", Path.Combine("Android", Path.Combine("src", "com"))));
                string RootJavaDest         = Path.Combine(BuildProducts[0], Path.Combine(PlayerSettings.productName, Path.Combine("src", "com")));

                CopyJavaFilesAndReplacePackageName(RootJavaPluginSource, RootJavaDest);

                string ResourcePath = Path.Combine(BuildProducts[0], Path.Combine(PlayerSettings.productName, "res"));
                string AppID        = GetParamOrConfigString(FacebookAndroidAppIDFlag, "Android Facebook ID isn't set, but we've enabled Facebook!  This will probably cause the app to crash on startup!");

                IgorBuildAndroid.SwapStringValueInStringsXML(Path.Combine(Path.Combine(ResourcePath, "values"), "strings.xml"), "fbapp_id", AppID, "FACEBOOKAPPIDTOREPLACE");
                IgorBuildAndroid.SwapStringValueInStringsXML(Path.Combine(Path.Combine(ResourcePath, "values-es"), "strings.xml"), "fbapp_id", AppID, "FACEBOOKAPPIDTOREPLACE");
                IgorBuildAndroid.SwapStringValueInStringsXML(Path.Combine(Path.Combine(ResourcePath, "values-he"), "strings.xml"), "fbapp_id", AppID, "FACEBOOKAPPIDTOREPLACE");
                IgorBuildAndroid.SwapStringValueInStringsXML(Path.Combine(Path.Combine(ResourcePath, "values-iw"), "strings.xml"), "fbapp_id", AppID, "FACEBOOKAPPIDTOREPLACE");

                if (IgorBuildAndroid.RunAndroidCommandLineUtility(this, Path.Combine(BuildProducts[0], "facebook"), "update project --path ."))
                {
                    IgorBuildAndroid.AddNewLibrary("facebook");
                }
            }

            return(true);
        }
Beispiel #7
0
        public static void ProcessArgs()
        {
            InitializeRuntimeCoreIfNeeded();

            if (RuntimeCore != null)
            {
                if (typeof(IgorCore).IsAssignableFrom(RuntimeCore.GetType()))
                {
                    IgorCore CoreInst = (IgorCore)RuntimeCore;

                    if (CoreInst != null)
                    {
                        ActiveModulesForJob.Clear();

                        foreach (IIgorModule CurrentModule in EnabledModules)
                        {
                            CurrentModule.ProcessArgs(CoreInst);
                        }
                    }
                    else
                    {
                        IgorDebug.CoreCriticalError("Core could not be case to type IgorCore!");
                    }
                }
                else
                {
                    IgorDebug.CoreCriticalError("Core is not of type IgorCore.  Did you make your own?  You may need to change how this works.");
                }
            }
            else
            {
                IgorDebug.CoreCriticalError("Core not found so we bailed out of processing arguments!");
            }
        }
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsStringParamSet(PlayerSettingFilesToOverrideFlag) && IgorJobConfig.IsStringParamSet(PlayerSettingsPathFlag))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(OverridePlayerSettingsStep, this, OverridePlayerSettings);
     }
 }
Beispiel #9
0
        public static void CommandLineRunJob()
        {
            IgorDebug.CoreLog("CommandLineRunJob invoked from command line.");

            IgorConfigWindow.OpenOrGetConfigWindow();

            EditorHandleJobStatus(IgorCore.RunJob());
        }
Beispiel #10
0
        public override void RegisterModule()
        {
            IgorCore.RegisterNewModule(this);

            BuildOptionsDelegates.Clear();

            IgorBuildCommon.RegisterBuildPlatforms(new string[] { "iOS" });
        }
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsStringParamSet(SetScriptingDefinesFlag) || StepHandler.IsModuleNeededByOtherModules(this))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(SetScriptingDefinesStep, this, SetScriptingDefines);
     }
 }
Beispiel #12
0
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsBoolParamSet(GenerateBuildInformationFlag))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(GenerateBuildInformationStep, this, PushDataToTextFile);
     }
 }
Beispiel #13
0
        public virtual void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(MonsterTestCore.RebuildLaunchersFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(MonsterTestCore.RebuildLaunchersStep, this, RebuildLaunchers);
            }
        }
Beispiel #14
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(EnableFacebookiOSHatsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(IgorBuildiOS.CustomFixupXCodeProjStep, this, UpdateXCodeProj);
            }
        }
Beispiel #15
0
        public override void RegisterModule()
        {
            bool DidRegister = IgorCore.RegisterNewModule(this);

            if (DidRegister)
            {
                AvailablePlatforms.Clear();
            }
        }
Beispiel #16
0
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorPackageCommon.RunPackageStepsThisJob() &&
         IgorJobConfig.IsBoolParamSet(OTAEnabledFlag) && GetParamOrConfigString(OTAPlistNameFlag) != "" &&
         GetParamOrConfigString(OTAHTTPRootFlag) != "")
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(IgorPackageCommon.PackageStep, this, CreateWebDeployFiles);
     }
 }
Beispiel #17
0
        public virtual bool Build()
        {
            string BuiltName     = GetBuiltNameForTarget(JobBuildTarget);
            string BuiltBaseName = BuiltName;

            if (BuiltBaseName.Contains("."))
            {
                BuiltBaseName = BuiltName.Substring(0, BuiltBaseName.LastIndexOf('.'));
            }

            string DataFolderName = BuiltBaseName + "_Data";

            if (File.Exists(BuiltName))
            {
                IgorRuntimeUtils.DeleteFile(BuiltName);
            }

            if (Directory.Exists(DataFolderName))
            {
                IgorRuntimeUtils.DeleteDirectory(DataFolderName);
            }

#if !UNITY_4_3
            BuiltName = System.IO.Path.Combine(System.IO.Path.GetFullPath("."), BuiltName);
#endif
            BuildPipeline.BuildPlayer(IgorUtils.GetLevels(), BuiltName, JobBuildTarget, IgorBuildCommon.GetBuildOptions());

            Log("Destination file is: " + BuiltName);

            List <string> BuiltFiles = new List <string>();

            if (Directory.Exists(DataFolderName))
            {
                if (IgorAssert.EnsureTrue(this, File.Exists(BuiltName), "The built file " + BuiltName + " doesn't exist.  Something went wrong during the build step.  Please check the logs!"))
                {
                    BuiltFiles.Add(BuiltName);
                }

                if (IgorAssert.EnsureTrue(this, Directory.Exists(DataFolderName), "The built data directory for the Windows build " + DataFolderName + " doesn't exist.  Something went wrong during the build step.  Please check the logs!"))
                {
                    BuiltFiles.Add(DataFolderName);
                }
            }
            else
            {
                if (IgorAssert.EnsureTrue(this, Directory.Exists(BuiltName), "The built app directory for the Mac build " + BuiltName + " doesn't exist.  Something went wrong during the build step.  Please check the logs!"))
                {
                    BuiltFiles.Add(BuiltName);
                }
            }

            IgorCore.SetNewModuleProducts(BuiltFiles);

            return(true);
        }
Beispiel #18
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(SetLightmapsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(SetLightmapsStep, this, SetLightmaps);

                CurrentLevelIndex = 0;
            }
        }
Beispiel #19
0
        public virtual bool UpdateXCodeProj()
        {
            List <string> BuildProducts = IgorCore.GetModuleProducts();

            if (IgorAssert.EnsureTrue(this, BuildProducts.Count > 0, "Attempting to update the XCode project, but one was not generated in the build phase!"))
            {
                string ProjectPath = Path.Combine(BuildProducts[0], "Unity-IPhone.xcodeproj");

                IgorXCodeProjUtils.AddFramework(this, ProjectPath, "StoreKit.framework", TreeEnum.SDKROOT, "System/Library/Frameworks/StoreKit.framework", -1, "wrapper.framework", "StoreKit.framework");
            }

            return(true);
        }
Beispiel #20
0
        public virtual bool UnzipProducts()
        {
            List <string> ZipFilename = IgorCore.GetModuleProducts();

            if (IgorAssert.EnsureTrue(this, ZipFilename.Count == 1, "Unzipping expected exactly 1 built product, but we found " + ZipFilename.Count))
            {
                Log("Unzipping file " + ZipFilename[0]);

                UnzipArchiveCrossPlatform(this, ZipFilename[0], Path.GetFullPath("."), true);
            }

            return(true);
        }
Beispiel #21
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorPackageCommon.RunPackageStepsThisJob() && IgorJobConfig.IsBoolParamSet(ZipFlag) && IgorJobConfig.GetStringParam(ZipFilenameFlag) != "")
            {
                IgorCore.SetModuleActiveForJob(this);
                StepHandler.RegisterJobStep(IgorPackageCommon.PackageStep, this, CreateZip);
            }

            if (IgorPackageCommon.RunPackageStepsThisJob() && IgorJobConfig.IsBoolParamSet(UnzipFlag))
            {
                IgorCore.SetModuleActiveForJob(this);
                StepHandler.RegisterJobStep(IgorPackageCommon.UnpackageStep, this, UnzipProducts);
            }
        }
Beispiel #22
0
        public virtual bool RunTest(string TestName)
        {
            MonsterDebug.Log("Attempting to run test " + TestName + " on a standalone copy of the game.");

            Environment.SetEnvironmentVariable(MonsterTestCore.MonsterStarterTestNameEnvVariable, TestName);

            string AppPath = "";

            if (IgorJobConfig.IsStringParamSet(MonsterTestCore.ExplicitAppPathFlag))
            {
                AppPath = IgorJobConfig.GetStringParam(MonsterTestCore.ExplicitAppPathFlag);
            }
            else
            {
                foreach (string CurrentProduct in IgorCore.GetModuleProducts())
                {
                    if (CurrentProduct.Contains(".app"))
                    {
                        AppPath = CurrentProduct.Substring(0, CurrentProduct.IndexOf(".app") + 4);
                    }
                    else if (CurrentProduct.EndsWith(".exe"))
                    {
                        AppPath = CurrentProduct;
                    }
                }
            }

            if (AppPath.EndsWith(".app"))
            {
                AppPath = Path.Combine(AppPath, Path.Combine("Contents", Path.Combine("MacOS", AppPath.Substring(AppPath.LastIndexOf('/') + 1, AppPath.Length - AppPath.LastIndexOf('/') - 5))));

                IgorRuntimeUtils.SetFileExecutable(AppPath);
            }

            string AppOutput = "";
            string AppError  = "";

            int RunAppRC = IgorRuntimeUtils.RunProcessCrossPlatform(AppPath, AppPath, "", Path.GetFullPath("."), ref AppOutput, ref AppError);

            if (RunAppRC != 0)
            {
                MonsterDebug.LogError("Failed to run test.  App retruned RC " + RunAppRC + "!\n\nOutput:\n" + AppOutput + "\n\nError:\n" + AppError);

                return(true);
            }

            MonsterDebug.Log("Test ran successfully!\n\nOutput:\n" + AppOutput + "\n\nError:\n" + AppError);

            return(true);
        }
Beispiel #23
0
        public static void ZipFilesWindows(IIgorModule ModuleInst, List <string> FilesToZip, string ZipFilename, bool bUpdateBuildProducts, string RootDir)
        {
            string ZipCommand = "";
            string ZipParams  = "";

            string PathX86 = "C:\\Program Files (x86)\\7-Zip\\7z.exe";
            string Path64  = "C:\\Program Files\\7-Zip\\7z.exe";

            if (File.Exists(PathX86))
            {
                ZipCommand = PathX86;
                ZipParams += "a -tzip \"" + ZipFilename + "\" ";
            }
            else
            if (File.Exists(Path64))
            {
                ZipCommand = Path64;
                ZipParams += "a -tzip \"" + ZipFilename + "\" ";
            }
            else
            {
                IgorDebug.LogError(ModuleInst, "7Zip is not installed.  Currently 7Zip is the only zip tool supported on Windows.\nPlease download it from here: http://www.7-zip.org/download.html");
                IgorDebug.LogError(ModuleInst, "Skipping zip step.");

                return;
            }

            foreach (string CurrentFile in FilesToZip)
            {
                ZipParams += "\"" + CurrentFile + "\" ";
            }

            string ZipOutput = "";
            string ZipError  = "";

            if (IgorRuntimeUtils.RunProcessCrossPlatform(ModuleInst, "", ZipCommand, ZipParams, Path.GetFullPath(RootDir), "Zipping the files") == 0)
            {
                IgorDebug.Log(ModuleInst, "Zip file " + ZipFilename + " created successfully!\nOutput:\n" + ZipOutput + "\nError\n" + ZipError);

                if (bUpdateBuildProducts)
                {
                    List <string> NewProducts = new List <string>();

                    NewProducts.Add(ZipFilename);

                    IgorCore.SetNewModuleProducts(NewProducts);
                }
            }
        }
Beispiel #24
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(UpdateAmplifyFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(BuildAmplifyStep, this, UpdateAmplify);
            }
            else if (IgorJobConfig.IsBoolParamSet(RebuildAmplifyFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(BuildAmplifyStep, this, RebuildAmplify);
            }
        }
Beispiel #25
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            IgorCore.SetModuleActiveForJob(this);

            if (IgorJobConfig.IsBoolParamSet(IgorBuildCommon.BuildFlag))
            {
                if (IgorJobConfig.IsStringParamSet(IgorBuildCommon.BuildOptionsFlag))
                {
                    int OutResult = 0;
                    if (Int32.TryParse(IgorJobConfig.GetStringParam(IgorBuildCommon.BuildOptionsFlag).Trim('"'), out OutResult))
                    {
                        SetBuildOptionsBitfield = OutResult;
                    }
                }
            }
        }
Beispiel #26
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            bool bStepRegistered = false;

            if (IgorDistributionCommon.RunDistributionStepsThisJob() &&
                GetParamOrConfigString(UploadToFTPHostFlag) != "" && GetParamOrConfigString(UploadToFTPUserFlag) != "" && GetParamOrConfigString(UploadToFTPPassFlag) != "" &&
                GetParamOrConfigString(UploadToFTPDirectoryFlag) != "" &&
                (IgorJobConfig.IsBoolParamSet(UploadToFTPNoEnvFlag) ||
                 (IgorJobConfig.IsBoolParamSet(UploadToFTPEnvEnableFlag) && GetParamOrConfigString(UploadToFTPEnvNameFlag) != "" &&
                  IgorRuntimeUtils.GetEnvVariable(GetParamOrConfigString(UploadToFTPEnvNameFlag)) == "true")))
            {
                StepHandler.RegisterJobStep(UploadToFTPStep, this, UploadToFTP);

                IgorCore.SetModuleActiveForJob(this);
            }
        }
Beispiel #27
0
        public static void CheckForAndRunJobs()
        {
            string JobName = Environment.GetEnvironmentVariable(MonsterTestCore.MonsterLauncherJobNameEnvVariable);

            MonsterDebug.Log("Checking for job " + JobName);

            if (JobName != null && JobName != "" && JobName != CurrentJobName)
            {
                IgorConfig.SetJobToRunByName(JobName);

                MonsterDebug.Log("Starting job " + JobName);

                CurrentJobName = JobName;
            }

            IgorCore.HandleJobStatus(IgorCore.RunJob(false));
        }
Beispiel #28
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(IgorBuildCommon.BuildFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                string Platform = IgorJobConfig.GetStringParam(IgorBuildCommon.PlatformFlag);

                if (Platform.Contains("Android"))
                {
                    JobBuildTarget = BuildTarget.Android;

                    StepHandler.RegisterJobStep(IgorBuildCommon.SwitchPlatformStep, this, SwitchPlatforms);
                    StepHandler.RegisterJobStep(IgorBuildCommon.BuildStep, this, BuildAndroid);
                    StepHandler.RegisterJobStep(BuildAndroidProjStep, this, BuildAndroidProj);
                }
            }
        }
Beispiel #29
0
        public virtual bool CreateZip()
        {
            string ZipFilename = GetParamOrConfigString(ZipFilenameFlag, "Zip destination filename is not set.");

            string LogDetails = "Creating zip file with name " + ZipFilename + " from files:";

            List <string> BuiltProducts = IgorCore.GetModuleProducts();

            foreach (string Product in BuiltProducts)
            {
                LogDetails += "\n" + Product;
            }

            Log(LogDetails);

            ZipFilesCrossPlatform(this, BuiltProducts, ZipFilename);

            return(true);
        }
Beispiel #30
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(RunTestFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(RunTestStep, this, RunTest);
            }

            if (IgorJobConfig.IsBoolParamSet(BuildTestableAppFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(BuildTestableStep, this, BuildTestable);
                StepHandler.RegisterJobStep(CleanupTestableStep, this, CleanupTestable);
            }

            ActiveMonsterRunner.ProcessArgs(StepHandler);
        }
Beispiel #31
0
        public static void EditorHandleJobStatus(IgorCore.JobReturnStatus Status)
        {
            if(Status.bDone)
            {
                if(IgorAssert.HasJobFailed())
                {
                    IgorDebug.CoreLogError("Job failed!");
                }
                else
                {
                    IgorDebug.CoreLog("Job's done!");
                }

                float time = IgorUtils.PlayJobsDoneSound();
                System.Threading.Thread t = new System.Threading.Thread(() => WaitToExit(time));
                t.Start();

                while(t.IsAlive)
                { }
            }

            if(Status.bFailed)
            {
                IgorJobConfig.SetIsRunning(false);

                if(!Status.bWasStartedManually)
                {
                    EditorApplication.Exit(-1);
                }
            }

            if(!Status.bWasStartedManually && Status.bDone)
            {
                EditorApplication.Exit(0);
            }
        }
Beispiel #32
0
        public static void HandleJobStatus(IgorCore.JobReturnStatus Status)
        {
            if(Status.bDone)
            {
                if(IgorAssert.HasJobFailed())
                {
                    IgorDebug.CoreLogError("Job failed!");
                }
                else
                {
                    IgorDebug.CoreLog("Job's done!");
                }
            }

            if(!Status.bWasStartedManually && (Status.bFailed || Status.bDone))
            {
                if(Status.bFailed)
                {
                    Application.Quit();
                }
                else
                {
                    Application.Quit();
                }
            }
        }