Skip to content

Commit

Permalink
Add support for experimental Firefox releases (qzind#891)
Browse files Browse the repository at this point in the history
* Add support for experimental Firefox releases
Closes qzind#217, qzind#889
  • Loading branch information
tresf authored Dec 9, 2021
1 parent 2046038 commit db01438
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/qz/installer/certificate/firefox/locator/AppAlias.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
public enum AppAlias {
// Tor Browser intentionally excluded; Tor's proxy blocks localhost connections
FIREFOX(
new Alias("Mozilla", "Mozilla Firefox", "org.mozilla.firefox", true), // Windows
new Alias("Mozilla", "Mozilla Firefox", "org.mozilla.firefox", true),
new Alias("Mozilla", "Firefox Developer Edition", "org.mozilla.firefoxdeveloperedition", true),
new Alias("Mozilla", "Firefox Nightly", "org.mozilla.nightly", true),
new Alias("Mozilla", "SeaMonkey", "org.mozilla.seamonkey", false),
new Alias("Waterfox", "Waterfox", "net.waterfox.waterfoxcurrent", true),
new Alias("Waterfox", "Waterfox Classic", "org.waterfoxproject.waterfox classic", false),
Expand Down
10 changes: 9 additions & 1 deletion src/qz/installer/certificate/firefox/locator/AppInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ private static Version parseVersion(String version) {
version = version + ".0";
}
return Version.valueOf(version);
} catch(Exception ignore) {}
} catch(Exception ignore1) {
// Catch poor formatting (e.g. "97.0a1"), try to use major version only
if(version.split("\\.").length > 0) {
try {
String[] tryFix = version.split("\\.");
return Version.valueOf(tryFix[0] + ".0.0-unknown");
} catch(Exception ignore2) {}
}
}
return null;
}

Expand Down

0 comments on commit db01438

Please sign in to comment.