Skip to content

Commit

Permalink
Put a binary copy of mlaunch in macios-binaries instead of in Azure. F…
Browse files Browse the repository at this point in the history
…ixes dotnet#3316. (dotnet#3800)

* Put a binary copy of mlaunch in macios-binaries instead of in Azure. Fixes dotnet#3316.

If the Xamarin build is enabled, then build mlaunch from source, otherwise get it from macios-binaries.

Fixes dotnet#3316.

* Bump macios-binaries.

Commit list for xamarin/macios-binaries:

* xamarin/macios-binaries@69a9088 Bump mlaunch to xamarin/maccore@4505cd6f02 (dotnet#8)

Diff: xamarin/macios-binaries@e1e8bdf...69a9088
  • Loading branch information
rolfbjarne authored Mar 22, 2018
1 parent 371a1d5 commit e6c45c2
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 39 deletions.
2 changes: 1 addition & 1 deletion external/macios-binaries
Submodule macios-binaries updated 27 files
+7 −0 mlaunch/bin/mlaunch
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/Info.plist
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch
+20 −0 mlaunch/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch.dSYM/Contents/Info.plist
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MacOS/mlaunch.dSYM/Contents/Resources/DWARF/mlaunch
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Mono.Security.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Mono.Security.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Core.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Core.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Net.Http.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Net.Http.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Xml.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.Xml.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/System.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Xamarin.Hosting.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Xamarin.Hosting.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Xamarin.Mac.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Xamarin.Mac.dll.mdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/Xamarin.Mac.pdb
+15 −0 mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/config
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/libMonoPosixHelper.dylib
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/mlaunch.exe
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/mlaunch.pdb
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/mscorlib.dll
+ mlaunch/lib/mlaunch/mlaunch.app/Contents/MonoBundle/mscorlib.pdb
+1 −0 mlaunch/lib/mlaunch/mlaunch.app/Contents/PkgInfo
38 changes: 1 addition & 37 deletions tests/xharness/Harness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,45 +185,9 @@ public string MtouchPath {
}
}

string mlaunch;
public string MlaunchPath {
get {
if (mlaunch == null) {
// First check if we've built mlaunch locally.
var filename = Path.GetFullPath (Path.Combine (IOS_DESTDIR, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current", "bin", "mlaunch"));
if (File.Exists (filename)) {
Log ("Found mlaunch: {0}", filename);
Environment.SetEnvironmentVariable ("MLAUNCH_PATH", filename);
return mlaunch = filename;
}

// Then check if we can download mlaunch.
Log ("Could not find a locally built mlaunch, will try downloading it.");
try {
filename = DownloadMlaunch ();
} catch (Exception e) {
Log ("Could not download mlaunch: {0}", e);
}
if (File.Exists (filename)) {
Log ("Found mlaunch: {0}", filename);
Environment.SetEnvironmentVariable ("MLAUNCH_PATH", filename);
return mlaunch = filename;
}

// Then check if the system version of Xamarin.iOS has mlaunch.
// This may be a version of mlaunch we're not compatible with, since we don't control which XI version the system has.
Log ("Could not download mlaunch, will try the system's Xamarin.iOS.");
filename = "/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch";
if (File.Exists (filename)) {
Log ("Found mlaunch: {0}", filename);
Environment.SetEnvironmentVariable ("MLAUNCH_PATH", filename);
return mlaunch = filename;
}

throw new FileNotFoundException (string.Format ("Could not find mlaunch: {0}", filename));
}

return mlaunch;
return Path.Combine (IOS_DESTDIR, "Library", "Frameworks", "Xamarin.iOS.framework", "Versions", "Current", "bin", "mlaunch");
}
}

Expand Down
2 changes: 1 addition & 1 deletion tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TOP=..
SUBDIRS=mmp mtouch install-source
SUBDIRS=mmp mtouch install-source mlaunch
include $(TOP)/Make.config
30 changes: 30 additions & 0 deletions tools/mlaunch/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
TOP=../..

include $(TOP)/Make.config

COLOR_GREEN:=$(shell tput setaf 120 2>/dev/null)
COLOR_CLEAR:=$(shell tput sgr0 2>/dev/null)

ifdef ENABLE_XAMARIN
all-local install-local::
$(MAKE) -C $(MACCORE_PATH)/tools/mlaunch $@
else
all-local install-local::
$(Q) cp -R $(MACIOS_BINARIES_PATH)/mlaunch/bin/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin
$(Q) cp -R $(MACIOS_BINARIES_PATH)/mlaunch/lib/mlaunch $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib
endif

ifdef ENABLE_XAMARIN
publish:
$(Q) mkdir -p $(MACIOS_BINARIES_PATH)/mlaunch/bin
$(Q) mkdir -p $(MACIOS_BINARIES_PATH)/mlaunch/lib
$(Q) cp -R $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch $(MACIOS_BINARIES_PATH)/mlaunch/bin
$(Q) cp -R $(IOS_DESTDIR)/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mlaunch $(MACIOS_BINARIES_PATH)/mlaunch/lib
$(Q) cd $(MACIOS_BINARIES_PATH) && git add mlaunch && git commit -q -m "Bump mlaunch to xamarin/maccore@$(shell cd $(MACCORE_PATH) && git log -1 --pretty=%h)" && git log -1 --pretty=short
$(Q) echo "$(COLOR_GREEN)A new version of mlaunch has been copied to $(MACIOS_BINARIES_PATH), and a commit created with the new version.$(COLOR_CLEAR)"
$(Q) echo "$(COLOR_GREEN)Please create pull request in the macios-binaries repository for the new mlaunch version, and once merged, bump the submodule in xamarin-macios.$(COLOR_CLEAR)"
else
publish:
@echo "Can't publish mlaunch binaries to the macios-binaries repository unless building mlaunch from source (by enabling the xamarin build)"
@exit 1
endif
15 changes: 15 additions & 0 deletions tools/mlaunch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mlaunch
-------

mlaunch is a closed source tool used to interact with simulators and devices.

We'll build this tool from souce if the xamarin build is enabled (configured
with --enable-xamarin).

Otherwise we'll get a binary version from the macios-binaries repository. This
version may be somewhat out of date, but should work at least for running
tests.

To update the binary version of mlaunch in macios-binaries execute `make publish`
in this directory (when the xamarin build is enabled, so that mlaunch
is built from source).

0 comments on commit e6c45c2

Please sign in to comment.