public static async Task <int> Main(string[] args) { var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); var listener = new ConsoleMessageListener("HEAT", "heat.exe"); try { var program = new Program(); return(await program.Run(serviceProvider, listener, args)); } catch (WixException e) { listener.Write(e.Error); return(e.Error.Id); } catch (Exception e) { listener.Write(ErrorMessages.UnexpectedException(e)); if (e is NullReferenceException || e is SEHException) { throw; } return(e.HResult); } }
public static int Main(string[] args) { var serviceProvider = new WixToolsetServiceProvider(); var listener = new ConsoleMessageListener("WIX", "wix.exe"); try { var program = new Program(); return(program.Run(serviceProvider, listener, args)); } catch (WixException e) { listener.Write(e.Error); return(e.Error.Id); } catch (Exception e) { listener.Write(ErrorMessages.UnexpectedException(e.Message, e.GetType().ToString(), e.StackTrace)); if (e is NullReferenceException || e is SEHException) { throw; } return(e.HResult); } }
public static int Main(string[] args) { var serviceProvider = new WixToolsetServiceProvider(); var listener = new ConsoleMessageListener("WIX", "light.exe"); Light light = new Light(); return(light.Run(serviceProvider, listener, args)); }
public static int Main(string[] args) { var serviceProvider = new WixToolsetServiceProvider(); var listener = new ConsoleMessageListener("WIX", "wix.exe"); var program = new Program(); return(program.Run(serviceProvider, listener, args)); }
public static int Main(string[] args) { var serviceProvider = new WixToolsetServiceProvider(); var listener = new ConsoleMessageListener("WXCP", "wixcop.exe"); serviceProvider.AddService <IMessageListener>((x, y) => listener); serviceProvider.AddService <IWixCopCommandLineParser>((x, y) => new WixCopCommandLineParser(x)); var program = new Program(); return(program.Run(serviceProvider, args)); }
public static async Task <int> Main(string[] args) { var cts = new CancellationTokenSource(); var listener = new ConsoleMessageListener("WIX", "wix.exe"); Console.CancelKeyPress += (s, e) => { cts.Cancel(); e.Cancel = true; }; try { var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider() .AddWindowsInstallerBackend() .AddBundleBackend() .AddExtensionCacheManager() .AddConverter(); return(await Run(serviceProvider, listener, args, cts.Token)); } catch (OperationCanceledException) { return(-1); } catch (WixException e) { listener.Write(e.Error); return(e.Error.Id); } catch (Exception e) { listener.Write(ErrorMessages.UnexpectedException(e)); if (e is NullReferenceException || e is SEHException) { throw; } return(e.HResult); } }