diff --git a/dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/SkidfuscatorMain.java b/dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/SkidfuscatorMain.java index cda88378..12f1b33f 100644 --- a/dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/SkidfuscatorMain.java +++ b/dev.skidfuscator.client.standalone/src/main/java/dev/skidfuscator/obfuscator/SkidfuscatorMain.java @@ -16,7 +16,13 @@ import picocli.CommandLine; import javax.swing.*; +import java.awt.*; import java.io.File; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.TimeUnit; public class SkidfuscatorMain { @@ -33,7 +39,41 @@ public static void main(String[] args) { } catch (Exception e) { e.printStackTrace(); } - new MainFrame().setVisible(true); + + final int option = JOptionPane.showOptionDialog( + null, + "You are running Skidfuscator Community! Whilst this project is free and open-source, " + + "we heavily encourage commercial usage to support the project by licensing via the enterprise" + + " edition available on our website", + "Notice!", + JOptionPane.DEFAULT_OPTION, + JOptionPane.INFORMATION_MESSAGE, + UIManager.getIcon("OptionPane.informationIcon"), + new Object[]{"OK", "Buy Enterprise", "Join the Discord"}, + "OK" + ); + + if (option == 0) { + new MainFrame().setVisible(true); + return; + } + + final String url = switch (option) { + case 1 -> "https://skidfuscator.dev/pricing"; + case 2 -> "https://discord.gg/QJC9g8fBU9"; + default -> throw new IllegalStateException("Impossible"); + }; + + CompletableFuture.delayedExecutor(1, TimeUnit.SECONDS).execute(() -> { + try { + Desktop.getDesktop().browse(new URI(url)); + } catch (IOException | URISyntaxException e) { + throw new RuntimeException(e); + } + }); + main(args); + return; + }); return; } diff --git a/docs/header.png b/docs/header.png new file mode 100644 index 00000000..31206414 Binary files /dev/null and b/docs/header.png differ diff --git a/docs/header.psd b/docs/header.psd new file mode 100644 index 00000000..4d74f165 Binary files /dev/null and b/docs/header.psd differ