]> git.draconx.ca Git - upkg.git/blobdiff - src/upkg.c
Early start of the module system.
[upkg.git] / src / upkg.c
index bcbee2fbcd291b5522ea551942e81c5ec07ed729..a7e96bf02984fbbf21c95ac7e4d8841b86e72a85 100644 (file)
@@ -22,6 +22,7 @@
 #include <glib-object.h>
 
 #include "upkg.h"
+#include "module.h"
 #include "serializable.h"
 #include "exportable.h"
 #include "music.h"
@@ -57,13 +58,14 @@ int main(int argc, char **argv)
 {
        struct upkg *pkg;
 
-       g_type_init();
-
        if (argc < 2) {
                fprintf(stderr, "usage: upkg file\n");
                return EXIT_FAILURE;
        }
 
+       if (module_init() != 0)
+               return EXIT_FAILURE;
+
        pkg = upkg_fopen(argv[1]);
        if (!pkg) {
                fprintf(stderr, "failed to open package!\n");
@@ -99,5 +101,7 @@ int main(int argc, char **argv)
        printf("Wrote %s\n", name);
 
        upkg_close(pkg);
+       module_exit();
+
        return 0;
 }