Exemplo n.º 1
0
 protected override async Task InstallImpl(IContentInstallationService installationService,
     IDownloadContentAction<IInstallableContent> action) {
     await base.InstallImpl(installationService, action).ConfigureAwait(false);
     // TODO
     //await new GtaPackager(InstalledState.Directory).HandlePackages().ConfigureAwait(false);
     HandleBackups();
 }
Exemplo n.º 2
0
        protected override async Task InstallImpl(IContentInstallationService installationService,
                                                  IDownloadContentAction <IInstallableContent> action)
        {
            await base.InstallImpl(installationService, action).ConfigureAwait(false);

            // TODO
            //await new GtaPackager(InstalledState.Directory).HandlePackages().ConfigureAwait(false);
            HandleBackups();
        }
Exemplo n.º 3
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 {
     foreach (var m in GetPackagedContent(action.Content).Select(x => new RvMod(this, x)))
     {
         m.Register();
     }
     return(base.InstallImpl(installationService, action));
 }
Exemplo n.º 4
0
 protected virtual InstallContentAction GetInstallAction(
     IDownloadContentAction <IInstallableContent> action)
 => new InstallContentAction(action.Content, action.CancelToken)
 {
     RemoteInfo       = RemoteInfo,
     Paths            = ContentPaths,
     Game             = this,
     Cleaning         = ContentCleaning,
     Force            = action.Force,
     HideLaunchAction = action.HideLaunchAction,
     Name             = action.Name
 };
Exemplo n.º 5
0
 protected override InstallContentAction GetInstallAction(
         IDownloadContentAction<IInstallableContent> action)
     => new InstallContentAction(action.Content, action.CancelToken) {
         RemoteInfo = RemoteInfo,
         Paths = ContentPaths,
         Game = this,
         CheckoutType = CheckoutType.CheckoutWithoutRemoval,
         GlobalWorkingPath = InstalledState.Directory,
         Cleaning = ContentCleaning,
         Force = action.Force,
         HideLaunchAction = action.HideLaunchAction,
         Name = action.Name
     };
Exemplo n.º 6
0
 protected override InstallContentAction GetInstallAction(
     IDownloadContentAction<IInstallableContent> action) {
     var content = action.Content;
     return new InstallContentAction(HandleAia(content), action.CancelToken) {
         RemoteInfo = RemoteInfo,
         Paths = ContentPaths,
         Game = this,
         Cleaning = ContentCleaning,
         Force = action.Force,
         HideLaunchAction = action.HideLaunchAction,
         Name = action.Name
     };
 }
Exemplo n.º 7
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 {
     foreach (var m in GetPackagedContent(action.Content).OfType <ModNetworkContent>())
     {
         m.RegisterAdditionalPostInstallTask(async processed => {
             if (processed)
             {
                 await InstallMod(m).ConfigureAwait(false);
             }
         });
     }
     return(base.InstallImpl(installationService, action));
 }
Exemplo n.º 8
0
 protected override InstallContentAction GetInstallAction(
     IDownloadContentAction <IInstallableContent> action)
 => new InstallContentAction(action.Content, action.CancelToken)
 {
     RemoteInfo        = RemoteInfo,
     Paths             = ContentPaths,
     Game              = this,
     CheckoutType      = CheckoutType.CheckoutWithoutRemoval,
     GlobalWorkingPath = InstalledState.Directory,
     Cleaning          = ContentCleaning,
     Force             = action.Force,
     HideLaunchAction  = action.HideLaunchAction,
     Name              = action.Name
 };
Exemplo n.º 9
0
        protected override InstallContentAction GetInstallAction(
            IDownloadContentAction <IInstallableContent> action)
        {
            var content = action.Content;

            return(new InstallContentAction(HandleAia(content), action.CancelToken)
            {
                RemoteInfo = RemoteInfo,
                Paths = ContentPaths,
                Game = this,
                Cleaning = ContentCleaning,
                Force = action.Force,
                HideLaunchAction = action.HideLaunchAction,
                Name = action.Name
            });
        }
Exemplo n.º 10
0
 protected abstract Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action);
Exemplo n.º 11
0
 Task InstallInternal(IContentInstallationService contentInstallation,
                      IDownloadContentAction <IInstallableContent> installAction)
 {
     ConfirmInstall();
     return(InstallImpl(contentInstallation, installAction));
 }
Exemplo n.º 12
0
 protected override Task InstallImpl(IContentInstallationService installationService,
                                     IDownloadContentAction <IInstallableContent> action)
 => installationService.Install(GetInstallAction(action));