private BootstrapperApplicationModel(BootstrapperApplication bootstrapperApplication) { this.BootstrapperApplication = bootstrapperApplication; this.hwnd = IntPtr.Zero; string[] strs = GetCommandLine(); }
public BootstrapperApplicationModel( BootstrapperApplication bootstrapperApplication) { this.BootstrapperApplication = bootstrapperApplication; this.hwnd = IntPtr.Zero; }
public MainViewModel( BootstrapperApplication installer, Engine engine, IViewModelsFactory <IOperationCompletedStepViewModel> completedStepVmFactory, IViewModelsFactory <IInstallationStepViewModel> installationStepVmFactory, NavigationManager navigationManager, IViewModelsFactory <IOperationProgressStepViewModel> progressStepVmFactory, IViewModelsFactory <IModificationStepViewModel> modificationStepVmFactory, IViewModelsFactory <ILayoutStepViewModel> layoutVmFactory) : this() { _completedStepVmFactory = completedStepVmFactory; _installationStepVmFactory = installationStepVmFactory; _navigationManager = navigationManager; _progressStepVmFactory = progressStepVmFactory; _modificationStepVmFactory = modificationStepVmFactory; _layoutVmFactory = layoutVmFactory; IsInitializing = true; PropertyChanged += OnPropertyChanged; Cancelled = false; _installer = installer; _engine = engine; if (_installer.Command.Display == Display.Passive || _installer.Command.Display == Display.Full) { OnUIThread(() => Application.Current.MainWindow.Closing += OnClosing); } SubscribeToInstallationEvents(); }
public void Initialize() { try { _installer = _container.Resolve <BootstrapperApplication>(); } catch { } RegisterViewsAndServices(); if (_installer == null || (_installer.Command.Display == Display.Passive || _installer.Command.Display == Display.Full)) { var navigationManager = _container.Resolve <NavigationManager>(); var mainViewModel = _container.Resolve <IMainViewModel>(); var mainNavigationItem = new NavigationItem(NavigationNames.Main, mainViewModel); navigationManager.RegisterNavigationItem(mainNavigationItem); var helpViewModel = _container.Resolve <IHelpViewModel>(); var helpNavigationItem = new NavigationItem(NavigationNames.Help, helpViewModel); navigationManager.RegisterNavigationItem(helpNavigationItem); navigationManager.Navigate(mainNavigationItem); if (_installer != null) { _installer.Engine.CloseSplashScreen(); } } }
public ShellViewModel(BootstrapperApplication ba) { this.DisplayName = "SampleApp Installer"; this.ba = ba; downloadRetries = new Dictionary <string, int>(); ba.DetectBegin += DetectBegin; ba.DetectPackageComplete += DetectedPackage; ba.DetectRelatedBundle += DetectedRelatedBundle; ba.DetectComplete += DetectComplete; ba.PlanPackageBegin += PlanPackageBegin; ba.PlanComplete += PlanComplete; ba.ApplyBegin += ApplyBegin; ba.ApplyComplete += ApplyComplete; ba.ResolveSource += ResolveSource; ba.Error += ExecuteError; ba.ExecuteMsiMessage += this.ExecuteMsiMessage; ba.ExecuteProgress += this.ApplyExecuteProgress; ba.Progress += this.ApplyProgress; ba.CacheAcquireProgress += this.CacheAcquireProgress; ba.CacheComplete += this.CacheComplete; }
public InstallWindowViewModel(BootstrapperApplication application) { IsThinking = false; Bootstrapper = application; Bootstrapper.ApplyComplete += BootstrapperOnApplyComplete; Bootstrapper.DetectPackageComplete += BootstrapperOnDetectPackageComplete; Bootstrapper.PlanComplete += BootstrapperOnPlanComplete; }
public static BootstrapperApplicationModel GetBootstrapperAppModel(BootstrapperApplication bootstrapperApplication) { if (bootstrapperAppModel == null) { bootstrapperAppModel = new BootstrapperApplicationModel(bootstrapperApplication); } return(bootstrapperAppModel); }
public UninstallViewModel(BootstrapperApplication bootstrapper, MainViewModel mainModel) { _bootstrapper = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); _mainModel = mainModel ?? throw new ArgumentNullException(nameof(mainModel)); _mainModel.PropertyChanged += OnMainModelPropertyChanged; ProgressModel = new ProgressViewModel(bootstrapper, mainModel); }
//constructor public MainViewModel(BootstrapperApplication bootstrapper) { IsThinking = false; Bootstrapper = bootstrapper; Bootstrapper.ApplyComplete += OnApplyComplete; Bootstrapper.DetectPackageComplete += OnDetectPackageComplete; Bootstrapper.PlanComplete += OnPlanComplete; }
public CaliburnMicroBootstrapper(BootstrapperApplication ba) { LogManager.GetLog = t => new WixLog(ba.Engine, t); this.ba = ba; SetupContainer(); }
public PackageCombinationConfiguration(WixBootstrapper bootstrapper) { this._bootstrapper = bootstrapper; this._sqlServerInstanceNameHelper = new WixVariableHelper(bootstrapper, "InstanceName"); this._installationTypeHelper = new WixVariableHelper(bootstrapper, "BundleInstallationType"); this._sqlServerInstallationTypeHelper = new WixVariableHelper(bootstrapper, "BundleSqlServerInstallationType"); this.UpdateSqlServerInstallationType(); }
public CaliburnMicroBootstrapper(BootstrapperApplication app) { LogManager.GetLog = type => new WixLog(app.Engine, type); this._app = app; Initialize(); SetupContainer(); }
//constructor public MainViewModel(BootstrapperApplication bootstrapper) { this.IsThinking = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.ApplyComplete += this.OnApplyComplete; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete; this.Bootstrapper.PlanComplete += this.OnPlanComplete; this.Bootstrapper.ExecuteMsiMessage += OnExecuteMessage; }
public InstallWaitingViewModel(BootstrapperApplication bootstrapper) { _bootstrapper = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); AddWindowsFirewallException = true; RegisterFileProtocolHandlers = true; ShouldDownloadDependencies = true; Refresh(); }
//constructor public MainViewModel(BootstrapperApplication bootstrapper) { this.IsThinking = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.ApplyComplete += this.OnApplyComplete; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete; this.Bootstrapper.PlanComplete += this.OnPlanComplete; this.Bootstrapper.CacheAcquireProgress += this.CacheAcquireProgress; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(BootstrapperInstaller bootstrapperInstaller) { // IsThinking = false; Bootstrapper = bootstrapperInstaller; // Bootstrapper.ApplyComplete += OnApplyComplete; // Bootstrapper.DetectPackageComplete += OnDetectPackageComplete; // Bootstrapper.PlanComplete += OnPlanComplete; Downloader.OnDownloadAppPartsComplite += Installer.Configurate; Downloader.OnSizeAppPartsUpdate += DownloaderOnSizeAppPartsUpdate; Installer.OnComplite += InstallerOnComplite; }
public MainViewModel(BootstrapperApplication bootstrapper) { this.IsBusy = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.ApplyComplete += this.OnApplyComplete; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete; this.Bootstrapper.PlanComplete += this.OnPlanComplete; this.Bootstrapper.Engine.Detect(); }
public OperationProgressStepViewModel( BootstrapperApplication installer, Engine engine, IViewModelsFactory <IMainViewModel> mainVmFactory) { _installer = installer; _engine = engine; _mainVmFactory = mainVmFactory; SubscribeToInstallationEvents(); }
//constructor public MainViewModel(Dispatcher dispatcher, BootstrapperApplication bootstrapper, bool applyAutomatically) { _dispatcher = dispatcher; _applyAutomatically = applyAutomatically; this.IsThinking = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.ApplyComplete += this.OnApplyCompleteUiUpdate; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageCompleteUiUpdate; this.Bootstrapper.PlanComplete += this.OnPlanCompleteUiUpdate; }
public void Initialize(BootstrapperApplication bootstrapper, AutoResetEvent autoEvent) { this.Bootstrapper = bootstrapper; this.Bootstrapper.Error += this.OnError; this.Bootstrapper.ApplyComplete += this.OnApplyComplete; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete; this.Bootstrapper.DetectComplete += this.OnDetectComplete; this.Bootstrapper.PlanComplete += this.OnPlanComplete; this.Bootstrapper.PlanPackageComplete += this.OnPlanPackageComplete; this.autoEvent = autoEvent; this.Bootstrapper.Engine.Detect(); }
public InstallViewModel(BootstrapperApplication bootstrapper, MainViewModel mainModel) { _bootstrapper = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); _bootstrapper.ResolveSource += OnResolveSource; _mainModel = mainModel ?? throw new ArgumentNullException(nameof(mainModel)); _mainModel.PropertyChanged += OnMainModelPropertyChanged; InstallFailedModel = new InstallFailedViewModel(bootstrapper); InstallWaitingModel = new InstallWaitingViewModel(bootstrapper); ProgressModel = new ProgressViewModel(bootstrapper, mainModel); IsUpgrade = false; }
public ProgressViewModel(BootstrapperApplication bootstrapper, MainViewModel mainModel) { _bootstrapper = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); _mainModel = mainModel ?? throw new ArgumentNullException(nameof(mainModel)); _bootstrapper.ApplyPhaseCount += (sender, args) => _progressPhases = args.PhaseCount; _bootstrapper.CacheAcquireProgress += OnCacheAcquireProgress; _bootstrapper.CacheComplete += OnCacheComplete; _bootstrapper.ExecuteMsiMessage += OnExecuteMsiMessage; _bootstrapper.ExecuteProgress += OnExecuteProgress; _bootstrapper.Progress += OnProgress; _mainModel.PropertyChanged += OnMainModelPropertyChanged; }
public ShellViewModel(BootstrapperApplication bootStrapper, IEventAggregator agg, DotaFinderViewModel finder, DotaDetectedViewModel detected, DotaManualSelectionViewModel manual, BusyViewModel busy, ErrorViewModel error, InstallSuccessViewModel installSuccess, UninstallSuccessViewModel uninstallSuccess) { DisplayName = "Bro do you even stack? Installer"; _ba = bootStrapper; _agg = agg; _agg.Subscribe(this); //engine events _ba.DetectBegin += DetectBegin; _ba.DetectPackageComplete += DetectedPackage; _ba.DetectRelatedBundle += DetectedRelatedBundle; _ba.DetectComplete += DetectComplete; _ba.PlanPackageBegin += PlanPackageBegin; _ba.PlanComplete += PlanComplete; _ba.ApplyBegin += ApplyBegin; _ba.ApplyComplete += ApplyComplete; _ba.ResolveSource += ResolveSource; _ba.Error += ExecuteError; _ba.ExecuteMsiMessage += this.ExecuteMsiMessage; _ba.ExecuteProgress += this.ApplyExecuteProgress; _ba.Progress += this.ApplyProgress; _ba.CacheAcquireProgress += this.CacheAcquireProgress; _ba.CacheComplete += this.CacheComplete; _screens = new List <IScreen>() { finder, detected, manual, busy, error, installSuccess, uninstallSuccess }; _agg.PublishOnBackgroundThread(new DirectorySearchMessages.SearchForDotaDirectory()); }
public MainViewModel(BootstrapperApplication ba, Window mainWindow) { _bootstrapper = ba ?? throw new ArgumentNullException(nameof(ba)); _mainWindow = mainWindow ?? throw new ArgumentNullException(nameof(mainWindow)); _bootstrapper.ApplyComplete += OnApplyComplete; _bootstrapper.DetectBegin += OnDetectBegin; _bootstrapper.DetectComplete += OnDetectComplete; _bootstrapper.DetectRelatedBundle += OnDetectRelatedBundle; _bootstrapper.DetectRelatedMsiPackage += OnDetectRelatedMsiPackage; _bootstrapper.PlanComplete += OnPlanComplete; WindowHandle = new WindowInteropHelper(_mainWindow).EnsureHandle(); InstallModel = new InstallViewModel(ba, this); UninstallModel = new UninstallViewModel(ba, this); }
public static void Register(FuseBootstrapperApplication a) { _bootstrapperApplication = a; a.DetectBegin += OnDetectBegin; a.DetectForwardCompatibleBundle += OnDetectForwardCompatibleBundle; a.DetectUpdateBegin += OnDetectUpdateBegin; a.DetectUpdate += OnDetectUpdate; a.DetectUpdateComplete += OnDetectUpdateComplete; a.DetectPriorBundle += OnDetectPriorBundle; a.DetectRelatedBundle += OnDetectRelatedBundle; a.DetectPackageBegin += OnDetectPackageBegin; a.DetectCompatiblePackage += OnDetectCompatiblePackage; a.DetectRelatedMsiPackage += OnDetectRelatedMsiPackage; a.DetectTargetMsiPackage += OnDetectTargetMsiPackage; a.DetectMsiFeature += OnDetectMsiFeature; a.DetectPackageComplete += OnDetectPackageComplete; a.DetectComplete += OnDetectComplete; }
public MainViewModel(BootstrapperApplication bootstrapper) { this.IsThinking = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.ApplyComplete += this.OnApplyComplete; this.Bootstrapper.DetectPackageComplete += this.OnDetectPackageComplete; this.Bootstrapper.PlanComplete += this.OnPlanComplete; this.Bootstrapper.CacheAcquireProgress += (sender, args) => { this.cacheProgress = args.OverallPercentage; this.Progress = (this.cacheProgress + this.executeProgress) / 2; }; this.Bootstrapper.ExecuteProgress += (sender, args) => { this.executeProgress = args.OverallPercentage; this.Progress = (this.cacheProgress + this.executeProgress) / 2; }; this.CurrentSQLStatus = SQLStatus.exists; }
/// <summary> /// Loads the bootstrapper application assembly and creates an instance of the IBootstrapperApplication. /// </summary> /// <param name="pEngine">IBootstrapperEngine provided for the bootstrapper application.</param> /// <param name="command">Command line for the bootstrapper application.</param> /// <returns>Bootstrapper application via <see cref="IBootstrapperApplication"/> interface.</returns> /// <exception cref="MissingAttributeException">The bootstrapper application assembly /// does not define the <see cref="BootstrapperApplicationAttribute"/>.</exception> public IBootstrapperApplication Create(IBootstrapperEngine pEngine, ref Command command) { // Get the wix.boostrapper section group to get the name of the bootstrapper application assembly to host. HostSection section = ConfigurationManager.GetSection("wix.bootstrapper/host") as HostSection; if (null == section) { throw new MissingAttributeException(); // TODO: throw a more specific exception than this. } // Load the BA and make sure it extends BootstrapperApplication. Type baType = BootstrapperApplicationFactory.GetBootstrapperApplicationTypeFromAssembly(section.AssemblyName); BootstrapperApplication ba = Activator.CreateInstance(baType) as BootstrapperApplication; if (null == ba) { throw new InvalidBootstrapperApplicationException(); } ba.Engine = new Engine(pEngine); ba.Command = command; return(ba); }
public MainWindowModel(BootstrapperApplication bootstrapper) { this.IsThinking = false; this.Bootstrapper = bootstrapper; this.Bootstrapper.PlanPackageBegin += SetPackagePlannedState; this.Bootstrapper.PlanMsiFeature += SetFeaturePlannedState; this.Bootstrapper.PlanComplete += PlanComplete; _settingsStorage = new SettingsStorage(); _settings = _settingsStorage.LoadSettings(); if (_settings.GtaPath == null) { _settings.GtaPath = ""; } if (!Util.IsValidGtaFolder(_settings.GtaPath)) { var registryPath = Util.GetGtaInstallPathFromRegistry(); if (Util.IsValidGtaFolder(registryPath)) { _settings.GtaPath = registryPath; } else { _settings.GtaPath = ""; } } StatusText = "Ready."; _updater = new Updater(_settings); _updater.ModInstalled += UpdaterOnModInstalled; _updater.ScriptHookVInstalled += UpdaterOnScriptHookVInstalled; _updater.ScriptHookVRemoved += UpdaterOnScriptHookVRemoved; _updater.ModRemoved += UpdaterOnModRemoved; _updater.UpdatesChecked += UpdaterOnUpdatesChecked; }
public InstallFailedViewModel(BootstrapperApplication bootstrapper) { _bootstrapper = bootstrapper ?? throw new ArgumentNullException(nameof(bootstrapper)); }
public BootstrapperApplicationModel(BootstrapperApplication bootstrapperApplication) { BootstrapperApplication = bootstrapperApplication; hwnd = IntPtr.Zero; }