X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/382855dd3f69cdce3e3b4eb6da392f881e7825da..9d3cb178db367962f68521985ef9e239e1d03fa9:/src/upkg.c diff --git a/src/upkg.c b/src/upkg.c index bcbee2f..a7e96bf 100644 --- a/src/upkg.c +++ b/src/upkg.c @@ -22,6 +22,7 @@ #include #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; }