All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Tomoki Sekiyama <tomoki.sekiyama@hds.com>, qemu-devel@nongnu.org
Cc: libaiqing@huawei.com, ghammer@redhat.com, stefanha@gmail.com,
	lcapitulino@redhat.com, vrozenfe@redhat.com,
	Paolo Bonzini <pbonzini@redhat.com>,
	seiji.aguchi@hds.com, Laszlo Ersek <lersek@redhat.com>,
	areis@redhat.com
Subject: Re: [Qemu-devel] [PATCH v7 04/10] Add a script to extract VSS SDK headers on POSIX system
Date: Mon, 22 Jul 2013 16:27:48 -0500	[thread overview]
Message-ID: <20130722212748.16294.57937@loki> (raw)
In-Reply-To: <20130715162041.16676.20397.stgit@outback>

Quoting Tomoki Sekiyama (2013-07-15 11:20:41)
> 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 <pbonzini@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>

> ---
>  scripts/extract-vsssdk-headers |   35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 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..9e38510
> --- /dev/null
> +++ b/scripts/extract-vsssdk-headers
> @@ -0,0 +1,35 @@
> +#! /bin/bash
> +
> +# extract-vsssdk-headers
> +# Author: Paolo Bonzini <pbonzini@redhat.com>
> +
> +set -e
> +if test $# != 1 || ! test -f "$1"; then
> +  echo 'Usage: extract-vsssdk-headers /path/to/setup.exe' >&2
> +  exit 1
> +fi
> +
> +if ! command -v msiextract > /dev/null; then
> +  echo 'msiextract not found. Please install msitools.' >&2
> +  exit 1
> +fi
> +
> +if test -e inc; then
> +  echo '"inc" already exists.' >&2
> +  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')
> +tmpdir=$(mktemp -d)
> +trap 'rm -fr -- "$tmpdir" vsssdk.msi' EXIT HUP INT QUIT ALRM TERM
> +tail -c +$(($offset+1)) -- "$1" > vsssdk.msi
> +
> +# Now extract the files.
> +msiextract -C $tmpdir vsssdk.msi
> +mv "$tmpdir/Program Files/Microsoft/VSSSDK72/inc" inc
> +echo 'Extracted SDK headers into "inc" directory.'
> +exit 0

  reply	other threads:[~2013-07-22 21:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 16:20 [Qemu-devel] [PATCH v7 00/10] qemu-ga: fsfreeze on Windows using VSS Tomoki Sekiyama
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 01/10] configure: Support configuring C++ compiler Tomoki Sekiyama
2013-07-22 20:53   ` Michael Roth
2013-07-23 21:49     ` Tomoki Sekiyama
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 02/10] Add c++ keywords to QAPI helper script Tomoki Sekiyama
2013-07-22 20:55   ` Michael Roth
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 03/10] checkpatch.pl: Check .cpp files Tomoki Sekiyama
2013-07-22 21:21   ` Michael Roth
2013-07-23 21:49     ` Tomoki Sekiyama
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 04/10] Add a script to extract VSS SDK headers on POSIX system Tomoki Sekiyama
2013-07-22 21:27   ` Michael Roth [this message]
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 05/10] qemu-ga: Add configure options to specify path to Windows/VSS SDK Tomoki Sekiyama
2013-07-22 21:42   ` Michael Roth
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 06/10] error: Add error_set_win32 and error_setg_win32 Tomoki Sekiyama
2013-07-22 21:50   ` Michael Roth
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 07/10] qemu-ga: Add Windows VSS provider and requester as DLL Tomoki Sekiyama
2013-07-15 16:20 ` [Qemu-devel] [PATCH v7 08/10] qemu-ga: Call Windows VSS requester in fsfreeze command handler Tomoki Sekiyama
2013-07-15 16:21 ` [Qemu-devel] [PATCH v7 09/10] qemu-ga: Install Windows VSS provider on `qemu-ga -s install' Tomoki Sekiyama
2013-07-15 16:21 ` [Qemu-devel] [PATCH v7 10/10] QMP/qemu-ga-client: Make timeout longer for guest-fsfreeze-freeze command Tomoki Sekiyama
2013-07-18 22:19 ` [Qemu-devel] [PATCH v7 00/10] qemu-ga: fsfreeze on Windows using VSS Michael Roth
2013-07-19  3:40   ` Tomoki Sekiyama
2013-07-22 20:02     ` Tomoki Sekiyama
2013-07-22 20:33       ` Michael Roth
2013-07-22 21:33         ` Tomoki Sekiyama

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130722212748.16294.57937@loki \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=areis@redhat.com \
    --cc=ghammer@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=libaiqing@huawei.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seiji.aguchi@hds.com \
    --cc=stefanha@gmail.com \
    --cc=tomoki.sekiyama@hds.com \
    --cc=vrozenfe@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.