Skip to content

Commit

Permalink
Add main entry to the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
mikir committed Nov 28, 2024
1 parent ac776e8 commit a86db26
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions extension/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ spotbugs.home_dir - Location of the spotbugs tool. If not set, spotbugs i
<zipfileset dir="${zserio_cpp17.base_dir}/freemarker" includes="*.ftl"
prefix="freemarker/cpp17"/>
<manifest>
<attribute name="Main-Class" value="zserio.extension.cpp17.Cpp17ExtensionMain"/>
<attribute name="Implementation-Version" value="${zserio_cpp17.version}"/>
</manifest>
<metainf dir="${zserio_cpp17.build_dir}/metainf" includes="**/*"/>
Expand Down
2 changes: 1 addition & 1 deletion extension/src/zserio/extension/cpp17/Cpp17Extension.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
22 changes: 22 additions & 0 deletions extension/src/zserio/extension/cpp17/Cpp17ExtensionMain.java
Original file line number Diff line number Diff line change
@@ -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");
}
}

0 comments on commit a86db26

Please sign in to comment.