Beispiel #1
0
        protected override void ExecuteInternal()
        {
            if (MonoNativeInfo == null)
            {
                return;
            }

            MonoNativeInfo.AddProjectDefines(inputProject);
            inputProject.AddAdditionalDefines("MONO_NATIVE_IOS");

            inputProject.FixInfoPListInclude(Suffix);
            inputProject.SetExtraLinkerDefs("extra-linker-defs" + ExtraLinkerDefsSuffix + ".xml");

            Harness.Save(inputProject, ProjectPath);

            XmlDocument info_plist        = new XmlDocument();
            var         target_info_plist = Path.Combine(TargetDirectory, "Info" + Suffix + ".plist");

            info_plist.LoadWithoutNetworkAccess(Path.Combine(TargetDirectory, "Info.plist"));
            info_plist.SetMinimumOSVersion(GetMinimumOSVersion(info_plist.GetMinimumOSVersion()));
            Harness.Save(info_plist, target_info_plist);
        }
Beispiel #2
0
        void AutoConfigureIOS()
        {
            var test_suites             = new string [] { "monotouch-test", "framework-test", "interdependent-binding-projects" };
            var library_projects        = new string [] { "BundledResources", "EmbeddedResources", "bindings-test", "bindings-test2", "bindings-framework-test" };
            var fsharp_test_suites      = new string [] { "fsharp" };
            var fsharp_library_projects = new string [] { "fsharplibrary" };

            foreach (var p in test_suites)
            {
                IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")))
                {
                    Name = p
                });
            }
            foreach (var p in fsharp_test_suites)
            {
                IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")))
                {
                    Name = p
                });
            }
            foreach (var p in library_projects)
            {
                IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".csproj")), false)
                {
                    Name = p
                });
            }
            foreach (var p in fsharp_library_projects)
            {
                IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, p + "/" + p + ".fsproj")), false)
                {
                    Name = p
                });
            }

            IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "introspection", "iOS", "introspection-ios.csproj")))
            {
                Name = "introspection"
            });
            IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "dont link", "dont link.csproj")))
            {
                Configurations = new string [] { "Debug", "Release" }
            });
            IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link all", "link all.csproj")))
            {
                Configurations = new string [] { "Debug", "Release" }
            });
            IOSTestProjects.Add(new iOSTestProject(Path.GetFullPath(Path.Combine(RootDirectory, "linker", "ios", "link sdk", "link sdk.csproj")))
            {
                Configurations = new string [] { "Debug", "Release" }
            });

            foreach (var flavor in new MonoNativeFlavor[] { MonoNativeFlavor.Compat, MonoNativeFlavor.Unified })
            {
                var monoNativeInfo = new MonoNativeInfo(this, flavor);
                var iosTestProject = new iOSTestProject(monoNativeInfo.ProjectPath)
                {
                    MonoNativeInfo = monoNativeInfo,
                    Name           = monoNativeInfo.ProjectName,
                    SkipwatchOSARM64_32Variation = monoNativeInfo.ProjectName.Contains("compat"),
                };

                IOSTestProjects.Add(iosTestProject);
            }

            // add all the tests that are using the precompiled mono assemblies
            var monoImportTestFactory = new BCLTestImportTargetFactory(this);

            IOSTestProjects.AddRange(monoImportTestFactory.GetiOSBclTargets());

            WatchOSContainerTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchContainer"));
            WatchOSAppTemplate       = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchApp"));
            WatchOSExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "templates/WatchExtension"));

            TodayContainerTemplate    = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayContainer"));
            TodayExtensionTemplate    = Path.GetFullPath(Path.Combine(RootDirectory, "templates", "TodayExtension"));
            BCLTodayExtensionTemplate = Path.GetFullPath(Path.Combine(RootDirectory, "bcl-test", "templates", "today"));
        }