Add version number to window title

This commit is contained in:
0xboobface 2018-08-29 14:02:16 +02:00
parent 8d4ba6d513
commit 154995a760
1 changed files with 3 additions and 3 deletions

View File

@ -59,9 +59,9 @@ public class Launcher extends Application {
checkForUpdates();
}
private void createGui(Stage primaryStage) {
private void createGui(Stage primaryStage) throws IOException {
LOG.debug("Creating GUI");
primaryStage.setTitle("CTB Recorder");
primaryStage.setTitle("CTB Recorder " + getVersion());
InputStream icon = getClass().getResourceAsStream("/icon.png");
primaryStage.getIcons().add(new Image(icon));
tabPane = new TabPane();
@ -214,7 +214,7 @@ public class Launcher extends Application {
private Version getVersion() throws IOException {
if(Objects.equals(System.getenv("CTBREC_DEV"), "1")) {
return Version.of("0.0.0");
return Version.of("0.0.0-DEV");
} else {
try(InputStream is = getClass().getClassLoader().getResourceAsStream("version")) {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));