Beispiel #1
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());
        }
Beispiel #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());
        }
Beispiel #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));
            });
        }
        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();
        }
Beispiel #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());
        }
Beispiel #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();
        }
Beispiel #7
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();
        }