Skip to content

Commit

Permalink
Commerce correct pre-requisites checking for sxa and pse....
Browse files Browse the repository at this point in the history
  • Loading branch information
navancommits committed Dec 5, 2020
1 parent 00277d2 commit 7ed0ce6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions SCIA/SCIA/SCIAWinApp/SCIAWinApp/CommonFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ public static SqlConnection CreateDatabase(string database,string dbServer,strin
}


public static bool CheckPrerequisiteList(string destFolder)
public static bool CheckPrerequisiteList(string destFolder,string sxaFileName,string pseFileName)
{
if (!CommonFunctions.FileSystemEntryExists(destFolder, null, "folder",true)) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "msbuild", "folder")) { return false; }
Expand All @@ -450,12 +450,12 @@ public static bool CheckPrerequisiteList(string destFolder)
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore Commerce ExperienceProfile Core OnPrem *.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore Commerce Marketing Automation Core OnPrem *.scwdp.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore Commerce Marketing Automation for AutomationEngine *.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore Experience Accelerator *.scwdp.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, sxaFileName, "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore.BizFx.OnPrem*", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore.BizFX.SDK*.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore.Commerce.Engine.OnPrem.Solr*.scwdp.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore.Commerce.Habitat.Images.OnPrem.scwdp.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, "Sitecore.PowerShell.Extensions*.scwdp.zip", "file")) { return false; }
if (!CommonFunctions.FileSystemEntryExists(destFolder, pseFileName, "file")) { return false; }
if ((!Directory.Exists("C:\\Program Files\\dotnet\\shared\\Microsoft.AspNetCore.App\\3.1.8")) && (!Directory.Exists("C:\\Program Files\\dotnet\\shared\\Microsoft.AspNetCore.App\\3.1.7"))) { return false; }
if (!Directory.Exists("C:\\Program Files\\Redis")) { return false; }

Expand Down
8 changes: 5 additions & 3 deletions SCIA/SCIA/SCIAWinApp/SCIAWinApp/SitecoreCommerceInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public SitecoreCommerceInstaller()
InitializeComponent();
SystemDrive = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.System));
this.Text = this.Text + " for Sitecore v" + Version.SitecoreVersion;
//destFolder = @".\Sitecore.Commerce.WDP.2020.08-6.0.238\SIF.Sitecore.Commerce.5.0.49\";

tabDetails.Region = new Region(tabDetails.DisplayRectangle);
ToggleEnableControls(false);
AssignStepStatus(TabIndexValue);
Expand Down Expand Up @@ -1910,8 +1910,10 @@ private bool CheckAllValidations(bool uninstall=false,bool generatescript=false)
ToggleButtonControls(false);
uninstall = CheckCommerceInstallDir();


if (!CommonFunctions.CheckPrerequisiteList(destFolder))
var prereqs = CommonFunctions.GetVersionPrerequisites(Version.SitecoreVersion, "commerce");
var sxaZipName = prereqs.Where(p => p.PrerequisiteKey == "sxa").ToList().FirstOrDefault().PrerequisiteName;
var pseZipName = prereqs.Where(p => p.PrerequisiteKey == "psextension").ToList().FirstOrDefault().PrerequisiteName;
if (!CommonFunctions.CheckPrerequisiteList(destFolder,sxaZipName,pseZipName))
{
SetStatusMessage("One or more pre-requisites missing.... Click Pre-requisites button to check...", Color.Red);
return false;
Expand Down

0 comments on commit 7ed0ce6

Please sign in to comment.