This commit is contained in:
Rolf Bjarne Kvinge 2020-02-18 22:05:42 +01:00 коммит произвёл GitHub
Родитель 96d5d3e02b
Коммит 984374157c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 19 добавлений и 36 удалений

Просмотреть файл

@ -21,6 +21,20 @@ using ObjCRuntime;
namespace Xamarin.Bundler {
public partial class Driver {
public static int Main (string [] args)
{
try {
Console.OutputEncoding = new UTF8Encoding (false, false);
SetCurrentLanguage ();
return Main2 (args);
} catch (Exception e) {
ErrorHelper.Show (e);
} finally {
Watch ("Total time", 0);
}
return 0;
}
static void AddSharedOptions (Application app, Mono.Options.OptionSet options)
{
options.Add ("v|verbose", "Specify how verbose the output should be. This can be passed multiple times to increase the verbosity.", v => Verbosity++);

Просмотреть файл

@ -196,23 +196,7 @@ namespace Xamarin.Bundler {
get { return App.EnableDebug; }
}
public static int Main (string [] args)
{
try {
Console.OutputEncoding = new UTF8Encoding (false, false);
SetCurrentLanguage ();
Main2 (args);
}
catch (Exception e) {
ErrorHelper.Show (e);
}
finally {
Watch ("Total time", 0);
}
return 0;
}
static void Main2 (string [] args)
static int Main2 (string [] args)
{
var os = new OptionSet () {
{ "h|?|help", "Displays the help", v => action = Action.Help },
@ -387,11 +371,11 @@ namespace Xamarin.Bundler {
if (action == Action.Help || (args.Length == 0)) {
ShowHelp (os);
return;
return 0;
} else if (action == Action.Version) {
Console.Write ("mmp {0}.{1}", Constants.Version, Constants.Revision);
Console.WriteLine ();
return;
return 0;
}
bool force45From40UnifiedSystemFull = false;
@ -509,7 +493,7 @@ namespace Xamarin.Bundler {
if (action == Action.RunRegistrar) {
App.Registrar = RegistrarMode.Static;
App.RunRegistrar ();
return;
return 0;
}
try {
Pack (App.RootAssemblies);
@ -531,6 +515,7 @@ namespace Xamarin.Bundler {
}
Log ("bundling complete");
return 0;
}
static void ValidateXamarinMacReference ()

Просмотреть файл

@ -834,22 +834,6 @@ namespace Xamarin.Bundler
return result;
}
public static int Main (string [] args)
{
try {
Console.OutputEncoding = new UTF8Encoding (false, false);
SetCurrentLanguage ();
return Main2 (args);
}
catch (Exception e) {
ErrorHelper.Show (e);
}
finally {
Watch ("Total time", 0);
}
return 0;
}
static Application ParseArguments (string [] args, out Action a)
{
var action = Action.None;