Example #1
0
    private void SetupStagingArea(BuildPostProcessArgs args, HashSet <string> filesToNotOverwrite)
    {
        List <string> cppPlugins;

        if (GetCreateSolution(args) && (args.target == BuildTarget.StandaloneWindows || args.target == BuildTarget.StandaloneWindows64))
        {
            // For Windows Standalone player solution build, we want to copy plugins for all architectures as
            // the ultimate CPU architecture choice can be made from Visual Studio
            CopyNativePlugins(args, BuildTarget.StandaloneWindows, out cppPlugins);
            CopyNativePlugins(args, BuildTarget.StandaloneWindows64, out cppPlugins);
        }
        else
        {
            CopyNativePlugins(args, args.target, out cppPlugins);
        }

        CreateApplicationData(args);

        PostprocessBuildPlayer.InstallStreamingAssets(args.stagingAreaData, args.report);

        if (GetInstallingIntoBuildsFolder(args))
        {
            CopyDataForBuildsFolder(args);
        }
        else
        {
            CopyVariationFolderIntoStagingArea(args, filesToNotOverwrite);

            if (UseIl2Cpp)
            {
                var il2cppPlatformProvider = GetPlatformProvider(args);
                IL2CPPUtils.RunIl2Cpp(args.stagingAreaData, il2cppPlatformProvider, (cppOutputDir) => CopyCppPlugins(args, cppOutputDir, cppPlugins), args.usedClassRegistry);

                if (GetCreateSolution(args))
                {
                    ProcessIl2CppOutputForSolution(args, il2cppPlatformProvider, cppPlugins);
                }
                else
                {
                    ProcessIl2CppOutputForBinary(args);
                }
            }
            else
            {
                var buildTargetGroup      = BuildPipeline.GetBuildTargetGroup(args.target);
                var managedStrippingLevel = PlayerSettings.GetManagedStrippingLevel(buildTargetGroup);
                AssemblyStripper.StripForMonoBackend(args.target, args.usedClassRegistry, managedStrippingLevel, args.report);
            }

            RenameFilesInStagingArea(args);
        }
    }
Example #2
0
    private void SetupStagingArea(BuildPostProcessArgs args, HashSet <string> filesToNotOverwrite)
    {
        List <string> cppPlugins;

        CopyNativePlugins(args, out cppPlugins);

        CreateApplicationData(args);

        PostprocessBuildPlayer.InstallStreamingAssets(args.stagingAreaData, args.report);

        if (GetInstallingIntoBuildsFolder(args))
        {
            CopyDataForBuildsFolder(args);
        }
        else
        {
            CopyVariationFolderIntoStagingArea(args);

            if (GetCreateSolution(args))
            {
                CopyPlayerSolutionIntoStagingArea(args, filesToNotOverwrite);
            }

            if (UseIl2Cpp)
            {
                var il2cppPlatformProvider = GetPlatformProvider(args);
                IL2CPPUtils.RunIl2Cpp(args.stagingAreaData, il2cppPlatformProvider, (cppOutputDir) => CopyCppPlugins(args, cppOutputDir, cppPlugins), args.usedClassRegistry);

                if (GetCreateSolution(args))
                {
                    ProcessIl2CppOutputForSolution(args, il2cppPlatformProvider, cppPlugins);
                }
                else
                {
                    ProcessIl2CppOutputForBinary(args);
                }
            }
            else
            {
                var buildTargetGroup      = BuildPipeline.GetBuildTargetGroup(args.target);
                var managedStrippingLevel = PlayerSettings.GetManagedStrippingLevel(buildTargetGroup);
                AssemblyStripper.StripForMonoBackend(args.target, args.usedClassRegistry, managedStrippingLevel, args.report);
            }

            RenameFilesInStagingArea(args);
        }
    }