Mercurial > mxe-octave
annotate src/msvc-msitools-1.patch @ 3987:0d529f3f439d
of-control: update to v2.8.3
* src/of-control.mk: update version, checksum
* src/build_packages.m: update control version
author | John Donoghue |
---|---|
date | Mon, 06 Jul 2015 11:52:01 -0400 |
parents | 98d994cfc408 |
children |
rev | line source |
---|---|
3137
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
1 diff -urN msitools-0.92-orig/Makefile.in msitools-0.92/Makefile.in |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
2 --- msitools-0.92-orig/Makefile.in 2013-03-07 15:27:29 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
3 +++ msitools-0.92/Makefile.in 2013-07-13 22:25:48 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
4 @@ -552,7 +552,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
5 $(NULL) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
6 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
7 wixl_CPPFLAGS = \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
8 - -include config.h \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
9 + -FI$(top_srcdir)/config.h \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
10 -Iinclude \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
11 -I$(srcdir)/include \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
12 $(WIXL_CFLAGS) \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
13 diff -urN msitools-0.92-orig/libmsi/insert.c msitools-0.92/libmsi/insert.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
14 --- msitools-0.92-orig/libmsi/insert.c 2013-02-07 20:04:46 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
15 +++ msitools-0.92/libmsi/insert.c 2013-07-13 18:57:31 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
16 @@ -65,7 +65,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
17 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
18 if( !vl ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
19 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
20 - TRACE("Not enough elements in the list to insert\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
21 + TRACE("Not enough elements in the list to insert\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
22 goto err; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
23 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
24 switch( vl->val->type ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
25 diff -urN msitools-0.92-orig/libmsi/libmsi-database.c msitools-0.92/libmsi/libmsi-database.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
26 --- msitools-0.92-orig/libmsi/libmsi-database.c 2013-02-19 17:24:53 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
27 +++ msitools-0.92/libmsi/libmsi-database.c 2013-07-13 19:03:52 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
28 @@ -134,8 +134,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
29 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
30 libmsi_database_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
31 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
32 + LibmsiDatabase *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
33 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
34 g_return_if_fail (LIBMSI_IS_DATABASE (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
35 - LibmsiDatabase *self = LIBMSI_DATABASE (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
36 + self = LIBMSI_DATABASE (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
37 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
38 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
39 case PROP_PATH: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
40 @@ -158,8 +160,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
41 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
42 libmsi_database_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
43 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
44 + LibmsiDatabase *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
45 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
46 g_return_if_fail (LIBMSI_IS_DATABASE (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
47 - LibmsiDatabase *self = LIBMSI_DATABASE (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
48 + self = LIBMSI_DATABASE (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
49 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
50 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
51 case PROP_PATH: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
52 @@ -1231,6 +1235,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
53 count = libmsi_record_get_field_count (row); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
54 for (i = start; i <= count; i++) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
55 char *str; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
56 + const char *sep; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
57 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
58 _libmsi_record_get_gsf_input (row, i, &in); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
59 if (in) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
60 @@ -1252,7 +1257,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
61 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
62 g_free (str); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
63 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
64 - const char *sep = (i < count) ? "\t" : "\r\n"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
65 + sep = (i < count) ? "\t" : "\r\n"; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
66 if (write (fd, sep, strlen (sep)) != strlen (sep)) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
67 goto end; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
68 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
69 @@ -1354,6 +1359,8 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
70 r = _libmsi_query_open( db, &view, query, table ); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
71 if (r == LIBMSI_RESULT_SUCCESS) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
72 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
73 + ExportRow export; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
74 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
75 /* write out row 1, the column names */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
76 r = _libmsi_query_get_column_info(view, LIBMSI_COL_INFO_NAMES, &rec); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
77 if (r == LIBMSI_RESULT_SUCCESS) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
78 @@ -1380,11 +1387,9 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
79 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
80 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
81 /* write out row 4 onwards, the data */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
82 - ExportRow export = { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
83 - .fd = fd, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
84 - .table_dir = g_file_new_for_path (table), |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
85 - .error = error |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
86 - }; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
87 + export.fd = fd; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
88 + export.table_dir = g_file_new_for_path (table); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
89 + export.error = error; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
90 r = _libmsi_query_iterate_records( view, 0, msi_export_row, &export); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
91 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
92 g_object_unref (export.table_dir); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
93 diff -urN msitools-0.92-orig/libmsi/libmsi-istream.c msitools-0.92/libmsi/libmsi-istream.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
94 --- msitools-0.92-orig/libmsi/libmsi-istream.c 2013-02-06 18:00:31 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
95 +++ msitools-0.92/libmsi/libmsi-istream.c 2013-07-13 19:04:46 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
96 @@ -146,9 +146,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
97 libmsi_istream_new (GsfInput *input) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
98 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
99 GsfInput *dup = gsf_input_dup (input, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
100 + LibmsiIStream *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
101 g_return_val_if_fail (dup, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
102 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
103 - LibmsiIStream *self = g_object_new (LIBMSI_TYPE_ISTREAM, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
104 + self = g_object_new (LIBMSI_TYPE_ISTREAM, NULL); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
105 self->input = dup; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
106 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
107 return self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
108 diff -urN msitools-0.92-orig/libmsi/libmsi-query.c msitools-0.92/libmsi/libmsi-query.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
109 --- msitools-0.92-orig/libmsi/libmsi-query.c 2013-02-11 13:33:02 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
110 +++ msitools-0.92/libmsi/libmsi-query.c 2013-07-13 19:05:38 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
111 @@ -67,8 +67,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
112 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
113 libmsi_query_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
114 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
115 + LibmsiQuery *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
116 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
117 g_return_if_fail (LIBMSI_IS_QUERY (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
118 - LibmsiQuery *self = LIBMSI_QUERY (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
119 + self = LIBMSI_QUERY (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
120 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
121 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
122 case PROP_DATABASE: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
123 @@ -88,8 +90,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
124 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
125 libmsi_query_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
126 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
127 + LibmsiQuery *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
128 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
129 g_return_if_fail (LIBMSI_IS_QUERY (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
130 - LibmsiQuery *self = LIBMSI_QUERY (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
131 + self = LIBMSI_QUERY (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
132 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
133 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
134 case PROP_DATABASE: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
135 diff -urN msitools-0.92-orig/libmsi/libmsi-record.c msitools-0.92/libmsi/libmsi-record.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
136 --- msitools-0.92-orig/libmsi/libmsi-record.c 2013-02-07 20:04:17 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
137 +++ msitools-0.92/libmsi/libmsi-record.c 2013-07-13 19:07:00 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
138 @@ -85,8 +85,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
139 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
140 libmsi_record_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
141 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
142 + LibmsiRecord *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
143 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
144 g_return_if_fail (LIBMSI_IS_RECORD (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
145 - LibmsiRecord *self = LIBMSI_RECORD (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
146 + self = LIBMSI_RECORD (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
147 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
148 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
149 case PROP_COUNT: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
150 @@ -101,8 +103,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
151 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
152 libmsi_record_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
153 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
154 + LibmsiRecord *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
155 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
156 g_return_if_fail (LIBMSI_IS_RECORD (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
157 - LibmsiRecord *self = LIBMSI_RECORD (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
158 + self = LIBMSI_RECORD (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
159 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
160 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
161 case PROP_COUNT: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
162 @@ -601,6 +605,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
163 GInputStream *input, gsize count, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
164 GCancellable *cancellable, GError **error) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
165 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
166 + gsize bytes_read = 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
167 + GsfInput *stm = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
168 + guint8 *data; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
169 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
170 g_return_val_if_fail (LIBMSI_IS_RECORD (rec), FALSE); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
171 g_return_val_if_fail (G_IS_INPUT_STREAM (input), FALSE); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
172 g_return_val_if_fail (field > 0 && field <= rec->count, FALSE); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
173 @@ -608,9 +616,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
174 g_return_val_if_fail (!cancellable || G_IS_CANCELLABLE (cancellable), FALSE); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
175 g_return_val_if_fail (!error || *error == NULL, FALSE); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
176 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
177 - gsize bytes_read = 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
178 - GsfInput *stm = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
179 - guint8 *data = g_malloc (count); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
180 + data = g_malloc (count); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
181 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
182 if (!g_input_stream_read_all (input, data, count, &bytes_read, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
183 cancellable, error) || |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
184 diff -urN msitools-0.92-orig/libmsi/libmsi-summary-info.c msitools-0.92/libmsi/libmsi-summary-info.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
185 --- msitools-0.92-orig/libmsi/libmsi-summary-info.c 2013-02-07 20:17:23 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
186 +++ msitools-0.92/libmsi/libmsi-summary-info.c 2013-07-13 19:18:27 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
187 @@ -76,8 +76,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
188 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
189 summary_info_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
190 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
191 + LibmsiSummaryInfo *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
192 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
193 g_return_if_fail (LIBMSI_IS_SUMMARY_INFO (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
194 - LibmsiSummaryInfo *self = LIBMSI_SUMMARY_INFO (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
195 + self = LIBMSI_SUMMARY_INFO (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
196 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
197 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
198 case PROP_DATABASE: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
199 @@ -96,8 +98,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
200 static void |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
201 summary_info_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
202 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
203 + LibmsiSummaryInfo *self; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
204 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
205 g_return_if_fail (LIBMSI_IS_SUMMARY_INFO (object)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
206 - LibmsiSummaryInfo *self = LIBMSI_SUMMARY_INFO (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
207 + self = LIBMSI_SUMMARY_INFO (object); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
208 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
209 switch (prop_id) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
210 case PROP_DATABASE: |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
211 @@ -244,19 +248,19 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
212 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
213 static gchar* filetime_to_string (guint64 ft) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
214 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
215 - struct tm tm; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
216 + struct tm *tm; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
217 time_t t; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
218 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
219 ft /= 10000000ULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
220 ft -= 134774ULL * 86400ULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
221 t = ft; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
222 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
223 - if (!gmtime_r (&t, &tm)) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
224 + if (!(tm = gmtime (&t))) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
225 return NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
226 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
227 return g_strdup_printf ("%d/%d/%d %d:%d:%d", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
228 - tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
229 - tm.tm_hour, tm.tm_min, tm.tm_sec); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
230 + tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
231 + tm->tm_hour, tm->tm_min, tm->tm_sec); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
232 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
233 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
234 static void parse_filetime( const char *str, guint64 *ft ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
235 diff -urN msitools-0.92-orig/libmsi/string.c msitools-0.92/libmsi/string.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
236 --- msitools-0.92-orig/libmsi/string.c 2013-02-07 20:07:52 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
237 +++ msitools-0.92/libmsi/string.c 2013-07-13 19:11:26 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
238 @@ -562,7 +562,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
239 char *data = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
240 uint8_t *pool = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
241 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
242 - TRACE("\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
243 + TRACE("\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
244 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
245 /* construct the new table in memory first */ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
246 string_totalsize( st, &datasize, &poolsize ); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
247 diff -urN msitools-0.92-orig/libmsi/table.c msitools-0.92/libmsi/table.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
248 --- msitools-0.92-orig/libmsi/table.c 2013-02-19 17:24:53 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
249 +++ msitools-0.92/libmsi/table.c 2013-07-13 20:00:12 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
250 @@ -27,6 +27,10 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
251 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
252 #include "debug.h" |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
253 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
254 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
255 +#include <intrin.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
256 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
257 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
258 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
259 #define LibmsiTable_HASH_TABLE_SIZE 37 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
260 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
261 @@ -263,7 +267,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
262 msi_free(encname); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
263 if( !stm ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
264 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
265 - TRACE("open stream failed - empty table?\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
266 + TRACE("open stream failed - empty table?\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
267 return ret; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
268 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
269 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
270 @@ -1527,7 +1531,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
271 continue; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
272 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
273 if ( MSITYPE_IS_BINARY(tv->columns[i].type) ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
274 - TRACE("skipping binary column\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
275 + TRACE("skipping binary column\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
276 else if ( tv->columns[i].type & MSITYPE_STRING ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
277 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
278 const char *str; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
279 @@ -1792,10 +1796,18 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
280 for (i = 0; i < tv->table->col_count; i++) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
281 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
282 if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
283 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
284 + _InterlockedIncrement((long*)(&tv->table->colinfo[i].ref_count)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
285 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
286 __sync_add_and_fetch(&tv->table->colinfo[i].ref_count, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
287 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
288 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
289 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
290 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
291 + return _InterlockedIncrement((long*)(&tv->table->ref_count)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
292 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
293 return __sync_add_and_fetch(&tv->table->ref_count, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
294 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
295 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
296 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
297 static unsigned table_view_remove_column(LibmsiView *view, const char *table, unsigned number) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
298 @@ -1844,7 +1856,11 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
299 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
300 if (tv->table->colinfo[i].type & MSITYPE_TEMPORARY) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
301 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
302 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
303 + ref = _InterlockedDecrement((long*)(&tv->table->colinfo[i].ref_count)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
304 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
305 ref = __sync_sub_and_fetch(&tv->table->colinfo[i].ref_count, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
306 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
307 if (ref == 0) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
308 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
309 r = table_view_remove_column(view, tv->table->colinfo[i].tablename, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
310 @@ -1855,7 +1871,11 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
311 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
312 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
313 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
314 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
315 + ref = _InterlockedDecrement((long*)(&tv->table->ref_count)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
316 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
317 ref = __sync_sub_and_fetch(&tv->table->ref_count, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
318 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
319 if (ref == 0) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
320 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
321 if (!tv->table->row_count) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
322 @@ -1900,7 +1920,11 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
323 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
324 if (!strcmp( msitable->colinfo[i].colname, column )) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
325 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
326 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
327 + _InterlockedIncrement((long*)(&msitable->colinfo[i].ref_count)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
328 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
329 __sync_add_and_fetch(&msitable->colinfo[i].ref_count, 1); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
330 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
331 break; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
332 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
333 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
334 @@ -2157,7 +2181,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
335 if( !rec ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
336 return rec; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
337 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
338 - TRACE("row ->\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
339 + TRACE("row ->\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
340 for( i=0; i<tv->num_cols; i++ ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
341 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
342 if ( (mask&1) && (i>=(mask>>8)) ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
343 @@ -2236,7 +2260,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
344 const char *sval; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
345 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
346 if( libmsi_record_is_null( rec, i ) ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
347 - TRACE("row -> []\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
348 + TRACE("row -> []\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
349 else if( (sval = _libmsi_record_get_string_raw( rec, i )) ) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
350 TRACE("row -> [%s]\n", debugstr_a(sval)); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
351 else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
352 @@ -2511,7 +2535,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
353 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
354 else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
355 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
356 - TRACE("inserting row\n"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
357 + TRACE("inserting row\n", 0); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
358 r = table_view_insert_row( &tv->view, rec, -1, false ); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
359 if (r != LIBMSI_RESULT_SUCCESS) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
360 g_warning("failed to insert row %u\n", r); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
361 diff -urN msitools-0.92-orig/tools/msibuild.c msitools-0.92/tools/msibuild.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
362 --- msitools-0.92-orig/tools/msibuild.c 2013-02-07 19:48:42 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
363 +++ msitools-0.92/tools/msibuild.c 2013-07-13 21:38:48 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
364 @@ -26,7 +26,11 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
365 #include <sys/stat.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
366 #include <libmsi.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
367 #include <limits.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
368 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
369 +#include <uuid-win32.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
370 +#else |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
371 #include <uuid.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
372 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
373 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
374 #include "sqldelim.h" |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
375 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
376 diff -urN msitools-0.92-orig/tools/msiinfo.c msitools-0.92/tools/msiinfo.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
377 --- msitools-0.92-orig/tools/msiinfo.c 2013-02-07 19:58:42 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
378 +++ msitools-0.92/tools/msiinfo.c 2013-07-13 22:08:12 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
379 @@ -34,6 +34,15 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
380 #include <fcntl.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
381 #include <limits.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
382 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
383 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
384 +# ifndef ssize_t |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
385 + typedef int ssize_t; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
386 +# endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
387 +# ifndef STDOUT_FILENO |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
388 +# define STDOUT_FILENO 1 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
389 +# endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
390 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
391 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
392 struct Command { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
393 const char *cmd; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
394 const char *desc; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
395 @@ -43,7 +52,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
396 int (*func)(struct Command *cmd, int argc, char **argv, GError **error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
397 }; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
398 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
399 -static struct Command cmds[]; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
400 +static struct Command *cmds; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
401 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
402 static void usage(FILE *out) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
403 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
404 @@ -690,67 +699,97 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
405 return 0; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
406 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
407 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
408 -static struct Command cmds[] = { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
409 +static struct Command _cmds[] = { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
410 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
411 - .cmd = "help", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
412 - .opts = "[SUBCOMMAND]", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
413 - .desc = "Show program or subcommand usage", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
414 - .func = cmd_help, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
415 + "help", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
416 + "Show program or subcommand usage", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
417 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
418 + "[SUBCOMMAND]", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
419 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
420 + cmd_help |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
421 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
422 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
423 - .cmd = "streams", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
424 - .opts = "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
425 - .desc = "List streams in a .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
426 - .func = cmd_streams, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
427 + "streams", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
428 + "List streams in a .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
429 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
430 + "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
431 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
432 + cmd_streams |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
433 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
434 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
435 - .cmd = "tables", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
436 - .opts = "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
437 - .desc = "List tables in a .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
438 - .func = cmd_tables, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
439 + "tables", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
440 + "List tables in a .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
441 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
442 + "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
443 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
444 + cmd_tables |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
445 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
446 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
447 - .cmd = "extract", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
448 - .opts = "FILE STREAM", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
449 - .desc = "Extract a binary stream from an .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
450 - .func = cmd_extract, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
451 + "extract", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
452 + "Extract a binary stream from an .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
453 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
454 + "FILE STREAM", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
455 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
456 + cmd_extract |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
457 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
458 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
459 - .cmd = "export", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
460 - .opts = "[-s] FILE TABLE\n\nOptions:\n" |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
461 - " -s Format output as an SQL query", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
462 - .desc = "Export a table in text form from an .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
463 - .func = cmd_export, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
464 + "export", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
465 + "Export a table in text form from an .msi file", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
466 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
467 + "[-s] FILE TABLE\n\nOptions:\n" |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
468 + " -s Format output as an SQL query", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
469 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
470 + cmd_export |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
471 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
472 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
473 - .cmd = "suminfo", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
474 - .opts = "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
475 - .desc = "Print summary information", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
476 - .func = cmd_suminfo, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
477 + "suminfo", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
478 + "Print summary information", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
479 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
480 + "FILE", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
481 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
482 + cmd_suminfo |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
483 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
484 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
485 - .cmd = "-h", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
486 - .func = cmd_help, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
487 + "-h", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
488 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
489 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
490 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
491 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
492 + cmd_help |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
493 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
494 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
495 - .cmd = "--help", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
496 - .func = cmd_help, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
497 + "--help", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
498 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
499 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
500 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
501 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
502 + cmd_help |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
503 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
504 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
505 - .cmd = "-v", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
506 - .func = cmd_version |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
507 + "-v", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
508 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
509 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
510 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
511 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
512 + cmd_version |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
513 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
514 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
515 - .cmd = "--version", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
516 - .func = cmd_version |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
517 + "--version", |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
518 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
519 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
520 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
521 + 0, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
522 + cmd_version |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
523 }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
524 { NULL }, |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
525 }; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
526 +static struct Command *cmds = _cmds; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
527 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
528 int main(int argc, char **argv) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
529 { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
530 GError *error = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
531 struct Command *cmd = NULL; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
532 + int result; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
533 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
534 #if !GLIB_CHECK_VERSION(2,35,1) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
535 g_type_init (); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
536 @@ -767,7 +806,7 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
537 usage(stderr); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
538 } |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
539 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
540 - int result = cmd->func(cmd, argc - 1, argv + 1, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
541 + result = cmd->func(cmd, argc - 1, argv + 1, &error); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
542 if (error != NULL) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
543 g_printerr("error: %s\n", error->message); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
544 print_libmsi_error(error->code); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
545 diff -urN msitools-0.92-orig/tools/wixl/util.c msitools-0.92/tools/wixl/util.c |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
546 --- msitools-0.92-orig/tools/wixl/util.c 2013-03-07 15:28:12 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
547 +++ msitools-0.92/tools/wixl/util.c 2013-07-13 22:33:52 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
548 @@ -82,6 +82,9 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
549 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
550 static gint _vala_array_length (gpointer array); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
551 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
552 +#ifdef _MSC_VER |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
553 +# include <uuid-win32.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
554 +#endif |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
555 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
556 GQuark wixl_error_quark (void) { |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
557 return g_quark_from_static_string ("wixl_error-quark"); |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
558 diff -urN msitools-0.92-orig/uuid-win32.h msitools-0.92/uuid-win32.h |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
559 --- msitools-0.92-orig/uuid-win32.h 1969-12-31 19:00:00 -0500 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
560 +++ msitools-0.92/uuid-win32.h 2013-07-13 22:50:42 -0400 |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
561 @@ -0,0 +1,18 @@ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
562 +#ifndef __UUID_WIN32_H__ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
563 +#define __UUID_WIN32_H__ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
564 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
565 +#include <rpc.h> |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
566 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
567 +typedef UUID uuid_t; |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
568 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
569 +#define uuid_generate(uu) UuidCreate(&(uu)) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
570 +#define uuid_unparse(uu,str) \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
571 + do { \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
572 + RPC_CSTR __buf__; \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
573 + UuidToString(&(uu), &__buf__); \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
574 + strcpy(str, __buf__); \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
575 + RpcStringFree(&__buf__); \ |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
576 + } while (0) |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
577 +#define uuid_unparse_upper uuid_unparse |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
578 + |
98d994cfc408
Add msitools (and MSVC-specific patches)
Michael Goffioul <michael.goffioul@gmail.com>
parents:
diff
changeset
|
579 +#endif /* __UUID_WIN32_H__ */ |