From 2022a1255cfb1b22904dee15e3a2d95acea3ed54 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 6 Apr 2017 17:55:15 +0200 Subject: [PATCH 1/2] Use Visual Studio instead of Xamarin Studio. --- Make.config | 4 ++-- src/NativeTypes/Makefile | 2 +- tests/common/Configuration.cs | 2 +- tests/common/mac/ProjectTestHelpers.cs | 2 +- tests/xharness/Jenkins.cs | 2 +- tools/mtouch/mtouch.cs | 5 ----- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Make.config b/Make.config index ff7a4d753f4a..044aa77ab22f 100644 --- a/Make.config +++ b/Make.config @@ -270,13 +270,13 @@ MAC_PACKAGE_DMG_DIRNAME="$(MAC_PACKAGE_TITLE)" MAC_PACKAGE_UTI=com.$(MAC_PACKAGE_NAME_LOWER).pkg MAC_PACKAGE_INSTALL_LOCATION=$(MAC_FRAMEWORK_VERSIONED_DIR) -TT = $(SYSTEM_MONO) "/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/TextTransform.exe" +TT = $(SYSTEM_MONO) "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/TextTransform.exe" PRODUCT_KEY_PATH?=$(TOP)/product.snk include $(TOP)/mk/quiet.mk -MDTOOL?=DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib:/Library/Frameworks/Mono.framework/Versions/Current/lib $(SYSTEM_MONO) "/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/bin/mdtool.exe" $(MDTOOL_VERBOSITY) +MDTOOL?=DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib:/Library/Frameworks/Mono.framework/Versions/Current/lib $(SYSTEM_MONO) "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/mdtool.exe" $(MDTOOL_VERBOSITY) ifneq ($(BUILD_REVISION),) # wrench build only diff --git a/src/NativeTypes/Makefile b/src/NativeTypes/Makefile index efb150cd3319..f0192c7098f0 100644 --- a/src/NativeTypes/Makefile +++ b/src/NativeTypes/Makefile @@ -1,4 +1,4 @@ -TT = "/Applications/Xamarin Studio.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/TextTransform.exe" +TT = "/Applications/Visual Studio.app/Contents/MacOS/lib/monodevelop/AddIns/MonoDevelop.TextTemplating/TextTransform.exe" .PHONY: all test clean diff --git a/tests/common/Configuration.cs b/tests/common/Configuration.cs index 00a66edede86..73d3fe4071ae 100644 --- a/tests/common/Configuration.cs +++ b/tests/common/Configuration.cs @@ -11,7 +11,7 @@ class Configuration public const string XI_ProductName = "MonoTouch"; public const string XM_ProductName = "Xamarin.Mac"; - const string XS_PATH = "/Applications/Xamarin Studio.app/Contents/Resources"; + const string XS_PATH = "/Applications/Visual Studio.app/Contents/Resources"; static string mt_root; static string ios_destdir; diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs index 1de4c44263cf..0d2b7f375702 100644 --- a/tests/common/mac/ProjectTestHelpers.cs +++ b/tests/common/mac/ProjectTestHelpers.cs @@ -136,7 +136,7 @@ public static string BuildProject (string csprojTarget, bool isUnified, bool dia if (isUnified) return RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/" + (useMSBuild ? "msbuild" : "xbuild"), buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); else - return RunAndAssert ("/Applications/Xamarin Studio.app/Contents/MacOS/mdtool", buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); + return RunAndAssert ("/Applications/Visual Studio.app/Contents/MacOS/mdtool", buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); } static string ProjectTextReplacement (UnifiedTestConfig config, string text) diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 8f03bc86c957..701e58a57fbb 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -1954,7 +1954,7 @@ protected override async Task ExecuteAsync () ExecutionResult = TestExecutingResult.Building; using (var resource = await NotifyBlockingWaitAsync (Jenkins.DesktopResource.AcquireConcurrentAsync ())) { using (var xbuild = new Process ()) { - xbuild.StartInfo.FileName = "/Applications/Xamarin Studio.app/Contents/MacOS/mdtool"; + xbuild.StartInfo.FileName = "/Applications/Visual Studio.app/Contents/MacOS/mdtool"; var args = new StringBuilder (); args.Append ("build "); var sln = Path.ChangeExtension (ProjectFile, "sln"); diff --git a/tools/mtouch/mtouch.cs b/tools/mtouch/mtouch.cs index c9ab67eadbec..879c43a213a9 100644 --- a/tools/mtouch/mtouch.cs +++ b/tools/mtouch/mtouch.cs @@ -1464,11 +1464,6 @@ static string MlaunchPath { if (File.Exists (path)) return path; - // check inside XS - path = "/Applications/Xamarin Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.IPhone/mlaunch.app/Contents/MacOS/mlaunch"; - if (File.Exists (path)) - return path; - // check an environment variable path = Environment.GetEnvironmentVariable ("MLAUNCH_PATH"); if (File.Exists (path)) From 70d0dabe7d07934c71d5f3c86840fd0b47f59d2d Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 10 Apr 2017 08:09:33 +0200 Subject: [PATCH 2/2] VS doesn't have mdtool, it has vstool. Also there's no need to manually invoke the mdtool.exe executable anymore (which we did because the mdtool executable had a min macOS version of 10.9, and we used to build tests on older macOS versions [1]), since now we only run tests on older macOS versions, we don't build those tests there. [1] https://github.com/xamarin/maccore/commit/a1932b0ccde097b46796e4dcf51971043698720a --- Make.config | 2 +- tests/common/mac/ProjectTestHelpers.cs | 2 +- tests/mmptest/src/ClassicTests.cs | 2 +- tests/xharness/Jenkins.cs | 2 +- tests/xharness/MakefileGenerator.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Make.config b/Make.config index 044aa77ab22f..bc9f8db11f42 100644 --- a/Make.config +++ b/Make.config @@ -276,7 +276,7 @@ PRODUCT_KEY_PATH?=$(TOP)/product.snk include $(TOP)/mk/quiet.mk -MDTOOL?=DYLD_FALLBACK_LIBRARY_PATH=$(HOME)/lib:/usr/local/lib:/lib:/usr/lib:/Library/Frameworks/Mono.framework/Versions/Current/lib $(SYSTEM_MONO) "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/mdtool.exe" $(MDTOOL_VERBOSITY) +MDTOOL?="/Applications/Visual Studio.app/Contents/MacOS/vstool" $(MDTOOL_VERBOSITY) ifneq ($(BUILD_REVISION),) # wrench build only diff --git a/tests/common/mac/ProjectTestHelpers.cs b/tests/common/mac/ProjectTestHelpers.cs index 0d2b7f375702..b9f07ba244ba 100644 --- a/tests/common/mac/ProjectTestHelpers.cs +++ b/tests/common/mac/ProjectTestHelpers.cs @@ -136,7 +136,7 @@ public static string BuildProject (string csprojTarget, bool isUnified, bool dia if (isUnified) return RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/" + (useMSBuild ? "msbuild" : "xbuild"), buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); else - return RunAndAssert ("/Applications/Visual Studio.app/Contents/MacOS/mdtool", buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); + return RunAndAssert ("/Applications/Visual Studio.app/Contents/MacOS/vstool", buildArgs, "Compile", shouldFail, getBuildProjectErrorInfo); } static string ProjectTextReplacement (UnifiedTestConfig config, string text) diff --git a/tests/mmptest/src/ClassicTests.cs b/tests/mmptest/src/ClassicTests.cs index 55343f8ab4a2..06ec413b6df3 100644 --- a/tests/mmptest/src/ClassicTests.cs +++ b/tests/mmptest/src/ClassicTests.cs @@ -15,7 +15,7 @@ bool ShouldSkipClassicTest { get { - return TI.FindMonoVersion () < new Version ("4.3") || !PlatformHelpers.CheckSystemVersion (10, 10); // mdtool build requires us to be on a version that XS supports + return TI.FindMonoVersion () < new Version ("4.3") || !PlatformHelpers.CheckSystemVersion (10, 10); // vstool build requires us to be on a version that XS supports } } diff --git a/tests/xharness/Jenkins.cs b/tests/xharness/Jenkins.cs index 701e58a57fbb..13a4a51cd8fe 100644 --- a/tests/xharness/Jenkins.cs +++ b/tests/xharness/Jenkins.cs @@ -1954,7 +1954,7 @@ protected override async Task ExecuteAsync () ExecutionResult = TestExecutingResult.Building; using (var resource = await NotifyBlockingWaitAsync (Jenkins.DesktopResource.AcquireConcurrentAsync ())) { using (var xbuild = new Process ()) { - xbuild.StartInfo.FileName = "/Applications/Visual Studio.app/Contents/MacOS/mdtool"; + xbuild.StartInfo.FileName = "/Applications/Visual Studio.app/Contents/MacOS/vstool"; var args = new StringBuilder (); args.Append ("build "); var sln = Path.ChangeExtension (ProjectFile, "sln"); diff --git a/tests/xharness/MakefileGenerator.cs b/tests/xharness/MakefileGenerator.cs index 1b86bd487991..b2009170df7d 100644 --- a/tests/xharness/MakefileGenerator.cs +++ b/tests/xharness/MakefileGenerator.cs @@ -120,7 +120,7 @@ public static void CreateMacMakefile (Harness harness, IEnumerable ta allTargetNames.Add (MakeMacClassicTargetName (target, MacTargetNameType.Build)); allTargetCleanNames.Add (MakeMacClassicTargetName (target, MacTargetNameType.Clean)); - // mdtool can only find referenced projects if the referenced + // vstool can only find referenced projects if the referenced // projects are included in the solution. This requires us to // build the solution (if it exists), not the project. var slnPath = Path.ChangeExtension (target.ProjectPath, "sln");