コード例 #1
0
ファイル: IgorBuildDesktop.cs プロジェクト: fbizuneh/Igor
        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);
                }
            }
        }
コード例 #2
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);
                }
            }
        }
コード例 #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 override void ProcessArgs(IIgorStepHandler StepHandler)
 {
     if (IgorJobConfig.IsBoolParamSet(GenerateBuildInformationFlag))
     {
         IgorCore.SetModuleActiveForJob(this);
         StepHandler.RegisterJobStep(GenerateBuildInformationStep, this, PushDataToTextFile);
     }
 }
コード例 #5
0
ファイル: IgorFacebookiOSHats.cs プロジェクト: fbizuneh/Igor
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(EnableFacebookiOSHatsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(IgorBuildiOS.CustomFixupXCodeProjStep, this, UpdateXCodeProj);
            }
        }
コード例 #6
0
        public virtual void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(MonsterTestCore.RebuildLaunchersFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(MonsterTestCore.RebuildLaunchersStep, this, RebuildLaunchers);
            }
        }
コード例 #7
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);
     }
 }
コード例 #8
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(SetLightmapsFlag))
            {
                IgorCore.SetModuleActiveForJob(this);

                StepHandler.RegisterJobStep(SetLightmapsStep, this, SetLightmaps);

                CurrentLevelIndex = 0;
            }
        }
コード例 #9
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);
            }
        }
コード例 #10
0
ファイル: IgorAmplifyTexture.cs プロジェクト: fbizuneh/Igor
        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);
            }
        }
コード例 #11
0
ファイル: IgorFTP.cs プロジェクト: fbizuneh/Igor
        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);
            }
        }
コード例 #12
0
        public static bool RunDistributionStepsThisJob()
        {
            if (IgorJobConfig.IsBoolParamSet(IgorDistributionCommon.RunDistributeFromMenuFlag))
            {
                return(true);
            }
            else
            {
                if (IgorJobConfig.GetWasMenuTriggered())
                {
                    return(false);
                }

                return(true);
            }
        }
コード例 #13
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;
                    }
                }
            }
        }
コード例 #14
0
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorJobConfig.IsBoolParamSet(IgorBuildCommon.BuildFlag) && IgorJobConfig.IsBoolParamSet(BuildOculusFlag))
            {
                bool bWindows = false;
                bool bOSX     = false;
                bool bLinux   = false;

                IgorBuildDesktop.GetBuildTargetForCurrentJob(out bWindows, out bOSX, out bLinux);

                if (bWindows)
                {
                    StepHandler.RegisterJobStep(BuildOculusStep, this, BuildOculus);
                }
            }
        }
コード例 #15
0
ファイル: IgorPackageCommon.cs プロジェクト: fbizuneh/Igor
        public static bool RunPackageStepsThisJob()
        {
            if (IgorJobConfig.IsBoolParamSet(IgorPackageCommon.RunPackageFromMenuFlag))
            {
                return(true);
            }
            else
            {
                if (IgorJobConfig.GetWasMenuTriggered())
                {
                    return(false);
                }

                return(true);
            }
        }
コード例 #16
0
ファイル: IgorBuildAndroid.cs プロジェクト: fbizuneh/Igor
        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);
                }
            }
        }
コード例 #17
0
ファイル: MonsterTestCore.cs プロジェクト: fbizuneh/Igor
        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);
        }
コード例 #18
0
ファイル: BitTorrentSync.cs プロジェクト: fbizuneh/Igor
        public override void ProcessArgs(IIgorStepHandler StepHandler)
        {
            if (IgorDistributionCommon.RunDistributionStepsThisJob() &&
                ((IgorJobConfig.IsBoolParamSet(CopyToSyncExpEnabledFlag) && GetParamOrConfigString(CopyToSyncExplicitFlag) != "") ||
                 (IgorJobConfig.IsBoolParamSet(CopyToSyncEnvEnabledFlag) &&
                  (GetParamOrConfigString(CopyToSyncEnvFlag) != "" && IgorRuntimeUtils.GetEnvVariable(GetParamOrConfigString(CopyToSyncEnvFlag)) != ""))) &&
                GetParamOrConfigString(CopyToSyncFilenameFlag) != "")
            {
                IgorCore.SetModuleActiveForJob(this);

                if (IgorJobConfig.IsBoolParamSet(CopyFromSyncFlag))
                {
                    StepHandler.RegisterJobStep(CopyFromSyncStep, this, CopyFromSync);
                }
                else
                {
                    StepHandler.RegisterJobStep(CopyToSyncStep, this, CopyToSync);
                }
            }
        }
コード例 #19
0
ファイル: IgorBuildAndroid.cs プロジェクト: fbizuneh/Igor
        public virtual bool BuildAndroidProj()
        {
            List <string> BuildProducts = IgorCore.GetModuleProducts();

            if (IgorAssert.EnsureTrue(this, BuildProducts.Count > 0, "Building the Android project, but there were no previous built products."))
            {
                Log("Project should be saved to " + EditorUserBuildSettings.GetBuildLocation(BuildTarget.Android));
                string BuiltProjectDir = Path.Combine(BuildProducts[0], PlayerSettings.productName);
                if (!RunAndroidCommandLineUtility(this, BuiltProjectDir, "update project --path ." + AndroidProjectUpdateAdditionalArgs))
                {
                    return(true);
                }

                string BuildXML = Path.Combine(BuiltProjectDir, "build.xml");
                if (!IgorAssert.EnsureTrue(this, File.Exists(BuildXML), "Can't check " + BuildXML + " for APK name because it doesn't exist."))
                {
                    return(false);
                }

                string BuildXMLFileContents = File.ReadAllText(BuildXML);

                int ProjectNameParamStart = BuildXMLFileContents.IndexOf("<project name=\"") + "<project name=\"".Length;
                int ProjectNameParamEnd   = BuildXMLFileContents.IndexOf("\"", ProjectNameParamStart);

                string APKName = BuildXMLFileContents.Substring(ProjectNameParamStart, ProjectNameParamEnd - ProjectNameParamStart);

                if (!RunAnt(this, BuiltProjectDir, "clean debug"))
                {
                    return(true);
                }

                Log("Debug APK built!");

                string DebugSignedAPK         = Path.Combine(BuiltProjectDir, Path.Combine("bin", APKName + "-debug.apk"));
                string AppropriatelySignedAPK = DebugSignedAPK;

                if (IgorJobConfig.IsBoolParamSet(AndroidResignInReleaseFlag))
                {
                    Log("Re-signing the APK for release.");

                    string RepackageDir = Path.Combine(BuildProducts[0], "Repackage");

                    if (!ResignAPK(this, DebugSignedAPK, RepackageDir, ref AppropriatelySignedAPK,
                                   GetParamOrConfigString(AndroidKeystoreFilenameFlag, "Android Keystore filename isn't set, but you want to re-sign the APK!"),
                                   GetParamOrConfigString(AndroidKeystorePassFlag, "Android Keystore password isn't set, but you want to re-sign the APK!"),
                                   GetParamOrConfigString(AndroidKeyAliasFlag, "Android Key Alias isn't set, but you want to re-sign the APK!"),
                                   GetParamOrConfigString(AndroidKeyAliasPassFlag, "Android Key Alias password isn't set, but you want to re-sign the APK!")))
                    {
                        return(true);
                    }

                    Log("Re-signing the APK succeeded!");
                }

                string FinalBuildProductName = GetBuiltNameForTarget(BuildTarget.Android);

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

                IgorRuntimeUtils.CopyFile(AppropriatelySignedAPK, FinalBuildProductName);

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

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

                IgorCore.SetNewModuleProducts(NewBuildProducts);

                Log("APK built and renamed to " + AppropriatelySignedAPK + ".");
            }

            return(true);
        }
コード例 #20
0
ファイル: IgorBuildVR.cs プロジェクト: fbizuneh/Igor
        public virtual bool SetVRSettings()
        {
            PlayerSettings.virtualRealitySupported = IgorJobConfig.IsBoolParamSet(VRSupportedFlag);

            return(true);
        }
コード例 #21
0
ファイル: IgorBuildDesktop.cs プロジェクト: fbizuneh/Igor
        public virtual string GetBuiltNameForTarget(BuildTarget NewTarget)
        {
            string BuiltName = "";

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

            if (NewTarget == BuildTarget.StandaloneOSXIntel)
            {
                BuiltName = GetConfigString("BuiltOSX32Name");
                bOSX      = true;
            }
            else if (NewTarget == BuildTarget.StandaloneOSXIntel64)
            {
                BuiltName = GetConfigString("BuiltOSX64Name");
                bOSX      = true;
            }
            else if (NewTarget == BuildTarget.StandaloneOSXUniversal)
            {
                BuiltName = GetConfigString("BuiltOSXUniversalName");
                bOSX      = true;
            }

            if (NewTarget == BuildTarget.StandaloneWindows)
            {
                BuiltName = GetConfigString("BuiltWindows32Name");
                bWindows  = true;
            }
            else if (NewTarget == BuildTarget.StandaloneWindows64)
            {
                BuiltName = GetConfigString("BuiltWindows64Name");
                bWindows  = true;
            }

            if (NewTarget == BuildTarget.StandaloneLinux)
            {
                BuiltName = GetConfigString("BuiltLinux32Name");
                bLinux    = true;
            }
            else if (NewTarget == BuildTarget.StandaloneLinux64)
            {
                BuiltName = GetConfigString("BuiltLinux64Name");
                bLinux    = true;
            }
            else if (NewTarget == BuildTarget.StandaloneLinuxUniversal)
            {
                BuiltName = GetConfigString("BuiltLinuxUniversalName");
                bLinux    = true;
            }

            if (BuiltName == "")
            {
                if (bOSX)
                {
                    BuiltName = GetConfigString("BuiltOSXName");
                }
                else if (bWindows)
                {
                    BuiltName = GetConfigString("BuiltWindowsName");
                }
                else if (bLinux)
                {
                    BuiltName = GetConfigString("BuiltLinuxName");
                }
            }

            if (BuiltName == "")
            {
                BuiltName = IgorJobConfig.GetStringParam(IgorBuildCommon.BuiltNameFlag);
            }

            if (BuiltName == "")
            {
                BuiltName = Path.GetFileName(EditorUserBuildSettings.GetBuildLocation(NewTarget));
            }

            if (BuiltName == "")
            {
                if (bOSX)
                {
                    BuiltName = "Unity.app";
                }
                else if (bWindows)
                {
                    BuiltName = "Unity.exe";
                }
                else if (bLinux)
                {
                    BuiltName = "Unity";
                }
            }

            if (!bLinux && !BuiltName.Contains(".exe") && !BuiltName.Contains(".app"))
            {
                if (bOSX)
                {
                    BuiltName += ".app";
                }
                if (bWindows)
                {
                    BuiltName += ".exe";
                }
            }

            if (!string.IsNullOrEmpty(BuiltName) && IgorJobConfig.IsBoolParamSet(IgorBuildCommon.AppendCommitInfoFlag))
            {
                string CommitInfo = IgorBuildCommon.GetCommitInfo();
                if (!string.IsNullOrEmpty(CommitInfo))
                {
                    BuiltName = BuiltName.Insert(BuiltName.IndexOf("."), "_" + CommitInfo);
                }
            }

            return(BuiltName);
        }
コード例 #22
0
ファイル: BitTorrentSync.cs プロジェクト: fbizuneh/Igor
        public virtual bool CopyToFromSync(bool bToSync)
        {
            string LocalFile = "";

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

                IgorAssert.EnsureTrue(this, BuiltProducts.Count == 1, "This module requires exactly one built file, but we found " + BuiltProducts.Count + " instead.  Please make sure you've enabled a package step prior to this one.");

                if (BuiltProducts.Count > 0)
                {
                    LocalFile = BuiltProducts[0];
                }
            }
            else
            {
                LocalFile = GetParamOrConfigString(CopyToLocalDirFlag, "", Path.GetFullPath("."), false);
            }

            if (IgorAssert.EnsureTrue(this, !bToSync || File.Exists(LocalFile), "BitTorrent Sync copy was told to copy file " + LocalFile + ", but the file doesn't exist!"))
            {
                string SyncFile = "";

                if (IgorJobConfig.IsBoolParamSet(CopyToSyncExpEnabledFlag))
                {
                    SyncFile = GetParamOrConfigString(CopyToSyncExplicitFlag, "BitTorrent Sync copy to sync explicit is enabled, but the path isn't set.");
                }

                if (SyncFile == "" && IgorJobConfig.IsBoolParamSet(CopyToSyncEnvEnabledFlag))
                {
                    string EnvVariable = GetParamOrConfigString(CopyToSyncEnvFlag, "BitTorrent Sync copy to sync based on environment variable is enabled, but the env variable name isn't set.");

                    if (EnvVariable == "")
                    {
                        return(true);
                    }

                    SyncFile = IgorRuntimeUtils.GetEnvVariable(EnvVariable);

                    if (!IgorAssert.EnsureTrue(this, SyncFile != "", "The BitTorrent Sync root path environment variable " + EnvVariable + " isn't set."))
                    {
                        return(true);
                    }
                }

                string SyncFilename = GetParamOrConfigString(CopyToSyncFilenameFlag, (bToSync ?
                                                                                      "BitTorrent Sync copy to sync destination filename isn't set." : "BitTorrent Sync copy from sync source filename isn't set."));

                if (SyncFilename == "")
                {
                    return(true);
                }

                SyncFile = Path.Combine(SyncFile, SyncFilename);

                if (bToSync)
                {
                    if (File.Exists(SyncFile))
                    {
                        IgorRuntimeUtils.DeleteFile(SyncFile);
                    }

                    IgorRuntimeUtils.CopyFile(LocalFile, SyncFile);

                    Log("File " + LocalFile + " copied to requested location " + SyncFile + " for BitTorrent Sync uploading.");
                }
                else
                {
                    LocalFile = Path.Combine(LocalFile, Path.GetFileName(SyncFile));

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

                    IgorRuntimeUtils.CopyFile(SyncFile, LocalFile);

                    Log("File " + SyncFile + " copied from the BitTorrent Sync share to requested location " + LocalFile + ".");

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

                    NewProducts.Add(LocalFile);

                    IgorCore.SetNewModuleProducts(NewProducts);
                }
            }

            return(true);
        }