// --------------- <<<<<<< <MAIN HERE....
#if HAVE_OLD_GLIB
- class PackerRun : Object
+ public class PackerRun : Object
#else
- class PackerRun : Application
+ public class PackerRun : Application
#endif
{
public string opt_target = null;
public string opt_doc_ext = "html";
- public OptionEntry[] options;
-
+
public PackerRun ()
{
#if !HAVE_OLD_GLIB
}
void parseArgs(string[] args)
{
- this.options = {
+ GLib.OptionEntry[] options = {
OptionEntry() {
long_name = "jsfile",
short_name = 'f',
arg_data = &opt_doc_include_private,
description = "Document Private functions",
arg_description = null
- },
- };
+ }
+ };
+ var opt_context = new OptionContext ("JSDOC Packer");
+
+ try {
+ opt_context.set_help_enabled (true);
+ opt_context.add_main_entries (options, null);
+ if (!opt_context.parse ( ref args)) {
+ print("options parse error");
+ GLib.Process.exit(Posix.EXIT_FAILURE);
+ }
+
+
+
+
+ } catch (OptionError e) {
+ stdout.printf ("error: %s\n", e.message);
+ stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s",
+ args[0], opt_context.get_help(true,null));
+ GLib.Process.exit(Posix.EXIT_FAILURE);
+
+ }
+
}
- public void run()
+ public void runPack()
{
// what's required...
if (opt_debug) {