Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kyte <alexmkyte@gmail.com>2017-03-07 21:39:04 +0300
committerGitHub <noreply@github.com>2017-03-07 21:39:04 +0300
commit21c2ed435a5533719ee80647c7c3cae150e013c3 (patch)
tree9a35f0bbbedde8a3fefb47ec33048ccf1099956e
parent5aba8a05f147ab1d12414c8f072657531b1c97f1 (diff)
parent7a6fe84eaeb592c3b5ffa9f8cbcf4659f758e7a9 (diff)
Merge pull request #4482 from migueldeicaza/mono-4.8.0-branch
[4.8.0/mkbundle] Fixes the embedding of dependency assemblies + test
-rw-r--r--mcs/tools/mkbundle/Makefile5
-rwxr-xr-xmcs/tools/mkbundle/mkbundle.cs11
2 files changed, 8 insertions, 8 deletions
diff --git a/mcs/tools/mkbundle/Makefile b/mcs/tools/mkbundle/Makefile
index 64a1b9cbf92..886fc465336 100644
--- a/mcs/tools/mkbundle/Makefile
+++ b/mcs/tools/mkbundle/Makefile
@@ -24,10 +24,11 @@ test-simple: simple.exe
mono --debug $(the_lib) --cross default simple.exe -o foo && ./foo
mono --debug $(the_lib) --sdk `dirname \`which mono\``/.. simple.exe -o foo && ./foo
-rm DEMO.zip
- mono-package-runtime `dirname \`which mono\``/.. DEMO
+ $(topdir)/../scripts/mono-package-runtime `dirname \`which mono\``/.. DEMO
mkdir -p ~/.mono/targets/DEMO
unzip -d ~/.mono/targets/DEMO DEMO.zip
- mono --debug $(the_lib) --cross DEMO simple.exe -o foo && ./foo
+ mono --debug $(the_lib) --cross DEMO simple.exe -o foo | grep "Assembly.*mscorlib.dll"
+ ./foo
simple.exe: Makefile
echo 'class X { static void Main () { System.Console.WriteLine ("OK");}}' > simple.cs && mcs simple.cs
diff --git a/mcs/tools/mkbundle/mkbundle.cs b/mcs/tools/mkbundle/mkbundle.cs
index 603af9458a8..8ba098905c0 100755
--- a/mcs/tools/mkbundle/mkbundle.cs
+++ b/mcs/tools/mkbundle/mkbundle.cs
@@ -1082,14 +1082,14 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static void LoadLocalizedAssemblies (List<string> assemblies)
{
var other = i18n.Select (x => "I18N." + x + (x.Length > 0 ? "." : "") + "dll");
- bool error = false;
+ string error = null;
foreach (string name in other) {
try {
Assembly a = LoadAssembly (name);
if (a == null) {
- error = true;
+ error = "Failed to load " + name;
continue;
}
@@ -1105,8 +1105,8 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
}
}
- if (error) {
- Error ("Couldn't load one or more of the i18n assemblies.");
+ if (error != null) {
+ Error ("Couldn't load one or more of the i18n assemblies: " + error);
Environment.Exit (1);
}
}
@@ -1158,7 +1158,7 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
Assembly a = universe.LoadFile (path);
foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
- LoadAssembly (an.FullName);
+ a = universe.Load (an.FullName);
if (!QueueAssembly (files, a.CodeBase))
return false;
}
@@ -1220,7 +1220,6 @@ void mono_register_config_for_assembly (const char* assembly_name, cons
static void Error (string msg, params object [] args)
{
Console.Error.WriteLine ("ERROR: {0}", string.Format (msg, args));
- throw new Exception ();
Environment.Exit (1);
}