[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v2 03/11] Add a script to extract VSS SDK header
From: |
Tomoki Sekiyama |
Subject: |
[Qemu-devel] [RFC PATCH v2 03/11] Add a script to extract VSS SDK headers on POSIX system |
Date: |
Fri, 12 Apr 2013 16:01:49 -0400 |
User-agent: |
StGit/0.16 |
VSS SDK(*) setup.exe is only runnable on Windows. This adds a script
to extract VSS SDK headers on POSIX-systems using msitools.
* http://www.microsoft.com/en-us/download/details.aspx?id=23490
From: Paolo Bonzini <address@hidden>
Signed-off-by: Tomoki Sekiyama <address@hidden>
---
scripts/extract-vsssdk-headers | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100755 scripts/extract-vsssdk-headers
diff --git a/scripts/extract-vsssdk-headers b/scripts/extract-vsssdk-headers
new file mode 100755
index 0000000..5877137
--- /dev/null
+++ b/scripts/extract-vsssdk-headers
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+# extract-vsssdk-headers
+# Author: Paolo Bonzini <address@hidden>
+
+set -e
+if test $# = 0 || ! test -f "$1"; then
+ echo 'Usage: extract-vsssdk-headers /path/to/setup.exe'
+ exit 1
+fi
+
+# Extract .MSI file in the .exe, looking for the OLE compound
+# document signature. Extra data at the end does not matter.
+export LC_ALL=C
+MAGIC=$'\xd0\xcf\x11\xe0\xa1\xb1\x1a\xe1'
+offset=`grep -abom1 "$MAGIC" "$1" | sed -n 's/:/\n/; P' `
+(dd of=/dev/null skip=$offset bs=1 count=0; cat) < "$1" > vsssdk.msi
+
+# Now extract the files.
+tmpdir=tmp$$
+mkdir $tmpdir
+msiextract -C $tmpdir vsssdk.msi
+mv "$tmpdir/Program Files/Microsoft/VSSSDK72/inc" inc
+rm -rf $tmpdir vsssdk.msi
+exit 0
- [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 01/11] configure: Support configuring c++ compiler, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 02/11] Fix errors and warnings while compiling with c++ compilier, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 03/11] Add a script to extract VSS SDK headers on POSIX system,
Tomoki Sekiyama <=
- [Qemu-devel] [RFC PATCH v2 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 07/11] qemu-ga: call Windows VSS requester in fsfreeze command handler, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 08/11] qemu-ga: install Windows VSS provider on `qemu-ga -s install', Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 09/11] qemu-ga: Add VSS provider .tlb file in the repository, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 10/11] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command, Tomoki Sekiyama, 2013/04/12
- [Qemu-devel] [RFC PATCH v2 11/11] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly, Tomoki Sekiyama, 2013/04/12
- Re: [Qemu-devel] [RFC PATCH v2 00/11] qemu-ga: fsfreeze on Windows using VSS, Libaiqing, 2013/04/23