Skip to content

Commit 89fe59f

Browse files
committed
2.0b release
1 parent aa1e941 commit 89fe59f

7 files changed

Lines changed: 19 additions & 17 deletions

File tree

.idea/.gitignore

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mod/changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 2.0b (August 28, 2020)
2+
================================
3+
Moved version file hosting from Bitbucket to GitHub
4+
15
Version 2.0 (March 19, 2019)
26
==============================
37
Added "nexusModId" field to .version file format:

mod/mod_info.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"name": "Version Checker",
44
"author": "LazyWizard",
55
"utility": "true",
6-
"version": "2.0",
6+
"version": "2.0b",
77
"description": "Tells you whether Starsector or any of your mods have updates available. A mod must include a .version file and an entry in data/config/version/version_files.csv for this to work with them.",
8-
"gameVersion": "0.9a",
8+
"gameVersion": "0.9.1a",
99
"jars":["jars/lw_VersionChecker.jar"],
1010
"modPlugin": "org.lazywizard.versionchecker.VCModPlugin"
1111
}

mod/versionchecker.version

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
2-
# Points toward the online master .version file. This mod works by comparing
2+
# Points toward the master .version file online. This mod works by comparing
33
# the local and online version to see if there is a newer version available.
44
#
55
# The master file must be:
66
# - Online (duh)
77
# - Directly reachable (the URL goes to the raw file, not a redirect page)
88
# - Permanently linked and editable without the URL itself changing
99
#
10-
# Bitbucket, GitHub, and other online repositories make excellent hosts.
10+
# GitHub and other online repositories make excellent hosts (with the
11+
# exception of Bitbucket, connections to which require cryptographic ciphers
12+
# that the JRE that ships with Starsector does not include).
1113
#
12-
# Example links for common hosts:
13-
#"masterVersionFile":"https://github.com/LazyWizard/VersionChecker/blob/master/versionchecker.version",
14-
#"masterVersionFile":"https://github.com/LazyWizard/VersionChecker/releases/download/0.1/versionchecker.version",
15-
#"masterVersionFile":"https://bitbucket.org/LazyWizard/version-checker/raw/tip/versionchecker.version",
16-
"masterVersionFile":"https://bitbucket.org/LazyWizard/version-checker/downloads/versionchecker.version",
14+
# A link to the raw .version JSON data
15+
"masterVersionFile":"https://raw.githubusercontent.com/LazyWizard/version-checker/master/mod/versionchecker.version",
1716
# The name that is displayed in-game for your mod
1817
"modName":"Version Checker",
1918
# The ID of the thread where updates to this mod can be found (optional).
@@ -34,6 +33,6 @@
3433
{
3534
"major":2,
3635
"minor":0,
37-
"patch":0 # Can be a number, character or string (1, 2, a, b, "-RC2", etc)
36+
"patch":b # Can be a number, character or string (1, 2, a, b, "-RC2", etc)
3837
}
3938
}

src/org/lazywizard/versionchecker/UpdateNotificationScript.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public void advance(float amount)
112112
{
113113
// Don't do anything while in a menu/dialog
114114
CampaignUIAPI ui = Global.getSector().getCampaignUI();
115-
if (Global.getSector().isInNewGameAdvance() || ui.isShowingDialog())
115+
if (Global.getSector().isInNewGameAdvance() || ui.isShowingDialog() || ui.isShowingMenu())
116116
{
117117
return;
118118
}

src/org/lazywizard/versionchecker/VCModPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public void connect() throws IOException
5252

5353
// Enable TLS v1.2 (required to use Bitbucket past December 1st, 2018)
5454
System.setProperty("https.protocols", "SSLv3,TLSv1,TLSv1.1,TLSv1.2");
55+
// TODO: Enable TLS v1.3 (required to use Bitbucket past August 24, 2020)
56+
//System.setProperty("https.cipherSuites", System.getProperty("https.cipherSuites") + ",");
5557

5658
final JSONObject settings = Global.getSettings().loadJSON(SETTINGS_FILE);
5759
notificationKey = settings.getInt("summonUpdateNotificationKey");

src/org/lazywizard/versionchecker/VersionChecker.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
import java.util.Scanner;
1717
import java.util.concurrent.*;
1818

19-
// TEMP: runcode String path = (System.getProperty("user.dir")+"/"+System.getProperty("com.fs.starfarer.settings.paths.mods")); path = path.replace("\\\\", "\\").replace("\\","/");System.out.println(path);
2019
final class VersionChecker
2120
{
2221
private static final String VANILLA_UPDATE_URL
23-
= "https://bitbucket.org/LazyWizard/version-checker/downloads/vanilla.txt";
22+
= "https://raw.githubusercontent.com/LazyWizard/version-checker/master/vanilla.txt";
2423
private static int MAX_THREADS = 12;
2524

2625
static void setMaxThreads(int maxThreads)
@@ -32,7 +31,7 @@ private static JSONObject sanitizeJSON(final String rawJSON) throws JSONExceptio
3231
{
3332
StringBuilder result = new StringBuilder(rawJSON.length());
3433

35-
// Remove elements that default JSON implementation can't parse
34+
// Remove elements that the default JSON implementation can't parse
3635
for (final String str : rawJSON.split("\n"))
3736
{
3837
// Strip out whole-line comments
@@ -80,7 +79,6 @@ private static Object getRemoteVersionFile(final String versionFileURL)
8079
Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A"))
8180
{
8281
return new VersionFile(sanitizeJSON(scanner.next()), true);
83-
8482
}
8583
catch (MalformedURLException ex)
8684
{

0 commit comments

Comments
 (0)