コード例 #1
0
ファイル: UpdateManager.cs プロジェクト: anthrax3/NSync
        List <string> runPostInstallOnDirectory(string newAppDirectoryRoot, bool isFirstInstall, Version newCurrentVersion, IEnumerable <ShortcutCreationRequest> shortcutRequestsToIgnore)
        {
            var postInstallInfo = new PostInstallInfo {
                NewAppDirectoryRoot      = newAppDirectoryRoot,
                IsFirstInstall           = isFirstInstall,
                NewCurrentVersion        = newCurrentVersion,
                ShortcutRequestsToIgnore = shortcutRequestsToIgnore.ToArray()
            };

            return(AppDomainHelper.ExecuteInNewAppDomain(postInstallInfo, info => {
                var appSetups = default(IEnumerable <IAppSetup>);

                try {
                    appSetups = findAppSetupsToRun(info.NewAppDirectoryRoot);
                } catch (UnauthorizedAccessException ex) {
                    log.ErrorException("Failed to load IAppSetups in post-install due to access denied", ex);
                    return new string[0];
                }

                return appSetups
                .Select(app => installAppVersion(app, info.NewCurrentVersion, info.ShortcutRequestsToIgnore, info.IsFirstInstall))
                .Where(x => x != null)
                .ToArray();
            }).ToList());
        }
コード例 #2
0
        List <string> runPostInstallOnDirectory(string newAppDirectoryRoot, bool isFirstInstall, Version newCurrentVersion, IEnumerable <ShortcutCreationRequest> shortcutRequestsToIgnore)
        {
            var postInstallInfo = new PostInstallInfo {
                NewAppDirectoryRoot      = newAppDirectoryRoot,
                IsFirstInstall           = isFirstInstall,
                NewCurrentVersion        = newCurrentVersion,
                ShortcutRequestsToIgnore = shortcutRequestsToIgnore.ToArray()
            };

            var installerHooks = new InstallerHookOperations(fileSystem, applicationName);

            return(AppDomainHelper.ExecuteInNewAppDomain(postInstallInfo, installerHooks.RunAppSetupInstallers).ToList());
        }
コード例 #3
0
        void runPostInstallOnDirectory(string newAppDirectoryRoot, bool isFirstInstall, Version newCurrentVersion, IEnumerable <ShortcutCreationRequest> shortcutRequestsToIgnore)
        {
            var postInstallInfo = new PostInstallInfo {
                NewAppDirectoryRoot      = newAppDirectoryRoot,
                IsFirstInstall           = isFirstInstall,
                NewCurrentVersion        = newCurrentVersion,
                ShortcutRequestsToIgnore = shortcutRequestsToIgnore.ToArray()
            };

            AppDomainHelper.ExecuteActionInNewAppDomain(postInstallInfo, info => {
                findAppSetupsToRun(info.NewAppDirectoryRoot).ForEach(app =>
                                                                     installAppVersion(app, info.NewCurrentVersion, info.ShortcutRequestsToIgnore, info.IsFirstInstall));
            });
        }
コード例 #4
0
        public IEnumerable<string> RunAppSetupInstallers(PostInstallInfo info)
        {
            var appSetups = default(IEnumerable<IAppSetup>);

            try {
                appSetups = findAppSetupsToRun(info.NewAppDirectoryRoot);
            } catch (UnauthorizedAccessException ex) {
                log.ErrorException("Failed to load IAppSetups in post-install due to access denied", ex);
                return new string[0];
            }

            return appSetups
                .Select(app => installAppVersion(app, info.NewCurrentVersion, info.ShortcutRequestsToIgnore, info.IsFirstInstall))
                .Where(x => x != null)
                .ToArray();
        }
コード例 #5
0
        public IEnumerable <string> RunAppSetupInstallers(PostInstallInfo info)
        {
            var appSetups = default(IEnumerable <IAppSetup>);

            try {
                appSetups = findAppSetupsToRun(info.NewAppDirectoryRoot);
            } catch (UnauthorizedAccessException ex) {
                log.ErrorException("Failed to load IAppSetups in post-install due to access denied", ex);
                return(new string[0]);
            }

            return(appSetups
                   .Select(app => installAppVersion(app, info.NewCurrentVersion, info.ShortcutRequestsToIgnore, info.IsFirstInstall))
                   .Where(x => x != null)
                   .ToArray());
        }
コード例 #6
0
        List<string> runPostInstallOnDirectory(string newAppDirectoryRoot, bool isFirstInstall, Version newCurrentVersion, IEnumerable<ShortcutCreationRequest> shortcutRequestsToIgnore)
        {
            var postInstallInfo = new PostInstallInfo {
                NewAppDirectoryRoot = newAppDirectoryRoot,
                IsFirstInstall = isFirstInstall,
                NewCurrentVersion = newCurrentVersion,
                ShortcutRequestsToIgnore = shortcutRequestsToIgnore.ToArray()
            };

            return AppDomainHelper.ExecuteInNewAppDomain(postInstallInfo, info => {
                var appSetups = default(IEnumerable<IAppSetup>);

                try {
                    appSetups = findAppSetupsToRun(info.NewAppDirectoryRoot);
                } catch (UnauthorizedAccessException ex) {
                    log.ErrorException("Failed to load IAppSetups in post-install due to access denied", ex);
                    return new string[0];
                }

                return appSetups
                    .Select(app => installAppVersion(app, info.NewCurrentVersion, info.ShortcutRequestsToIgnore, info.IsFirstInstall))
                    .Where(x => x != null)
                    .ToArray();
            }).ToList();
        }
コード例 #7
0
ファイル: UpdateManager.cs プロジェクト: KyleGobel/Shimmer
        List<string> runPostInstallOnDirectory(string newAppDirectoryRoot, bool isFirstInstall, Version newCurrentVersion, IEnumerable<ShortcutCreationRequest> shortcutRequestsToIgnore)
        {
            var postInstallInfo = new PostInstallInfo {
                NewAppDirectoryRoot = newAppDirectoryRoot,
                IsFirstInstall = isFirstInstall,
                NewCurrentVersion = newCurrentVersion,
                ShortcutRequestsToIgnore = shortcutRequestsToIgnore.ToArray()
            };

            var installerHooks = new InstallerHookOperations(fileSystem, applicationName);
            return AppDomainHelper.ExecuteInNewAppDomain(postInstallInfo, installerHooks.RunAppSetupInstallers).ToList();
        }