예제 #1
0
        public async Task Install()
        {
            AInstaller installer;

            var download = VortexCompiler.RetrieveDownloadLocation(TargetGame);
            var staging  = VortexCompiler.RetrieveStagingLocation(TargetGame);

            installer = new VortexInstaller(
                archive: Parent.ModListLocation.TargetPath,
                modList: Parent.ModList.SourceModList,
                outputFolder: staging,
                downloadFolder: download);

            await Task.Run(async() =>
            {
                try
                {
                    var workTask       = installer.Begin();
                    ActiveInstallation = installer;
                    await workTask;
                }
                finally
                {
                    ActiveInstallation = null;
                }
            });
        }
예제 #2
0
        public async Task <bool> Install()
        {
            AInstaller installer;

            var download = VortexCompiler.RetrieveDownloadLocation(TargetGame);
            var staging  = VortexCompiler.RetrieveStagingLocation(TargetGame);

            using (installer = new VortexInstaller(
                       archive: Parent.ModListLocation.TargetPath,
                       modList: Parent.ModList.SourceModList,
                       outputFolder: staging,
                       downloadFolder: download,
                       parameters: SystemParametersConstructor.Create()))
            {
                Parent.MWVM.Settings.Performance.AttachToBatchProcessor(installer);

                return(await Task.Run(async() =>
                {
                    try
                    {
                        var workTask = installer.Begin();
                        ActiveInstallation = installer;
                        return await workTask;
                    }
                    finally
                    {
                        ActiveInstallation = null;
                    }
                }));
            }
        }