From a86db2633f3f281d5c8a99828de51f008b089322 Mon Sep 17 00:00:00 2001 From: Miki Rozloznik Date: Thu, 28 Nov 2024 11:11:25 +0100 Subject: [PATCH] Add main entry to the extension --- extension/build.xml | 1 + .../extension/cpp17/Cpp17Extension.java | 2 +- .../extension/cpp17/Cpp17ExtensionMain.java | 22 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 extension/src/zserio/extension/cpp17/Cpp17ExtensionMain.java diff --git a/extension/build.xml b/extension/build.xml index 4d053a0..01d1800 100644 --- a/extension/build.xml +++ b/extension/build.xml @@ -184,6 +184,7 @@ spotbugs.home_dir - Location of the spotbugs tool. If not set, spotbugs i + diff --git a/extension/src/zserio/extension/cpp17/Cpp17Extension.java b/extension/src/zserio/extension/cpp17/Cpp17Extension.java index 4515c45..53f350a 100644 --- a/extension/src/zserio/extension/cpp17/Cpp17Extension.java +++ b/extension/src/zserio/extension/cpp17/Cpp17Extension.java @@ -15,7 +15,7 @@ import zserio.tools.ExtensionParameters; /** - * The extension which generates C++ API sources. + * The extension which generates C++17 API sources. */ public final class Cpp17Extension implements Extension { diff --git a/extension/src/zserio/extension/cpp17/Cpp17ExtensionMain.java b/extension/src/zserio/extension/cpp17/Cpp17ExtensionMain.java new file mode 100644 index 0000000..4194485 --- /dev/null +++ b/extension/src/zserio/extension/cpp17/Cpp17ExtensionMain.java @@ -0,0 +1,22 @@ +package zserio.extension.cpp17; + +/** + * The main entry of the Zserio C++17 extension. + * + * This just prints the usage. + */ +public final class Cpp17ExtensionMain +{ + public static void main(String[] args) + { + System.out.println( + "C++17 Generator version " + Cpp17ExtensionVersion.CPP17_EXTENSION_VERSION_STRING + "\n"); + System.out.println("This generator cannot be run standalone and is designed as an extension to the " + + "Zserio version " + + Cpp17ExtensionVersion.EXPECTED_ZSERIO_VERSION_STRING + ".\n"); + System.out.println("How to run it using Zserio bundle:"); + System.out.println(" java -cp zserio.jar:zserio_cpp17.jar zserio.tools.ZserioTool\n"); + System.out.println("How to run it using Zserio core:"); + System.out.println(" java -cp zserio_core.jar:zserio_cpp17.jar zserio.tools.ZserioTool"); + } +}