public override void PostProcess(BuildPostProcessArgs args)
        {
            PostProcessWSA swsa;
            WSASDK wsaSDK = EditorUserBuildSettings.wsaSDK;
            switch (wsaSDK)
            {
                case WSASDK.SDK81:
                    swsa = new PostProcessStore81(args, null);
                    break;

                case WSASDK.PhoneSDK81:
                    swsa = new PostProcessPhone81(args, null);
                    break;

                case WSASDK.UniversalSDK81:
                    swsa = new PostProcessUniversal81(args);
                    break;

                case WSASDK.UWP:
                    if (PlayerSettings.GetScriptingBackend(BuildTargetGroup.WSA) != ScriptingImplementation.IL2CPP)
                    {
                        swsa = new PostProcessUAPDotNet(args, null);
                        break;
                    }
                    swsa = new PostProcessUAPIl2Cpp(args, null);
                    break;

                default:
                    throw new NotSupportedException(string.Format("{0} is not supported.", wsaSDK));
            }
            swsa.Process();
        }
 public virtual void PostProcessScriptsOnly(BuildPostProcessArgs args)
 {
     if (!this.SupportsScriptsOnlyBuild())
     {
         throw new NotSupportedException();
     }
 }
 public PostProcessUniversal81(BuildPostProcessArgs args) : base(args, WSASDK.UniversalSDK81, null)
 {
     this._stagingAreaShared = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".Shared");
     this._storeStagingArea = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".Windows");
     this._phoneStagingArea = Utility.CombinePath(base.StagingArea, base.VisualStudioName + ".WindowsPhone");
     this._store = new PostProcessStore81(args, this._storeStagingArea);
     this._phone = new PostProcessPhone81(args, this._phoneStagingArea);
 }
Ejemplo n.º 4
0
 public PostProcessWSA(BuildPostProcessArgs args, WSASDK sdk, [Optional, DefaultParameterValue(null)] string stagingArea) : base(args, sdk, stagingArea)
 {
     this._generateReferenceProjects = EditorUserBuildSettings.wsaGenerateReferenceProjects;
     this._images = new ProjectImages();
     if (this._generateReferenceProjects)
     {
         MetroAssemblyCSharpCreator.ResetAssemblyCSharpProjectGUIDs();
     }
 }
 internal static string ArgumentsForEmscripten(BuildPostProcessArgs args)
 {
     bool flag = (args.options & BuildOptions.Development) != BuildOptions.CompressTextures;
     bool flag2 = flag && EditorUserBuildSettings.webGLUsePreBuiltUnityEngine;
     string str = "-s PRECISE_F32=2 ";
     bool flag3 = PlayerSettings.WebGL.exceptionSupport != WebGLExceptionSupport.None;
     string str2 = str;
     object[] objArray1 = new object[] { str2, "-s DISABLE_EXCEPTION_CATCHING=", !flag3 ? 1 : 0, " " };
     str2 = string.Concat(objArray1);
     str = string.Concat(new object[] { str2, "--memory-init-file ", !flag2 ? 1 : 0, " " }) + "-O3 " + "-s NO_EXIT_RUNTIME=1 ";
     if (flag)
     {
         str = (str + "-g2 ") + "-s ASSERTIONS=1 " + "-s DEMANGLE_SUPPORT=1 ";
     }
     else
     {
         str = str + "-g0 ";
     }
     str = str + "-s USE_WEBGL2=1 ";
     if (PlayerSettings.WebGL.useWasm)
     {
         str = str + "-s BINARYEN=1 ";
     }
     string str3 = ((uint) ((PlayerSettings.WebGL.memorySize * 0x400) * 0x400)).ToString();
     str = str + "-s TOTAL_MEMORY=" + str3 + " ";
     if (!flag2)
     {
         str = str + "--separate-asm ";
     }
     str = str + "--emit-symbol-map " + "--output_eol linux ";
     if (flag2)
     {
         str = str + "-s SIDE_MODULE=1 -s ASM_JS=2 ";
     }
     return (str + "-s MEMFS_APPEND_TO_TYPED_ARRAYS=1 " + PlayerSettings.WebGL.emscriptenArgs);
 }
 private static void CompressFilesInOutputDirectory(BuildPostProcessArgs args)
 {
     string compressedFileExtension = GetCompressedFileExtension();
     if (compressedFileExtension != null)
     {
         string[] components = new string[] { args.installPath, DataFolderName(args) };
         string path = Paths.Combine(components);
         if (<>f__am$cache1 == null)
         {
 public void PostProcessScriptsOnly(BuildPostProcessArgs args)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 8
0
 protected virtual IEnumerable <BuildTarget> GetPluginBuildTargetsFor(BuildPostProcessArgs args)
 {
     yield return(args.target);
 }
	protected DesktopStandalonePostProcessor(BuildPostProcessArgs postProcessArgs)
	{
		this.m_PostProcessArgs = postProcessArgs;
	}
 // Supports legacy interface before BuildProperties was introduced
 public virtual void PostProcess(BuildPostProcessArgs args)
 {
 }
Ejemplo n.º 11
0
        LinkerConfig LinkerConfigFor(BuildPostProcessArgs args)
        {
            var namedBuildTarget = GetNamedBuildTarget(args);
            var strippingLevel   = PlayerSettings.GetManagedStrippingLevel(namedBuildTarget);

            // IL2CPP does not support a managed stripping level of disabled. If the player settings
            // do try this (which should not be possible from the editor), use Low instead.
            if (GetUseIl2Cpp(args) && strippingLevel == ManagedStrippingLevel.Disabled)
            {
                strippingLevel = ManagedStrippingLevel.Minimal;
            }

            if (strippingLevel > ManagedStrippingLevel.Disabled)
            {
                var rcr = args.usedClassRegistry;

                var additionalArgs = new List <string>();

                var diagArgs = Debug.GetDiagnosticSwitch("VMUnityLinkerAdditionalArgs").value as string;
                if (!string.IsNullOrEmpty(diagArgs))
                {
                    additionalArgs.Add(diagArgs.Trim('\''));
                }

                var engineStrippingFlags = new List <string>();

                if (UnityEngine.Connect.UnityConnectSettings.enabled)
                {
                    engineStrippingFlags.Add("EnableUnityConnect");
                }
                if (UnityEngine.Analytics.PerformanceReporting.enabled)
                {
                    engineStrippingFlags.Add("EnablePerformanceReporting");
                }
                if (UnityEngine.Analytics.Analytics.enabled)
                {
                    engineStrippingFlags.Add("EnableAnalytics");
                }
                if (UnityEditor.CrashReporting.CrashReportingSettings.enabled)
                {
                    engineStrippingFlags.Add("EnableCrashReporting");
                }

                NPath managedAssemblyFolderPath = $"{args.stagingAreaData}/Managed";
                var   linkerRunInformation      = new UnityLinkerRunInformation(managedAssemblyFolderPath.MakeAbsolute().ToString(), null, args.target,
                                                                                rcr, strippingLevel, null, args.report);
                AssemblyStripper.WriteEditorData(linkerRunInformation);

                return(new LinkerConfig
                {
                    LinkXmlFiles = AssemblyStripper.GetLinkXmlFiles(linkerRunInformation).ToArray(),
                    EditorToLinkerData = linkerRunInformation.EditorToLinkerDataPath.ToNPath().MakeAbsolute().ToString(),
                    AssembliesToProcess = rcr.GetUserAssemblies()
                                          .Where(s => rcr.IsDLLUsed(s))
                                          .ToArray(),
                    Runtime = GetUseIl2Cpp(args) ? "il2cpp" : "mono",
                    Profile = IL2CPPUtils.ApiCompatibilityLevelToDotNetProfileArgument(
                        PlayerSettings.GetApiCompatibilityLevel(namedBuildTarget), args.target),
                    Ruleset = strippingLevel switch
                    {
                        ManagedStrippingLevel.Minimal => "Minimal",
                        ManagedStrippingLevel.Low => "Conservative",
                        ManagedStrippingLevel.Medium => "Aggressive",
                        ManagedStrippingLevel.High => "Experimental",
                        _ => throw new ArgumentException($"Unhandled {nameof(ManagedStrippingLevel)} value")
                    },
 public override void PostProcess(BuildPostProcessArgs args)
 {
     PostProcessiPhonePlayer.PostProcess(this.settings, args);
 }
 public virtual void PostProcess(BuildPostProcessArgs args)
 {
 }
 private void BuildStep(BuildPostProcessArgs args, string title, string description)
 {
     this.m_Progress.Show(title, description);
     args.report.BeginBuildStep(description);
 }
 public virtual void PostProcess(BuildPostProcessArgs args, out BuildProperties outProperties)
 {
     this.PostProcess(args);
     outProperties = ScriptableObject.CreateInstance <DefaultBuildProperties>();
 }
 public PostProcessUAPDotNet(BuildPostProcessArgs args, [Optional, DefaultParameterValue(null)] string stagingArea) : base(args, stagingArea)
 {
 }
 protected static string GetIl2CppDataBackupFolderName(BuildPostProcessArgs args)
 {
     return($"{args.installPath.ToNPath().FileNameWithoutExtension}_BackUpThisFolder_ButDontShipItWithYourGame");
 }
 // Note! Only called when running a bee build.
 public virtual void PostProcessCompletedBuild(BuildPostProcessArgs args)
 {
 }
Ejemplo n.º 19
0
 public PostProcessPhone81(BuildPostProcessArgs args, [Optional, DefaultParameterValue(null)] string stagingArea) : base(args, WSASDK.PhoneSDK81, stagingArea)
 {
 }
 public void PostProcess(BuildPostProcessArgs args)
 {
     base.m_PostProcessArgs = args;
     AssemblyReferenceChecker checker = new AssemblyReferenceChecker();
     checker.CollectReferences(args.stagingAreaDataManaged, false, 0f, true);
     bool flag = !string.IsNullOrEmpty(checker.WhoReferencesClass("UnityEngine.SocialPlatforms.GameCenter.GameCenterPlatform", true));
     this.SaveEditorOnlyPlayerSettingsToPlist();
     base.PostProcess();
     if (flag)
     {
         if (Application.platform != RuntimePlatform.OSXEditor)
         {
             UnityEngine.Debug.LogWarning("OS X Standalone players with GameCenter support need to be built on an OS X machine in order to pass Mac App Store validation.");
         }
         else
         {
             Console.WriteLine("Adding GameKit linkage to OS X binary.");
             ProcessStartInfo info2 = new ProcessStartInfo {
                 FileName = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(args.target, args.options), "optool")
             };
             string[] textArray1 = new string[] { "install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit -t \"", this.m_PostProcessArgs.installPath, "/Contents/MacOS/", this.InstallNameWithoutExtension, "\"" };
             info2.Arguments = string.Concat(textArray1);
             info2.CreateNoWindow = true;
             ProcessStartInfo si = info2;
             Program program = new Program(si);
             program.Start();
             while (!program.WaitForExit(100))
             {
             }
             if (program.ExitCode != 0)
             {
                 UnityEngine.Debug.LogError("Running optool to link GameKit failed\n" + si.FileName + " " + si.Arguments + "\n" + program.GetAllOutput());
             }
             program.Dispose();
         }
     }
 }
 public override void PostProcess(BuildPostProcessArgs args)
 {
     PostProcessSamsungTVPlayer.PostProcess(args.target, args.stagingAreaData, args.stagingArea, args.stagingAreaDataManaged, args.playerPackage, args.installPath, args.companyName, args.productName, args.options);
 }
 public void PostProcess(BuildPostProcessArgs args)
 {
     base.m_PostProcessArgs = args;
     base.PostProcess();
 }