From 049ca3b97be5dd023f6f56335821e76b0face389 Mon Sep 17 00:00:00 2001 From: leprinco Date: Fri, 29 Nov 2024 09:51:32 +0100 Subject: [PATCH] ui banner --- .../src/main/java/de/mephisto/vpin/ui/Studio.java | 10 ++++++++-- vpin-studio-ui/src/main/resources/banner.txt | 7 +++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 vpin-studio-ui/src/main/resources/banner.txt diff --git a/vpin-studio-ui/src/main/java/de/mephisto/vpin/ui/Studio.java b/vpin-studio-ui/src/main/java/de/mephisto/vpin/ui/Studio.java index 69765a08c..a55908b23 100644 --- a/vpin-studio-ui/src/main/java/de/mephisto/vpin/ui/Studio.java +++ b/vpin-studio-ui/src/main/java/de/mephisto/vpin/ui/Studio.java @@ -44,6 +44,7 @@ import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.util.StreamUtils; import java.awt.*; import java.io.File; @@ -51,6 +52,7 @@ import java.io.InputStream; import java.net.ServerSocket; import java.net.URI; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Locale; import java.util.Optional; @@ -81,10 +83,14 @@ public static void main(String[] args) { @Override public void start(Stage stage) throws IOException { - LOG.info("-------------- Studio Starts -------------"); + try (InputStream banner = getClass().getResourceAsStream("/banner.txt")) { + String txt = StreamUtils.copyToString(banner, StandardCharsets.UTF_8); + LOG.info("\n" + txt + "\n"); + } + + LOG.info("Studio Starting..."); LOG.info("Locale: " + Locale.getDefault().getDisplayName()); LOG.info("OS: " + System.getProperty("os.name")); - LOG.info("------------------------------------------"); try { ss = new ServerSocket(1044); } diff --git a/vpin-studio-ui/src/main/resources/banner.txt b/vpin-studio-ui/src/main/resources/banner.txt new file mode 100644 index 000000000..ad95ed9c6 --- /dev/null +++ b/vpin-studio-ui/src/main/resources/banner.txt @@ -0,0 +1,7 @@ + _ __ ___ + _ ______ (_)___ _____/ /___ ______/ (_)___ +| | / / __ \/ / __ \______/ ___/ __/ / / / __ / / __ \ +| |/ / /_/ / / / / /_____(__ ) /_/ /_/ / /_/ / / /_/ / +|___/ .___/_/_/ /_/ /____/\__/\__,_/\__,_/_/\____/ + /_/ +vpin-studio-ui @project.version@