Skip to content

Commit

Permalink
Fix download FutureRestore beta for macOS universal binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
CoocooFroggy committed Jul 18, 2022
1 parent 1f8c7a1 commit db98772
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/main/java/Main.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
public class Main {
static final String futureRestoreGUIVersion = "1.98";
static final String futureRestoreGUIVersion = "1.98.1";
static final boolean futureRestoreGUIPrerelease = false;
public static void main(String[] args) {
MainMenu.main();
Expand Down
27 changes: 20 additions & 7 deletions src/main/java/MainMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -973,19 +973,32 @@ Map<String, String> getLatestFrBetaDownload(String operatingSystem, String archi
for (Map<String, Object> artifact : artifacts) {
String assetName = ((String) artifact.get("name"));
// Look for our OS and release binary
if (assetName.toLowerCase().contains(operatingSystem)
&& assetName.toLowerCase().contains("release")) {
// If we're mac, match architecture as well
if (assetName.toLowerCase().contains("mac")) {
if (assetName.toLowerCase().contains(architecture)) {
String lcAssetName = assetName.toLowerCase();
if (lcAssetName.contains(operatingSystem) && lcAssetName.contains("release")) {
// If we're Mac
if (lcAssetName.contains("mac")) {
// If the asset has an architecture in it
if (lcAssetName.contains("x86_64") || lcAssetName.contains("arm64")) {
// Match it with ours
if (lcAssetName.contains(architecture)) {
linkNameMap.put("link", (String) artifact.get("archive_download_url"));
linkNameMap.put("name", assetName);
return linkNameMap;
}
}
// Otherwise, don't worry about matching architecture
else {
linkNameMap.put("link", (String) artifact.get("archive_download_url"));
linkNameMap.put("name", assetName);
return linkNameMap;
}
} else {
}
// Not Mac
else {
linkNameMap.put("link", (String) artifact.get("archive_download_url"));
linkNameMap.put("name", assetName);
return linkNameMap;
}
return linkNameMap;
}
}

Expand Down

0 comments on commit db98772

Please sign in to comment.