Skip to content

Commit

Permalink
Fix: RZUpdate Issue where dependencies are not getting installed
Browse files Browse the repository at this point in the history
It seems only RuckZuck.exe is affected. Issue was implemented with
V1.6.2.8
  • Loading branch information
rzander committed Aug 30, 2018
1 parent 1e5ce32 commit 64bc0ea
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 25 deletions.
2 changes: 1 addition & 1 deletion RZ.Bot/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.6.*")]
[assembly: AssemblyFileVersion("1.0.6.8")]
[assembly: AssemblyFileVersion("1.0.6.9")]
13 changes: 9 additions & 4 deletions RZ.Bot/RZUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,12 @@ public SWUpdate(string Shortname)
SW.ProductName = oGetSW.ProductName;
SW.ProductVersion = oGetSW.ProductVersion;
SW.Manufacturer = oGetSW.Manufacturer;
SW.Shortname = Shortname;

if (SW.Architecture == null)
{
SW = RZRestAPI.GetSWDefinitions(oGetSW.ProductName, oGetSW.ProductVersion, oGetSW.Manufacturer).FirstOrDefault();

SW.Shortname = Shortname;
try
{
if (SW.Image == null)
Expand All @@ -447,6 +448,7 @@ public SWUpdate(string Shortname)

if (string.IsNullOrEmpty(SW.Shortname))
return;

//Get Install-type
GetInstallType();

Expand Down Expand Up @@ -506,9 +508,11 @@ public bool GetInstallType(bool bGetFirst = false)
}
catch { }
}

return false;
}

return false;
return true;
}

private bool _Download(bool Enforce, string DLPath)
Expand Down Expand Up @@ -834,7 +838,8 @@ public async Task<bool> Download()
/// <returns>true = success</returns>
public async Task<bool> Download(bool Enforce)
{
bool bAutoInstall = downloadTask.AutoInstall;
return await Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID));
/*bool bAutoInstall = downloadTask.AutoInstall;
downloadTask = new DLTask() { ProductName = SW.ProductName, ProductVersion = SW.ProductVersion, Manufacturer = SW.Manufacturer, Shortname = SW.Shortname, Image = SW.Image, Files = SW.Files };
if (SW.PreRequisites.Length > 0)
Expand All @@ -852,7 +857,7 @@ public async Task<bool> Download(bool Enforce)
ProgressDetails += SWUpdate_ProgressDetails;
bool bResult = await Task.Run(() => _Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID))).ConfigureAwait(false);
return bResult;
return bResult;*/
}

public async Task<bool> Download(bool Enforce, string DLPath)
Expand Down
4 changes: 2 additions & 2 deletions RZ.OneGetProvider/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.6.2.8")]
[assembly: AssemblyFileVersion("1.6.2.8")]
[assembly: AssemblyVersion("1.6.2.9")]
[assembly: AssemblyFileVersion("1.6.2.9")]
13 changes: 9 additions & 4 deletions RZ.OneGetProvider/RZUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,12 @@ public SWUpdate(string Shortname)
SW.ProductName = oGetSW.ProductName;
SW.ProductVersion = oGetSW.ProductVersion;
SW.Manufacturer = oGetSW.Manufacturer;
SW.Shortname = Shortname;

if (SW.Architecture == null)
{
SW = RZRestAPI.GetSWDefinitions(oGetSW.ProductName, oGetSW.ProductVersion, oGetSW.Manufacturer).FirstOrDefault();

SW.Shortname = Shortname;
try
{
if (SW.Image == null)
Expand All @@ -447,6 +448,7 @@ public SWUpdate(string Shortname)

if (string.IsNullOrEmpty(SW.Shortname))
return;

//Get Install-type
GetInstallType();

Expand Down Expand Up @@ -506,9 +508,11 @@ public bool GetInstallType(bool bGetFirst = false)
}
catch { }
}

return false;
}

return false;
return true;
}

private bool _Download(bool Enforce, string DLPath)
Expand Down Expand Up @@ -834,7 +838,8 @@ public async Task<bool> Download()
/// <returns>true = success</returns>
public async Task<bool> Download(bool Enforce)
{
bool bAutoInstall = downloadTask.AutoInstall;
return await Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID));
/*bool bAutoInstall = downloadTask.AutoInstall;
downloadTask = new DLTask() { ProductName = SW.ProductName, ProductVersion = SW.ProductVersion, Manufacturer = SW.Manufacturer, Shortname = SW.Shortname, Image = SW.Image, Files = SW.Files };
if (SW.PreRequisites.Length > 0)
Expand All @@ -852,7 +857,7 @@ public async Task<bool> Download(bool Enforce)
ProgressDetails += SWUpdate_ProgressDetails;
bool bResult = await Task.Run(() => _Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID))).ConfigureAwait(false);
return bResult;
return bResult;*/
}

public async Task<bool> Download(bool Enforce, string DLPath)
Expand Down
2 changes: 1 addition & 1 deletion RZUpdate/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.2.*")]
[assembly: AssemblyFileVersion("1.6.2.8")]
[assembly: AssemblyFileVersion("1.6.2.9")]
21 changes: 13 additions & 8 deletions RZUpdate/RZUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public RZUpdater(string sSWFile)
SoftwareUpdate = new SWUpdate(ParseJSON(sSWFile));
}

if(!File.Exists(sSWFile))
if (!File.Exists(sSWFile))
{
SoftwareUpdate = new SWUpdate(Parse(sSWFile));
}
Expand Down Expand Up @@ -282,7 +282,7 @@ internal static AddSoftware Parse(string sJSON)
lRes.PreRequisites = lRes.PreRequisites.Where(x => !string.IsNullOrEmpty(x)).ToArray();
return lRes;
}
catch(Exception ex)
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Expand Down Expand Up @@ -406,7 +406,7 @@ public SWUpdate(string Shortname)

try
{

SW = new AddSoftware();

//Always use local JSON-File if exists
Expand All @@ -423,11 +423,12 @@ public SWUpdate(string Shortname)
SW.ProductName = oGetSW.ProductName;
SW.ProductVersion = oGetSW.ProductVersion;
SW.Manufacturer = oGetSW.Manufacturer;
SW.Shortname = Shortname;

if (SW.Architecture == null)
{
SW = RZRestAPI.GetSWDefinitions(oGetSW.ProductName, oGetSW.ProductVersion, oGetSW.Manufacturer).FirstOrDefault();

SW.Shortname = Shortname;
try
{
if (SW.Image == null)
Expand All @@ -447,6 +448,7 @@ public SWUpdate(string Shortname)

if (string.IsNullOrEmpty(SW.Shortname))
return;

//Get Install-type
GetInstallType();

Expand Down Expand Up @@ -506,9 +508,11 @@ public bool GetInstallType(bool bGetFirst = false)
}
catch { }
}

return false;
}

return false;
return true;
}

private bool _Download(bool Enforce, string DLPath)
Expand Down Expand Up @@ -834,7 +838,8 @@ public async Task<bool> Download()
/// <returns>true = success</returns>
public async Task<bool> Download(bool Enforce)
{
bool bAutoInstall = downloadTask.AutoInstall;
return await Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID));
/*bool bAutoInstall = downloadTask.AutoInstall;
downloadTask = new DLTask() { ProductName = SW.ProductName, ProductVersion = SW.ProductVersion, Manufacturer = SW.Manufacturer, Shortname = SW.Shortname, Image = SW.Image, Files = SW.Files };
if (SW.PreRequisites.Length > 0)
Expand All @@ -852,7 +857,7 @@ public async Task<bool> Download(bool Enforce)
ProgressDetails += SWUpdate_ProgressDetails;
bool bResult = await Task.Run(() => _Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID))).ConfigureAwait(false);
return bResult;
return bResult;*/
}

public async Task<bool> Download(bool Enforce, string DLPath)
Expand Down Expand Up @@ -1327,7 +1332,7 @@ public bool CheckIsInstalled(bool sendProgressEvent)
return true;
}
}
catch(Exception ex)
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
Expand Down
2 changes: 1 addition & 1 deletion RuckZuck_Tool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.2.*")]
[assembly: AssemblyFileVersion("1.6.2.8")]
[assembly: AssemblyFileVersion("1.6.2.9")]
13 changes: 9 additions & 4 deletions RuckZuck_Tool/RZUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -423,11 +423,12 @@ public SWUpdate(string Shortname)
SW.ProductName = oGetSW.ProductName;
SW.ProductVersion = oGetSW.ProductVersion;
SW.Manufacturer = oGetSW.Manufacturer;
SW.Shortname = Shortname;

if (SW.Architecture == null)
{
SW = RZRestAPI.GetSWDefinitions(oGetSW.ProductName, oGetSW.ProductVersion, oGetSW.Manufacturer).FirstOrDefault();

SW.Shortname = Shortname;
try
{
if (SW.Image == null)
Expand All @@ -447,6 +448,7 @@ public SWUpdate(string Shortname)

if (string.IsNullOrEmpty(SW.Shortname))
return;

//Get Install-type
GetInstallType();

Expand Down Expand Up @@ -506,9 +508,11 @@ public bool GetInstallType(bool bGetFirst = false)
}
catch { }
}

return false;
}

return false;
return true;
}

private bool _Download(bool Enforce, string DLPath)
Expand Down Expand Up @@ -834,7 +838,8 @@ public async Task<bool> Download()
/// <returns>true = success</returns>
public async Task<bool> Download(bool Enforce)
{
bool bAutoInstall = downloadTask.AutoInstall;
return await Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID));
/*bool bAutoInstall = downloadTask.AutoInstall;
downloadTask = new DLTask() { ProductName = SW.ProductName, ProductVersion = SW.ProductVersion, Manufacturer = SW.Manufacturer, Shortname = SW.Shortname, Image = SW.Image, Files = SW.Files };
if (SW.PreRequisites.Length > 0)
Expand All @@ -852,7 +857,7 @@ public async Task<bool> Download(bool Enforce)
ProgressDetails += SWUpdate_ProgressDetails;
bool bResult = await Task.Run(() => _Download(Enforce, Path.Combine(Environment.ExpandEnvironmentVariables("%TEMP%"), SW.ContentID))).ConfigureAwait(false);
return bResult;
return bResult;*/
}

public async Task<bool> Download(bool Enforce, string DLPath)
Expand Down

0 comments on commit 64bc0ea

Please sign in to comment.