-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package lau.NovelDL; | ||
|
||
import java.io.IOException; | ||
|
||
/** | ||
* NovelDL, the best application for Chinese readers | ||
* | ||
* @author layou233 | ||
*/ | ||
|
||
public class UpdateCheck { | ||
public static String version = "1.0"; | ||
|
||
public static void updateCheck() { | ||
System.out.println("Version " + version); | ||
String remoteVersion; | ||
try { | ||
remoteVersion = Weber.getWebString("https://raw.githubusercontent.com/layou233/NovelDL/master/src/main/resources/version.txt", "UTF-8"); | ||
} catch ( | ||
IOException e) { | ||
System.out.println("FAILED TO CHECK FOR UPDATES.\n" + | ||
"You can check it yourself at https://github.com/layou233/NovelDL/releases\n"); | ||
return; | ||
} | ||
if (version.equals(remoteVersion)) | ||
System.out.println("Nice! You are using the latest version!\n"); | ||
else System.out.println("THE NovelDL YOU ARE CURRENTLY USING HAS BEEN OUTDATED!\n" + | ||
"Check out newer versions at https://github.com/layou233/NovelDL/releases\n"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters