public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            string _virtualPathToAppsFolder = "~/sitecore modules/shell/ucommerce/apps";

            if (_sitecoreVersionChecker.IsEqualOrGreaterThan(new Version(9, 2)))
            {
                new DirectoryMover(
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore92compatibility.disabled")),
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore92compatibility")),
                    true).Move(ex => _sitecoreInstallerLoggingService.Error <Exception>(ex));
            }


            if (_sitecoreVersionChecker.IsEqualOrGreaterThan(new Version(9, 3)))
            {
                new DirectoryMover(
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore93compatibility.disabled")),
                    new DirectoryInfo(
                        HostingEnvironment.MapPath($"{_virtualPathToAppsFolder}/Sitecore93compatibility")),
                    true).Move(ex => _sitecoreInstallerLoggingService.Error <Exception>(ex));
            }
        }
예제 #2
0
        public void Run(ITaskOutput output, NameValueCollection metaData)
        {
            var tasks = new List <IPostStep>();

            if (_sitecoreVersionChecker.SupportsSpeakApps())
            {
                tasks.Add(new CreateSpeakApplications());
                tasks.Add(new CreateApplicationLaunchButton());

                //Remove uCommerce shortcut on desktop if present
                tasks.Add(new RemoveUCommerceApplicationLaunchButton());
            }

            if (_sitecoreVersionChecker.IsEqualOrGreaterThan(new Version(8, 2)))
            {
                tasks.Add(new AddTitleToCommerceSpeakAppsSection());
            }

            foreach (var task in tasks)
            {
                task.Run(output, metaData);
            }
        }