Remove a lot of legacy logic. (#21576)
This commit is contained in:
Родитель
70b61c1b18
Коммит
0daefa2212
84
Make.config
84
Make.config
|
@ -201,14 +201,6 @@ TVOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(TVOS_NUGET_VERSION)))
|
|||
TVOS_NUGET_VERSION_NO_METADATA=$(TVOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
|
||||
TVOS_NUGET_VERSION_FULL=$(TVOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
|
||||
|
||||
WATCHOS_NUGET=Microsoft.watchOS
|
||||
WATCHOS_NUGET_VERSION=$(WATCHOS_NUGET_OS_VERSION).$(WATCHOS_NUGET_COMMIT_DISTANCE)
|
||||
WATCHOS_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(WATCHOS_NUGET_VERSION)))
|
||||
WATCHOS_NUGET_VERSION_MINOR=$(word 2, $(subst ., ,$(WATCHOS_NUGET_VERSION)))
|
||||
WATCHOS_NUGET_VERSION_PATCH=$(word 3, $(subst ., ,$(WATCHOS_NUGET_VERSION)))
|
||||
WATCHOS_NUGET_VERSION_NO_METADATA=$(WATCHOS_NUGET_VERSION)$(NUGET_PRERELEASE_IDENTIFIER)
|
||||
WATCHOS_NUGET_VERSION_FULL=$(WATCHOS_NUGET_VERSION_NO_METADATA)$(NUGET_BUILD_METADATA)
|
||||
|
||||
MACCATALYST_NUGET=Microsoft.MacCatalyst
|
||||
MACCATALYST_NUGET_VERSION=$(MACCATALYST_NUGET_OS_VERSION).$(MACCATALYST_NUGET_COMMIT_DISTANCE)
|
||||
MACCATALYST_NUGET_VERSION_MAJOR=$(word 1, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
|
||||
|
@ -275,25 +267,19 @@ MIN_OSX_VERSION_FOR_MAC=10.15
|
|||
# Bump the *_NUGET_VERSION variables in Make.versions instead, because that makes sure the computed commit distance for the version is correct.
|
||||
IOS_SDK_VERSION=$(word 1, $(subst ., ,$(IOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(IOS_NUGET_VERSION)))
|
||||
MACOS_SDK_VERSION=$(word 1, $(subst ., ,$(MACOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(MACOS_NUGET_VERSION)))
|
||||
WATCH_SDK_VERSION=$(word 1, $(subst ., ,$(WATCHOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(WATCHOS_NUGET_VERSION)))
|
||||
TVOS_SDK_VERSION=$(word 1, $(subst ., ,$(TVOS_NUGET_VERSION))).$(word 2, $(subst ., ,$(TVOS_NUGET_VERSION)))
|
||||
MACCATALYST_SDK_VERSION=$(word 1, $(subst ., ,$(MACCATALYST_NUGET_VERSION))).$(word 2, $(subst ., ,$(MACCATALYST_NUGET_VERSION)))
|
||||
MACCATALYST_MAC_SDK_VERSION=$(MACOS_SDK_VERSION)
|
||||
|
||||
MAX_IOS_DEPLOYMENT_TARGET=$(IOS_SDK_VERSION)
|
||||
MAX_WATCH_DEPLOYMENT_TARGET=$(WATCH_SDK_VERSION)
|
||||
MAX_TVOS_DEPLOYMENT_TARGET=$(TVOS_SDK_VERSION)
|
||||
|
||||
MAX_IOS_SIMULATOR_VERSION=$(IOS_SDK_VERSION)
|
||||
MAX_TVOS_SIMULATOR_VERSION=$(TVOS_SDK_VERSION)
|
||||
MAX_WATCH_SIMULATOR_VERSION=$(WATCH_SDK_VERSION)
|
||||
|
||||
# Minimum OS versions for running XI/XM apps.
|
||||
MIN_IOS_SDK_VERSION=12.2
|
||||
MIN_MACOS_SDK_VERSION=12.0
|
||||
MIN_WATCHOS_SDK_VERSION=4.0
|
||||
MIN_WATCHOS64_32_SDK_VERSION=5.1
|
||||
MIN_WATCH_OS_VERSION=4.0
|
||||
MIN_TVOS_SDK_VERSION=12.2
|
||||
MIN_MACCATALYST_SDK_VERSION=15.0
|
||||
|
||||
|
@ -305,40 +291,17 @@ DOTNET_MIN_MACOS_SDK_VERSION=12.0
|
|||
|
||||
# The min simulator version available in the Xcode we're using
|
||||
MIN_IOS_SIMULATOR_VERSION=15.0
|
||||
MIN_WATCHOS_SIMULATOR_VERSION=8.0
|
||||
# This is the iOS version that matches the watchOS version (i.e same Xcode)
|
||||
MIN_WATCHOS_COMPANION_SIMULATOR_VERSION=15.0
|
||||
MIN_TVOS_SIMULATOR_VERSION=15.0
|
||||
# These are the simulator package ids for the versions above
|
||||
EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK15_0 com.apple.pkg.AppleTVSimulatorSDK15_0 com.apple.pkg.WatchSimulatorSDK8_0
|
||||
EXTRA_SIMULATORS=com.apple.pkg.iPhoneSimulatorSDK15_0 com.apple.pkg.AppleTVSimulatorSDK15_0
|
||||
|
||||
INCLUDE_IOS=1
|
||||
INCLUDE_MAC=1
|
||||
INCLUDE_TVOS=1
|
||||
INCLUDE_MACCATALYST=1
|
||||
INCLUDE_DEVICE=1
|
||||
INCLUDE_XAMARIN_LEGACY=
|
||||
INCLUDE_HOTRESTART=1
|
||||
|
||||
ENABLE_DOTNET=1
|
||||
|
||||
ifeq ($(shell test $(shell echo $(MIN_IOS_SDK_VERSION) | sed 's/[.].*//') -ge 11; echo $$?),0)
|
||||
IOS_SUPPORTS_32BIT_ARCHITECTURES=
|
||||
else
|
||||
IOS_SUPPORTS_32BIT_ARCHITECTURES=1
|
||||
endif
|
||||
|
||||
ifeq ($(shell test $(shell echo $(MIN_WATCHOS_SDK_VERSION) | sed 's/[.].*//') -ge 9; echo $$?),0)
|
||||
WATCHOS_SUPPORTS_32BIT_DEVICE_ARCHITECTURES=
|
||||
else
|
||||
WATCHOS_SUPPORTS_32BIT_DEVICE_ARCHITECTURES=1
|
||||
endif
|
||||
ifeq ($(shell test $(shell echo $(MIN_WATCHOS_SDK_VERSION) | sed 's/[.].*//') -ge 4; echo $$?),0)
|
||||
WATCHOS_SUPPORTS_32BIT_SIMULATOR_ARCHITECTURES=
|
||||
else
|
||||
WATCHOS_SUPPORTS_32BIT_SIMULATOR_ARCHITECTURES=1
|
||||
endif
|
||||
|
||||
-include $(TOP)/Make.config.local
|
||||
-include $(TOP)/configure.inc
|
||||
|
||||
|
@ -381,7 +344,6 @@ MONOTOUCH_PREFIX := $(abspath $(MONOTOUCH_PREFIX))
|
|||
|
||||
MONOTOUCH_MONO_PATH?=$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.iOS
|
||||
MONOTOUCH_TV_MONO_PATH?=$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.TVOS
|
||||
MONOTOUCH_WATCH_MONO_PATH?=$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.WatchOS
|
||||
MONOTOUCH_MACCATALYST_MONO_PATH?=$(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/Xamarin.MacCatalyst
|
||||
|
||||
IOS_PACKAGE_FILENAME=$(IOS_PACKAGE_NAME_LOWER)-$(IOS_PACKAGE_VERSION).pkg
|
||||
|
@ -449,7 +411,6 @@ DEVICE_CXX=$(IOS_CXX)
|
|||
|
||||
IOS_CSC=$(SYSTEM_CSC) -features:strict -nostdlib -noconfig -r:$(MONOTOUCH_MONO_PATH)/System.dll -r:$(MONOTOUCH_MONO_PATH)/System.Core.dll -r:$(MONOTOUCH_MONO_PATH)/System.Xml.dll -r:$(MONOTOUCH_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_MONO_PATH)/System.Net.Http.dll -r:$(MONOTOUCH_MONO_PATH)/Facades/System.Drawing.Common.dll -deterministic
|
||||
TV_CSC=$(SYSTEM_CSC) -features:strict -nostdlib -noconfig -r:$(MONOTOUCH_TV_MONO_PATH)/System.dll -r:$(MONOTOUCH_TV_MONO_PATH)/System.Core.dll -r:$(MONOTOUCH_TV_MONO_PATH)/System.Xml.dll -r:$(MONOTOUCH_TV_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_TV_MONO_PATH)/System.Net.Http.dll -r:$(MONOTOUCH_TV_MONO_PATH)/Facades/System.Drawing.Common.dll -deterministic
|
||||
WATCH_CSC=$(SYSTEM_CSC) -features:strict -nostdlib -noconfig -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.Core.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.Xml.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.Net.Http.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/Facades/System.Drawing.Common.dll -deterministic
|
||||
MACCATALYST_CSC=$(SYSTEM_CSC) -features:strict -nostdlib -noconfig -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/System.dll -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/System.Core.dll -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/System.Xml.dll -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/System.Net.Http.dll -r:$(MONOTOUCH_MACCATALYST_MONO_PATH)/Facades/System.Drawing.Common.dll -deterministic
|
||||
|
||||
DEVICE_OBJC_CFLAGS=$(OBJC_CFLAGS)
|
||||
|
@ -476,23 +437,6 @@ XAMARIN_IPHONEOS_SDK = $(MONOTOUCH_DEVICE_SDK)
|
|||
|
||||
XAMARIN_MACCATALYST_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.MacCatalyst.sdk
|
||||
|
||||
# WatchOS
|
||||
|
||||
XAMARIN_WATCHSIMULATOR_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.WatchSimulator.sdk
|
||||
XAMARIN_WATCHOS_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.WatchOS.sdk
|
||||
|
||||
SIMULATORWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator$(WATCH_SDK_VERSION).sdk
|
||||
SIMULATORWATCH_CFLAGS = -arch i386 -mwatchos-simulator-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(SIMULATORWATCH_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
|
||||
SIMULATORWATCH64_CFLAGS = -arch x86_64 -mwatchos-simulator-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(SIMULATORWATCH_SDK) $(CFLAGS) -g $(IOS_COMMON_DEFINES)
|
||||
SIMULATORWATCH_OBJC_CFLAGS = $(SIMULATORWATCH_CFLAGS) $(COMMON_SIMULATOR_OBJC_CFLAGS)
|
||||
SIMULATORWATCH64_OBJC_CFLAGS = $(SIMULATORWATCH64_CFLAGS) $(COMMON_SIMULATOR_OBJC_CFLAGS)
|
||||
|
||||
DEVICEWATCH_SDK = $(XCODE_DEVELOPER_ROOT)/Platforms/WatchOS.platform/Developer/SDKs/WatchOS$(WATCH_SDK_VERSION).sdk
|
||||
DEVICEWATCH_CFLAGS = -arch armv7k -mwatchos-version-min=$(MIN_WATCHOS_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) $(CFLAGS) $(IOS_COMMON_DEFINES)
|
||||
DEVICEWATCH64_32_CFLAGS = -arch arm64_32 -mwatchos-version-min=$(MIN_WATCHOS64_32_SDK_VERSION) -isysroot $(DEVICEWATCH_SDK) $(CFLAGS) $(IOS_COMMON_DEFINES)
|
||||
DEVICEWATCH_OBJC_CFLAGS = $(DEVICEWATCH_CFLAGS) $(DEVICE_OBJC_CFLAGS)
|
||||
DEVICEWATCH64_32_OBJC_CFLAGS = $(DEVICEWATCH64_32_CFLAGS) $(DEVICE_OBJC_CFLAGS)
|
||||
|
||||
# TVOS
|
||||
|
||||
XAMARIN_TVSIMULATOR_SDK = $(MONOTOUCH_PREFIX)/SDKs/Xamarin.AppleTVSimulator.sdk
|
||||
|
@ -544,14 +488,6 @@ TVOS_SIMULATOR_X64_SWIFTFLAGS=$(TVOS_SIMULATOR_COMMON_SWIFTFLAGS) -target x86_64
|
|||
TVOS_DEVICE_COMMON_SWIFTFLAGS=$(COMMON_SWIFTFLAGS) -sdk $(DEVICETV_SDK)
|
||||
TVOS_DEVICE_ARM64_SWIFTFLAGS=$(TVOS_DEVICE_COMMON_SWIFTFLAGS) -target arm64-apple-tvos$(MIN_TVOS_SDK_VERSION)
|
||||
|
||||
WATCHOS_SIMULATOR_COMMON_SWIFTFLAGS=$(COMMON_SWIFTFLAGS) -sdk $(SIMULATORWATCH_SDK)
|
||||
WATCHOS_SIMULATOR_ARM64_SWIFTFLAGS=$(WATCHOS_SIMULATOR_COMMON_SWIFTFLAGS) -target arm64-apple-watchos$(MIN_WATCHOS_SDK_VERSION)-simulator
|
||||
WATCHOS_SIMULATOR_X64_SWIFTFLAGS=$(WATCHOS_SIMULATOR_COMMON_SWIFTFLAGS) -target x86_64-apple-watchos$(MIN_WATCHOS_SDK_VERSION)-simulator
|
||||
WATCHOS_SIMULATOR_X86_SWIFTFLAGS=$(WATCHOS_SIMULATOR_COMMON_SWIFTFLAGS) -target x86-apple-watchos$(MIN_WATCHOS_SDK_VERSION)-simulator
|
||||
WATCHOS_DEVICE_COMMON_SWIFTFLAGS=$(COMMON_SWIFTFLAGS) -sdk $(DEVICEWATCH_SDK)
|
||||
WATCHOS_DEVICE_ARM64_32_SWIFTFLAGS=$(WATCHOS_DEVICE_COMMON_SWIFTFLAGS) -target arm64_32-apple-watchos$(MIN_WATCHOS_SDK_VERSION)
|
||||
WATCHOS_DEVICE_ARMV7K_SWIFTFLAGS=$(WATCHOS_DEVICE_COMMON_SWIFTFLAGS) -target armv7k-apple-watchos$(MIN_WATCHOS_SDK_VERSION)
|
||||
|
||||
MACCATALYST_COMMON_SWIFTFLAGS=$(COMMON_SWIFTFLAGS) -sdk $(XCODE_MAC_SDKROOT) -Fsystem $(XCODE_MAC_SDKROOT)/System/iOSSupport/System/Library/Frameworks
|
||||
MACCATALYST_ARM64_SWIFTFLAGS=$(MACCATALYST_COMMON_SWIFTFLAGS) -target arm64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
|
||||
MACCATALYST_X64_SWIFTFLAGS=$(MACCATALYST_COMMON_SWIFTFLAGS) -target x86_64-apple-ios$(MIN_MACCATALYST_SDK_VERSION)-macabi
|
||||
|
@ -659,7 +595,6 @@ CP:=$(shell df -t apfs / >/dev/null 2>&1 && echo "cp -c" || echo "cp")
|
|||
MONO_IOS_SDK_DESTDIR:=$(abspath $(TOP)/builds/downloads/mono-ios-sdk-destdir)
|
||||
|
||||
# This variable includes all the platforms we support, even those that might be disabled in this build.
|
||||
ALL_PLATFORMS=iOS tvOS watchOS macOS
|
||||
ALL_DOTNET_PLATFORMS=iOS macOS tvOS MacCatalyst
|
||||
|
||||
# Set this to 1 if the Microsoft.NETCore.App.Ref dependency in eng/Version.Details.xml does *not* specify a CoherentParentDependency on Microsoft.Dotnet.Sdk.Internal.
|
||||
|
@ -766,21 +701,11 @@ DOTNET_MACOS_ASSEMBLY_NAME=Microsoft.macOS
|
|||
|
||||
DOTNET_PLATFORMS=
|
||||
ifdef INCLUDE_IOS
|
||||
ifdef ENABLE_DOTNET
|
||||
DOTNET_PLATFORMS+=iOS
|
||||
DOTNET_MONOVM_PLATFORMS+=iOS
|
||||
DOTNET_IOS_BITNESSES+=64
|
||||
DOTNET_NATIVEAOT_PLATFORMS+=iOS
|
||||
|
||||
# 32-bit architectures
|
||||
ifdef IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
DOTNET_IOS_BITNESSES+=32
|
||||
ifdef INCLUDE_DEVICE
|
||||
DOTNET_IOS_RUNTIME_IDENTIFIERS_32=ios-arm
|
||||
endif # INCLUDE_DEVICE
|
||||
DOTNET_IOS_RUNTIME_IDENTIFIERS_32+=iossimulator-x86
|
||||
endif # IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
|
||||
# 64-bit architectures
|
||||
ifdef INCLUDE_DEVICE
|
||||
DOTNET_IOS_RUNTIME_IDENTIFIERS_64=ios-arm64
|
||||
|
@ -789,11 +714,9 @@ DOTNET_IOS_RUNTIME_IDENTIFIERS_64+=iossimulator-x64 iossimulator-arm64
|
|||
|
||||
# All of them
|
||||
DOTNET_IOS_RUNTIME_IDENTIFIERS=$(DOTNET_IOS_RUNTIME_IDENTIFIERS_32) $(DOTNET_IOS_RUNTIME_IDENTIFIERS_64)
|
||||
endif # ENABLE_DOTNET
|
||||
endif # INCLUDE_IOS
|
||||
|
||||
ifdef INCLUDE_TVOS
|
||||
ifdef ENABLE_DOTNET
|
||||
DOTNET_PLATFORMS+=tvOS
|
||||
DOTNET_MONOVM_PLATFORMS+=tvOS
|
||||
DOTNET_TVOS_BITNESSES+=64
|
||||
|
@ -804,29 +727,24 @@ else
|
|||
DOTNET_TVOS_RUNTIME_IDENTIFIERS=tvossimulator-x64 tvossimulator-arm64
|
||||
endif
|
||||
DOTNET_TVOS_RUNTIME_IDENTIFIERS_64+=$(DOTNET_TVOS_RUNTIME_IDENTIFIERS)
|
||||
endif # ENABLE_DOTNET
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_MACCATALYST
|
||||
ifdef ENABLE_DOTNET
|
||||
DOTNET_PLATFORMS+=MacCatalyst
|
||||
DOTNET_MONOVM_PLATFORMS+=MacCatalyst
|
||||
DOTNET_MACCATALYST_BITNESSES+=64
|
||||
DOTNET_NATIVEAOT_PLATFORMS+=MacCatalyst
|
||||
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS=maccatalyst-x64 maccatalyst-arm64
|
||||
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS_64+=$(DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS)
|
||||
endif # ENABLE_DOTNET
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_MAC
|
||||
ifdef ENABLE_DOTNET
|
||||
DOTNET_PLATFORMS+=macOS
|
||||
DOTNET_CORECLR_PLATFORMS+=macOS
|
||||
DOTNET_MACOS_BITNESSES+=64
|
||||
DOTNET_NATIVEAOT_PLATFORMS+=macOS
|
||||
DOTNET_MACOS_RUNTIME_IDENTIFIERS=osx-x64 osx-arm64
|
||||
DOTNET_MACOS_RUNTIME_IDENTIFIERS_64=$(DOTNET_MACOS_RUNTIME_IDENTIFIERS)
|
||||
endif # ENABLE_DOTNET
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_IOS
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#
|
||||
# IOS_NUGET_VERSION (major/minor/patch #)
|
||||
# TVOS_NUGET_VERSION (major/minor/patch #)
|
||||
# WATCHOS_NUGET_VERSION (major/minor/patch #)
|
||||
# MACOS_NUGET_VERSION (major/minor/patch #)
|
||||
# MACCATALYST_NUGET_VERSION (major/minor/patch #)
|
||||
#
|
||||
# Update version numbers on main as well, to the next version
|
||||
#
|
||||
|
@ -67,7 +67,6 @@ MAC_PACKAGE_VERSION=9.99.0.$(MAC_COMMIT_DISTANCE)
|
|||
|
||||
IOS_NUGET_OS_VERSION=18.1
|
||||
TVOS_NUGET_OS_VERSION=18.1
|
||||
WATCHOS_NUGET_OS_VERSION=11.1
|
||||
MACOS_NUGET_OS_VERSION=15.1
|
||||
MACCATALYST_NUGET_OS_VERSION=18.1
|
||||
|
||||
|
|
19
Makefile
19
Makefile
|
@ -3,9 +3,7 @@ SUBDIRS=builds runtime src msbuild tools
|
|||
include $(TOP)/Make.config
|
||||
include $(TOP)/mk/versions.mk
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
SUBDIRS += dotnet
|
||||
endif
|
||||
|
||||
#
|
||||
# Common
|
||||
|
@ -42,19 +40,8 @@ endif
|
|||
|
||||
show-versions:
|
||||
@echo "Building:"
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
@echo " The legacy package(s):"
|
||||
ifdef INCLUDE_IOS
|
||||
@echo " Xamarin.iOS $(IOS_PACKAGE_VERSION)"
|
||||
endif
|
||||
ifdef INCLUDE_MAC
|
||||
@echo " Xamarin.Mac $(MAC_PACKAGE_VERSION)"
|
||||
endif
|
||||
endif
|
||||
ifdef ENABLE_DOTNET
|
||||
@echo " The .NET NuGet(s):"
|
||||
@$(foreach platform,$(DOTNET_PLATFORMS),echo " Microsoft.$(platform) $($(shell echo $(platform) | tr 'a-z' 'A-Z')_NUGET_VERSION_FULL)";)
|
||||
endif
|
||||
|
||||
check-permissions:
|
||||
ifdef INCLUDE_MAC
|
||||
|
@ -189,16 +176,12 @@ git-clean-all:
|
|||
@git submodule foreach -q --recursive 'git clean -xffdq && git reset --hard -q'
|
||||
@for dir in $(DEPENDENCY_DIRECTORIES); do if test -d $(CURDIR)/$$dir; then echo "Cleaning $$dir" && cd $(CURDIR)/$$dir && git clean -xffdq && git reset --hard -q && git submodule foreach -q --recursive 'git clean -xffdq'; else echo "Skipped $$dir (does not exist)"; fi; done
|
||||
|
||||
@if [ -n "$(ENABLE_XAMARIN)" ] || [ -n "$(ENABLE_DOTNET)" ]; then \
|
||||
@if [ -n "$(ENABLE_XAMARIN)" ]; then \
|
||||
CONFIGURE_FLAGS=""; \
|
||||
if [ -n "$(ENABLE_XAMARIN)" ]; then \
|
||||
echo "Xamarin-specific build has been re-enabled"; \
|
||||
CONFIGURE_FLAGS="$$CONFIGURE_FLAGS --enable-xamarin"; \
|
||||
fi; \
|
||||
if [ -n "$(ENABLE_DOTNET)" ]; then \
|
||||
echo "Dotnet-specific build has been re-enabled"; \
|
||||
CONFIGURE_FLAGS="$$CONFIGURE_FLAGS --enable-dotnet"; \
|
||||
fi; \
|
||||
./configure "$$CONFIGURE_FLAGS"; \
|
||||
$(MAKE) reset; \
|
||||
echo "Done"; \
|
||||
|
|
|
@ -134,7 +134,7 @@ include $(TOP)/scripts/versions-check/fragment.mk
|
|||
$(VERSIONS_CHECK): downloads/$(DOTNET_INSTALL_NAME)
|
||||
define VersionInfo
|
||||
$(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/Versions.plist: $(TOP)/builds/Versions-$(1).plist.in Makefile $(TOP)/Make.config $(VERSIONS_CHECK) | $(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)
|
||||
$$(Q) $(VERSIONS_CHECK_EXEC) $$< "$(DOTNET_MIN_IOS_SDK_VERSION)" "$(MAX_IOS_DEPLOYMENT_TARGET)" "$(DOTNET_MIN_TVOS_SDK_VERSION)" "$(MAX_TVOS_DEPLOYMENT_TARGET)" "$(MIN_WATCH_OS_VERSION)" "$(MAX_WATCH_DEPLOYMENT_TARGET)" "$(DOTNET_MIN_MACOS_SDK_VERSION)" "$(MACOS_SDK_VERSION)" "$(DOTNET_MIN_MACCATALYST_SDK_VERSION)" "$(MACCATALYST_SDK_VERSION)"
|
||||
$$(Q) $(VERSIONS_CHECK_EXEC) $$< "$(DOTNET_MIN_IOS_SDK_VERSION)" "$(MAX_IOS_DEPLOYMENT_TARGET)" "$(DOTNET_MIN_TVOS_SDK_VERSION)" "$(MAX_TVOS_DEPLOYMENT_TARGET)" "$(DOTNET_MIN_MACOS_SDK_VERSION)" "$(MACOS_SDK_VERSION)" "$(DOTNET_MIN_MACCATALYST_SDK_VERSION)" "$(MACCATALYST_SDK_VERSION)"
|
||||
$$(QF_GEN) sed -e 's/@XCODE_VERSION@/$(XCODE_VERSION)/g' -e "s/@MONO_VERSION@/$(DOTNET_VERSION)/g" $$< > $$@.tmp
|
||||
$$(Q) mv $$@.tmp $$@
|
||||
endef
|
||||
|
|
|
@ -156,12 +156,12 @@ while test "x$1" != x; do
|
|||
shift
|
||||
;;
|
||||
--enable-dotnet)
|
||||
echo "ENABLE_DOTNET=1" >> "$CONFIGURED_FILE"
|
||||
# This is the default, and there's no way do enable it, so ignore this argument
|
||||
shift
|
||||
;;
|
||||
--disable-dotnet)
|
||||
echo "ENABLE_DOTNET=" >> "$CONFIGURED_FILE"
|
||||
shift
|
||||
echo "It's not possible to disable .NET anymore."
|
||||
exit 1
|
||||
;;
|
||||
--enable-dotnet-windows)
|
||||
echo "$1 is ignored. Use --enable-dotnet instead"
|
||||
|
@ -172,11 +172,11 @@ while test "x$1" != x; do
|
|||
shift
|
||||
;;
|
||||
--enable-legacy-xamarin)
|
||||
echo "INCLUDE_XAMARIN_LEGACY=1" >> "$CONFIGURED_FILE"
|
||||
shift
|
||||
echo "It's not possible to enable legacy Xamarin anymore."
|
||||
exit 1
|
||||
;;
|
||||
--disable-legacy-xamarin)
|
||||
echo "INCLUDE_XAMARIN_LEGACY=" >> "$CONFIGURED_FILE"
|
||||
# This is the default, and there's no way do enable it, so ignore this argument
|
||||
shift
|
||||
;;
|
||||
--custom-dotnet=*)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
```shell
|
||||
cd ~/work/xamarin-macios
|
||||
make git-clean-all # Must start from a clean state when switching between downloaded and custom built dotnet/runtime.
|
||||
./configure --custom-dotnet=$HOME/work/runtime --enable-dotnet
|
||||
./configure --custom-dotnet=$HOME/work/runtime
|
||||
```
|
||||
|
||||
3. Build dotnet/runtime using our script that builds everything we need:
|
||||
|
|
|
@ -500,9 +500,7 @@ install-system:
|
|||
$(Q) cd $(HOME) && sudo dotnet workload remove $(DOTNET_PLATFORMS_LOWERCASE)
|
||||
$(Q) cd $(HOME) && sudo dotnet workload install --from-rollback-file $(abspath $(TOP)/../WorkloadRollback.json) --source $(abspath $(TOP)/_build/nupkgs) --source https://api.nuget.org/v3/index.json $(DOTNET_PLATFORMS_LOWERCASE) -v diag
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
all-local:: $(TARGETS)
|
||||
endif
|
||||
|
||||
clean-local::
|
||||
$(Q) rm -Rf $(DOTNET_NUPKG_DIR)
|
||||
|
|
72
mk/rules.mk
72
mk/rules.mk
|
@ -176,76 +176,6 @@ define NativeCompilationTemplate
|
|||
.libs/maccatalyst/%$(1).arm64.framework: | .libs/maccatalyst
|
||||
$$(call Q_2,LD, [maccatalyst]) $(XCODE_CC) $(MACCATALYST_ARM64_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_MACCATALYST_SDK)/Frameworks -fapplication-extension
|
||||
|
||||
## watch simulator
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.o: %.m $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,OBJC, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH_OBJC_CFLAGS) $$(EXTRA_DEFINES) $(SIMW_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.o: %.c $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,CC, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH_CFLAGS) $$(EXTRA_DEFINES) $(SIMW_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.o: %.s $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,ASM, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH_CFLAGS) $$(EXTRA_DEFINES) $(SIMW_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.dylib: %.swift | .libs/watchsimulator
|
||||
$$(call Q_2,SWIFT, [watchsimulator]) $(SWIFTC) $(WATCHOS_SIMULATOR_X86_SWIFTFLAGS) $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.dylib: | .libs/watchsimulator
|
||||
$$(call Q_2,LD, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -L$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/lib -fapplication-extension
|
||||
|
||||
.libs/watchsimulator/%$(1).x86.framework: | .libs/watchsimulator
|
||||
$$(call Q_2,LD, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks -fapplication-extension
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.o: %.m $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,OBJC, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH64_OBJC_CFLAGS) $$(EXTRA_DEFINES) $(SIMW64_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.o: %.c $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,CC, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH64_CFLAGS) $$(EXTRA_DEFINES) $(SIMW64_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.o: %.s $(EXTRA_DEPENDENCIES) | .libs/watchsimulator
|
||||
$$(call Q_2,ASM, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH64_CFLAGS) $$(EXTRA_DEFINES) $(SIMW64_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.dylib: %.swift | .libs/watchsimulator
|
||||
$$(call Q_2,SWIFT, [watchsimulator]) $(SWIFTC) $(WATCHOS_SIMULATOR_X64_SWIFTFLAGS) $$< -o $$@
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.dylib: | .libs/watchsimulator
|
||||
$$(call Q_2,LD, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH64_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -L$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/lib -fapplication-extension
|
||||
|
||||
.libs/watchsimulator/%$(1).x86_64.framework: | .libs/watchsimulator
|
||||
$$(call Q_2,LD, [watchsimulator]) $(SIMULATOR_CC) $(SIMULATORWATCH64_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHSIMULATOR_SDK)/Frameworks -fapplication-extension
|
||||
|
||||
## watch device
|
||||
|
||||
.libs/watchos/%$(1).armv7k.o: %.m $(EXTRA_DEPENDENCIES) | .libs/watchos
|
||||
$$(call Q_2,OBJC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH_OBJC_CFLAGS) $$(EXTRA_DEFINES) $(DEVW_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).armv7k.o: %.c $(EXTRA_DEPENDENCIES) | .libs/watchos
|
||||
$$(call Q_2,CC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH_CFLAGS) $$(EXTRA_DEFINES) $(DEVW_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).armv7k.dylib: %.swift | .libs/watchsimulator
|
||||
$$(call Q_2,SWIFT, [watchos]) $(SWIFTC) $(WATCHOS_DEVICE_ARMV7K_SWIFTFLAGS) $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).armv7k.dylib: | .libs/watchos
|
||||
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -L$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/lib -fapplication-extension
|
||||
|
||||
.libs/watchos/%$(1).armv7k.framework: | .libs/watchos
|
||||
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks -fapplication-extension
|
||||
|
||||
.libs/watchos/%$(1).arm64_32.o: %.m $(EXTRA_DEPENDENCIES) | .libs/watchos
|
||||
$$(call Q_2,OBJC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_OBJC_CFLAGS) $$(EXTRA_DEFINES) $(DEVW64_32_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).arm64_32.o: %.c $(EXTRA_DEPENDENCIES) | .libs/watchos
|
||||
$$(call Q_2,CC, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_DEFINES) $(DEVW64_32_I) -g $(2) -c $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).arm64_32.dylib: %.swift | .libs/watchsimulator
|
||||
$$(call Q_2,SWIFT, [watchos]) $(SWIFTC) $(WATCHOS_DEVICE_ARM64_32_SWIFTFLAGS) $$< -o $$@
|
||||
|
||||
.libs/watchos/%$(1).arm64_32.dylib: | .libs/watchos
|
||||
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -L$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/lib -fapplication-extension
|
||||
|
||||
.libs/watchos/%$(1).arm64_32.framework: | .libs/watchos
|
||||
$$(call Q_2,LD, [watchos]) $(DEVICE_CC) $(DEVICEWATCH64_32_CFLAGS) $$(EXTRA_FLAGS) -dynamiclib -o $$@ $$^ -F$(IOS_DESTDIR)$(XAMARIN_WATCHOS_SDK)/Frameworks -fapplication-extension
|
||||
|
||||
## tv simulator
|
||||
|
||||
### X64
|
||||
|
@ -390,7 +320,7 @@ $(eval $(call NativeCompilationTemplate,-dotnet-coreclr-debug,$(DEBUG_FLAGS) -DC
|
|||
$(eval $(call NativeCompilationTemplate,-dotnet-nativeaot,$(RELEASE_FLAGS) -DCORECLR_RUNTIME -DDOTNET -DNATIVEAOT))
|
||||
$(eval $(call NativeCompilationTemplate,-dotnet-nativeaot-debug,$(DEBUG_FLAGS) -DCORECLR_RUNTIME -DDOTNET -DNATIVEAOT))
|
||||
|
||||
.libs/iphoneos .libs/iphonesimulator .libs/watchos .libs/watchsimulator .libs/tvos .libs/tvsimulator .libs/maccatalyst .libs/mac:
|
||||
.libs/iphoneos .libs/iphonesimulator .libs/tvos .libs/tvsimulator .libs/maccatalyst .libs/mac:
|
||||
$(Q) mkdir -p $@
|
||||
|
||||
%.csproj.inc: %.csproj $(TOP)/Make.config $(TOP)/mk/mono.mk $(TOP)/tools/common/create-makefile-fragment.sh
|
||||
|
|
|
@ -417,7 +417,6 @@ $(DOTNET_DESTDIR)/$(MACCATALYST_NUGET_SDK_NAME)/tools/msbuild/MacCatalyst/%: $(I
|
|||
|
||||
MSBUILD_DIRECTORIES += $(DOTNET_DIRECTORIES)
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
MSBUILD_PRODUCTS += $(DOTNET_TARGETS)
|
||||
|
||||
DOTNET_IOS_WINDOWS_OUTPUT_FILES = \
|
||||
|
@ -444,7 +443,6 @@ DOTNET_IOS_WINDOWS_MOBILEDEVICE_TOOLS_X64 = $(foreach file,$(IOS_WINDOWS_MOBILED
|
|||
|
||||
all-local:: .dotnet-windows
|
||||
dotnet:: .dotnet-windows
|
||||
endif
|
||||
|
||||
##
|
||||
## Common targets ##
|
||||
|
|
476
runtime/Makefile
476
runtime/Makefile
|
@ -23,19 +23,14 @@ SHIPPED_HEADERS += \
|
|||
xamarin/coreclr-bridge.h \
|
||||
|
||||
SHARED_SOURCES += mono-runtime.m bindings.m bindings-generated.m shared.m runtime.m trampolines.m trampolines-invoke.m xamarin-support.m nsstring-localization.m trampolines-varargs.m monovm-bridge.m coreclr-bridge.m nativeaot-bridge.m swift-functions.swift
|
||||
SHARED_I386_SOURCES += trampolines-i386.m trampolines-i386-asm.s trampolines-i386-objc_msgSend.s trampolines-i386-objc_msgSendSuper.s trampolines-i386-objc_msgSend_stret.s trampolines-i386-objc_msgSendSuper_stret.s
|
||||
SHARED_X86_64_SOURCES += trampolines-x86_64.m trampolines-x86_64-asm.s trampolines-x86_64-objc_msgSend.s trampolines-x86_64-objc_msgSendSuper.s trampolines-x86_64-objc_msgSend_stret.s trampolines-x86_64-objc_msgSendSuper_stret.s
|
||||
SHARED_ARM64_SOURCES += trampolines-arm64.m trampolines-arm64-asm.s trampolines-arm64-objc_msgSend.s trampolines-arm64-objc_msgSendSuper.s
|
||||
SHARED_HEADERS += shared.h product.h delegates.h runtime-internal.h $(SHARED_INC) $(SHIPPED_HEADERS) trampolines-internal.h slinked-list.h
|
||||
|
||||
SHARED_FILES = $(SHARED_SOURCES) $(SHARED_HEADERS) $(SHARED_I386_SOURCES) $(SHARED_X86_64_SOURCES) $(SHARED_ARM64_SOURCES)
|
||||
SHARED_FILES = $(SHARED_SOURCES) $(SHARED_HEADERS) $(SHARED_X86_64_SOURCES) $(SHARED_ARM64_SOURCES)
|
||||
|
||||
EXTRA_DEPENDENCIES = $(SHARED_HEADERS) $(TOP)/Make.config $(TOP)/mk/mono.mk
|
||||
|
||||
ifdef IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
IOS_SIMULATOR_ARCHITECTURES=x86
|
||||
IOS_DEVICE_ARCHITECTURES=armv7 armv7s
|
||||
endif
|
||||
IOS_SIMULATOR_ARCHITECTURES+=x86_64
|
||||
IOS_DEVICE_ARCHITECTURES+=arm64
|
||||
|
||||
|
@ -86,477 +81,10 @@ MONOTOUCH_SOURCES = \
|
|||
MONOTOUCH_HEADERS = \
|
||||
monotouch-debug.h \
|
||||
|
||||
MONOTOUCH_LIBS = \
|
||||
libextension.a \
|
||||
libtvextension.a \
|
||||
libapp.a \
|
||||
libxamarin.a \
|
||||
libxamarin-debug.a \
|
||||
libxamarin.dylib \
|
||||
libxamarin-debug.dylib \
|
||||
|
||||
MONOTOUCH_FRAMEWORKS = \
|
||||
Xamarin \
|
||||
Xamarin-debug \
|
||||
|
||||
MONOTOUCH_SOURCE_STEMS = $(patsubst %.swift,%,$(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_SOURCES) $(MONOTOUCH_SOURCES))))
|
||||
MONOTOUCH_I386_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_I386_SOURCES)))
|
||||
MONOTOUCH_X86_64_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_X86_64_SOURCES)))
|
||||
MONOTOUCH_ARM64_SOURCE_STEMS = $(patsubst %.s,%,$(patsubst %.m,%,$(SHARED_ARM64_SOURCES)))
|
||||
|
||||
MONOTOUCH_X86_SOURCE_STEMS = $(MONOTOUCH_I386_SOURCE_STEMS)
|
||||
|
||||
#
|
||||
# FrameworkTemplate contains the install targets and sets up some variables for frameworks
|
||||
#
|
||||
|
||||
define FrameworkTemplate
|
||||
|
||||
$(2)_ARCHITECTURES = $(3)
|
||||
$(2)_FRAMEWORKS = $(MONOTOUCH_FRAMEWORKS)
|
||||
|
||||
RUNTIME_$(2)_TARGETS_DIRS += \
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework \
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework \
|
||||
|
||||
RUNTIME_$(2)_TARGETS += \
|
||||
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework/$$(file)) \
|
||||
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework/Info.plist) \
|
||||
$$(foreach file,$$($(2)_FRAMEWORKS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/$$(file).framework.dSYM/Contents/Info.plist) \
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Xamarin: .libs/$(1)/Xamarin.framework | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework
|
||||
$(Q) $(CP) $$< $$@
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Xamarin-debug: .libs/$(1)/Xamarin-debug.framework | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework
|
||||
$(Q) $(CP) $$< $$@
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/%.framework/Info.plist: Xamarin.framework-$(1).Info.plist | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/%.framework
|
||||
$(Q) sed 's/@BUNDLE_EXECUTABLE@/$$*/' $$< > $$@
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework.dSYM/Contents/Info.plist: $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Xamarin $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin.framework/Info.plist
|
||||
$$(Q_GEN) dsymutil -j 4 $$< -o $$(abspath $$(dir $$<)/..)/Xamarin.framework.dSYM
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework.dSYM/Contents/Info.plist: $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Xamarin-debug $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/Frameworks/Xamarin-debug.framework/Info.plist
|
||||
$$(Q_GEN) dsymutil -j 4 $$< -o $$(abspath $$(dir $$<)/..)/Xamarin-debug.framework.dSYM
|
||||
|
||||
.libs/$(1)/Xamarin.framework: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/Xamarin.$$(arch).framework)
|
||||
$(Q) rm -f $$@
|
||||
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
|
||||
$(Q) $(CP) $$^ $$@
|
||||
else
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
endif
|
||||
|
||||
.libs/$(1)/Xamarin-debug.framework: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/Xamarin-debug.$$(arch).framework)
|
||||
$(Q) rm -f $$@
|
||||
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
|
||||
$(Q) $(CP) $$^ $$@
|
||||
else
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
endif
|
||||
endef
|
||||
|
||||
# 1: platform
|
||||
# 2: variable prefix
|
||||
# 3: architectures
|
||||
ifdef INCLUDE_IOS
|
||||
ifdef INCLUDE_DEVICE
|
||||
$(eval $(call FrameworkTemplate,iphoneos,IPHONEOS,$(IOS_DEVICE_ARCHITECTURES)))
|
||||
endif
|
||||
$(eval $(call FrameworkTemplate,iphonesimulator,IOSSIMULATOR,$(IOS_SIMULATOR_ARCHITECTURES)))
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_TVOS
|
||||
ifdef INCLUDE_DEVICE
|
||||
$(eval $(call FrameworkTemplate,tvos,TVOS,arm64))
|
||||
endif
|
||||
$(eval $(call FrameworkTemplate,tvsimulator,TVSIMULATOR,x86_64))
|
||||
endif
|
||||
|
||||
#
|
||||
# PlatformTemplate contains the install targets and sets up some variables
|
||||
#
|
||||
|
||||
define PlatformTemplate
|
||||
|
||||
$(2)_SOURCES = $(MONOTOUCH_SOURCES)
|
||||
$(2)_HEADERS = $(MONOTOUCH_HEADERS)
|
||||
$(2)_SOURCE_STEMS = $(MONOTOUCH_SOURCE_STEMS)
|
||||
$(2)_X86_64_SOURCE_STEMS = $(MONOTOUCH_X86_64_SOURCE_STEMS)
|
||||
$(2)_I386_SOURCE_STEMS = $(MONOTOUCH_I386_SOURCE_STEMS)
|
||||
$(2)_ARM64_SOURCE_STEMS = $(MONOTOUCH_ARM64_SOURCE_STEMS)
|
||||
$(2)_LIBRARIES = $(MONOTOUCH_LIBS)
|
||||
$(2)_ARCHITECTURES = $(3)
|
||||
|
||||
RUNTIME_$(2)_TARGETS_DIRS += \
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib \
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/xamarin \
|
||||
|
||||
RUNTIME_$(2)_TARGETS += \
|
||||
$$(foreach file,$$($(2)_LIBRARIES),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/$$(file)) \
|
||||
$(foreach file,$(SHIPPED_HEADERS),$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/$(file)) \
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/%.a: .libs/$(1)/%.a | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib
|
||||
$(Q) install -m 0644 $$< $$@
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib/%.dylib: .libs/$(1)/%.dylib | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/lib
|
||||
$$(Q_STRIP) $(DEVICE_BIN_PATH)/bitcode_strip $$< -m -o $$@
|
||||
|
||||
$(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/%.h: %.h | $(IOS_DESTDIR)$$(XAMARIN_$(2)_SDK)/include/xamarin
|
||||
$(Q) install -m 0644 $$< $$@
|
||||
|
||||
$$(RUNTIME_$(2)_TARGETS_DIRS):
|
||||
$(Q) mkdir -p $$@
|
||||
|
||||
all-$(2):: $$(RUNTIME_$(2)_TARGETS)
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
all-local:: $$(RUNTIME_$(2)_TARGETS)
|
||||
install-local:: $$(RUNTIME_$(2)_TARGETS)
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
# 1: platform
|
||||
# 2: variable prefix
|
||||
# 3: architectures
|
||||
ifdef INCLUDE_IOS
|
||||
ifdef INCLUDE_DEVICE
|
||||
$(eval $(call PlatformTemplate,iphoneos,IPHONEOS,$(IOS_DEVICE_ARCHITECTURES)))
|
||||
endif
|
||||
$(eval $(call PlatformTemplate,iphonesimulator,IOSSIMULATOR,$(IOS_SIMULATOR_ARCHITECTURES)))
|
||||
endif
|
||||
ifdef INCLUDE_MACCATALYST
|
||||
$(eval $(call PlatformTemplate,maccatalyst,MACCATALYST,x86_64))
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_TVOS
|
||||
ifdef INCLUDE_DEVICE
|
||||
$(eval $(call PlatformTemplate,tvos,TVOS,arm64))
|
||||
endif
|
||||
$(eval $(call PlatformTemplate,tvsimulator,TVSIMULATOR,x86_64))
|
||||
endif
|
||||
|
||||
#
|
||||
# LibTemplate we build two different libraries from the same source code,
|
||||
# libapp.a and libextension.a
|
||||
#
|
||||
# They're all built from the same soure file (extension-main.m), but with different defines:
|
||||
# libextension.a has EXTENSION defined.
|
||||
#
|
||||
|
||||
define LibTemplate
|
||||
$$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/extension-main.$$(arch).o): EXTRA_DEFINES=-DEXTENSION
|
||||
$$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/tvextension-main.$$(arch).o): EXTRA_DEFINES=-DTV_EXTENSION
|
||||
|
||||
.libs/$(1)/libextension.%.a: .libs/$(1)/extension-main.%.o
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
|
||||
|
||||
.libs/$(1)/libapp.%.a: .libs/$(1)/app-main.%.o
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
|
||||
|
||||
.libs/$(1)/libextension.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libextension.$$(arch).a)
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
|
||||
.libs/$(1)/libapp.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libapp.$$(arch).a)
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
|
||||
.libs/$(1)/libtvextension.%.a: .libs/$(1)/tvextension-main.%.o
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar cru $$@ $$^
|
||||
|
||||
.libs/$(1)/libtvextension.a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libtvextension.$$(arch).a)
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
|
||||
.libs/$(1)/libxamarin.dylib: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin.$$(arch).dylib)
|
||||
$(Q) rm -f $$@
|
||||
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
|
||||
$(Q) $(CP) $$^ $$@
|
||||
else
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
endif
|
||||
$(Q) install_name_tool -id @rpath/libxamarin.dylib $$@
|
||||
$(Q) install_name_tool -change @rpath/ @rpath/libmonosgen-2.0.dylib $$@
|
||||
|
||||
.libs/$(1)/libxamarin-debug.dylib: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin-debug.$$(arch).dylib)
|
||||
$(Q) rm -f $$@
|
||||
ifeq (1,$$(words $$($(2)_ARCHITECTURES)))
|
||||
$(Q) $(CP) $$^ $$@
|
||||
else
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
endif
|
||||
$(Q) install_name_tool -id @rpath/libxamarin-debug.dylib $$@
|
||||
$(Q) install_name_tool -change @rpath/ @rpath/libmonosgen-2.0.dylib $$@
|
||||
|
||||
.SECONDARY: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/app-main.$$(arch).o)
|
||||
endef
|
||||
|
||||
$(eval $(call LibTemplate,iphoneos,IPHONEOS))
|
||||
$(eval $(call LibTemplate,iphonesimulator,IOSSIMULATOR))
|
||||
$(eval $(call LibTemplate,maccatalyst,MACCATALYST))
|
||||
$(eval $(call LibTemplate,tvos,TVOS))
|
||||
$(eval $(call LibTemplate,tvsimulator,TVSIMULATOR))
|
||||
|
||||
#
|
||||
# LibXamarinTemplate (and LibXamarinArchTemplate) builds libxamarin.a
|
||||
#
|
||||
|
||||
define LibXamarinArchTemplate
|
||||
.libs/$(1)/libxamarin$(4).$(5).a: $$($(5)_$(1)$(3)_OBJECTS)
|
||||
$$(Q) rm -f $$@
|
||||
$$(call Q_2,AR, [$1]) $(DEVICE_BIN_PATH)/ar Scru $$@ $$^
|
||||
$$(call Q_2,RANLIB,[$1]) $(DEVICE_BIN_PATH)/ranlib -no_warning_for_no_symbols -q $$@
|
||||
endef
|
||||
|
||||
define LibXamarinTemplate
|
||||
|
||||
$(1)$(3)_COMMON_DYLIB_FLAGS = -lmonosgen-2.0 -Wl,-install_name,libxamarin$(4).dylib -framework Foundation -framework CFNetwork -framework UIKit -lz
|
||||
$(1)$(3)_COMMON_FRAMEWORK_FLAGS = -framework Mono -Wl,-install_name,@rpath/Xamarin$(4).framework/Xamarin$(4) -framework Foundation -framework CFNetwork -framework UIKit -lz
|
||||
|
||||
x86_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).x86.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).x86.o,$$($(2)_I386_SOURCE_STEMS))
|
||||
x86_64_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).x86_64.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).x86_64.o,$$($(2)_X86_64_SOURCE_STEMS))
|
||||
armv7_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7.o,$$($(2)_SOURCE_STEMS))
|
||||
armv7s_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7s.o,$$($(2)_SOURCE_STEMS))
|
||||
armv7k_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).armv7k.o,$$($(2)_SOURCE_STEMS))
|
||||
arm64_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64.o,$$($(2)_SOURCE_STEMS)) $$(patsubst %,.libs/$(1)/%$(4).arm64.o,$$($(2)_ARM64_SOURCE_STEMS))
|
||||
arm64_32_$(1)$(3)_OBJECTS = $$(patsubst %,.libs/$(1)/%$(4).arm64_32.o,$$($(2)_SOURCE_STEMS))
|
||||
|
||||
$$(foreach arch,$$($(2)_ARCHITECTURES),$$(eval $$(call LibXamarinArchTemplate,$(1),$(2),$(3),$(4),$$(arch))))
|
||||
|
||||
.libs/$(1)/libxamarin$(4).a: $$(foreach arch,$$($(2)_ARCHITECTURES),.libs/$(1)/libxamarin$(4).$$(arch).a)
|
||||
$(Q) rm -f $$@
|
||||
$$(call Q_2,LIPO, [$1]) $(DEVICE_BIN_PATH)/lipo $$^ -create -output $$@
|
||||
|
||||
.libs/$(1)/libxamarin$(4).x86.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
|
||||
.libs/$(1)/libxamarin$(4).x86.dylib: $$(x86_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).x86_64.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
|
||||
.libs/$(1)/libxamarin$(4).x86_64.dylib: $$(x86_64_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).armv7.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
|
||||
.libs/$(1)/libxamarin$(4).armv7.dylib: $$(armv7_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).armv7s.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
|
||||
.libs/$(1)/libxamarin$(4).armv7s.dylib: $$(armv7s_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).arm64.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
|
||||
.libs/$(1)/libxamarin$(4).arm64.dylib: $$(arm64_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).armv7k.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
|
||||
.libs/$(1)/libxamarin$(4).armv7k.dylib: $$(armv7k_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/libxamarin$(4).arm64_32.dylib: EXTRA_FLAGS=$$($(1)$(3)_COMMON_DYLIB_FLAGS)
|
||||
.libs/$(1)/libxamarin$(4).arm64_32.dylib: $$(arm64_32_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).x86.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
|
||||
.libs/$(1)/Xamarin$(4).x86.framework: $$(x86_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).x86_64.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
|
||||
.libs/$(1)/Xamarin$(4).x86_64.framework: $$(x86_64_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).armv7.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
|
||||
.libs/$(1)/Xamarin$(4).armv7.framework: $$(armv7_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).armv7s.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS) -miphoneos-version-min=$(MIN_IOS_SDK_VERSION)
|
||||
.libs/$(1)/Xamarin$(4).armv7s.framework: $$(armv7s_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).arm64.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
|
||||
.libs/$(1)/Xamarin$(4).arm64.framework: $$(arm64_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).armv7k.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
|
||||
.libs/$(1)/Xamarin$(4).armv7k.framework: $$(armv7k_$(1)$(3)_OBJECTS)
|
||||
|
||||
.libs/$(1)/Xamarin$(4).arm64_32.framework: EXTRA_FLAGS=$$($(1)$(3)_COMMON_FRAMEWORK_FLAGS)
|
||||
.libs/$(1)/Xamarin$(4).arm64_32.framework: $$(arm64_32_$(1)$(3)_OBJECTS)
|
||||
endef
|
||||
|
||||
$(eval $(call LibXamarinTemplate,iphoneos,IPHONEOS))
|
||||
$(eval $(call LibXamarinTemplate,iphoneos,IPHONEOS,_DEBUG,-debug))
|
||||
$(eval $(call LibXamarinTemplate,iphonesimulator,IOSSIMULATOR))
|
||||
$(eval $(call LibXamarinTemplate,iphonesimulator,IOSSIMULATOR,_DEBUG,-debug))
|
||||
$(eval $(call LibXamarinTemplate,maccatalyst,MACCATALYST))
|
||||
$(eval $(call LibXamarinTemplate,maccatalyst,MACCATALYST,_DEBUG,-debug))
|
||||
$(eval $(call LibXamarinTemplate,tvos,TVOS))
|
||||
$(eval $(call LibXamarinTemplate,tvos,TVOS,_DEBUG,-debug))
|
||||
$(eval $(call LibXamarinTemplate,tvsimulator,TVSIMULATOR))
|
||||
$(eval $(call LibXamarinTemplate,tvsimulator,TVSIMULATOR,_DEBUG,-debug))
|
||||
|
||||
#
|
||||
# Xamarin.Mac
|
||||
#
|
||||
|
||||
MAC_ARCHITECTURES = x86_64 arm64
|
||||
|
||||
CLANG_ARCH = $(addprefix -arch ,$(MAC_ARCHITECTURES))
|
||||
MAC_CLANG = DEVELOPER_DIR=$(XCODE_DEVELOPER_ROOT) $(MAC_CC) -mmacosx-version-min=$(MIN_MACOS_SDK_VERSION)
|
||||
|
||||
MAC_SHIPPED_HEADERS = xamarin/launch.h
|
||||
|
||||
MAC_STATIC_CFLAGS = $(MAC_CFLAGS)
|
||||
|
||||
MAC_SOURCES = $(SHARED_SOURCES) $(SHARED_X86_64_SOURCES) $(SHARED_ARM64_SOURCES) launcher.m
|
||||
|
||||
ALLOWED_UNDEFINED_SYMBOLS = _xamarin_enable_debug _xammac_setup
|
||||
|
||||
MAC_LIBS = \
|
||||
libextension.a \
|
||||
libxammac.a \
|
||||
libxammac-debug.a \
|
||||
libxammac-classic.a \
|
||||
libxammac-classic-debug.a\
|
||||
libxammac.dylib \
|
||||
libxammac-debug.dylib \
|
||||
libxammac-system.a \
|
||||
libxammac-system-debug.a \
|
||||
libxammac-system-classic.a \
|
||||
libxammac-system-classic-debug.a \
|
||||
|
||||
#
|
||||
# libxammac[-debug].a: (no defines)
|
||||
# This is linked into the native executable when embedding the Mono runtime.
|
||||
#
|
||||
# libxammac[-debug].dylib: -DDYNAMIC_MONO_RUNTIME -DDYLIB
|
||||
# This is not officially supported. It's used when not wanting to use mmp for
|
||||
# whatever reason (usually to make build processes easier). There is no good
|
||||
# reason to keep using it, since mmp now supports creating empty 'shell' apps
|
||||
# with no assemblies, which the user can fill in as they want.
|
||||
#
|
||||
# libxammac-system[-debug].a: -DDYNAMIC_MONO_RUNTIME
|
||||
# This is used linked into the native executable when using the system Mono (i.e. not)
|
||||
# embedding the Mono runtime).
|
||||
#
|
||||
# libxamarin-coreclr.a:
|
||||
# This is used when using the CoreCLR runtime instead of Mono.
|
||||
# CORECLR_RUNTIME is defined for these versions of libxamarin.
|
||||
#
|
||||
# libxamarin-nativeaot.a:
|
||||
# This is used when using NativeAOT.
|
||||
# CORECLR_RUNTIME is defined for these versions of libxamarin (because the nativeaot bridge shares *a lot* of code with the coreclr bridge)
|
||||
# NATIVEAOT is defined for these versions of libxamarin
|
||||
#
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
all-local:: $(TARGETS)
|
||||
endif
|
||||
|
||||
define ObjTemplate
|
||||
DYNAMIC_DYLIB$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).dylib.$(1).o)
|
||||
STATIC_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).static.$(1).o)
|
||||
SYSTEM_LAUNCHER$(2)_OBJECTS = $$(foreach src,$$(MAC_SOURCES),.libs/mac/$$(basename $$(src))$(3).system.$(1).o)
|
||||
|
||||
.libs/mac/%$(3).dylib.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_OBJC_CFLAGS) $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
|
||||
|
||||
.libs/mac/%$(3).dylib.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -DDYLIB -o $$@ $$<
|
||||
|
||||
.libs/mac/%$(3).static.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
|
||||
|
||||
.libs/mac/%$(3).static.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_STATIC_CFLAGS) -o $$@ $$<
|
||||
|
||||
.libs/mac/%$(3).system.$(1).o: %.m $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,OBJC, [mac]) $(MAC_CLANG) -arch $(1) $(4) $$(MAC_OBJC_CFLAGS) -c $$(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
|
||||
|
||||
.libs/mac/%$(3).system.$(1).o: %.s $$(SHARED_HEADERS) | .libs/mac
|
||||
$$(call Q_2,ASM, [mac]) $(MAC_CLANG) -arch $(1) $(4) -c $(MAC_CFLAGS) -DDYNAMIC_MONO_RUNTIME -o $$@ $$<
|
||||
|
||||
.libs/mac/libxammac$(3).$(1).dylib: $$(DYNAMIC_DYLIB$(2)_OBJECTS)
|
||||
$$(call Q_2,LD, [mac]) $(MAC_CLANG) -arch $(1) -dynamiclib $$(MAC_LDFLAGS) -Wl,-install_name,libxammac$(3).dylib -o $$@ $$^ $$(addprefix -Xlinker -U -Xlinker ,$$(ALLOWED_UNDEFINED_SYMBOLS))
|
||||
|
||||
.libs/mac/libxammac$(3).$(1).a: $$(STATIC_LAUNCHER$(2)_OBJECTS)
|
||||
$$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^
|
||||
|
||||
.libs/mac/libxammac-system$(3).$(1).a: $$(SYSTEM_LAUNCHER$(2)_OBJECTS)
|
||||
$$(call Q_2,LIB, [mac]) xcrun libtool -no_warning_for_no_symbols -static -o $$@ $$^
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call ObjTemplate,x86_64,64,,,64))
|
||||
$(eval $(call ObjTemplate,x86_64,DEBUG64,-debug,-DDEBUG,64))
|
||||
$(eval $(call ObjTemplate,arm64,64,,,64))
|
||||
$(eval $(call ObjTemplate,arm64,DEBUG64,-debug,-DDEBUG,64))
|
||||
|
||||
$(foreach arch,$(MAC_ARCHITECTURES),.libs/mac/extension-main.$(arch).o): EXTRA_DEFINES=-DEXTENSION
|
||||
|
||||
.libs/mac/extension-main.%.o: | .libs/mac
|
||||
$(Q) rm -f $@
|
||||
$(call Q_2,CC, [mac]) $(MAC_CLANG) -c -DEXTENSION extension-main.m -arch $* -o $@
|
||||
|
||||
.libs/mac/libextension.%.a: .libs/mac/extension-main.%.o
|
||||
$(Q) rm -f $@
|
||||
$(call Q_2,AR, [mac]) $(DEVICE_BIN_PATH)/ar cru $@ $^
|
||||
|
||||
.libs/mac/libextension.a: $(foreach arch,$(MAC_ARCHITECTURES),.libs/mac/libextension.$(arch).a)
|
||||
$(Q) rm -f $@
|
||||
$(call Q_2,LIPO, [mac]) $(DEVICE_BIN_PATH)/lipo $^ -create -output $@
|
||||
|
||||
.libs/mac/libxammac-debug.dylib: .libs/mac/libxammac-debug.x86_64.dylib .libs/mac/libxammac-debug.arm64.dylib
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxammac.dylib: .libs/mac/libxammac.x86_64.dylib .libs/mac/libxammac.arm64.dylib
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxammac-debug.a: .libs/mac/libxammac-debug.x86_64.a .libs/mac/libxammac-debug.arm64.a
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxammac.a: .libs/mac/libxammac.x86_64.a .libs/mac/libxammac.arm64.a
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxammac-system-debug.a: .libs/mac/libxammac-system-debug.x86_64.a .libs/mac/libxammac-system-debug.arm64.a
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxammac-system.a: .libs/mac/libxammac-system.x86_64.a .libs/mac/libxammac-system.arm64.a
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxamarin%.a: .libs/mac/libxamarin%.x86_64.a
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
.libs/mac/libxamarin%.dylib: .libs/mac/libxamarin%.x86_64.dylib
|
||||
$(call Q_2,LIPO, [mac]) xcrun lipo -create $^ -o $@
|
||||
|
||||
RUNTIME_MAC_TARGETS_DIRS += \
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib \
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono \
|
||||
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib \
|
||||
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/xamarin \
|
||||
|
||||
RUNTIME_MAC_TARGETS += \
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/XamMacLauncher \
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/XamMacLauncher \
|
||||
$(foreach file,$(SHIPPED_HEADERS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/$(file)) \
|
||||
$(foreach file,$(MAC_SHIPPED_HEADERS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/$(file)) \
|
||||
$(foreach file,$(MAC_LIBS),$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib/$(file)) \
|
||||
|
||||
# The XamMacLauncher file must exist for VSfM to be able to open XM/Classic projects (so that people can use the migration wizard)
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/XamMacLauncher: | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib
|
||||
$(Q) touch $@
|
||||
|
||||
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib/%: .libs/mac/% | $(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/lib
|
||||
$(Q) $(CP) $< $@
|
||||
|
||||
$(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono/XamMacLauncher: | $(MAC_DESTDIR)$(MAC_FRAMEWORK_CURRENT_DIR)/lib/mono
|
||||
$(Q) ln -sF ../XamMacLauncher $@
|
||||
|
||||
$(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/%.h: %.h | $(MAC_DESTDIR)$(XAMARIN_MACOS_SDK)/include/xamarin
|
||||
$(Q) install -m 0644 $< $@
|
||||
|
||||
$(RUNTIME_MAC_TARGETS_DIRS):
|
||||
$(Q) mkdir -p $@
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_MAC
|
||||
all-local:: $(RUNTIME_MAC_TARGETS)
|
||||
install-local:: $(RUNTIME_MAC_TARGETS)
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# .NET
|
||||
#
|
||||
|
@ -738,10 +266,8 @@ dotnet: $(DOTNET_TARGETS)
|
|||
$(DOTNET_TARGET_DIRS):
|
||||
$(Q) mkdir -p $@
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
all-local:: $(DOTNET_TARGETS)
|
||||
install-local:: $(DOTNET_TARGETS)
|
||||
endif
|
||||
|
||||
#
|
||||
# Common
|
||||
|
|
|
@ -1,28 +1,27 @@
|
|||
// this script is to make sure our versions.plist files are not out of date with our min/max supported OS versions.
|
||||
|
||||
// arguments are: plistPath iOSMinVersion iOSMaxVersion tvOSMinVersion tvOSMaxVersion watchOSMinVersion watchOSMaxVersion macOSMinVersion macOSMaxVersion MacCatalystOSMinVersion MacCatalystOSMaxVersion
|
||||
// arguments are: plistPath iOSMinVersion iOSMaxVersion tvOSMinVersion tvOSMaxVersion macOSMinVersion macOSMaxVersion MacCatalystOSMinVersion MacCatalystOSMaxVersion
|
||||
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
try {
|
||||
var expectedArgumentCount = 11;
|
||||
var expectedArgumentCount = 9;
|
||||
if (args.Length != expectedArgumentCount) {
|
||||
Console.WriteLine ("Need 11 arguments, got {0}", args.Length);
|
||||
Console.WriteLine ($"Need {expectedArgumentCount} arguments, got {0}", args.Length);
|
||||
return 1;
|
||||
}
|
||||
|
||||
var plistPath = args [0];
|
||||
var iOSMin = args [1];
|
||||
var iOSMax = args [2];
|
||||
var tvOSMin = args [3];
|
||||
var tvOSMax = args [4];
|
||||
var watchOSMin = args [5];
|
||||
var watchOSMax = args [6];
|
||||
var macOSMin = args [7];
|
||||
var macOSMax = args [8];
|
||||
var MacCatalystMin = args [9];
|
||||
var MacCatalystMax = args [10];
|
||||
var idx = 0;
|
||||
var plistPath = args [idx++];
|
||||
var iOSMin = args [idx++];
|
||||
var iOSMax = args [idx++];
|
||||
var tvOSMin = args [idx++];
|
||||
var tvOSMax = args [idx++];
|
||||
var macOSMin = args [idx++];
|
||||
var macOSMax = args [idx++];
|
||||
var MacCatalystMin = args [idx++];
|
||||
var MacCatalystMax = args [idx++];
|
||||
|
||||
var doc = new System.Xml.XmlDocument ();
|
||||
doc.Load (plistPath);
|
||||
|
@ -36,7 +35,7 @@ try {
|
|||
var foundMin = false;
|
||||
var versions = doc.SelectNodes ($"/plist/dict/key[text()='KnownVersions']/following-sibling::dict[1]/key[text()='{product}']/following-sibling::array[1]/string")!;
|
||||
if (versions.Count == 0) {
|
||||
// Skip this (iOS/tvOS/watchOS versions for macOS, or vice versa)
|
||||
// Skip this (iOS/tvOS versions for macOS, or vice versa)
|
||||
return;
|
||||
}
|
||||
var versionsHashSet = new HashSet<string> (versions.Cast<XmlNode> ().Select (v => v.InnerText));
|
||||
|
@ -82,7 +81,6 @@ try {
|
|||
|
||||
check ("iOS", iOSMin, iOSMax);
|
||||
check ("tvOS", tvOSMin, tvOSMax);
|
||||
check ("watchOS", watchOSMin, watchOSMax);
|
||||
check ("macOS", macOSMin, macOSMax);
|
||||
check ("MacCatalyst", MacCatalystMin, MacCatalystMax);
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@ DOTNET_BINDING_ATTRIBUTES=$(DOTNET_BUILD_DIR)/Xamarin.Apple.BindingAttributes.dl
|
|||
NULLABILITY_WARNINGS=nullable
|
||||
GENERATOR_WARNASERROR=-warnaserror:
|
||||
IOS_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
WATCH_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
TVOS_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
MACOS_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
MACCATALYST_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
|
@ -580,7 +579,6 @@ MinimumVersions.cs: MinimumVersions.cs.in Makefile $(TOP)/Make.config
|
|||
\
|
||||
-e 's/@MIN_IOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_IOS_SDK_VERSION))/g' \
|
||||
-e 's/@MIN_MACOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACOS_SDK_VERSION))/g' \
|
||||
-e 's/@MIN_WATCHOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_WATCHOS_SDK_VERSION))/g' \
|
||||
-e 's/@MIN_TVOS_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_TVOS_SDK_VERSION))/g' \
|
||||
-e 's/@MIN_MACCATALYST_SDK_VERSION@/$(subst .,$(COMMA) ,$(MIN_MACCATALYST_SDK_VERSION))/g' \
|
||||
$< > $@
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.Runtime.Versioning;
|
||||
using ObjCRuntime;
|
||||
|
||||
#if NET
|
||||
#if __IOS__ && !__MACCATALYST__
|
||||
[assembly: TargetPlatform ("ios")]
|
||||
#elif __TVOS__
|
||||
|
@ -10,9 +9,6 @@ using ObjCRuntime;
|
|||
[assembly: TargetPlatform ("maccatalyst")]
|
||||
#elif MONOMAC
|
||||
[assembly: TargetPlatform ("macos")]
|
||||
#elif __WATCHOS__
|
||||
// unsupported on dotnet but we're still building it right now
|
||||
[assembly: TargetPlatform ("watchos")]
|
||||
#else
|
||||
#error Unsupported Platform
|
||||
#endif
|
||||
|
@ -22,14 +18,3 @@ using ObjCRuntime;
|
|||
[assembly: SupportedOSPlatform ("tvos@DOTNET_MIN_TVOS_SDK_VERSION@")]
|
||||
[assembly: SupportedOSPlatform ("macos@DOTNET_MIN_MACOS_SDK_VERSION@")]
|
||||
[assembly: SupportedOSPlatform ("maccatalyst@DOTNET_MIN_MACCATALYST_SDK_VERSION@")]
|
||||
[assembly: UnsupportedOSPlatform ("watchos")]
|
||||
|
||||
#else
|
||||
|
||||
[assembly: Introduced (PlatformName.iOS, @MIN_IOS_SDK_VERSION@)]
|
||||
[assembly: Introduced (PlatformName.TvOS, @MIN_TVOS_SDK_VERSION@)]
|
||||
[assembly: Introduced (PlatformName.WatchOS, @MIN_WATCHOS_SDK_VERSION@)]
|
||||
[assembly: Introduced (PlatformName.MacCatalyst, @MIN_MACCATALYST_SDK_VERSION@)]
|
||||
[assembly: Introduced (PlatformName.MacOSX, @MIN_MACOS_SDK_VERSION@)]
|
||||
|
||||
#endif // NET
|
||||
|
|
|
@ -586,10 +586,9 @@ function check_xcode () {
|
|||
local XCODE_DEVELOPER_ROOT=`grep ^XCODE_DEVELOPER_ROOT= Make.config | sed 's/.*=//'`
|
||||
IOS_SDK_VERSION=$(grep ^IOS_NUGET_OS_VERSION= Make.versions | sed -e 's/.*=//')
|
||||
MACOS_SDK_VERSION=$(grep ^MACOS_NUGET_OS_VERSION= Make.versions | sed -e 's/.*=//')
|
||||
WATCH_SDK_VERSION=$(grep ^WATCHOS_NUGET_OS_VERSION= Make.versions | sed -e 's/.*=//')
|
||||
TVOS_SDK_VERSION=$(grep ^TVOS_NUGET_OS_VERSION= Make.versions | sed -e 's/.*=//')
|
||||
|
||||
download_xcode_platforms "$XCODE_DEVELOPER_ROOT" "$TVOS_SDK_VERSION" "$WATCH_SDK_VERSION"
|
||||
download_xcode_platforms "$XCODE_DEVELOPER_ROOT" "$TVOS_SDK_VERSION"
|
||||
|
||||
local D=$XCODE_DEVELOPER_ROOT/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator${IOS_SDK_VERSION}.sdk
|
||||
if test ! -d $D -a -z "$FAIL"; then
|
||||
|
@ -605,11 +604,6 @@ function check_xcode () {
|
|||
if test ! -d $D -a -z "$FAIL"; then
|
||||
fail "The directory $D does not exist. If you've updated the Xcode location it means you also need to update TVOS_SDK_VERSION in Make.config."
|
||||
fi
|
||||
|
||||
local D=$XCODE_DEVELOPER_ROOT/Platforms/WatchOS.platform/Developer/SDKs/WatchOS${WATCH_SDK_VERSION}.sdk
|
||||
if test ! -d $D -a -z "$FAIL"; then
|
||||
fail "The directory $D does not exist. If you've updated the Xcode location it means you also need to update WATCH_SDK_VERSION in Make.config."
|
||||
fi
|
||||
}
|
||||
|
||||
function check_mono () {
|
||||
|
|
|
@ -1,26 +1,15 @@
|
|||
TOP = ..
|
||||
SUBDIRS=test-libraries
|
||||
SUBDIRS=test-libraries dotnet
|
||||
|
||||
# disabled for now: mac-test
|
||||
|
||||
include $(TOP)/Make.config
|
||||
include $(TOP)/mk/rules.mk
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
SUBDIRS += dotnet
|
||||
endif
|
||||
|
||||
MTOUCH=$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)/bin/mtouch
|
||||
|
||||
XHARNESS_EXECUTABLE=xharness/bin/Debug/xharness.dll
|
||||
|
||||
export MD_MTOUCH_SDK_ROOT=$(IOS_DESTDIR)/$(MONOTOUCH_PREFIX)
|
||||
export MSBUILD_EXE_PATH=$(MONO_PREFIX)/lib/mono/msbuild/15.0/bin/MSBuild.dll
|
||||
export TargetFrameworkFallbackSearchPaths=$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild-frameworks
|
||||
export MSBuildExtensionsPathFallbackPathsOverride=$(IOS_DESTDIR)/Library/Frameworks/Mono.framework/External/xbuild
|
||||
export XAMMAC_FRAMEWORK_PATH=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
|
||||
export XamarinMacFrameworkRoot=$(MAC_DESTDIR)/Library/Frameworks/Xamarin.Mac.framework/Versions/Current
|
||||
|
||||
ifneq ($(RELEASE),)
|
||||
CONFIG=Release
|
||||
else
|
||||
|
@ -68,8 +57,6 @@ test.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk $(TOP)/eng/Version.De
|
|||
@echo "WATCH_SDK_VERSION=$(WATCH_SDK_VERSION)" >> $@
|
||||
@echo "MACOS_SDK_VERSION=$(MACOS_SDK_VERSION)" >> $@
|
||||
@echo "DOTNET_BCL_DIR=$(DOTNET_BCL_DIR)" >> $@
|
||||
@echo "ENABLE_DOTNET=$(ENABLE_DOTNET)" >> $@
|
||||
@echo "INCLUDE_XAMARIN_LEGACY=$(INCLUDE_XAMARIN_LEGACY)" >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),DOTNET_$(platform)_RUNTIME_IDENTIFIERS='$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS)'\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),DOTNET_$(rid)_ARCHITECTURES='$(DOTNET_$(rid)_ARCHITECTURES)'\\n))" | sed 's/^ //' >> $@
|
||||
@echo "DOTNET_CSC_COMMAND='$(DOTNET_CSC)'" >> $@
|
||||
|
@ -79,7 +66,6 @@ test.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk $(TOP)/eng/Version.De
|
|||
@echo "DOTNET_DIR=$(DOTNET_DIR)" >> $@
|
||||
@echo "INCLUDE_MAC=$(INCLUDE_MAC)" >> $@
|
||||
@echo "INCLUDE_MACCATALYST=$(INCLUDE_MACCATALYST)" >> $@
|
||||
@echo "IOS_SUPPORTS_32BIT_ARCHITECTURES=$(IOS_SUPPORTS_32BIT_ARCHITECTURES)" >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_SDK_NAME=$($(platform)_NUGET_SDK_NAME)\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_REF_NAME=$($(platform)_NUGET_REF_NAME)\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(rid)_NUGET_RUNTIME_NAME=$($(rid)_NUGET_RUNTIME_NAME)\\n))" | sed 's/^ //' >> $@
|
||||
|
@ -103,8 +89,6 @@ test-system.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk $(TOP)/eng/Ver
|
|||
@echo "MACOS_SDK_VERSION=$(MACOS_SDK_VERSION)" >> $@
|
||||
@echo "DOTNET_TFM=$(DOTNET_TFM)" >> $@
|
||||
@echo "DOTNET_BCL_DIR=$(DOTNET_BCL_DIR)" >> $@
|
||||
@echo "ENABLE_DOTNET=$(ENABLE_DOTNET)" >> $@
|
||||
@echo "INCLUDE_XAMARIN_LEGACY=$(INCLUDE_XAMARIN_LEGACY)" >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),DOTNET_$(platform)_RUNTIME_IDENTIFIERS='$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS)'\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),DOTNET_$(rid)_ARCHITECTURES='$(DOTNET_$(rid)_ARCHITECTURES)'\\n))" | sed 's/^ //' >> $@
|
||||
@echo "DOTNET_CSC_COMMAND='$(DOTNET_CSC)'" >> $@
|
||||
|
@ -113,7 +97,6 @@ test-system.config: Makefile $(TOP)/Make.config $(TOP)/mk/mono.mk $(TOP)/eng/Ver
|
|||
@echo "DOTNET_DIR=$(DOTNET_DIR)" >> $@
|
||||
@echo "INCLUDE_MAC=$(INCLUDE_MAC)" >> $@
|
||||
@echo "INCLUDE_MACCATALYST=$(INCLUDE_MACCATALYST)" >> $@
|
||||
@echo "IOS_SUPPORTS_32BIT_ARCHITECTURES=$(IOS_SUPPORTS_32BIT_ARCHITECTURES)" >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_SDK_NAME=$($(platform)_NUGET_SDK_NAME)\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(platform)_NUGET_REF_NAME=$($(platform)_NUGET_REF_NAME)\\n)" | sed 's/^ //' >> $@
|
||||
@printf "$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(rid)_NUGET_RUNTIME_NAME=$($(rid)_NUGET_RUNTIME_NAME)\\n))" | sed 's/^ //' >> $@
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace Cecil.Tests {
|
|||
|
||||
[TestFixture]
|
||||
public partial class ApiTest {
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
public void ARConfiguration_GetSupportedVideoFormats (AssemblyInfo info)
|
||||
{
|
||||
|
|
|
@ -511,13 +511,13 @@ namespace Cecil.Tests {
|
|||
string AssemblyToAttributeName (AssemblyDefinition assembly)
|
||||
{
|
||||
var baseName = assembly.Name.Name + ".dll";
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_iOS.Platform, true) == baseName)
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_iOS.Platform) == baseName)
|
||||
return "ios";
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_tvOS.Platform, true) == baseName)
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_tvOS.Platform) == baseName)
|
||||
return "tvos";
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_macOS.Platform, true) == baseName)
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_macOS.Platform) == baseName)
|
||||
return "macos";
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_MacCatalyst.Platform, true) == baseName)
|
||||
if (Configuration.GetBaseLibraryName (TargetFramework.DotNet_MacCatalyst.Platform) == baseName)
|
||||
return "maccatalyst";
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ namespace Cecil.Tests {
|
|||
[TestFixture]
|
||||
public class EnumTest {
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
// https://github.com/xamarin/xamarin-macios/issues/9724
|
||||
public void NoAvailabilityOnError (AssemblyInfo info)
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace Cecil.Tests {
|
|||
if (!cache.TryGetValue (assembly, out var ad)) {
|
||||
if (parameters is null) {
|
||||
var resolver = new DefaultAssemblyResolver ();
|
||||
resolver.AddSearchDirectory (GetBCLDirectory (assembly));
|
||||
parameters = new ReaderParameters () {
|
||||
AssemblyResolver = resolver,
|
||||
ReadSymbols = readSymbols,
|
||||
|
@ -409,71 +408,6 @@ namespace Cecil.Tests {
|
|||
yield return item;
|
||||
}
|
||||
|
||||
public static string GetBCLDirectory (string assembly)
|
||||
{
|
||||
var rv = string.Empty;
|
||||
var isDotNet = !assembly.Contains ("Library/Frameworks/Xamarin.iOS.framework") && !assembly.Contains ("Library/Frameworks/Xamarin.Mac.framework");
|
||||
|
||||
switch (Configuration.GetPlatform (assembly, isDotNet)) {
|
||||
case ApplePlatform.iOS:
|
||||
rv = Path.GetDirectoryName (Configuration.XamarinIOSDll);
|
||||
break;
|
||||
case ApplePlatform.WatchOS:
|
||||
rv = Path.GetDirectoryName (Configuration.XamarinWatchOSDll);
|
||||
break;
|
||||
case ApplePlatform.TVOS:
|
||||
rv = Path.GetDirectoryName (Configuration.XamarinTVOSDll);
|
||||
break;
|
||||
case ApplePlatform.MacOSX:
|
||||
rv = Path.GetDirectoryName (assembly);
|
||||
break;
|
||||
case ApplePlatform.MacCatalyst:
|
||||
rv = Path.GetDirectoryName (Configuration.XamarinCatalystDll);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException (assembly);
|
||||
}
|
||||
|
||||
return rv!;
|
||||
}
|
||||
|
||||
static IEnumerable<string> PlatformAssemblies {
|
||||
get {
|
||||
if (!Configuration.include_legacy_xamarin)
|
||||
yield break;
|
||||
|
||||
if (Configuration.include_ios) {
|
||||
// we want to process 32/64 bits individually since their content can differ
|
||||
if (Configuration.iOSSupports32BitArchitectures)
|
||||
yield return Path.Combine (Configuration.MonoTouchRootDirectory, "lib", "32bits", "iOS", "Xamarin.iOS.dll");
|
||||
yield return Path.Combine (Configuration.MonoTouchRootDirectory, "lib", "64bits", "iOS", "Xamarin.iOS.dll");
|
||||
}
|
||||
|
||||
if (Configuration.include_tvos) {
|
||||
// XamarinTVOSDll is stripped of it's IL
|
||||
yield return Path.Combine (Configuration.MonoTouchRootDirectory, "lib", "64bits", "tvOS", "Xamarin.TVOS.dll");
|
||||
}
|
||||
|
||||
if (Configuration.include_mac) {
|
||||
yield return Configuration.XamarinMacMobileDll;
|
||||
yield return Configuration.XamarinMacFullDll;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static IList<AssemblyInfo>? platform_assembly_definitions;
|
||||
public static IEnumerable<AssemblyInfo> PlatformAssemblyDefinitions {
|
||||
get {
|
||||
if (platform_assembly_definitions is null) {
|
||||
platform_assembly_definitions = PlatformAssemblies
|
||||
.Select (v => new AssemblyInfo (v, GetAssembly (v, readSymbols: true), false))
|
||||
.ToArray ();
|
||||
}
|
||||
return platform_assembly_definitions;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static IEnumerable<string> NetPlatformAssemblies => Configuration.GetRefLibraries ();
|
||||
|
||||
static IList<AssemblyInfo>? net_platform_assembly_definitions;
|
||||
|
@ -481,7 +415,7 @@ namespace Cecil.Tests {
|
|||
get {
|
||||
if (net_platform_assembly_definitions is null) {
|
||||
net_platform_assembly_definitions = NetPlatformAssemblies
|
||||
.Select (v => new AssemblyInfo (v, GetAssembly (v, readSymbols: false), true))
|
||||
.Select (v => new AssemblyInfo (v, GetAssembly (v, readSymbols: false)))
|
||||
.ToArray ();
|
||||
}
|
||||
return net_platform_assembly_definitions;
|
||||
|
@ -495,7 +429,7 @@ namespace Cecil.Tests {
|
|||
get {
|
||||
if (net_platform_assembly_implemnetation_assembly_definitions is null) {
|
||||
net_platform_assembly_implemnetation_assembly_definitions = NetPlatformImplementationAssemblies
|
||||
.Select (v => new AssemblyInfo (v, GetAssembly (v, readSymbols: true), true))
|
||||
.Select (v => new AssemblyInfo (v, GetAssembly (v, readSymbols: true)))
|
||||
.ToArray ();
|
||||
}
|
||||
return net_platform_assembly_implemnetation_assembly_definitions;
|
||||
|
@ -529,22 +463,6 @@ namespace Cecil.Tests {
|
|||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<TestFixtureData> TaskAssemblies {
|
||||
get {
|
||||
if (Configuration.include_ios)
|
||||
yield return CreateTestFixtureDataFromPath (Path.Combine (Configuration.SdkRootXI, "lib", "msbuild", "iOS", "Xamarin.iOS.Tasks.dll"));
|
||||
if (Configuration.include_mac)
|
||||
yield return CreateTestFixtureDataFromPath (Path.Combine (Configuration.SdkRootXM, "lib", "msbuild", "Xamarin.Mac.Tasks.dll"));
|
||||
}
|
||||
}
|
||||
|
||||
static TestFixtureData CreateTestFixtureDataFromPath (string path)
|
||||
{
|
||||
var rv = new TestFixtureData (path);
|
||||
rv.SetArgDisplayNames (Path.GetFileName (path));
|
||||
return rv;
|
||||
}
|
||||
|
||||
// This method renders a string that sorts well - methods in the same
|
||||
// type are sorted next to eachother (the default MethodDefinition.FullName
|
||||
// implementation starts with the return type, so sorting the results
|
||||
|
@ -712,11 +630,11 @@ namespace Cecil.Tests {
|
|||
public string Path;
|
||||
public ApplePlatform Platform;
|
||||
|
||||
public AssemblyInfo (string path, AssemblyDefinition assembly, bool isDotNet)
|
||||
public AssemblyInfo (string path, AssemblyDefinition assembly)
|
||||
{
|
||||
Assembly = assembly;
|
||||
Path = path;
|
||||
Platform = Configuration.GetPlatform (path, isDotNet);
|
||||
Platform = Configuration.GetPlatform (path);
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
|
|
|
@ -18,7 +18,6 @@ namespace Cecil.Tests {
|
|||
|
||||
HashSet<string> knownIssues = new HashSet<string> { };
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
public void TestAssembly (AssemblyInfo info)
|
||||
{
|
||||
|
|
|
@ -14,7 +14,6 @@ namespace Cecil.Tests {
|
|||
[TestFixture]
|
||||
public class Test {
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformImplementationAssemblyDefinitions))]
|
||||
// ref: https://github.com/xamarin/xamarin-macios/pull/7760
|
||||
public void IdentifyBackingFieldAssignation (AssemblyInfo info)
|
||||
|
@ -50,7 +49,6 @@ namespace Cecil.Tests {
|
|||
}
|
||||
}
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformImplementationAssemblyDefinitions))]
|
||||
// ref: https://github.com/xamarin/xamarin-macios/issues/8249
|
||||
public void EnsureUIThreadOnInit (AssemblyInfo info)
|
||||
|
@ -85,7 +83,6 @@ namespace Cecil.Tests {
|
|||
}
|
||||
}
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
public void NoSystemConsoleReference (AssemblyInfo info)
|
||||
{
|
||||
|
@ -127,7 +124,6 @@ namespace Cecil.Tests {
|
|||
// keep up-to-date with the 'bannedCApi' list in tests/mtouch/MiscTests.cs
|
||||
};
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
public void NoBannedApi (AssemblyInfo info)
|
||||
{
|
||||
|
@ -153,7 +149,6 @@ namespace Cecil.Tests {
|
|||
MacCatalyst,
|
||||
}
|
||||
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.PlatformAssemblyDefinitions))]
|
||||
[TestCaseSource (typeof (Helper), nameof (Helper.NetPlatformAssemblyDefinitions))]
|
||||
// ref: https://github.com/xamarin/xamarin-macios/issues/4835
|
||||
public void Unavailable (AssemblyInfo info)
|
||||
|
|
|
@ -42,9 +42,6 @@ namespace Xamarin.Tests {
|
|||
public static bool include_tvos;
|
||||
public static bool include_maccatalyst;
|
||||
public static bool include_device;
|
||||
public static bool include_dotnet;
|
||||
public static bool include_legacy_xamarin;
|
||||
public static bool iOSSupports32BitArchitectures;
|
||||
public static bool EnableXamarin;
|
||||
public static bool XcodeIsStable;
|
||||
|
||||
|
@ -297,13 +294,10 @@ namespace Xamarin.Tests {
|
|||
include_tvos = !string.IsNullOrEmpty (GetVariable ("INCLUDE_TVOS", ""));
|
||||
include_maccatalyst = !string.IsNullOrEmpty (GetVariable ("INCLUDE_MACCATALYST", ""));
|
||||
include_device = !string.IsNullOrEmpty (GetVariable ("INCLUDE_DEVICE", ""));
|
||||
include_dotnet = !string.IsNullOrEmpty (GetVariable ("ENABLE_DOTNET", ""));
|
||||
include_legacy_xamarin = !string.IsNullOrEmpty (GetVariable ("INCLUDE_XAMARIN_LEGACY", ""));
|
||||
DotNetBclDir = GetVariable ("DOTNET_BCL_DIR", null);
|
||||
DotNetCscCommand = GetVariable ("DOTNET_CSC_COMMAND", null)?.Trim ('\'');
|
||||
DotNetExecutable = GetVariable ("DOTNET", null);
|
||||
DotNetTfm = GetVariable ("DOTNET_TFM", null);
|
||||
iOSSupports32BitArchitectures = !string.IsNullOrEmpty (GetVariable ("IOS_SUPPORTS_32BIT_ARCHITECTURES", ""));
|
||||
EnableXamarin = !string.IsNullOrEmpty (GetVariable ("ENABLE_XAMARIN", ""));
|
||||
XcodeIsStable = string.Equals (GetVariable ("XCODE_IS_STABLE", ""), "true", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
|
@ -328,7 +322,6 @@ namespace Xamarin.Tests {
|
|||
Console.WriteLine (" INCLUDE_MAC={0}", include_mac);
|
||||
Console.WriteLine (" INCLUDE_TVOS={0}", include_tvos);
|
||||
Console.WriteLine (" INCLUDE_MACCATALYST={0}", include_maccatalyst);
|
||||
Console.WriteLine (" ENABLE_DOTNET={0}", include_dotnet);
|
||||
}
|
||||
|
||||
public static string RootPath {
|
||||
|
@ -385,84 +378,12 @@ namespace Xamarin.Tests {
|
|||
}
|
||||
}
|
||||
|
||||
public static string XamarinIOSDll {
|
||||
get {
|
||||
return Path.Combine (mt_root, "lib", "mono", "Xamarin.iOS", "Xamarin.iOS.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string XamarinCatalystDll {
|
||||
get {
|
||||
return Path.Combine (mt_root, "lib", "mono", "Xamarin.MacCatalyst", "Xamarin.MacCatalyst.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string XamarinWatchOSDll {
|
||||
get {
|
||||
return Path.Combine (mt_root, "lib", "mono", "Xamarin.WatchOS", "Xamarin.WatchOS.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string XamarinTVOSDll {
|
||||
get {
|
||||
return Path.Combine (mt_root, "lib", "mono", "Xamarin.TVOS", "Xamarin.TVOS.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string XamarinMacMobileDll {
|
||||
get {
|
||||
return Path.Combine (SdkRootXM, "lib", "mono", "Xamarin.Mac", "Xamarin.Mac.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string XamarinMacFullDll {
|
||||
get {
|
||||
return Path.Combine (SdkRootXM, "lib", "mono", "4.5", "Xamarin.Mac.dll");
|
||||
}
|
||||
}
|
||||
|
||||
public static string SdkBinDir {
|
||||
get {
|
||||
#if MONOMAC
|
||||
return BinDirXM;
|
||||
#else
|
||||
return BinDirXI;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
public static string TargetDirectoryXI {
|
||||
get {
|
||||
if (UseSystem)
|
||||
return "/";
|
||||
return make_config ["IOS_DESTDIR"];
|
||||
}
|
||||
}
|
||||
|
||||
public static string TargetDirectoryXM {
|
||||
get {
|
||||
if (UseSystem)
|
||||
return "/";
|
||||
return make_config ["MAC_DESTDIR"];
|
||||
}
|
||||
}
|
||||
|
||||
public static string TestProjectsDirectory {
|
||||
get {
|
||||
return Path.Combine (RootPath, "tests", "common", "TestProjects");
|
||||
}
|
||||
}
|
||||
|
||||
public static string SdkRoot {
|
||||
get {
|
||||
#if MONOMAC
|
||||
return SdkRootXM;
|
||||
#else
|
||||
return SdkRootXI;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static string GetRefNuGetName (TargetFramework targetFramework) => GetRefNuGetName (targetFramework.Platform);
|
||||
|
||||
static string GetRefNuGetName (ApplePlatform platform)
|
||||
|
@ -514,11 +435,7 @@ namespace Xamarin.Tests {
|
|||
|
||||
public static string GetRefDirectory (TargetFramework targetFramework)
|
||||
{
|
||||
if (targetFramework.IsDotNet)
|
||||
return GetRefDirectory (targetFramework.Platform);
|
||||
|
||||
// This is only applicable for .NET
|
||||
throw new InvalidOperationException (targetFramework.ToString ());
|
||||
return GetRefDirectory (targetFramework.Platform);
|
||||
}
|
||||
|
||||
public static string GetNuGetVersionNoMetadata (TargetFramework framework)
|
||||
|
@ -542,34 +459,9 @@ namespace Xamarin.Tests {
|
|||
return Path.Combine (rv, "runtimes", runtimeIdentifier);
|
||||
}
|
||||
|
||||
public static string GetTargetDirectory (ApplePlatform platform)
|
||||
{
|
||||
switch (platform) {
|
||||
case ApplePlatform.iOS:
|
||||
case ApplePlatform.TVOS:
|
||||
case ApplePlatform.WatchOS:
|
||||
return TargetDirectoryXI;
|
||||
case ApplePlatform.MacOSX:
|
||||
return TargetDirectoryXM;
|
||||
default:
|
||||
throw new InvalidOperationException (platform.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSdkRoot (TargetFramework targetFramework)
|
||||
{
|
||||
if (targetFramework.IsDotNet)
|
||||
return GetSdkRoot (targetFramework.Platform);
|
||||
switch (targetFramework.Platform) {
|
||||
case ApplePlatform.iOS:
|
||||
case ApplePlatform.TVOS:
|
||||
case ApplePlatform.WatchOS:
|
||||
return SdkRootXI;
|
||||
case ApplePlatform.MacOSX:
|
||||
return SdkRootXM;
|
||||
default:
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
return GetSdkRoot (targetFramework.Platform);
|
||||
}
|
||||
|
||||
// Only valid for .NET
|
||||
|
@ -581,196 +473,57 @@ namespace Xamarin.Tests {
|
|||
return Path.Combine (rv, "tools");
|
||||
}
|
||||
|
||||
public static string SdkRootXI {
|
||||
get {
|
||||
return Path.Combine (TargetDirectoryXI, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current");
|
||||
}
|
||||
}
|
||||
|
||||
public static string SdkRootXM {
|
||||
get {
|
||||
return Path.Combine (TargetDirectoryXM, "Library", "Frameworks", "Xamarin.Mac.framework", "Versions", "Current");
|
||||
}
|
||||
}
|
||||
|
||||
public static string BinDirXI {
|
||||
get {
|
||||
return Path.Combine (SdkRootXI, "bin");
|
||||
}
|
||||
}
|
||||
|
||||
public static string BinDirXM {
|
||||
get {
|
||||
return Path.Combine (SdkRootXM, "bin");
|
||||
}
|
||||
}
|
||||
|
||||
public static string BtouchPath {
|
||||
get {
|
||||
return Path.Combine (SdkBinDir, "btouch-native");
|
||||
}
|
||||
}
|
||||
|
||||
public static string BGenPath {
|
||||
get {
|
||||
return Path.Combine (SdkBinDir, "bgen");
|
||||
}
|
||||
}
|
||||
|
||||
public static string BGenClassicPath {
|
||||
get {
|
||||
return Path.Combine (BinDirXM, "bgen-classic");
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetBindingAttributePath (TargetFramework targetFramework)
|
||||
{
|
||||
if (targetFramework.IsDotNet)
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "Xamarin.Apple.BindingAttributes.dll");
|
||||
|
||||
switch (targetFramework.Platform) {
|
||||
case ApplePlatform.iOS:
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.iOS.BindingAttributes.dll");
|
||||
case ApplePlatform.TVOS:
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.TVOS.BindingAttributes.dll");
|
||||
case ApplePlatform.WatchOS:
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.WatchOS.BindingAttributes.dll");
|
||||
case ApplePlatform.MacOSX:
|
||||
if (targetFramework == TargetFramework.Xamarin_Mac_2_0_Mobile) {
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.Mac-mobile.BindingAttributes.dll");
|
||||
} else if (targetFramework == TargetFramework.Xamarin_Mac_4_5_Full) {
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "bgen", "Xamarin.Mac-full.BindingAttributes.dll");
|
||||
}
|
||||
goto default;
|
||||
default:
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
}
|
||||
|
||||
public static string MmpPath {
|
||||
get {
|
||||
return Path.Combine (BinDirXM, "mmp");
|
||||
}
|
||||
}
|
||||
|
||||
public static string MtouchPath {
|
||||
get {
|
||||
return Path.Combine (BinDirXI, "mtouch");
|
||||
}
|
||||
}
|
||||
|
||||
public static string MlaunchPath {
|
||||
get {
|
||||
var env = Environment.GetEnvironmentVariable ("MLAUNCH_PATH");
|
||||
if (!string.IsNullOrEmpty (env))
|
||||
return env;
|
||||
return Path.Combine (BinDirXI, "mlaunch");
|
||||
}
|
||||
return Path.Combine (GetSdkRoot (targetFramework), "lib", "Xamarin.Apple.BindingAttributes.dll");
|
||||
}
|
||||
|
||||
#if !XAMMAC_TESTS
|
||||
|
||||
public static string GetBaseLibrary (Profile profile)
|
||||
public static string GetBaseLibrary (ApplePlatform platform)
|
||||
{
|
||||
switch (profile) {
|
||||
case Profile.iOS:
|
||||
return XamarinIOSDll;
|
||||
case Profile.tvOS:
|
||||
return XamarinTVOSDll;
|
||||
case Profile.watchOS:
|
||||
return XamarinWatchOSDll;
|
||||
case Profile.macOSMobile:
|
||||
return XamarinMacMobileDll;
|
||||
case Profile.macOSFull:
|
||||
case Profile.macOSSystem:
|
||||
return XamarinMacFullDll;
|
||||
default:
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetBaseLibrary (ApplePlatform platform, bool isDotNet)
|
||||
{
|
||||
if (isDotNet)
|
||||
return Path.Combine (GetRefDirectory (platform), GetBaseLibraryName (platform, isDotNet));
|
||||
return GetBaseLibrary (platform.AsProfile ());
|
||||
return Path.Combine (GetRefDirectory (platform), GetBaseLibraryName (platform));
|
||||
}
|
||||
|
||||
static string GetBaseLibraryName (TargetFramework targetFramework)
|
||||
{
|
||||
return GetBaseLibraryName (targetFramework.Platform, targetFramework.IsDotNet);
|
||||
return GetBaseLibraryName (targetFramework.Platform);
|
||||
}
|
||||
|
||||
public static string GetBaseLibraryName (ApplePlatform platform, bool isDotNet)
|
||||
public static string GetBaseLibraryName (ApplePlatform platform)
|
||||
{
|
||||
switch (platform) {
|
||||
case ApplePlatform.iOS:
|
||||
return isDotNet ? "Microsoft.iOS.dll" : "Xamarin.iOS.dll";
|
||||
return "Microsoft.iOS.dll";
|
||||
case ApplePlatform.TVOS:
|
||||
return isDotNet ? "Microsoft.tvOS.dll" : "Xamarin.TVOS.dll";
|
||||
case ApplePlatform.WatchOS:
|
||||
return isDotNet ? "Microsoft.watchOS.dll" : "Xamarin.WatchOS.dll";
|
||||
return "Microsoft.tvOS.dll";
|
||||
case ApplePlatform.MacOSX:
|
||||
return isDotNet ? "Microsoft.macOS.dll" : "Xamarin.Mac.dll";
|
||||
return "Microsoft.macOS.dll";
|
||||
case ApplePlatform.MacCatalyst:
|
||||
return isDotNet ? "Microsoft.MacCatalyst.dll" : "Xamarin.MacCatalyst.dll";
|
||||
return "Microsoft.MacCatalyst.dll";
|
||||
default:
|
||||
throw new InvalidOperationException (platform.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
public static ApplePlatform GetPlatform (string assemblyName, bool isDotNet)
|
||||
public static ApplePlatform GetPlatform (string assemblyName)
|
||||
{
|
||||
if (isDotNet) {
|
||||
switch (Path.GetFileNameWithoutExtension (assemblyName)) {
|
||||
case "Microsoft.iOS":
|
||||
return ApplePlatform.iOS;
|
||||
case "Microsoft.MacCatalyst":
|
||||
return ApplePlatform.MacCatalyst;
|
||||
case "Microsoft.tvOS":
|
||||
return ApplePlatform.TVOS;
|
||||
case "Microsoft.macOS":
|
||||
return ApplePlatform.MacOSX;
|
||||
default:
|
||||
throw new NotSupportedException ($"Unknown assembly: {assemblyName}");
|
||||
}
|
||||
} else {
|
||||
switch (Path.GetFileNameWithoutExtension (assemblyName)) {
|
||||
case "Xamarin.iOS":
|
||||
return ApplePlatform.iOS;
|
||||
case "Xamarin.WatchOS":
|
||||
return ApplePlatform.WatchOS;
|
||||
case "Xamarin.TVOS":
|
||||
return ApplePlatform.TVOS;
|
||||
case "Xamarin.Mac":
|
||||
return ApplePlatform.MacOSX;
|
||||
default:
|
||||
throw new NotSupportedException ($"Unknown assembly: {assemblyName}");
|
||||
}
|
||||
switch (Path.GetFileNameWithoutExtension (assemblyName)) {
|
||||
case "Microsoft.iOS":
|
||||
return ApplePlatform.iOS;
|
||||
case "Microsoft.MacCatalyst":
|
||||
return ApplePlatform.MacCatalyst;
|
||||
case "Microsoft.tvOS":
|
||||
return ApplePlatform.TVOS;
|
||||
case "Microsoft.macOS":
|
||||
return ApplePlatform.MacOSX;
|
||||
default:
|
||||
throw new NotSupportedException ($"Unknown assembly: {assemblyName}");
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetBaseLibrary (TargetFramework targetFramework)
|
||||
{
|
||||
if (targetFramework.IsDotNet)
|
||||
return Path.Combine (GetRefDirectory (targetFramework), GetBaseLibraryName (targetFramework));
|
||||
|
||||
switch (targetFramework.Platform) {
|
||||
case ApplePlatform.iOS:
|
||||
return XamarinIOSDll;
|
||||
case ApplePlatform.TVOS:
|
||||
return XamarinTVOSDll;
|
||||
case ApplePlatform.WatchOS:
|
||||
return XamarinWatchOSDll;
|
||||
}
|
||||
|
||||
if (targetFramework == TargetFramework.Xamarin_Mac_2_0_Mobile) {
|
||||
return XamarinMacMobileDll;
|
||||
} else if (targetFramework == TargetFramework.Xamarin_Mac_4_5_Full) {
|
||||
return XamarinMacFullDll;
|
||||
}
|
||||
|
||||
throw new InvalidOperationException (targetFramework.ToString ());
|
||||
return Path.Combine (GetRefDirectory (targetFramework), GetBaseLibraryName (targetFramework));
|
||||
}
|
||||
|
||||
public static IList<string> GetRuntimeIdentifiers (ApplePlatform platform)
|
||||
|
@ -793,7 +546,7 @@ namespace Xamarin.Tests {
|
|||
|
||||
public static IEnumerable<string> GetBaseLibraryImplementations ()
|
||||
{
|
||||
foreach (var platform in GetIncludedPlatforms (true))
|
||||
foreach (var platform in GetIncludedPlatforms ())
|
||||
foreach (var lib in GetBaseLibraryImplementations (platform))
|
||||
yield return lib;
|
||||
}
|
||||
|
@ -803,91 +556,25 @@ namespace Xamarin.Tests {
|
|||
var runtimeIdentifiers = GetRuntimeIdentifiers (platform);
|
||||
foreach (var rid in runtimeIdentifiers) {
|
||||
var libdir = Path.Combine (GetRuntimeDirectory (platform, rid), "lib", DotNetTfm);
|
||||
yield return Path.Combine (libdir, GetBaseLibraryName (platform, true));
|
||||
yield return Path.Combine (libdir, GetBaseLibraryName (platform));
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<string> GetRefLibraries ()
|
||||
{
|
||||
foreach (var platform in GetIncludedPlatforms (true))
|
||||
yield return Path.Combine (GetRefDirectory (platform), GetBaseLibraryName (platform, true));
|
||||
foreach (var platform in GetIncludedPlatforms ())
|
||||
yield return Path.Combine (GetRefDirectory (platform), GetBaseLibraryName (platform));
|
||||
}
|
||||
|
||||
|
||||
public static string GetRefLibrary (ApplePlatform platform)
|
||||
{
|
||||
return GetBaseLibrary (platform, true);
|
||||
return GetBaseLibrary (platform);
|
||||
}
|
||||
|
||||
public static string GetTargetFramework (Profile profile)
|
||||
{
|
||||
switch (profile) {
|
||||
case Profile.iOS:
|
||||
return "Xamarin.iOS,v1.0";
|
||||
case Profile.tvOS:
|
||||
return "Xamarin.TVOS,v1.0";
|
||||
case Profile.watchOS:
|
||||
return "Xamarin.WatchOS,v1.0";
|
||||
case Profile.macOSMobile:
|
||||
return "Xamarin.Mac,Version=v2.0,Profile=Mobile";
|
||||
case Profile.macOSFull:
|
||||
return "Xamarin.Mac,Version=v4.5,Profile=Full";
|
||||
case Profile.macOSSystem:
|
||||
return "Xamarin.Mac,Version=v4.5,Profile=System";
|
||||
default:
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSdkVersion (Profile profile)
|
||||
{
|
||||
switch (profile) {
|
||||
case Profile.iOS:
|
||||
return Configuration.sdk_version;
|
||||
case Profile.tvOS:
|
||||
return Configuration.tvos_sdk_version;
|
||||
case Profile.watchOS:
|
||||
return Configuration.watchos_sdk_version;
|
||||
case Profile.macOSFull:
|
||||
case Profile.macOSMobile:
|
||||
case Profile.macOSSystem:
|
||||
return Configuration.macos_sdk_version;
|
||||
default:
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSdkPath (Profile profile, bool is_device)
|
||||
{
|
||||
switch (profile) {
|
||||
case Profile.iOS:
|
||||
return Path.Combine (MonoTouchRootDirectory, "SDKs", "MonoTouch." + (is_device ? "iphoneos" : "iphonesimulator") + ".sdk");
|
||||
case Profile.tvOS:
|
||||
return Path.Combine (MonoTouchRootDirectory, "SDKs", "Xamarin.AppleTV" + (is_device ? "OS" : "Simulator") + ".sdk");
|
||||
case Profile.watchOS:
|
||||
return Path.Combine (MonoTouchRootDirectory, "SDKs", "Xamarin.Watch" + (is_device ? "OS" : "Simulator") + ".sdk");
|
||||
case Profile.macOSFull:
|
||||
case Profile.macOSMobile:
|
||||
case Profile.macOSSystem:
|
||||
return Path.Combine (SdkRootXM, "lib");
|
||||
default:
|
||||
throw new NotImplementedException (profile.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetCompiler (Profile profile, IList<string> args)
|
||||
{
|
||||
args.Add ($"-lib:{Path.GetDirectoryName (GetBaseLibrary (profile))}");
|
||||
return "/Library/Frameworks/Mono.framework/Commands/csc";
|
||||
}
|
||||
|
||||
#endif // !XAMMAC_TESTS
|
||||
|
||||
public static IEnumerable<ApplePlatform> GetIncludedPlatforms (bool dotnet)
|
||||
public static IEnumerable<ApplePlatform> GetIncludedPlatforms ()
|
||||
{
|
||||
if (dotnet && !include_dotnet)
|
||||
yield break;
|
||||
|
||||
if (include_ios)
|
||||
yield return ApplePlatform.iOS;
|
||||
if (include_tvos)
|
||||
|
@ -898,15 +585,12 @@ namespace Xamarin.Tests {
|
|||
yield return ApplePlatform.MacCatalyst;
|
||||
}
|
||||
|
||||
public static IEnumerable<ApplePlatform> GetAllPlatforms (bool dotnet)
|
||||
public static IEnumerable<ApplePlatform> GetAllPlatforms ()
|
||||
{
|
||||
yield return ApplePlatform.iOS;
|
||||
yield return ApplePlatform.TVOS;
|
||||
yield return ApplePlatform.MacOSX;
|
||||
if (dotnet)
|
||||
yield return ApplePlatform.MacCatalyst;
|
||||
if (!dotnet)
|
||||
yield return ApplePlatform.WatchOS;
|
||||
yield return ApplePlatform.MacCatalyst;
|
||||
}
|
||||
|
||||
public static string NuGetPackagesDirectory {
|
||||
|
@ -976,14 +660,10 @@ namespace Xamarin.Tests {
|
|||
|
||||
public static void SetBuildVariables (ApplePlatform platform, ref Dictionary<string, string> environment)
|
||||
{
|
||||
var rootDirectory = GetTargetDirectory (platform);
|
||||
|
||||
if (environment is null)
|
||||
environment = new Dictionary<string, string> ();
|
||||
|
||||
environment ["MD_APPLE_SDK_ROOT"] = Path.GetDirectoryName (Path.GetDirectoryName (xcode_root));
|
||||
environment ["TargetFrameworkFallbackSearchPaths"] = Path.Combine (rootDirectory, "Library", "Frameworks", "Mono.framework", "External", "xbuild-frameworks");
|
||||
environment ["MSBuildExtensionsPathFallbackPathsOverride"] = Path.Combine (rootDirectory, "Library", "Frameworks", "Mono.framework", "External", "xbuild");
|
||||
|
||||
// This is set by `dotnet test` and can cause building legacy projects to fail to build with:
|
||||
// Microsoft.NET.Build.Extensions.ConflictResolution.targets(30,5):
|
||||
|
@ -991,20 +671,6 @@ namespace Xamarin.Tests {
|
|||
// Invalid Image Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available,
|
||||
// and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
|
||||
environment ["MSBuildExtensionsPath"] = null;
|
||||
|
||||
switch (platform) {
|
||||
case ApplePlatform.iOS:
|
||||
case ApplePlatform.TVOS:
|
||||
case ApplePlatform.WatchOS:
|
||||
environment ["MD_MTOUCH_SDK_ROOT"] = Path.Combine (rootDirectory, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current");
|
||||
break;
|
||||
case ApplePlatform.MacOSX:
|
||||
environment ["XAMMAC_FRAMEWORK_PATH"] = Path.Combine (rootDirectory, "Library", "Frameworks", "Xamarin.Mac.framework", "Versions", "Current");
|
||||
environment ["XamarinMacFrameworkRoot"] = Path.Combine (rootDirectory, "Library", "Frameworks", "Xamarin.Mac.framework", "Versions", "Current");
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException (platform.ToString ());
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsBuildingRemotely {
|
||||
|
|
|
@ -45,8 +45,6 @@ namespace Xamarin.Tests {
|
|||
|
||||
public static void AssertiOS32BitAvailable ()
|
||||
{
|
||||
if (iOSSupports32BitArchitectures)
|
||||
return;
|
||||
Assert.Ignore ($"32-bit iOS support is not available in the current build.");
|
||||
}
|
||||
#endif // !XAMMAC_TESTS
|
||||
|
@ -60,15 +58,10 @@ namespace Xamarin.Tests {
|
|||
|
||||
public static void AssertDotNetAvailable ()
|
||||
{
|
||||
if (include_dotnet)
|
||||
return;
|
||||
Assert.Ignore (".NET tests not enabled");
|
||||
}
|
||||
|
||||
public static void AssertLegacyXamarinAvailable ()
|
||||
{
|
||||
if (include_legacy_xamarin)
|
||||
return;
|
||||
Assert.Ignore ("Legacy xamarin build not enabled");
|
||||
}
|
||||
|
||||
|
@ -116,22 +109,22 @@ namespace Xamarin.Tests {
|
|||
}
|
||||
}
|
||||
|
||||
public static bool AnyIgnoredPlatforms (bool dotnet = true)
|
||||
public static bool AnyIgnoredPlatforms ()
|
||||
{
|
||||
return AnyIgnoredPlatforms (dotnet, out var _);
|
||||
return AnyIgnoredPlatforms (out var _);
|
||||
}
|
||||
|
||||
public static bool AnyIgnoredPlatforms (bool dotnet, out IEnumerable<ApplePlatform> notIncluded)
|
||||
public static bool AnyIgnoredPlatforms (out IEnumerable<ApplePlatform> notIncluded)
|
||||
{
|
||||
var allPlatforms = GetAllPlatforms (dotnet);
|
||||
var includedPlatforms = GetIncludedPlatforms (dotnet);
|
||||
var allPlatforms = GetAllPlatforms ();
|
||||
var includedPlatforms = GetIncludedPlatforms ();
|
||||
notIncluded = allPlatforms.Where (v => !includedPlatforms.Contains (v)).ToArray ();
|
||||
return notIncluded.Any ();
|
||||
}
|
||||
|
||||
public static void IgnoreIfAnyIgnoredPlatforms (bool dotnet = true)
|
||||
public static void IgnoreIfAnyIgnoredPlatforms ()
|
||||
{
|
||||
if (AnyIgnoredPlatforms (dotnet, out var notIncluded))
|
||||
if (AnyIgnoredPlatforms (out var notIncluded))
|
||||
Assert.Ignore ($"This test requires all platforms to be included, but the following platforms aren't included: {string.Join (", ", notIncluded.Select (v => v.AsString ()))}");
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Xamarin.Tests {
|
|||
public override IEnumerable<object []> GetData (MethodInfo testMethod)
|
||||
{
|
||||
return Configuration.
|
||||
GetIncludedPlatforms (true).
|
||||
GetIncludedPlatforms ().
|
||||
Select (platform => dataValues.Prepend (platform).ToArray ());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -492,11 +492,6 @@ namespace TestCase
|
|||
s.Write (testCase);
|
||||
}
|
||||
|
||||
public static string FindRootDirectory ()
|
||||
{
|
||||
return Configuration.TargetDirectoryXM;
|
||||
}
|
||||
|
||||
static string GenerateOutputCommand (string tmpDir, Guid guid)
|
||||
{
|
||||
return string.Format ("System.IO.File.Create(\"{0}\").Dispose();", Path.Combine (tmpDir, guid.ToString ()));
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace Xamarin.Tests {
|
|||
if (assemblyName.EndsWith (".dll", StringComparison.Ordinal) || assemblyName.EndsWith (".pdb", StringComparison.Ordinal))
|
||||
assemblyName = Path.GetFileNameWithoutExtension (assemblyName);
|
||||
foreach (var platform in Enum.GetValues<ApplePlatform> ()) {
|
||||
if (platform == ApplePlatform.None)
|
||||
if (platform == ApplePlatform.None || platform == ApplePlatform.WatchOS)
|
||||
continue;
|
||||
var platformAssembly = Path.GetFileNameWithoutExtension (Configuration.GetBaseLibraryName (platform, true));
|
||||
var platformAssembly = Path.GetFileNameWithoutExtension (Configuration.GetBaseLibraryName (platform));
|
||||
if (platformAssembly == assemblyName)
|
||||
return true;
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ namespace Xamarin.Tests {
|
|||
expectedFiles.Add (Path.Combine (assemblyDirectory, "nunitlite.dll"));
|
||||
bool forceSingleRid = (platform == ApplePlatform.MacCatalyst && !isReleaseBuild) || platform == ApplePlatform.MacOSX;
|
||||
AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, "Touch.Client", runtimeIdentifiers, forceSingleRid, includeDebugFiles: includeDebugFiles);
|
||||
AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, Path.GetFileNameWithoutExtension (Configuration.GetBaseLibraryName (platform, true)), runtimeIdentifiers, forceSingleRid, includeDebugFiles: includeDebugFiles);
|
||||
AddMultiRidAssembly (platform, expectedFiles, assemblyDirectory, Path.GetFileNameWithoutExtension (Configuration.GetBaseLibraryName (platform)), runtimeIdentifiers, forceSingleRid, includeDebugFiles: includeDebugFiles);
|
||||
expectedFiles.Add (Path.Combine (assemblyDirectory, "runtimeconfig.bin"));
|
||||
|
||||
switch (platform) {
|
||||
|
|
|
@ -427,7 +427,7 @@ namespace Xamarin.Tests {
|
|||
var appExecutable = Path.Combine (appPath, Path.GetFileName (project_path));
|
||||
Assert.That (appPath, Does.Not.Exist, "There is an .app");
|
||||
Assert.That (appExecutable, Does.Not.Empty, "There is no executable");
|
||||
Assert.That (Path.Combine (appPath, Configuration.GetBaseLibraryName (platform, true)), Does.Not.Exist, "Platform assembly is in the bundle");
|
||||
Assert.That (Path.Combine (appPath, Configuration.GetBaseLibraryName (platform)), Does.Not.Exist, "Platform assembly is in the bundle");
|
||||
break;
|
||||
case ApplePlatform.MacCatalyst:
|
||||
break;
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace Xamarin.Tests {
|
|||
var asmDir = Path.Combine (appDir, GetRelativeAssemblyDirectory (platform));
|
||||
|
||||
var appExecutable = Path.Combine (asmDir, project + ".dll");
|
||||
var platformDll = Path.Combine (asmDir, Configuration.GetBaseLibraryName (platform, true));
|
||||
var platformDll = Path.Combine (asmDir, Configuration.GetBaseLibraryName (platform));
|
||||
Assert.That (File.Exists (platformDll), "No platform dll.");
|
||||
var module = ModuleDefinition.ReadModule (platformDll);
|
||||
var classHandlesMaybe = AllTypes (module).FirstOrDefault (t => t.FullName == "ObjCRuntime.Runtime/ClassHandles");
|
||||
|
|
|
@ -98,7 +98,6 @@ class MainClass {
|
|||
var tmpdir = Cache.CreateTemporaryDirectory ();
|
||||
var assemblies = 200;
|
||||
|
||||
var xm = Configuration.XamarinMacMobileDll;
|
||||
var csc = Configuration.DotNetCscCommand;
|
||||
|
||||
var references = new List<string> ();
|
||||
|
|
|
@ -306,7 +306,7 @@ public class Binding
|
|||
[Category ("Multiplatform")]
|
||||
public void BuildMultiTargeting ()
|
||||
{
|
||||
var enabledPlatforms = Configuration.GetIncludedPlatforms (dotnet: true);
|
||||
var enabledPlatforms = Configuration.GetIncludedPlatforms ();
|
||||
var templatePlatform = enabledPlatforms.First ();
|
||||
var testDir = Cache.CreateTemporaryDirectory (TestName);
|
||||
var proj = Path.Combine (testDir, $"{TestName}.csproj");
|
||||
|
|
|
@ -52,20 +52,13 @@ namespace Xamarin.Tests {
|
|||
public string? Out;
|
||||
public int Verbosity = 1;
|
||||
|
||||
protected override string ToolPath { get { return Profile == Profile.macOSClassic ? Configuration.BGenClassicPath : Configuration.BGenPath; } }
|
||||
protected override string ToolPath { get => throw new InvalidOperationException (); }
|
||||
protected override string MessagePrefix { get { return "BI"; } }
|
||||
protected override string MessageToolName { get { return Profile == Profile.macOSClassic ? "bgen-classic" : "bgen"; } }
|
||||
protected override string MessageToolName { get { return "bgen"; } }
|
||||
|
||||
public BGenTool ()
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
EnvironmentVariables = new Dictionary<string, string> ();
|
||||
} else {
|
||||
EnvironmentVariables = new Dictionary<string, string> {
|
||||
{ "MD_MTOUCH_SDK_ROOT", Configuration.SdkRootXI },
|
||||
{ "XamarinMacFrameworkRoot", Configuration.SdkRootXM },
|
||||
};
|
||||
}
|
||||
EnvironmentVariables = new Dictionary<string, string> ();
|
||||
}
|
||||
|
||||
public void AddTestApiDefinition (string filename)
|
||||
|
@ -435,11 +428,7 @@ namespace Xamarin.Tests {
|
|||
if (assembly is null) {
|
||||
var parameters = new ReaderParameters ();
|
||||
var resolver = new DefaultAssemblyResolver ();
|
||||
#if NET
|
||||
var searchdir = Path.GetDirectoryName (Configuration.GetBaseLibrary (Profile.AsPlatform (), true));
|
||||
#else
|
||||
var searchdir = Path.GetDirectoryName (Configuration.GetBaseLibrary (Profile));
|
||||
#endif
|
||||
var searchdir = Path.GetDirectoryName (Configuration.GetBaseLibrary (Profile.AsPlatform ()));
|
||||
resolver.AddSearchDirectory (searchdir);
|
||||
parameters.AssemblyResolver = resolver;
|
||||
var tmpDirectory = EnsureTempDir ();
|
||||
|
|
|
@ -18,9 +18,6 @@ public class AssemblySetup {
|
|||
if (is_in_vsmac) {
|
||||
var env = new Dictionary<string, string> {
|
||||
{ "MD_APPLE_SDK_ROOT", Path.GetDirectoryName (Path.GetDirectoryName (Configuration.xcode_root)) },
|
||||
{ "TargetFrameworkFallbackSearchPaths", Path.Combine (Configuration.TargetDirectoryXI, "Library", "Frameworks", "Mono.framework", "External", "xbuild-frameworks") },
|
||||
{ "MSBuildExtensionsPathFallbackPathsOverride", Path.Combine (Configuration.TargetDirectoryXI, "Library", "Frameworks", "Mono.framework", "External", "xbuild") },
|
||||
{ "MD_MTOUCH_SDK_ROOT", Path.Combine (Configuration.TargetDirectoryXI, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current") },
|
||||
{ "MSBUILD_EXE_PATH", msbuild_exe_path },
|
||||
};
|
||||
|
||||
|
|
|
@ -1,185 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using NUnit.Framework;
|
||||
using Xamarin.Tests;
|
||||
using System.Linq;
|
||||
|
||||
namespace Xamarin.MacDev.Tasks {
|
||||
[TestFixture]
|
||||
public class FrameworkListTests {
|
||||
[TestCase ("Xamarin.iOS-FrameworkList.xml.in")]
|
||||
[TestCase ("Xamarin.TVOS-FrameworkList.xml.in")]
|
||||
[TestCase ("Xamarin.Mac-Full-FrameworkList.xml.in")]
|
||||
[TestCase ("Xamarin.Mac-Mobile-FrameworkList.xml.in")]
|
||||
public void CheckFrameworkListFile (string frameworkListFile)
|
||||
{
|
||||
Configuration.AssertLegacyXamarinAvailable ();
|
||||
|
||||
var fameworkListFileParts = frameworkListFile.Split ('-');
|
||||
string frameworkName = fameworkListFileParts [0];
|
||||
switch (frameworkName) {
|
||||
case "Xamarin.iOS":
|
||||
if (!Configuration.include_ios)
|
||||
Assert.Inconclusive ("include_ios is disabled");
|
||||
break;
|
||||
case "Xamarin.TVOS":
|
||||
if (!Configuration.include_tvos)
|
||||
Assert.Inconclusive ("include_tvos is disabled");
|
||||
break;
|
||||
case "Xamarin.Mac":
|
||||
if (!Configuration.include_mac)
|
||||
Assert.Inconclusive ("include_mac is disabled");
|
||||
break;
|
||||
}
|
||||
var isMac = frameworkName == "Xamarin.Mac";
|
||||
var isFull = fameworkListFileParts [1] == "Full";
|
||||
var frameworkListAssemblies = ScanFrameworkListXml (frameworkListFile);
|
||||
var installedAssemblies = ScanAssemblyDirectory (frameworkName, isMac, isFull);
|
||||
|
||||
foreach (var assembly in frameworkListAssemblies) {
|
||||
if (!installedAssemblies.Any (a => a.Name == assembly.Name))
|
||||
ReportAssemblies (assembly, $"One or more assemblies listed in '{frameworkListFile}' were not found in the final SDK root folder. Update the list if an assembly was intentionally removed.");
|
||||
}
|
||||
|
||||
foreach (var assembly in installedAssemblies) {
|
||||
if (!frameworkListAssemblies.Any (a => a.Name == assembly.Name))
|
||||
ReportAssemblies (assembly, $"One or more assemblies in the the SDK root folder are not listed in '{frameworkListFile}'. Update the list if an assembly was intentionally added.");
|
||||
else if (!frameworkListAssemblies.Single (a => a.Name == assembly.Name).Equals (assembly))
|
||||
ReportAssemblies (assembly, $"One or more assemblies in the the SDK root folder do not match the entry in '{frameworkListFile}'. Update the list if an assembly was intentionally modified.");
|
||||
}
|
||||
}
|
||||
|
||||
void ReportAssemblies (AssemblyInfo assembly, string message)
|
||||
{
|
||||
var errorCount = 0;
|
||||
using (var sw = new StringWriter ()) {
|
||||
using (var writer = XmlWriter.Create (sw, new XmlWriterSettings { Encoding = Encoding.UTF8, ConformanceLevel = ConformanceLevel.Fragment, Indent = true })) {
|
||||
writer.WriteStartElement ("File");
|
||||
writer.WriteAttributeString ("AssemblyName", assembly.Name);
|
||||
WriteNonEmptyAttribute ("Version", assembly.Version);
|
||||
WriteNonEmptyAttribute ("PublicKeyToken", assembly.PublicKeyToken);
|
||||
WriteNonEmptyAttribute ("Culture", assembly.Culture);
|
||||
if (assembly.ProcessorArchitecture != ProcessorArchitecture.None)
|
||||
writer.WriteAttributeString ("ProcessorArchitecture", assembly.ProcessorArchitecture.ToString ());
|
||||
if (assembly.InGac)
|
||||
writer.WriteAttributeString ("InGac", "true");
|
||||
writer.WriteEndElement ();
|
||||
errorCount++;
|
||||
|
||||
void WriteNonEmptyAttribute (string name, string val)
|
||||
{
|
||||
if (!string.IsNullOrEmpty (val))
|
||||
writer.WriteAttributeString (name, val);
|
||||
}
|
||||
}
|
||||
Assert.AreEqual (0, errorCount, $"{message}\n{sw.ToString ()}");
|
||||
}
|
||||
}
|
||||
|
||||
List<AssemblyInfo> ScanFrameworkListXml (string frameworkListFile)
|
||||
{
|
||||
var assemblies = new List<AssemblyInfo> ();
|
||||
var path = Path.GetFullPath (Path.Combine (Configuration.SourceRoot, "msbuild", "Xamarin.Shared", frameworkListFile));
|
||||
using (var reader = XmlReader.Create (path)) {
|
||||
while (reader.Read ()) {
|
||||
if (reader.IsStartElement ()) {
|
||||
switch (reader.LocalName) {
|
||||
case "File":
|
||||
assemblies.Add (ReadFileElement (reader));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return assemblies;
|
||||
}
|
||||
|
||||
List<AssemblyInfo> ScanAssemblyDirectory (string frameworkName, bool isMac, bool isFull)
|
||||
{
|
||||
var assemblies = new List<AssemblyInfo> ();
|
||||
var assembliesPath = Path.GetFullPath (Path.Combine (isMac ? Configuration.SdkRootXM : Configuration.MonoTouchRootDirectory, "lib", "mono", isFull ? "4.5" : frameworkName));
|
||||
AddAssemblies (assembliesPath);
|
||||
AddAssemblies (Path.Combine (assembliesPath, "Facades"));
|
||||
|
||||
void AddAssemblies (string path)
|
||||
{
|
||||
foreach (var f in Directory.EnumerateFiles (path, "*.dll")) {
|
||||
try {
|
||||
var an = AssemblyName.GetAssemblyName (f);
|
||||
assemblies.Add (new AssemblyInfo (an));
|
||||
} catch (Exception ex) {
|
||||
Assert.Fail ("Error reading assembly '{0}' in framework '{1}':{2}{3}", f, frameworkName, Environment.NewLine, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return assemblies;
|
||||
}
|
||||
|
||||
static AssemblyInfo ReadFileElement (XmlReader reader)
|
||||
{
|
||||
var ainfo = new AssemblyInfo ();
|
||||
if (reader.MoveToAttribute ("AssemblyName") && reader.ReadAttributeValue ())
|
||||
ainfo.Name = reader.ReadContentAsString ();
|
||||
if (string.IsNullOrEmpty (ainfo.Name))
|
||||
throw new Exception ("Missing AssemblyName attribute");
|
||||
if (reader.MoveToAttribute ("Version") && reader.ReadAttributeValue ())
|
||||
ainfo.Version = reader.ReadContentAsString ();
|
||||
if (reader.MoveToAttribute ("PublicKeyToken") && reader.ReadAttributeValue ())
|
||||
ainfo.PublicKeyToken = reader.ReadContentAsString ();
|
||||
if (reader.MoveToAttribute ("Culture") && reader.ReadAttributeValue ())
|
||||
ainfo.Culture = reader.ReadContentAsString ();
|
||||
if (reader.MoveToAttribute ("ProcessorArchitecture") && reader.ReadAttributeValue ())
|
||||
ainfo.ProcessorArchitecture = (ProcessorArchitecture)
|
||||
Enum.Parse (typeof (ProcessorArchitecture), reader.ReadContentAsString (), true);
|
||||
if (reader.MoveToAttribute ("InGac") && reader.ReadAttributeValue ())
|
||||
ainfo.InGac = reader.ReadContentAsBoolean ();
|
||||
return ainfo;
|
||||
}
|
||||
}
|
||||
|
||||
class AssemblyInfo {
|
||||
public string Name;
|
||||
|
||||
public string Version;
|
||||
|
||||
public string PublicKeyToken;
|
||||
|
||||
public string Culture;
|
||||
|
||||
public ProcessorArchitecture ProcessorArchitecture = ProcessorArchitecture.MSIL;
|
||||
|
||||
public bool InGac;
|
||||
|
||||
public AssemblyInfo ()
|
||||
{
|
||||
}
|
||||
|
||||
public AssemblyInfo (AssemblyName aname)
|
||||
{
|
||||
Name = aname.Name;
|
||||
Version = aname.Version.ToString ();
|
||||
ProcessorArchitecture = aname.ProcessorArchitecture;
|
||||
Culture = aname.CultureInfo.Name;
|
||||
string fn = aname.ToString ();
|
||||
string key = "publickeytoken=";
|
||||
int i = fn.IndexOf (key, StringComparison.OrdinalIgnoreCase) + key.Length;
|
||||
int j = fn.IndexOf (',', i);
|
||||
if (j == -1) j = fn.Length;
|
||||
PublicKeyToken = fn.Substring (i, j - i);
|
||||
}
|
||||
|
||||
public bool Equals (AssemblyInfo other)
|
||||
{
|
||||
// ignore Culture and InGac for equality since those are not mentioned in the FrameworkList.xml
|
||||
return other.Name == this.Name &&
|
||||
other.Version == this.Version &&
|
||||
other.PublicKeyToken == this.PublicKeyToken &&
|
||||
other.ProcessorArchitecture == this.ProcessorArchitecture;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -23,8 +23,7 @@ namespace Xamarin.MacDev.Tasks {
|
|||
};
|
||||
|
||||
RunMake (Path.Combine (Configuration.RootPath, "tests", "test-libraries"), environment: env);
|
||||
if (Configuration.include_dotnet)
|
||||
RunMake (Path.Combine (Configuration.RootPath, "tests", "common", "TestProjects", "ComplexAssembly"), environment: env);
|
||||
RunMake (Path.Combine (Configuration.RootPath, "tests", "common", "TestProjects", "ComplexAssembly"), environment: env);
|
||||
}
|
||||
|
||||
static void RunMake (string directory, Dictionary<string, string> environment = null)
|
||||
|
|
|
@ -216,10 +216,6 @@ $$($(1)_DIRECTORIES):
|
|||
|
||||
endef
|
||||
|
||||
ifdef IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
IOS_SIMULATOR_ARCHITECTURES=x86
|
||||
IOS_DEVICE_ARCHITECTURES=armv7 armv7s
|
||||
endif
|
||||
IOS_SIMULATOR_ARCHITECTURES+=x86_64 arm64
|
||||
IOS_DEVICE_ARCHITECTURES+=arm64
|
||||
|
||||
|
@ -254,12 +250,6 @@ $(5)_TARGETS += .libs/$(4)/libtest.$(1).a
|
|||
all-local:: $$($(5)_TARGETS)
|
||||
endef
|
||||
|
||||
ifdef IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
$(eval $(call LibTemplate,armv7+7s,.libs/iphoneos/libtest.armv7.o,.libs/iphoneos/libtest.armv7s.o,ios-fat,IOS))
|
||||
$(eval $(call LibTemplate,armv7+x86,.libs/iphoneos/libtest.armv7.o,.libs/iphonesimulator/libtest.x86.o,ios-fat,IOS))
|
||||
$(eval $(call LibTemplate,armv7s+x86,.libs/iphoneos/libtest.armv7s.o,.libs/iphonesimulator/libtest.x86.o,ios-fat,IOS))
|
||||
endif
|
||||
|
||||
ifdef INCLUDE_TVOS
|
||||
$(eval $(call LibTemplate,arm64+x86_64,.libs/tvos/libtest.arm64.o,.libs/tvsimulator/libtest.x86_64.o,tvos-fat,TVOS))
|
||||
endif
|
||||
|
|
|
@ -50,13 +50,8 @@ maccatalyst_INFO_PLIST_INFIX=/Versions/A/Resources
|
|||
maccatalyst_BINARY_INFIX=/Versions/A
|
||||
|
||||
# For XCFrameworks, we have to lipo some of the RID-specific frameworks together (the ones with multiple RIDs below)
|
||||
ifdef IOS_SUPPORTS_32BIT_ARCHITECTURES
|
||||
iphonesimulator_XC_RUNTIMEIDENTIFIERS=iossimulator-x86 iossimulator-x64 iossimulator-arm64
|
||||
iphoneos_XC_RUNTIMEIDENTIFIERS=ios-arm ios-arm64
|
||||
else
|
||||
iphonesimulator_XC_RUNTIMEIDENTIFIERS=iossimulator-x64 iossimulator-arm64
|
||||
iphoneos_XC_RUNTIMEIDENTIFIERS=ios-arm64
|
||||
endif
|
||||
tvsimulator_XC_RUNTIMEIDENTIFIERS=tvossimulator-x64 tvossimulator-arm64
|
||||
tvos_XC_RUNTIMEIDENTIFIERS=tvos-arm64
|
||||
mac_XC_RUNTIMEIDENTIFIERS=osx-x64 osx-arm64
|
||||
|
@ -200,9 +195,7 @@ ZIPPED_TARGETS += .libs/$(1).xcframework.zip
|
|||
all-local:: .libs/$(1).xcframework.stamp
|
||||
endef
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
$(foreach name,$(NAMES),$(eval $(call XCFrameworkTemplate,$(name))))
|
||||
endif
|
||||
|
||||
zip: $(ZIPPED_TARGETS)
|
||||
all-local:: $(ZIPPED_TARGETS)
|
||||
|
|
|
@ -101,11 +101,6 @@ namespace Xharness.Jenkins {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (project.IsDotNetProject && !TestSelection.IsEnabled (PlatformLabel.Dotnet)) {
|
||||
MainLog.WriteLine ($"Ignoring {project.Name} with label {project.Label} because it's a .NET project and .NET is not included.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var rv = TestSelection.IsEnabled (project.Label);
|
||||
MainLog.WriteLine ($"Including {project.Name} with label {project.Label.ToString ()}: {rv}");
|
||||
return rv;
|
||||
|
@ -154,7 +149,7 @@ namespace Xharness.Jenkins {
|
|||
TestName = "Xtro",
|
||||
Target = "dotnet-wrench",
|
||||
WorkingDirectory = Path.Combine (HarnessConfiguration.RootDirectory, "xtro-sharpie"),
|
||||
Ignored = !(TestSelection.IsEnabled (TestLabel.Xtro) && TestSelection.IsEnabled (PlatformLabel.Dotnet)),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Xtro),
|
||||
Timeout = TimeSpan.FromMinutes (15),
|
||||
SupportsParallelExecution = false,
|
||||
};
|
||||
|
@ -183,7 +178,7 @@ namespace Xharness.Jenkins {
|
|||
Platform = TestPlatform.iOS,
|
||||
TestName = "Generator tests",
|
||||
Mode = ".NET",
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator) || !TestSelection.IsEnabled (PlatformLabel.Dotnet),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator),
|
||||
};
|
||||
Tasks.Add (runDotNetGenerator);
|
||||
|
||||
|
@ -201,7 +196,7 @@ namespace Xharness.Jenkins {
|
|||
Platform = TestPlatform.iOS,
|
||||
TestName = "Roslyn Generator tests",
|
||||
Mode = ".NET",
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator) || !TestSelection.IsEnabled (PlatformLabel.Dotnet),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator),
|
||||
};
|
||||
Tasks.Add (runDotNetRoslynGenerator);
|
||||
|
||||
|
@ -219,7 +214,7 @@ namespace Xharness.Jenkins {
|
|||
Platform = TestPlatform.iOS,
|
||||
TestName = "Roslyn Analyzer tests",
|
||||
Mode = ".NET",
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator) || !TestSelection.IsEnabled (PlatformLabel.Dotnet),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.Generator),
|
||||
};
|
||||
Tasks.Add (runDotNetRoslynAnalyzer);
|
||||
|
||||
|
@ -238,7 +233,7 @@ namespace Xharness.Jenkins {
|
|||
TestName = "DotNet tests",
|
||||
Filter = "Category!=Windows",
|
||||
Timeout = TimeSpan.FromMinutes (360),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.DotnetTest) || !TestSelection.IsEnabled (PlatformLabel.Dotnet),
|
||||
Ignored = !TestSelection.IsEnabled (TestLabel.DotnetTest),
|
||||
};
|
||||
Tasks.Add (runDotNetTests);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ namespace Xharness.Jenkins {
|
|||
Platform = TestPlatform.iOS,
|
||||
TestName = "Cecil-based tests",
|
||||
Timeout = TimeSpan.FromMinutes (10),
|
||||
Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Cecil) || !jenkins.TestSelection.IsEnabled (PlatformLabel.Dotnet),
|
||||
Ignored = !jenkins.TestSelection.IsEnabled (TestLabel.Cecil),
|
||||
};
|
||||
yield return runCecilTests;
|
||||
|
||||
|
|
|
@ -22,8 +22,7 @@ namespace Xharness.Jenkins {
|
|||
PlatformLabel.tvOS |
|
||||
PlatformLabel.iOS |
|
||||
PlatformLabel.iOSSimulator |
|
||||
PlatformLabel.MacCatalyst |
|
||||
PlatformLabel.Dotnet;
|
||||
PlatformLabel.MacCatalyst;
|
||||
|
||||
public bool ForceExtensionBuildOnly { get; set; }
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ namespace Xharness.Jenkins.TestTasks {
|
|||
}
|
||||
}
|
||||
|
||||
public override async Task RunTestAsync ()
|
||||
public override Task RunTestAsync ()
|
||||
{
|
||||
throw new NotSupportedException ("Legacy projects not supported anymore");
|
||||
}
|
||||
|
|
|
@ -274,8 +274,6 @@ namespace Xharness.Jenkins {
|
|||
clone.Xml.Save (clone.Path);
|
||||
});
|
||||
|
||||
ignored |= clone.IsDotNetProject && !jenkins.TestSelection.IsEnabled (PlatformLabel.Dotnet);
|
||||
|
||||
var build = new MSBuildTask (jenkins: jenkins, testProject: clone, processManager: processManager);
|
||||
build.ProjectConfiguration = configuration;
|
||||
build.ProjectPlatform = task.ProjectPlatform;
|
||||
|
|
|
@ -97,8 +97,7 @@ namespace Xharness {
|
|||
[Label ("tvos")]
|
||||
tvOS = 1 << 10,
|
||||
// 1 << 11 is unused
|
||||
[Label ("dotnet")]
|
||||
Dotnet = 1 << 12,
|
||||
// 1 << 12 is unused
|
||||
// 1 << 13 is unused
|
||||
[Label ("all")]
|
||||
All = 0xFFFFFFFF,
|
||||
|
|
|
@ -24,12 +24,4 @@ endif
|
|||
|
||||
SUBDIRS+=mlaunch siminstaller
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
SUBDIRS += nnyeah
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef ENABLE_DOTNET
|
||||
SUBDIRS += dotnet-linker
|
||||
endif
|
||||
|
|
|
@ -1689,8 +1689,6 @@ namespace Xamarin.Bundler {
|
|||
return ProductConstants.iOS;
|
||||
case ApplePlatform.TVOS:
|
||||
return ProductConstants.tvOS;
|
||||
case ApplePlatform.WatchOS:
|
||||
return ProductConstants.watchOS;
|
||||
case ApplePlatform.MacOSX:
|
||||
return ProductConstants.macOS;
|
||||
default:
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
$(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP)/Make.config $(TOP)/Make.versions
|
||||
$(Q_GEN) sed \
|
||||
-e 's/@IOS_SDK_VERSION@/$(IOS_SDK_VERSION)/g' -e 's/@WATCHOS_SDK_VERSION@/$(WATCH_SDK_VERSION)/' -e 's/@TVOS_SDK_VERSION@/$(TVOS_SDK_VERSION)/' -e 's/@MACOS_SDK_VERSION@/$(MACOS_SDK_VERSION)/' \
|
||||
-e 's/@IOS_SDK_VERSION@/$(IOS_SDK_VERSION)/g' -e 's/@TVOS_SDK_VERSION@/$(TVOS_SDK_VERSION)/' -e 's/@MACOS_SDK_VERSION@/$(MACOS_SDK_VERSION)/' \
|
||||
-e 's/@MACCATALYST_SDK_VERSION@/$(MACCATALYST_SDK_VERSION)/g' \
|
||||
\
|
||||
-e 's/@MIN_IOS_SDK_VERSION@/$(MIN_IOS_SDK_VERSION)/g' \
|
||||
-e 's/@MIN_WATCHOS_SDK_VERSION@/$(MIN_WATCHOS_SDK_VERSION)/' \
|
||||
-e 's/@MIN_TVOS_SDK_VERSION@/$(MIN_TVOS_SDK_VERSION)/' \
|
||||
-e 's/@MIN_MACOS_SDK_VERSION@/$(MIN_MACOS_SDK_VERSION)/' \
|
||||
-e 's/@MIN_MACCATALYST_SDK_VERSION@/$(MIN_MACCATALYST_SDK_VERSION)/g' \
|
||||
|
@ -19,15 +18,11 @@ $(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP)
|
|||
-e 's/@XCODE_VERSION@/$(XCODE_VERSION)/g' \
|
||||
-e 's/@MIN_XM_MONO_VERSION@/$(MIN_XM_MONO_VERSION)/g' \
|
||||
-e 's/@MIN_IOS_SIMULATOR_VERSION@/$(MIN_IOS_SIMULATOR_VERSION)/g' \
|
||||
-e 's/@MIN_WATCHOS_SIMULATOR_VERSION@/$(MIN_WATCHOS_SIMULATOR_VERSION)/' \
|
||||
-e 's/@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@/$(MIN_WATCHOS_COMPANION_SIMULATOR_VERSION)/' \
|
||||
-e 's/@MIN_TVOS_SIMULATOR_VERSION@/$(MIN_TVOS_SIMULATOR_VERSION)/' \
|
||||
-e "s/@MAX_IOS_SIMULATOR_VERSION@/$(MAX_IOS_SIMULATOR_VERSION)/g" \
|
||||
-e "s/@MAX_MACOS_VERSION@/$(MAX_MACOS_VERSION)/g" \
|
||||
-e "s/@MAX_WATCH_SIMULATOR_VERSION@/$(MAX_WATCH_SIMULATOR_VERSION)/g" \
|
||||
-e "s/@MAX_TVOS_SIMULATOR_VERSION@/$(MAX_TVOS_SIMULATOR_VERSION)/g" \
|
||||
-e "s/@MAX_IOS_DEPLOYMENT_TARGET@/$(MAX_IOS_DEPLOYMENT_TARGET)/g" \
|
||||
-e "s/@MAX_WATCH_DEPLOYMENT_TARGET@/$(MAX_WATCH_DEPLOYMENT_TARGET)/g" \
|
||||
-e "s/@MAX_TVOS_DEPLOYMENT_TARGET@/$(MAX_TVOS_DEPLOYMENT_TARGET)/g" \
|
||||
\
|
||||
-e "s/@IOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \
|
||||
|
@ -40,11 +35,6 @@ $(abspath ../common/SdkVersions.cs): ../common/SdkVersions.in.cs Makefile $(TOP)
|
|||
-e "s/@TVOS_NUGET_VERSION@/$(TVOS_NUGET_VERSION)/g" \
|
||||
-e "s/@TVOS_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$(TVOS_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g" \
|
||||
\
|
||||
-e "s/@WATCHOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \
|
||||
-e 's/@WATCHOS_REVISION@/$(IOS_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \
|
||||
-e "s/@WATCHOS_NUGET_VERSION@/$(WATCHOS_NUGET_VERSION)/g" \
|
||||
-e "s/@WATCHOS_NUGET_REVISION@/$(NUGET_PRERELEASE_IDENTIFIER)$(WATCHOS_NUGET_COMMIT_DISTANCE)$(NUGET_BUILD_METADATA)/g" \
|
||||
\
|
||||
-e "s/@MACOS_VERSION@/$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR).$(MAC_PACKAGE_VERSION_REV)/g" \
|
||||
-e 's/@MACOS_REVISION@/$(MAC_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g' \
|
||||
-e "s/@MACOS_NUGET_VERSION@/$(MACOS_NUGET_VERSION)/g" \
|
||||
|
@ -72,7 +62,6 @@ $(abspath ../common/ProductConstants.cs): ../common/ProductConstants.in.cs Makef
|
|||
$(Q_GEN) sed \
|
||||
-e "s/@IOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \
|
||||
-e "s/@TVOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \
|
||||
-e "s/@WATCHOS_VERSION@/$(IOS_PACKAGE_VERSION_MAJOR).$(IOS_PACKAGE_VERSION_MINOR).$(IOS_PACKAGE_VERSION_REV)/g" \
|
||||
-e "s/@MACOS_VERSION@/$(MAC_PACKAGE_VERSION_MAJOR).$(MAC_PACKAGE_VERSION_MINOR).$(MAC_PACKAGE_VERSION_REV)/g" \
|
||||
\
|
||||
$(foreach platform,$(DOTNET_PLATFORMS_UPPERCASE),-e 's/@$(platform)_REVISION@/$($(platform)_COMMIT_DISTANCE) ($(CURRENT_BRANCH_SED_ESCAPED): $(CURRENT_HASH))/g') \
|
||||
|
|
|
@ -23,12 +23,10 @@ namespace Xamarin {
|
|||
#if BUNDLER
|
||||
public readonly static ProductConstants iOS = new ProductConstants ("@IOS_NUGET_VERSION@", "@IOS_NUGET_REVISION@");
|
||||
public readonly static ProductConstants tvOS = new ProductConstants ("@TVOS_NUGET_VERSION@", "@TVOS_NUGET_REVISION@");
|
||||
public readonly static ProductConstants watchOS = new ProductConstants ("@WATCHOS_NUGET_VERSION@", "@WATCHOS_NUGET_REVISION@");
|
||||
public readonly static ProductConstants macOS = new ProductConstants ("@MACOS_NUGET_VERSION@", "@MACOS_NUGET_REVISION@");
|
||||
#else
|
||||
public readonly static ProductConstants iOS = new ProductConstants ("@IOS_VERSION@", "@IOS_REVISION@");
|
||||
public readonly static ProductConstants tvOS = new ProductConstants ("@TVOS_VERSION@", "@TVOS_REVISION@");
|
||||
public readonly static ProductConstants watchOS = new ProductConstants ("@WATCHOS_VERSION@", "@WATCHOS_REVISION@");
|
||||
public readonly static ProductConstants macOS = new ProductConstants ("@MACOS_VERSION@", "@MACOS_REVISION@");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -17,22 +17,13 @@ namespace Xamarin {
|
|||
public const string Xcode = "16.1";
|
||||
public const string OSX = "15.1";
|
||||
public const string iOS = "18.1";
|
||||
public const string WatchOS = "11.1";
|
||||
public const string TVOS = "18.1";
|
||||
public const string MacCatalyst = "18.1";
|
||||
|
||||
#if NET
|
||||
public const string MinOSX = "12.0";
|
||||
public const string MiniOS = "12.2";
|
||||
public const string MinTVOS = "12.2";
|
||||
public const string MinMacCatalyst = "15.0";
|
||||
#else
|
||||
public const string MinOSX = "12.0";
|
||||
public const string MiniOS = "12.2";
|
||||
public const string MinWatchOS = "4.0";
|
||||
public const string MinTVOS = "12.2";
|
||||
public const string MinMacCatalyst = "15.0";
|
||||
#endif
|
||||
|
||||
public const string DotNetMinOSX = "12.0";
|
||||
public const string DotNetMiniOS = "12.2";
|
||||
|
@ -40,21 +31,15 @@ namespace Xamarin {
|
|||
public const string DotNetMinMacCatalyst = "15.0";
|
||||
public const string LegacyMinOSX = "12.0";
|
||||
public const string LegacyMiniOS = "12.2";
|
||||
public const string LegacyMinWatchOS = "4.0";
|
||||
public const string LegacyMinTVOS = "12.2";
|
||||
|
||||
public const string MiniOSSimulator = "15.0";
|
||||
public const string MinWatchOSSimulator = "8.0";
|
||||
public const string MinWatchOSCompanionSimulator = "15.0";
|
||||
public const string MinTVOSSimulator = "15.0";
|
||||
|
||||
public const string MaxiOSSimulator = "18.1";
|
||||
public const string MaxWatchOSSimulator = "11.1";
|
||||
public const string MaxWatchOSCompanionSimulator = "18.1";
|
||||
public const string MaxTVOSSimulator = "18.1";
|
||||
|
||||
public const string MaxiOSDeploymentTarget = "18.1";
|
||||
public const string MaxWatchDeploymentTarget = "11.1";
|
||||
public const string MaxTVOSDeploymentTarget = "18.1";
|
||||
|
||||
public const string TargetPlatformVersionExecutableiOS = "18.1";
|
||||
|
@ -69,30 +54,21 @@ namespace Xamarin {
|
|||
|
||||
public static Version OSXVersion { get { return new Version (OSX); } }
|
||||
public static Version iOSVersion { get { return new Version (iOS); } }
|
||||
public static Version WatchOSVersion { get { return new Version (WatchOS); } }
|
||||
public static Version TVOSVersion { get { return new Version (TVOS); } }
|
||||
public static Version MacCatalystVersion { get { return new Version (MacCatalyst); } }
|
||||
|
||||
public static Version iOSTargetVersion { get { return new Version (MaxiOSDeploymentTarget); } }
|
||||
public static Version WatchOSTargetVersion { get { return new Version (MaxWatchDeploymentTarget); } }
|
||||
public static Version TVOSTargetVersion { get { return new Version (MaxTVOSDeploymentTarget); } }
|
||||
|
||||
public static Version MinOSXVersion { get { return new Version (MinOSX); } }
|
||||
public static Version MiniOSVersion { get { return new Version (MiniOS); } }
|
||||
#if !NET
|
||||
public static Version MinWatchOSVersion { get { return new Version (MinWatchOS); } }
|
||||
#endif
|
||||
public static Version MinTVOSVersion { get { return new Version (MinTVOS); } }
|
||||
public static Version MinMacCatalystVersion { get { return new Version (MinMacCatalyst); } }
|
||||
|
||||
public static Version MiniOSSimulatorVersion { get { return new Version (MiniOSSimulator); } }
|
||||
public static Version MinWatchOSSimulatorVersion { get { return new Version (MinWatchOSSimulator); } }
|
||||
public static Version MinWatchOSCompanionSimulatorVersion { get { return new Version (MinWatchOSCompanionSimulator); } }
|
||||
public static Version MinTVOSSimulatorVersion { get { return new Version (MinTVOSSimulator); } }
|
||||
|
||||
public static Version MaxiOSSimulatorVersion { get { return new Version (MaxiOSSimulator); } }
|
||||
public static Version MaxWatchOSSimulatorVersion { get { return new Version (MaxWatchOSSimulator); } }
|
||||
public static Version MaxWatchOSCompanionSimulatorVersion { get { return new Version (MaxWatchOSCompanionSimulator); } }
|
||||
public static Version MaxTVOSSimulatorVersion { get { return new Version (MaxTVOSSimulator); } }
|
||||
|
||||
public static Version XcodeVersion { get { return new Version (Xcode); } }
|
||||
|
@ -103,7 +79,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSVersion;
|
||||
case ApplePlatform.TVOS: return TVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MacCatalystVersion;
|
||||
default:
|
||||
|
@ -116,7 +91,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSTargetVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSTargetVersion;
|
||||
case ApplePlatform.TVOS: return TVOSTargetVersion;
|
||||
default:
|
||||
throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform, app.ProductName);
|
||||
|
@ -128,9 +102,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return MinOSXVersion;
|
||||
case ApplePlatform.iOS: return MiniOSVersion;
|
||||
#if !NET
|
||||
case ApplePlatform.WatchOS: return MinWatchOSVersion;
|
||||
#endif
|
||||
case ApplePlatform.TVOS: return MinTVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MinMacCatalystVersion;
|
||||
default:
|
||||
|
@ -144,7 +115,6 @@ namespace Xamarin {
|
|||
switch (platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSVersion;
|
||||
case ApplePlatform.TVOS: return TVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MacCatalystVersion;
|
||||
default:
|
||||
|
@ -157,9 +127,6 @@ namespace Xamarin {
|
|||
switch (platform) {
|
||||
case ApplePlatform.MacOSX: return MinOSXVersion;
|
||||
case ApplePlatform.iOS: return MiniOSVersion;
|
||||
#if !NET
|
||||
case ApplePlatform.WatchOS: return MinWatchOSVersion;
|
||||
#endif
|
||||
case ApplePlatform.TVOS: return MinTVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MinMacCatalystVersion;
|
||||
default:
|
||||
|
|
|
@ -17,22 +17,13 @@ namespace Xamarin {
|
|||
public const string Xcode = "@XCODE_VERSION@";
|
||||
public const string OSX = "@MACOS_SDK_VERSION@";
|
||||
public const string iOS = "@IOS_SDK_VERSION@";
|
||||
public const string WatchOS = "@WATCHOS_SDK_VERSION@";
|
||||
public const string TVOS = "@TVOS_SDK_VERSION@";
|
||||
public const string MacCatalyst = "@MACCATALYST_SDK_VERSION@";
|
||||
|
||||
#if NET
|
||||
public const string MinOSX = "@DOTNET_MIN_MACOS_SDK_VERSION@";
|
||||
public const string MiniOS = "@DOTNET_MIN_IOS_SDK_VERSION@";
|
||||
public const string MinTVOS = "@DOTNET_MIN_TVOS_SDK_VERSION@";
|
||||
public const string MinMacCatalyst = "@DOTNET_MIN_MACCATALYST_SDK_VERSION@";
|
||||
#else
|
||||
public const string MinOSX = "@MIN_MACOS_SDK_VERSION@";
|
||||
public const string MiniOS = "@MIN_IOS_SDK_VERSION@";
|
||||
public const string MinWatchOS = "@MIN_WATCHOS_SDK_VERSION@";
|
||||
public const string MinTVOS = "@MIN_TVOS_SDK_VERSION@";
|
||||
public const string MinMacCatalyst = "@MIN_MACCATALYST_SDK_VERSION@";
|
||||
#endif
|
||||
|
||||
public const string DotNetMinOSX = "@DOTNET_MIN_MACOS_SDK_VERSION@";
|
||||
public const string DotNetMiniOS = "@DOTNET_MIN_IOS_SDK_VERSION@";
|
||||
|
@ -40,21 +31,15 @@ namespace Xamarin {
|
|||
public const string DotNetMinMacCatalyst = "@DOTNET_MIN_MACCATALYST_SDK_VERSION@";
|
||||
public const string LegacyMinOSX = "@MIN_MACOS_SDK_VERSION@";
|
||||
public const string LegacyMiniOS = "@MIN_IOS_SDK_VERSION@";
|
||||
public const string LegacyMinWatchOS = "@MIN_WATCHOS_SDK_VERSION@";
|
||||
public const string LegacyMinTVOS = "@MIN_TVOS_SDK_VERSION@";
|
||||
|
||||
public const string MiniOSSimulator = "@MIN_IOS_SIMULATOR_VERSION@";
|
||||
public const string MinWatchOSSimulator = "@MIN_WATCHOS_SIMULATOR_VERSION@";
|
||||
public const string MinWatchOSCompanionSimulator = "@MIN_WATCHOS_COMPANION_SIMULATOR_VERSION@";
|
||||
public const string MinTVOSSimulator = "@MIN_TVOS_SIMULATOR_VERSION@";
|
||||
|
||||
public const string MaxiOSSimulator = "@MAX_IOS_SIMULATOR_VERSION@";
|
||||
public const string MaxWatchOSSimulator = "@MAX_WATCH_SIMULATOR_VERSION@";
|
||||
public const string MaxWatchOSCompanionSimulator = "@MAX_IOS_SIMULATOR_VERSION@";
|
||||
public const string MaxTVOSSimulator = "@MAX_TVOS_SIMULATOR_VERSION@";
|
||||
|
||||
public const string MaxiOSDeploymentTarget = "@MAX_IOS_DEPLOYMENT_TARGET@";
|
||||
public const string MaxWatchDeploymentTarget = "@MAX_WATCH_DEPLOYMENT_TARGET@";
|
||||
public const string MaxTVOSDeploymentTarget = "@MAX_TVOS_DEPLOYMENT_TARGET@";
|
||||
|
||||
public const string TargetPlatformVersionExecutableiOS = "@TARGET_PLATFORM_VERSION_EXECUTABLE_IOS@";
|
||||
|
@ -69,30 +54,21 @@ namespace Xamarin {
|
|||
|
||||
public static Version OSXVersion { get { return new Version (OSX); } }
|
||||
public static Version iOSVersion { get { return new Version (iOS); } }
|
||||
public static Version WatchOSVersion { get { return new Version (WatchOS); } }
|
||||
public static Version TVOSVersion { get { return new Version (TVOS); } }
|
||||
public static Version MacCatalystVersion { get { return new Version (MacCatalyst); } }
|
||||
|
||||
public static Version iOSTargetVersion { get { return new Version (MaxiOSDeploymentTarget); } }
|
||||
public static Version WatchOSTargetVersion { get { return new Version (MaxWatchDeploymentTarget); } }
|
||||
public static Version TVOSTargetVersion { get { return new Version (MaxTVOSDeploymentTarget); } }
|
||||
|
||||
public static Version MinOSXVersion { get { return new Version (MinOSX); } }
|
||||
public static Version MiniOSVersion { get { return new Version (MiniOS); } }
|
||||
#if !NET
|
||||
public static Version MinWatchOSVersion { get { return new Version (MinWatchOS); } }
|
||||
#endif
|
||||
public static Version MinTVOSVersion { get { return new Version (MinTVOS); } }
|
||||
public static Version MinMacCatalystVersion { get { return new Version (MinMacCatalyst); } }
|
||||
|
||||
public static Version MiniOSSimulatorVersion { get { return new Version (MiniOSSimulator); } }
|
||||
public static Version MinWatchOSSimulatorVersion { get { return new Version (MinWatchOSSimulator); } }
|
||||
public static Version MinWatchOSCompanionSimulatorVersion { get { return new Version (MinWatchOSCompanionSimulator); } }
|
||||
public static Version MinTVOSSimulatorVersion { get { return new Version (MinTVOSSimulator); } }
|
||||
|
||||
public static Version MaxiOSSimulatorVersion { get { return new Version (MaxiOSSimulator); } }
|
||||
public static Version MaxWatchOSSimulatorVersion { get { return new Version (MaxWatchOSSimulator); } }
|
||||
public static Version MaxWatchOSCompanionSimulatorVersion { get { return new Version (MaxWatchOSCompanionSimulator); } }
|
||||
public static Version MaxTVOSSimulatorVersion { get { return new Version (MaxTVOSSimulator); } }
|
||||
|
||||
public static Version XcodeVersion { get { return new Version (Xcode); } }
|
||||
|
@ -103,7 +79,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSVersion;
|
||||
case ApplePlatform.TVOS: return TVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MacCatalystVersion;
|
||||
default:
|
||||
|
@ -116,7 +91,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSTargetVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSTargetVersion;
|
||||
case ApplePlatform.TVOS: return TVOSTargetVersion;
|
||||
default:
|
||||
throw ErrorHelper.CreateError (71, "Unknown platform: {0}. This usually indicates a bug in {1}; please file a bug report at https://github.com/xamarin/xamarin-macios/issues/new with a test case.", app.Platform, app.ProductName);
|
||||
|
@ -128,9 +102,6 @@ namespace Xamarin {
|
|||
switch (app.Platform) {
|
||||
case ApplePlatform.MacOSX: return MinOSXVersion;
|
||||
case ApplePlatform.iOS: return MiniOSVersion;
|
||||
#if !NET
|
||||
case ApplePlatform.WatchOS: return MinWatchOSVersion;
|
||||
#endif
|
||||
case ApplePlatform.TVOS: return MinTVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MinMacCatalystVersion;
|
||||
default:
|
||||
|
@ -144,7 +115,6 @@ namespace Xamarin {
|
|||
switch (platform) {
|
||||
case ApplePlatform.MacOSX: return OSXVersion;
|
||||
case ApplePlatform.iOS: return iOSVersion;
|
||||
case ApplePlatform.WatchOS: return WatchOSVersion;
|
||||
case ApplePlatform.TVOS: return TVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MacCatalystVersion;
|
||||
default:
|
||||
|
@ -157,9 +127,6 @@ namespace Xamarin {
|
|||
switch (platform) {
|
||||
case ApplePlatform.MacOSX: return MinOSXVersion;
|
||||
case ApplePlatform.iOS: return MiniOSVersion;
|
||||
#if !NET
|
||||
case ApplePlatform.WatchOS: return MinWatchOSVersion;
|
||||
#endif
|
||||
case ApplePlatform.TVOS: return MinTVOSVersion;
|
||||
case ApplePlatform.MacCatalyst: return MinMacCatalystVersion;
|
||||
default:
|
||||
|
|
|
@ -5,8 +5,6 @@ TestConfiguration unit tests.
|
|||
$ScriptDir = Split-Path -parent $MyInvocation.MyCommand.Path
|
||||
Import-Module $ScriptDir/TestConfiguration.psm1 -Force
|
||||
|
||||
$Env:CONFIGURE_PLATFORMS_INCLUDE_XAMARIN_LEGACY = "1"
|
||||
|
||||
Describe 'Get-TestConfiguration' {
|
||||
BeforeAll {
|
||||
$TestConfigurations = @"
|
||||
|
|
|
@ -18,7 +18,7 @@ Describe "TestResults tests" {
|
|||
{
|
||||
"dotnettests_ios": {
|
||||
"LABEL": "dotnettests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"LABEL_WITH_PLATFORM": "dotnettests_iOS",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - dotnettests - iOS",
|
||||
"TEST_simulator_tests": "simulator_dotnettests_ios",
|
||||
|
@ -27,7 +27,7 @@ Describe "TestResults tests" {
|
|||
},
|
||||
"dotnettests_tvos": {
|
||||
"LABEL": "dotnettests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"LABEL_WITH_PLATFORM": "dotnettests_tvOS",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - dotnettests - tvOS",
|
||||
"TEST_simulator_tests": "simulator_dotnettests_tvos",
|
||||
|
@ -36,7 +36,7 @@ Describe "TestResults tests" {
|
|||
},
|
||||
"dotnettests_maccatalyst": {
|
||||
"LABEL": "dotnettests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"LABEL_WITH_PLATFORM": "dotnettests_MacCatalyst",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - dotnettests - MacCatalyst",
|
||||
"TEST_simulator_tests": "simulator_dotnettests_maccatalyst",
|
||||
|
@ -45,7 +45,7 @@ Describe "TestResults tests" {
|
|||
},
|
||||
"dotnettests_macos": {
|
||||
"LABEL": "dotnettests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"LABEL_WITH_PLATFORM": "dotnettests_macOS",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - dotnettests - macOS",
|
||||
"TEST_simulator_tests": "simulator_dotnettests_macos",
|
||||
|
@ -54,7 +54,7 @@ Describe "TestResults tests" {
|
|||
},
|
||||
"dotnettests_multiple": {
|
||||
"LABEL": "dotnettests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-dotnettests-tests",
|
||||
"LABEL_WITH_PLATFORM": "dotnettests_Multiple",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - dotnettests - Multiple",
|
||||
"TEST_simulator_tests": "simulator_dotnettests_multiple",
|
||||
|
@ -64,7 +64,7 @@ Describe "TestResults tests" {
|
|||
"cecil":
|
||||
{
|
||||
"LABEL": "cecil",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-64-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests,run-cecil-tests",
|
||||
"TESTS_LABELS": "--label=skip-all-tests,run-ios-64-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests,run-cecil-tests",
|
||||
"LABEL_WITH_PLATFORM": "cecil",
|
||||
"STATUS_CONTEXT": "VSTS: simulator tests - cecil",
|
||||
"TEST_simulator_tests": "simulator_cecil",
|
||||
|
|
|
@ -447,11 +447,6 @@ class BuildConfiguration {
|
|||
|
||||
$this.StoreParentBuildVariables($configuration)
|
||||
|
||||
# store if dotnet has been enabled
|
||||
$variableName = "ENABLE_DOTNET"
|
||||
$variableValue = [Environment]::GetEnvironmentVariable($variableName)
|
||||
$configuration | Add-Member -NotePropertyName $variableName -NotePropertyValue $variableValue
|
||||
|
||||
# For each .NET platform we support, add a INCLUDE_DOTNET_<platform> variable specifying whether that platform is enabled or not.
|
||||
$dotnetPlatforms = $configuration.DOTNET_PLATFORMS.Split(' ', [StringSplitOptions]::RemoveEmptyEntries)
|
||||
foreach ($platform in $dotnetPlatforms) {
|
||||
|
@ -483,24 +478,7 @@ class BuildConfiguration {
|
|||
}
|
||||
}
|
||||
|
||||
# store all the variables needed when classic xamarin has been enabled
|
||||
$configuration | Add-Member -NotePropertyName "INCLUDE_XAMARIN_LEGACY" -NotePropertyValue $Env:INCLUDE_XAMARIN_LEGACY
|
||||
|
||||
# if xamarin legacy has been included, check if we need to include the xamarin sdk for each of the platforms, otherewise it will be
|
||||
# false for all
|
||||
$xamarinPlatforms = @("ios", "macos", "tvos", "maccatalyst")
|
||||
if ($configuration.INCLUDE_XAMARIN_LEGACY -eq "true") {
|
||||
foreach ($platform in $xamarinPlatforms) {
|
||||
$variableName = "INCLUDE_LEGACY_$($platform.ToUpper())"
|
||||
$variableValue = [Environment]::GetEnvironmentVariable("$variableName")
|
||||
$configuration | Add-Member -NotePropertyName $variableName -NotePropertyValue $variableValue
|
||||
}
|
||||
} else {
|
||||
foreach ($platform in $xamarinPlatforms) {
|
||||
$variableName = "INCLUDE_LEGACY_$($platform.ToUpper())"
|
||||
$configuration | Add-Member -NotePropertyName $variableName -NotePropertyValue "false"
|
||||
}
|
||||
}
|
||||
|
||||
# add all the include platforms as well as the nuget os version
|
||||
foreach ($platform in $xamarinPlatforms) {
|
||||
|
|
|
@ -26,9 +26,6 @@ elif [[ "${LABELS_SKIP_ALL_TESTS:-}" == "True" ]]; then
|
|||
elif [[ "${CONFIGURE_PLATFORMS_INCLUDE_DOTNET_MACOS:-}" != "" ]]; then
|
||||
# Run mac tests if a .NET desktop platform is enabled
|
||||
RUN_MAC_TESTS=true
|
||||
elif [[ "${CONFIGURE_PLATFORMS_INCLUDE_LEGACY_MAC:-}" != "" ]]; then
|
||||
# Run mac tests if a legacy desktop platform is enabled
|
||||
RUN_MAC_TESTS=true
|
||||
else
|
||||
# Otherwise don't run mac tests
|
||||
RUN_MAC_TESTS=false
|
||||
|
|
|
@ -13,13 +13,6 @@ DOTNET_PLATFORMS=$(cat "$FILE")
|
|||
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=ALL_DOTNET_PLATFORMS
|
||||
ALL_DOTNET_PLATFORMS=$(cat "$FILE")
|
||||
|
||||
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=ENABLE_DOTNET
|
||||
ENABLE_DOTNET=$(cat "$FILE")
|
||||
|
||||
|
||||
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_XAMARIN_LEGACY
|
||||
INCLUDE_XAMARIN_LEGACY=$(cat "$FILE")
|
||||
|
||||
make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable-value-to-file FILE="$FILE" VARIABLE=INCLUDE_IOS
|
||||
INCLUDE_IOS=$(cat "$FILE")
|
||||
|
||||
|
@ -47,7 +40,6 @@ MACCATALYST_NUGET_OS_VERSION=$(cat "$FILE")
|
|||
# print it out, so turn off echoing since that confuses Azure DevOps
|
||||
set +x
|
||||
|
||||
echo "##vso[task.setvariable variable=ENABLE_DOTNET;isOutput=true]$ENABLE_DOTNET"
|
||||
echo "##vso[task.setvariable variable=DOTNET_PLATFORMS;isOutput=true]$DOTNET_PLATFORMS"
|
||||
DISABLED_DOTNET_PLATFORMS=" $ALL_DOTNET_PLATFORMS "
|
||||
for platform in $DOTNET_PLATFORMS; do
|
||||
|
@ -88,17 +80,6 @@ for platform in $DISABLED_DOTNET_PLATFORMS; do
|
|||
echo "##vso[task.setvariable variable=INCLUDE_DOTNET_$PLATFORM_UPPER;isOutput=true]"
|
||||
done
|
||||
|
||||
echo "##vso[task.setvariable variable=INCLUDE_XAMARIN_LEGACY;isOutput=true]$INCLUDE_XAMARIN_LEGACY"
|
||||
if test -n "$INCLUDE_XAMARIN_LEGACY"; then
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_IOS;isOutput=true]$INCLUDE_IOS"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_TVOS;isOutput=true]$INCLUDE_TVOS"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_MAC;isOutput=true]$INCLUDE_MAC"
|
||||
else
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_IOS;isOutput=true]"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_TVOS;isOutput=true]"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_LEGACY_MAC;isOutput=true]"
|
||||
fi
|
||||
|
||||
echo "##vso[task.setvariable variable=INCLUDE_IOS;isOutput=true]$INCLUDE_IOS"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_TVOS;isOutput=true]$INCLUDE_TVOS"
|
||||
echo "##vso[task.setvariable variable=INCLUDE_MAC;isOutput=true]$INCLUDE_MAC"
|
||||
|
|
|
@ -42,15 +42,6 @@ make global.json
|
|||
|
||||
make -C builds dotnet
|
||||
|
||||
# Check if .NET is even enabled
|
||||
# Note that we do this after downloading .NET, because we need .NET to build some of our tests that may contain legacy tests (such as the MSBuild tests).
|
||||
var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=ENABLE_DOTNET)
|
||||
ENABLE_DOTNET=${var#*=}
|
||||
if test -z "$ENABLE_DOTNET"; then
|
||||
echo "Not installing anything, because .NET is not enabled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
var=$(make -C "$BUILD_SOURCESDIRECTORY/xamarin-macios/tools/devops" print-variable VARIABLE=DOTNET)
|
||||
DOTNET=${var#*=}
|
||||
echo "Using dotnet found at $DOTNET"
|
||||
|
|
|
@ -67,7 +67,7 @@ stages:
|
|||
parameters:
|
||||
repositoryAlias: ${{ parameters.repositoryAlias }}
|
||||
commit: ${{ parameters.commit }}
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests'
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests'
|
||||
statusContext: 'VSTS: simulator tests'
|
||||
uploadArtifacts: true
|
||||
use1ES: false
|
||||
|
|
|
@ -42,8 +42,6 @@ jobs:
|
|||
timeoutInMinutes: 180
|
||||
variables:
|
||||
DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
|
||||
ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
|
||||
INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
|
||||
${{ if eq(parameters.pool, 'automatic') }}:
|
||||
AgentPoolComputed: $[ stageDependencies.configure_build.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
|
||||
${{ if eq(parameters.pool, 'ci') }}:
|
||||
|
|
|
@ -49,7 +49,7 @@ steps:
|
|||
# build nugets
|
||||
- bash: $(Build.SourcesDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/build-nugets.sh
|
||||
displayName: 'Build Nugets'
|
||||
condition: and(succeeded(), contains(variables['configuration.BuildNugets'], 'True'), ne(variables['ENABLE_DOTNET'], ''))
|
||||
condition: and(succeeded(), contains(variables['configuration.BuildNugets'], 'True'))
|
||||
timeoutInMinutes: 180
|
||||
|
||||
- bash: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/generate-workload-rollback.sh
|
||||
|
|
|
@ -42,16 +42,10 @@ jobs:
|
|||
timeoutInMinutes: 1000
|
||||
variables:
|
||||
DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
|
||||
ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
|
||||
INCLUDE_DOTNET_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ]
|
||||
INCLUDE_DOTNET_MACCATALYST: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ]
|
||||
INCLUDE_DOTNET_MACOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ]
|
||||
INCLUDE_DOTNET_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ]
|
||||
INCLUDE_LEGACY_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_IOS'] ]
|
||||
INCLUDE_LEGACY_MAC: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_MAC'] ]
|
||||
INCLUDE_LEGACY_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_TVOS'] ]
|
||||
INCLUDE_LEGACY_WATCH: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_WATCH'] ]
|
||||
INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
|
||||
${{ if eq(parameters.pool, 'automatic') }}:
|
||||
AgentPoolComputed: $[ stageDependencies.configure_build.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
|
||||
${{ if eq(parameters.pool, 'ci') }}:
|
||||
|
|
|
@ -155,23 +155,6 @@ parameters:
|
|||
- name: macTestsConfigurations
|
||||
type: object
|
||||
|
||||
- name: legacyPackageJobs
|
||||
type: object
|
||||
default: [
|
||||
{
|
||||
job: 'xamarin_ios_sign_notarize',
|
||||
name: 'Xamarin.iOS',
|
||||
pattern: 'xamarin.ios-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_IOS",
|
||||
},
|
||||
{
|
||||
job: 'xamarin_mac_sing_notarie',
|
||||
name: 'Xamarin.Mac',
|
||||
pattern: 'xamarin.mac-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_MAC",
|
||||
}
|
||||
]
|
||||
|
||||
- name: stageDisplayNamePrefix
|
||||
type: string
|
||||
default: ''
|
||||
|
@ -228,7 +211,7 @@ stages:
|
|||
commit: ${{ parameters.commit }}
|
||||
testConfigurations: ${{ parameters.testConfigurations }}
|
||||
supportedPlatforms: ${{ parameters.supportedPlatforms }}
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests'
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests'
|
||||
statusContext: 'VSTS: simulator tests'
|
||||
uploadArtifacts: true
|
||||
use1ES: true
|
||||
|
|
|
@ -119,7 +119,7 @@ stages:
|
|||
commit: HEAD
|
||||
testConfigurations: ${{ parameters.testConfigurations }}
|
||||
supportedPlatforms: ${{ parameters.supportedPlatforms }}
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests'
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests'
|
||||
statusContext: 'VSTS: simulator tests'
|
||||
uploadArtifacts: true
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ stages:
|
|||
commit: ${{ parameters.commit }}
|
||||
testConfigurations: ${{ parameters.testConfigurations }}
|
||||
supportedPlatforms: ${{ parameters.supportedPlatforms }}
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests'
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests'
|
||||
statusContext: 'VSTS: simulator tests'
|
||||
uploadArtifacts: true
|
||||
|
||||
|
|
|
@ -61,7 +61,6 @@ stages:
|
|||
artifactName: '${{ parameters.uploadPrefix }}not-signed-package'
|
||||
signType: Real
|
||||
usePipelineArtifactTasks: true
|
||||
condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
|
||||
setupSteps:
|
||||
- template: tools/devops/automation/templates/common/checkout.yml@${{ parameters.repositoryAlias }}
|
||||
parameters:
|
||||
|
@ -84,7 +83,6 @@ stages:
|
|||
propsArtifactName: ${{ parameters.uploadPrefix }}not-signed-package
|
||||
binlogsArtifactName: ${{ parameters.uploadPrefix }}nuget-msi-convert-binlogs
|
||||
signType: Real
|
||||
condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
|
||||
preConvertSteps:
|
||||
- pwsh: |
|
||||
New-Item "$(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/governance" -ItemType Directory -ea 0
|
||||
|
@ -122,8 +120,7 @@ stages:
|
|||
or(
|
||||
eq(dependencies.nuget_convert.result, 'Succeeded'),
|
||||
eq(dependencies.nuget_convert.result, 'SucceededWithIssues')
|
||||
),
|
||||
ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
|
||||
)
|
||||
)
|
||||
variables:
|
||||
- name: skipNugetSecurityAnalysis
|
||||
|
|
|
@ -202,7 +202,7 @@ stages:
|
|||
commit: ${{ parameters.commit }}
|
||||
testConfigurations: ${{ parameters.testConfigurations }}
|
||||
supportedPlatforms: ${{ parameters.supportedPlatforms }}
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-dotnet-tests,run-system-permission-tests'
|
||||
testsLabels: '--label=skip-all-tests,run-ios-tests,run-ios-simulator-tests,run-tvos-tests,run-mac-tests,run-maccatalyst-tests,run-system-permission-tests'
|
||||
statusContext: 'VSTS: simulator tests'
|
||||
uploadArtifacts: true
|
||||
|
||||
|
|
|
@ -56,7 +56,6 @@ stages:
|
|||
dependsOn:
|
||||
displayName: "Reserve macOS bot for tests"
|
||||
timeoutInMinutes: 120
|
||||
condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
|
||||
workspace:
|
||||
clean: all
|
||||
pool:
|
||||
|
@ -81,7 +80,6 @@ stages:
|
|||
- mac_reservation
|
||||
displayName: 'Dotnet tests'
|
||||
timeoutInMinutes: 120
|
||||
condition: and(succeeded(),ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],''))
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
|
@ -115,8 +113,7 @@ stages:
|
|||
- run_tests
|
||||
displayName: "Re-enable macOS bot for tests"
|
||||
timeoutInMinutes: 120
|
||||
# the condition must be exactly the same as for the mac_reservation job (or if no condition there, then 'always ()')
|
||||
condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
|
||||
condition: always()
|
||||
workspace:
|
||||
clean: all
|
||||
pool:
|
||||
|
|
|
@ -7,28 +7,12 @@ DOTNET_PLATFORMS_MOBILE=$(filter-out macOS MacCatalyst,$(DOTNET_PLATFORMS))
|
|||
|
||||
DOWNLOAD_STAMP_FILE=.download-$(MLAUNCH_NUGET_VERSION).stamp
|
||||
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_IOS
|
||||
TARGETS += $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGETS += $(foreach platform,$(DOTNET_PLATFORMS_MOBILE),$(DOTNET_DESTDIR)/Microsoft.$(platform).Sdk/tools/bin/mlaunch)
|
||||
|
||||
$(DOWNLOAD_STAMP_FILE):
|
||||
$(Q) $(DOTNET) restore download-mlaunch.csproj /bl:$@.binlog $(MSBUILD_VERBOSITY) /p:MlaunchNuGetVersion=$(MLAUNCH_NUGET_VERSION)
|
||||
$(Q) touch $@
|
||||
|
||||
$(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch: $(DOWNLOAD_STAMP_FILE)
|
||||
$(Q) rm -Rf $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch
|
||||
$(Q) rm -Rf $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mlaunch
|
||||
$(Q) mkdir -p $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/
|
||||
$(Q) mkdir -p $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/
|
||||
$(Q) $(CP) -R $(TOP)/packages/microsoft.tools.mlaunch/$(MLAUNCH_NUGET_VERSION)/mlaunch/bin/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/
|
||||
$(Q) $(CP) -R $(TOP)/packages/microsoft.tools.mlaunch/$(MLAUNCH_NUGET_VERSION)/mlaunch/lib/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/
|
||||
$(Q) chmod a+x $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch
|
||||
$(Q) chmod a+x $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch
|
||||
|
||||
define DotNetInstall
|
||||
$$(DOTNET_DESTDIR)/Microsoft.$(1).Sdk/tools/bin/mlaunch: $$(DOWNLOAD_STAMP_FILE)
|
||||
$$(Q) rm -rf $$(DOTNET_DESTDIR)/$($(1)_NUGET_SDK_NAME)/tools/bin/mlaunch
|
||||
|
@ -44,16 +28,8 @@ endef
|
|||
$(foreach platform,$(DOTNET_PLATFORMS_MOBILE),$(eval $(call DotNetInstall,$(platform))))
|
||||
|
||||
clean-local::
|
||||
ifdef INCLUDE_XAMARIN_LEGACY
|
||||
ifdef INCLUDE_IOS
|
||||
$(Q) rm -rf $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch
|
||||
$(Q) rm -rf $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mlaunch
|
||||
endif
|
||||
endif
|
||||
ifdef ENABLE_DOTNET
|
||||
$(Q) rm -rf $(foreach platform,$(DOTNET_PLATFORMS_MOBILE),$(DOTNET_DESTDIR)/$($(platform)_NUGET_SDK_NAME)/tools/bin/mlaunch)
|
||||
$(Q) rm -rf $(foreach platform,$(DOTNET_PLATFORMS_MOBILE),$(DOTNET_DESTDIR)/$($(platform)_NUGET_SDK_NAME)/tools/lib/mlaunch)
|
||||
endif
|
||||
$(Q) rm -rf .*.stamp obj .*.binlog
|
||||
|
||||
all-local:: $(TARGETS)
|
||||
|
|
Загрузка…
Ссылка в новой задаче