Skip to content

Commit 5954f47

Browse files
committed
fix automatic install path, #BUILD
1 parent 2bda48b commit 5954f47

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

UnityLauncherPro/Tools.cs

+8-6
Original file line numberDiff line numberDiff line change
@@ -590,14 +590,14 @@ public static bool VersionIsAlpha(string version)
590590

591591
public static bool VersionIsChinese(string version)
592592
{
593-
return version.Contains("c1");
593+
return version.Contains("c1");
594594
}
595595

596596

597597
//as of 21 May 2021, only final 'f' versions are now available on the alpha release notes for Unity 2018 and newer. 2017 and 5 still have patch 'p' versions as well.
598598
public static bool HasAlphaReleaseNotes(string version) => VersionIsArchived(version) || VersionIsPatch(version);
599599

600-
public static string GetAlphaReleaseNotesURL(string fromVersion, string toVersion = null)
600+
public static string GetAlphaReleaseNotesURL(string fromVersion, string toVersion = null)
601601
=> "https://alpha.release-notes.ds.unity3d.com/search?fromVersion=" + fromVersion + "&toVersion=" + (toVersion != null ? toVersion : fromVersion);
602602

603603
// open release notes page in browser
@@ -606,7 +606,7 @@ public static bool OpenReleaseNotes(string version)
606606
bool result = false;
607607
if (string.IsNullOrEmpty(version)) return false;
608608
string url = null;
609-
if(Properties.Settings.Default.useAlphaReleaseNotes && HasAlphaReleaseNotes(version))
609+
if (Properties.Settings.Default.useAlphaReleaseNotes && HasAlphaReleaseNotes(version))
610610
{
611611
url = GetAlphaReleaseNotesURL(version);
612612
}
@@ -644,8 +644,8 @@ public static bool OpenReleaseNotes_Cumulative(string version)
644644
if (nextFinalVersionAfterInstalled != null) comparisonVersion = nextFinalVersionAfterInstalled;
645645

646646
}
647-
url = GetAlphaReleaseNotesURL(comparisonVersion,version);
648-
647+
url = GetAlphaReleaseNotesURL(comparisonVersion, version);
648+
649649
OpenURL(url);
650650
result = true;
651651
return result;
@@ -695,8 +695,10 @@ public static void DownloadAndInstall(string url, string version)
695695
// get base version, to use for install path
696696
// FIXME check if have any paths?
697697
string lastRootFolder = Properties.Settings.Default.rootFolders[Properties.Settings.Default.rootFolders.Count - 1];
698+
698699
// check if ends with / or \
699-
if (lastRootFolder.EndsWith("/") == false && lastRootFolder.EndsWith("\\") == false) lastRootFolder += "/";
700+
if (lastRootFolder.EndsWith("/") == false && lastRootFolder.EndsWith("\\") == false) lastRootFolder += "\\";
701+
700702
string outputVersionFolder = version.Split('.')[0] + "_" + version.Split('.')[1];
701703
string targetPathArgs = " /D=" + lastRootFolder + outputVersionFolder; ;
702704

0 commit comments

Comments
 (0)