diff options
| author | Simon Tatham <anakin@pobox.com> | 2017-05-18 19:00:07 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2017-05-18 19:00:07 +0100 |
| commit | 5e1f0d7e9fb3b05c5867c57c9dfee0363441feae (patch) | |
| tree | 70dc283df890730d54003115722aca6d277a509a | |
| parent | 8574dcc8c56971345a688a61a8d2022f4cc000cc (diff) | |
| download | wix-on-linux-5e1f0d7e9fb3b05c5867c57c9dfee0363441feae.tar.gz wix-on-linux-5e1f0d7e9fb3b05c5867c57c9dfee0363441feae.tar.bz2 wix-on-linux-5e1f0d7e9fb3b05c5867c57c9dfee0363441feae.zip | |
Move CAB-reading into its own file.
| -rw-r--r-- | Makefile.am | 4 | ||||
| -rw-r--r-- | fake-winterop.c | 33 | ||||
| -rw-r--r-- | readcab.c | 41 |
3 files changed, 43 insertions, 35 deletions
diff --git a/Makefile.am b/Makefile.am index 951eb9d..c40bb2e 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -4,8 +4,8 @@ ACLOCAL_AMFLAGS = -I m4 | |||
| 4 | 4 | ||
| 5 | lib_LTLIBRARIES = libwinterop.la libmsi.la libpreload.la | 5 | lib_LTLIBRARIES = libwinterop.la libmsi.la libpreload.la |
| 6 | 6 | ||
| 7 | libwinterop_la_SOURCES = fake-winterop.c makecab.c memory.c memory.h \ | 7 | libwinterop_la_SOURCES = fake-winterop.c makecab.c readcab.c memory.c \ |
| 8 | dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h | 8 | memory.h dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h |
| 9 | 9 | ||
| 10 | libmsi_la_SOURCES = makemsi.c md5.c memory.c memory.h version.c \ | 10 | libmsi_la_SOURCES = makemsi.c md5.c memory.c memory.h version.c \ |
| 11 | dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h | 11 | dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h |
diff --git a/fake-winterop.c b/fake-winterop.c index 755853f..70261e2 100644 --- a/fake-winterop.c +++ b/fake-winterop.c | |||
| @@ -27,36 +27,3 @@ uint32_t ResetAcls(const char16_t **pwzFiles, uint32_t cFiles) | |||
| 27 | { | 27 | { |
| 28 | return 0; | 28 | return 0; |
| 29 | } | 29 | } |
| 30 | |||
| 31 | uint32_t ExtractCabBegin(void) | ||
| 32 | { | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | uint32_t ExtractCab(const char16_t *wzCabinet, const char16_t *wzExtractDir) | ||
| 37 | { | ||
| 38 | char *cab = ascii(wzCabinet, true), *dir = ascii(wzExtractDir, true); | ||
| 39 | fprintf(stderr, "ExtractCab(\"%s\", \"%s\"\n", cab, dir); | ||
| 40 | system_argv("cabextract", "-d", dir, cab, cNULL); | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | |||
| 44 | void ExtractCabFinish(void) | ||
| 45 | { | ||
| 46 | } | ||
| 47 | |||
| 48 | uint32_t EnumerateCabBegin(void) | ||
| 49 | { | ||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | uint32_t EnumerateCab(const char16_t *wzCabinet, void *pfnNotify) | ||
| 54 | { | ||
| 55 | /* FIXME: pfnNotify looks like a fn ptr again */ | ||
| 56 | fprintf(stderr, "EnumerateCab!\n"); | ||
| 57 | return 0; | ||
| 58 | } | ||
| 59 | |||
| 60 | void EnumerateCabFinish(void) | ||
| 61 | { | ||
| 62 | } | ||
diff --git a/readcab.c b/readcab.c new file mode 100644 index 0000000..c9171ca --- /dev/null +++ b/readcab.c | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | #include <stdint.h> | ||
| 2 | #include <stdbool.h> | ||
| 3 | #include <uchar.h> | ||
| 4 | #include <err.h> | ||
| 5 | |||
| 6 | #include "memory.h" | ||
| 7 | #include "subproc.h" | ||
| 8 | #include "uchars.h" | ||
| 9 | |||
| 10 | uint32_t ExtractCabBegin(void) | ||
| 11 | { | ||
| 12 | return 0; | ||
| 13 | } | ||
| 14 | |||
| 15 | uint32_t ExtractCab(const char16_t *wzCabinet, const char16_t *wzExtractDir) | ||
| 16 | { | ||
| 17 | char *cab = ascii(wzCabinet, true), *dir = ascii(wzExtractDir, true); | ||
| 18 | warnx("ExtractCab(\"%s\", \"%s\"", cab, dir); | ||
| 19 | system_argv("cabextract", "-d", dir, cab, cNULL); | ||
| 20 | sfree(cab); | ||
| 21 | sfree(dir); | ||
| 22 | return 0; | ||
| 23 | } | ||
| 24 | |||
| 25 | void ExtractCabFinish(void) | ||
| 26 | { | ||
| 27 | } | ||
| 28 | |||
| 29 | uint32_t EnumerateCabBegin(void) | ||
| 30 | { | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | uint32_t EnumerateCab(const char16_t *wzCabinet, void *pfnNotify) | ||
| 35 | { | ||
| 36 | return -1; /* we don't support this call */ | ||
| 37 | } | ||
| 38 | |||
| 39 | void EnumerateCabFinish(void) | ||
| 40 | { | ||
| 41 | } | ||
