Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Jun 28, 2021
1 parent d3a737d commit be55ebf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private static bool ProcessUnityVersion(UnityVersion version)

if (was_error)
return false;
Logger.Msg(version.Version + " Zip Successfully Created!");
Logger.Msg(version.VersionStr + " Zip Successfully Created!");
return true;
}

Expand Down
23 changes: 10 additions & 13 deletions UnityVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,24 @@ internal UnityVersion(string version, string fullversion, string downloadurl)
Version[i] = output;
}


string[] downloadurl_splices = downloadurl.Split('/');
if (downloadurl_splices[4].EndsWith(".exe"))
if ((Version[0] < 5)
|| ((Version[0] == 5) && (Version[1] < 3))
|| downloadurl_splices[4].EndsWith(".exe"))
{
Logger.DebugMsg($"{version} - {downloadurl}");
Logger.DebugMsg($"{VersionStr} - {DownloadURL}");
return;
}

UsePayloadExtraction = true;
HashStr = downloadurl_splices[4];
DownloadURL = $"https://download.unity3d.com/download_unity/{HashStr}/";
if ((Version[0] == 5) && Version[1] < 3)
DownloadURL += $"MacEditorInstaller/Unity-{FullVersionStr}.pkg";
else
{
DownloadURL += "MacEditorTargetInstaller/UnitySetup-Windows-";
if (Version[0] >= 2018)
DownloadURL += "Mono-";
DownloadURL += $"Support-for-Editor-{FullVersionStr}.pkg";
}
DownloadURL = $"https://download.unity3d.com/download_unity/{HashStr}/MacEditorTargetInstaller/UnitySetup-Windows-";
if (Version[0] >= 2018)
DownloadURL += "Mono-";
DownloadURL += $"Support-for-Editor-{FullVersionStr}.pkg";

Logger.DebugMsg($"{version} - {HashStr} - {downloadurl}");
Logger.DebugMsg($"{VersionStr} - {HashStr} - {DownloadURL}");
}

internal static void Refresh()
Expand Down

0 comments on commit be55ebf

Please sign in to comment.