[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 05/15] qemu-ga: Building Windows MSI installation wit
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 05/15] qemu-ga: Building Windows MSI installation with configure/Makefile |
Date: |
Fri, 19 Jun 2015 09:45:26 +0200 |
From: Yossi Hindin <address@hidden>
New options were added to enable Windows MSI installation package
creation:
Option --enable-guest-agent-msi, like the name suggests, enables building
Windows MSI package for QEMU guest agent; option --disable-guest-agent-msi
disables MSI package creation; by default, no MSI package is created
Signed-off-by: Yossi Hindin <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
Makefile | 24 ++++++++++++++++++++++-
configure | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3f97904..e7c5c3a 100644
--- a/Makefile
+++ b/Makefile
@@ -74,7 +74,7 @@ Makefile: ;
configure: ;
.PHONY: all clean cscope distclean dvi html info install install-doc \
- pdf recurse-all speed test dist
+ pdf recurse-all speed test dist msi
$(call set-vpath, $(SRC_PATH))
@@ -287,10 +287,32 @@ $(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
qemu-ga$(EXESUF): $(qga-obj-y) libqemuutil.a libqemustub.a
$(call LINK, $^)
+ifdef QEMU_GA_MSI_ENABLED
+QEMU_GA_MSI=qemu-ga-$(ARCH).msi
+
+msi: ${QEMU_GA_MSI}
+
+$(QEMU_GA_MSI): qemu-ga.exe
+
+ifdef QEMU_GA_MSI_WITH_VSS
+$(QEMU_GA_MSI): qga/vss-win32/qga-vss.dll
+endif
+
+$(QEMU_GA_MSI): config-host.mak
+
+$(QEMU_GA_MSI): qga/installer/qemu-ga.wxs
+ $(call quiet-command,QEMU_GA_VERSION="$(QEMU_GA_VERSION)"
QEMU_GA_MANUFACTURER="$(QEMU_GA_MANUFACTURER)"
QEMU_GA_DISTRO="$(QEMU_GA_DISTRO)" \
+ wixl -o $@ $(QEMU_GA_MSI_ARCH) $(QEMU_GA_MSI_WITH_VSS)
$(QEMU_GA_MSI_MINGW_DLL_PATH) $<, " WIXL $@")
+else
+msi:
+ @echo MSI build not configured or dependency resolution failed
(reconfigure with --enable-guest-agent-msi option)
+endif
+
clean:
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h
gen-op-arm.h
rm -f qemu-options.def
+ rm -f *.msi
find . \( -name '*.l[oa]' -o -name '*.so' -o -name '*.dll' -o -name
'*.mo' -o -name '*.[oda]' \) -type f -exec rm {} +
rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.*
*.pod *~ */*~
rm -f fsdev/*.pod
diff --git a/configure b/configure
index 222694f..6fed07b 100755
--- a/configure
+++ b/configure
@@ -315,6 +315,7 @@ snappy=""
bzip2=""
guest_agent=""
guest_agent_with_vss="no"
+guest_agent_msi=""
vss_win32_sdk=""
win_sdk="no"
want_tools="yes"
@@ -1078,6 +1079,10 @@ for opt do
;;
--disable-guest-agent) guest_agent="no"
;;
+ --enable-guest-agent-msi) guest_agent_msi="yes"
+ ;;
+ --disable-guest-agent-msi) guest_agent_msi="no"
+ ;;
--with-vss-sdk) vss_win32_sdk=""
;;
--with-vss-sdk=*) vss_win32_sdk="$optarg"
@@ -1394,6 +1399,8 @@ Advanced options (experts only):
reading bzip2-compressed dmg images)
--disable-guest-agent disable building of the QEMU Guest Agent
--enable-guest-agent enable building of the QEMU Guest Agent
+ --enable-guest-agent-msi enable building guest agent Windows MSI
installation package
+ --disable-guest-agent-msi disable building guest agent Windows MSI
installation
--with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
--with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
--disable-seccomp disable seccomp support
@@ -3862,6 +3869,56 @@ if test "$mingw32" = "yes" -a "$guest_agent" != "no" -a
"$guest_agent_with_vss"
fi
##########################################
+# Guest agent Window MSI package
+
+if test "$guest_agent" != yes; then
+ if test "$guest_agent_msi" = yes; then
+ error_exit "MSI guest agent package requires guest agent enabled"
+ fi
+ guest_agent_msi=no
+elif test "$mingw32" != "yes"; then
+ if test "$guest_agent_msi" = "yes"; then
+ error_exit "MSI guest agent package is available only for MinGW Windows
cross-compilation"
+ fi
+ guest_agent_msi=no
+elif ! has wixl; then
+ if test "$guest_agent_msi" = "yes"; then
+ error_exit "MSI guest agent package requires wixl tool installed ( usually
from msitools package )"
+ fi
+ guest_agent_msi=no
+fi
+
+if test "$guest_agent_msi" != "no"; then
+ if test "$guest_agent_with_vss" = "yes"; then
+ QEMU_GA_MSI_WITH_VSS="-D InstallVss"
+ fi
+
+ if test "$QEMU_GA_MANUFACTURER" = ""; then
+ QEMU_GA_MANUFACTURER=QEMU
+ fi
+
+ if test "$QEMU_GA_DISTRO" = ""; then
+ QEMU_GA_DISTRO=Linux
+ fi
+
+ if test "$QEMU_GA_VERSION" = ""; then
+ QEMU_GA_VERSION=`cat $source_path/VERSION`
+ fi
+
+ QEMU_GA_MSI_MINGW_DLL_PATH="-D Mingw_dlls=`$pkg_config --variable=prefix
glib-2.0`/bin"
+
+ case "$cpu" in
+ x86_64)
+ QEMU_GA_MSI_ARCH="-a x64 -D Arch=64"
+ ;;
+ i386)
+ QEMU_GA_MSI_ARCH="-D Arch=32"
+ ;;
+ *)
+ error_exit "CPU $cpu not supported for building installation package"
+ ;;
+ esac
+fi
##########################################
# check if we have fdatasync
@@ -4558,6 +4615,15 @@ if test "$mingw32" = "yes" ; then
echo "CONFIG_QGA_VSS=y" >> $config_host_mak
echo "WIN_SDK=\"$win_sdk\"" >> $config_host_mak
fi
+ if test "$guest_agent_msi" != "no"; then
+ echo "QEMU_GA_MSI_ENABLED=yes" >> $config_host_mak
+ echo "QEMU_GA_MSI_MINGW_DLL_PATH=${QEMU_GA_MSI_MINGW_DLL_PATH}" >>
$config_host_mak
+ echo "QEMU_GA_MSI_WITH_VSS=${QEMU_GA_MSI_WITH_VSS}" >> $config_host_mak
+ echo "QEMU_GA_MSI_ARCH=${QEMU_GA_MSI_ARCH}" >> $config_host_mak
+ echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER}" >> $config_host_mak
+ echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO}" >> $config_host_mak
+ echo "QEMU_GA_VERSION=${QEMU_GA_VERSION}" >> $config_host_mak
+ fi
else
echo "CONFIG_POSIX=y" >> $config_host_mak
fi
--
2.4.3
- [Qemu-devel] [PULL 00/15] Timer, virtio-scsi-test, build, memory changes for 2015-06-19, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 01/15] qemu-log: Open file for logging when specified, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 03/15] qemu-ga: debug printouts to help troubleshoot installation, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 04/15] qemu-ga: Introduce Windows MSI script, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 02/15] qemu-ga: adding vss-[un]install options, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 06/15] i8254: fix out-of-bounds memory access in pit_ioport_read(), Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 05/15] qemu-ga: Building Windows MSI installation with configure/Makefile,
Paolo Bonzini <=
- [Qemu-devel] [PULL 07/15] tests: Link libqos virtio object to virtio-scsi-test, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 08/15] libqos: Allow calling guest_free on NULL pointer, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 09/15] libqos: Complete virtio device ID definition list, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 10/15] tests: virtio-scsi: Move start/stop to individual test functions, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 11/15] tests: virtio-scsi: Add test for unaligned WRITE SAME, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 12/15] qemu-timer: Call clock reset notifiers on forward jumps, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 13/15] mc146818rtc: Reset the periodic timer on load, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 14/15] exec: do not clamp accesses to MMIO regions, Paolo Bonzini, 2015/06/19
- [Qemu-devel] [PULL 15/15] exec: clamp accesses against the MemoryRegionSection, Paolo Bonzini, 2015/06/19
- Re: [Qemu-devel] [PULL 00/15] Timer, virtio-scsi-test, build, memory changes for 2015-06-19, Peter Maydell, 2015/06/19