예제 #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);
                }
            }
        }
예제 #2
0
        public static void CheckForNamedJobFlag()
        {
            if (IgorJobConfig.IsStringParamSet(NamedJobFlag))
            {
                string JobToStart = IgorJobConfig.GetStringParam(NamedJobFlag);

                foreach (IgorPersistentJobConfig Job in IgorConfig.GetInstance().JobConfigs)
                {
                    if (Job.JobName == JobToStart)
                    {
                        IgorJobConfig ConfigInst = IgorJobConfig.GetConfig();

                        ConfigInst.Persistent = Job;

                        ConfigInst.Save(IgorJobConfig.IgorJobConfigPath);

                        IgorDebug.CoreLog("Starting named job " + JobToStart + ".");

                        return;
                    }
                }

                IgorDebug.CoreLogError("Couldn't find named job " + JobToStart + "!");
            }
        }
예제 #3
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);
                }
            }
        }
예제 #4
0
        public virtual string GetParamOrConfigString(string StringKey, string EmptyStringWarningMessage = "", string DefaultValue = "", bool bCheckForEmpty = true)
        {
#if UNITY_EDITOR
            if (bIsDrawingInspector && EmptyStringWarningMessage != "")
            {
                LogError("Don't call this from within a DrawJobInspectorAndGetEnabledParams implementation!  This isn't accessing the right job config value since it hasn't been saved to disk yet.");
            }
#endif // UNITY_EDITOR

            string StringValue = DefaultValue;

            if (IgorJobConfig.IsStringParamSet(StringKey))
            {
                StringValue = IgorJobConfig.GetStringParam(StringKey);
            }
            else
            {
                StringValue = IgorConfig.GetModuleString(this, StringKey);
            }

            if (StringValue == DefaultValue && bCheckForEmpty && EmptyStringWarningMessage != "")
            {
                LogWarning(EmptyStringWarningMessage);
            }

            if (StringValue == "")
            {
                StringValue = DefaultValue;
            }

            return(StringValue);
        }
예제 #5
0
        public virtual bool SetScriptingDefines()
        {
            // Record pre-job-run scripting define symbols per build target so that if someone wants to test a job
            // in editor it doesn't leave the job's defines resident in the PlayerSettings afterwards.
            foreach (BuildTargetGroup group in BuildTargets)
            {
                if (group != BuildTargetGroup.Unknown)
                {
                    EditorPrefs.SetString(kEditorPrefsPrefix + group.ToString(), PlayerSettings.GetScriptingDefineSymbolsForGroup(group));
                }
            }

            string AllParams = ExtraModuleParams;

            if (AllParams.Length > 0)
            {
                AllParams += ";";
            }

            AllParams += IgorJobConfig.GetStringParam(SetScriptingDefinesFlag);

            // Flush to all of the groups, to be sure we hit the one marked for build in the job. This should be fine
            // because there's only ever at most one built platform per job.
            foreach (BuildTargetGroup group in BuildTargets)
            {
                if (group != BuildTargetGroup.Unknown)
                {
                    PlayerSettings.SetScriptingDefineSymbolsForGroup(group, AllParams);
                }
            }

            AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);

            return(true);
        }
예제 #6
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);
                }
            }
        }
예제 #7
0
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsBoolParamSet(GenerateBuildInformationFlag))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(GenerateBuildInformationStep, this, PushDataToTextFile);
     }
 }
예제 #8
0
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsStringParamSet(PlayerSettingFilesToOverrideFlag) && IgorJobConfig.IsStringParamSet(PlayerSettingsPathFlag))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(OverridePlayerSettingsStep, this, OverridePlayerSettings);
     }
 }
예제 #9
0
 public override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsStringParamSet(SetScriptingDefinesFlag) || StepHandler.IsModuleNeededByOtherModules(this))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(SetScriptingDefinesStep, this, SetScriptingDefines);
     }
 }
예제 #10
0
        public static BuildTarget GetBuildTargetForCurrentJob(out bool bWindows, out bool bOSX, out bool bLinux, string AllParams = "")
        {
            string PlatformString = IgorJobConfig.GetStringParam(IgorBuildCommon.PlatformFlag);

            if (PlatformString == "")
            {
                PlatformString = IgorRuntimeUtils.GetStringParam(AllParams, IgorBuildCommon.PlatformFlag);
            }

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

            BuildTarget CurrentJobBuildTarget = BuildTarget.StandaloneOSXIntel;

            if (PlatformString.Contains("OSX32"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneOSXIntel;
                bOSX = true;
            }
            else if (PlatformString.Contains("OSX64"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneOSXIntel64;
                bOSX = true;
            }
            else if (PlatformString.Contains("OSXUniversal"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneOSXUniversal;
                bOSX = true;
            }
            else if (PlatformString.Contains("Windows32"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneWindows;
                bWindows = true;
            }
            else if (PlatformString.Contains("Windows64"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneWindows64;
                bWindows = true;
            }
            else if (PlatformString.Contains("Linux32"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneLinux;
                bLinux = true;
            }
            else if (PlatformString.Contains("Linux64"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneLinux64;
                bLinux = true;
            }
            else if (PlatformString.Contains("LinuxUniversal"))
            {
                CurrentJobBuildTarget = BuildTarget.StandaloneLinuxUniversal;
                bLinux = true;
            }

            return(CurrentJobBuildTarget);
        }
예제 #11
0
        public virtual void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(MonsterTestCore.RebuildLaunchersFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(MonsterTestCore.RebuildLaunchersStep, this, RebuildLaunchers);
            }
        }
예제 #12
0
        public virtual bool OverridePlayerSettings()
        {
            string TargetDirectory = IgorJobConfig.GetStringParam(PlayerSettingsPathFlag);

            TargetDirectory = TargetDirectory.Replace("\"", string.Empty);

            CopyStoredPlayerSettingsOverCurrent(TargetDirectory);
            return(true);
        }
예제 #13
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(EnableFacebookiOSHatsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(IgorBuildiOS.CustomFixupXCodeProjStep, this, UpdateXCodeProj);
            }
        }
예제 #14
0
        public virtual bool RunTest()
        {
            MonsterTestCoreInst = this;

            bool bReturn = ActiveMonsterRunner.RunTest(IgorJobConfig.GetStringParam(TestNameFlag));

            MonsterTestCoreInst = null;

            return(bReturn);
        }
예제 #15
0
파일: iOSOTA.cs 프로젝트: fbizuneh/Igor
 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);
     }
 }
예제 #16
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(SetLightmapsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(SetLightmapsStep, this, SetLightmaps);

                CurrentLevelIndex = 0;
            }
        }
예제 #17
0
        public static bool IsBoolParamSet(string BoolParam)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                return(IgorRuntimeUtils.IsBoolParamSet(Inst.Persistent.JobCommandLineParams, BoolParam));
            }

            return(false);
        }
예제 #18
0
        public static void SetBoolParam(string BoolParam, bool bTrue)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.Persistent.JobCommandLineParams = IgorRuntimeUtils.SetBoolParam(Inst.Persistent.JobCommandLineParams, BoolParam, bTrue);

                Inst.Save(IgorJobConfigPath);
            }
        }
예제 #19
0
        public static bool GetWasMenuTriggered()
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                return(Inst.bMenuTriggered);
            }

            return(false);
        }
예제 #20
0
        public static void SetWasMenuTriggered(bool bMenu)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.bMenuTriggered = bMenu;

                Inst.Save(IgorJobConfigPath);
            }
        }
예제 #21
0
        public static bool GetIsRunning()
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                return(Inst.bIsRunning);
            }

            return(false);
        }
예제 #22
0
        public static void SetIsRunning(bool bRunning)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.bIsRunning = bRunning;

                Inst.Save(IgorJobConfigPath);
            }
        }
예제 #23
0
        public static void SetLastIndexInPriority(int NewLastIndex)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.LastIndexInPriority = NewLastIndex;

                Inst.Save(IgorJobConfigPath);
            }
        }
예제 #24
0
        public static int GetLastIndexInPriority()
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                return(Inst.LastIndexInPriority);
            }

            return(0);
        }
예제 #25
0
        public static void SetStringParam(string ParamKey, string ParamValue)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                Inst.Persistent.JobCommandLineParams = IgorRuntimeUtils.SetStringParam(Inst.Persistent.JobCommandLineParams, ParamKey, ParamValue);

                Inst.Save(IgorJobConfigPath);
            }
        }
예제 #26
0
        public static string GetStringParam(string ParamKey)
        {
            IgorJobConfig Inst = GetConfig();

            if (Inst != null)
            {
                return(IgorRuntimeUtils.GetStringParam(Inst.Persistent.JobCommandLineParams, ParamKey));
            }

            return("");
        }
예제 #27
0
        public static List <string> GetModuleProducts()
        {
            if (CurrentModuleProducts.Count == 0)
            {
                string CombinedProducts = IgorJobConfig.GetStringParam(ProductsFlag);

                CurrentModuleProducts.Clear();
                CurrentModuleProducts.AddRange(CombinedProducts.Split(','));
            }

            return(CurrentModuleProducts);
        }
예제 #28
0
        public virtual bool InternalCleanupTestable(bool bRunningTestInEditor = false)
        {
            if (!bRunningTestInEditor || (TestRunnerInst.CurrentTest != null && TestRunnerInst.CurrentTest.bForceLoadToFirstSceneInEditor))
            {
                string FirstLevelName = IgorUtils.GetFirstLevelName();

                if (FirstLevelName != "")
                {
                    if (EditorApplication.currentScene != FirstLevelName)
                    {
                        EditorApplication.OpenScene(FirstLevelName);

                        return(false);
                    }
                }
            }

            MonsterStarter[] Starters = GameObject.FindObjectsOfType <MonsterStarter>();

            foreach (MonsterStarter CurrentStarter in Starters)
            {
                GameObject.DestroyImmediate(CurrentStarter.gameObject);
            }

            if (!bRunningTestInEditor)
            {
                string StreamingAssetsFolder = Path.Combine("Assets", Path.Combine("StreamingAssets", Path.Combine("Igor", Path.Combine("Monster", "Config"))));

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

                string LastValue = IgorJobConfig.GetStringParam(LastDisplayResolutionDialogFlag);

                switch (LastValue)
                {
                case "Disabled":
                    PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled;
                    break;

                case "Enabled":
                    PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Enabled;
                    break;

                case "HiddenByDefault":
                    PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.HiddenByDefault;
                    break;
                }
            }

            return(true);
        }
예제 #29
0
        public static void Cleanup()
        {
            foreach (IIgorModule module in ActiveModulesForJob)
            {
                module.PostJobCleanup();
            }

            ActiveModulesForJob.Clear();

            JobSteps.Clear();

            IgorJobConfig.Cleanup();
        }
예제 #30
0
파일: IgorZip.cs 프로젝트: fbizuneh/Igor
        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);
            }
        }