コード例 #1
0
        private static UnrealPluginInstallInfo.InstallDescription GetPluginInfo(
            [NotNull] FileSystemPath upluginFilePath, [CanBeNull] FileSystemPath uprojectFilePath = null)
        {
            var installDescription = new UnrealPluginInstallInfo.InstallDescription()
            {
                UnrealPluginRootFolder = upluginFilePath.Directory,
                UprojectFilePath       = uprojectFilePath != null ? uprojectFilePath : FileSystemPath.Empty
            };

            if (!upluginFilePath.ExistsFile)
            {
                return(installDescription);
            }

            var version = PluginPathsProvider.GetPluginVersion(upluginFilePath);

            if (version == null)
            {
                return(installDescription);
            }

            installDescription.IsPluginAvailable = true;
            installDescription.PluginVersion     = version;
            return(installDescription);
        }
コード例 #2
0
        public UnrealPluginInstaller(Lifetime lifetime, ILogger logger, UnrealPluginDetector pluginDetector,
                                     PluginPathsProvider pathsProvider, ISolution solution, ISettingsStore settingsStore, UnrealHost unrealHost,
                                     NotificationsModel notificationsModel, RiderBackgroundTaskHost backgroundTaskHost)
        {
            Lifetime             = lifetime;
            myLogger             = logger;
            myPathsProvider      = pathsProvider;
            mySolution           = solution;
            myUnrealHost         = unrealHost;
            myNotificationsModel = notificationsModel;
            myBackgroundTaskHost = backgroundTaskHost;
            myBoundSettingsStore =
                settingsStore.BindToContextLive(Lifetime, ContextRange.Smart(solution.ToDataContext()));
            myPluginDetector = pluginDetector;

            myPluginDetector.InstallInfoProperty.Change.Advise_NewNotNull(Lifetime, installInfo =>
            {
                mySolution.Locks.ExecuteOrQueueReadLockEx(Lifetime,
                                                          "UnrealPluginInstaller.CheckAllProjectsIfAutoInstallEnabled",
                                                          () => { HandleAutoUpdatePlugin(installInfo.New); });
            });
            BindToInstallationSettingChange();
            BindToNotificationFixAction();
        }