[Spice-devel] [NSIS 6/7] Add ovirt-related scripts

Yedidyah Bar David didi at redhat.com
Tue Oct 20 04:35:27 PDT 2015


From: Christophe Fergeau <cfergeau at redhat.com>

Change-Id: I6bf84620dd18361274a0d9bb1d2a98011c2bc1d4
Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 tools/config             |  4 ++++
 tools/get-qxl.sh         | 29 +++++++++++++++++++++++++++++
 tools/get-spice-agent.sh | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)
 create mode 100644 tools/config
 create mode 100755 tools/get-qxl.sh
 create mode 100755 tools/get-spice-agent.sh

diff --git a/tools/config b/tools/config
new file mode 100644
index 0000000..e043fb4
--- /dev/null
+++ b/tools/config
@@ -0,0 +1,4 @@
+QXL_RELEASE=qxl-0.1-21
+QXL_URL=http://www.spice-space.org/download/windows/qxl/${QXL_RELEASE}
+SPICE_RELEASE=vdagent-win-0.7.2
+SPICE_URL=http://www.spice-space.org/download/windows/vdagent/${SPICE_RELEASE}
diff --git a/tools/get-qxl.sh b/tools/get-qxl.sh
new file mode 100755
index 0000000..f54829e
--- /dev/null
+++ b/tools/get-qxl.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+if [ -f $(dirname ${BASH_SOURCE[0]})/config ]; then
+	source $(dirname ${BASH_SOURCE[0]})/config
+else
+	echo "Requires config to be present."
+	echo "$(dirname ${BASH_SOURCE[0]})/config couldn't be found."
+	exit 1
+fi
+
+if [ -z $1 ]; then
+	echo "Usage: get-qxl.sh <destination directory>"
+	exit 1
+fi
+
+pushd $1
+
+for file in qxl_8k2R2_x64.zip qxl_w7_x64.zip qxl_w7_x86.zip qxl_xp_x86.zip
+do
+	wget ${QXL_URL}/${file}
+	unzip ${file}
+	rm ${file}
+done
+
+mv xp winxp
+mv w7 win7
+mv 2k8R2 win2k8r2
+
+popd
diff --git a/tools/get-spice-agent.sh b/tools/get-spice-agent.sh
new file mode 100755
index 0000000..4520c53
--- /dev/null
+++ b/tools/get-spice-agent.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+if [ -f $(dirname ${BASH_SOURCE[0]})/config ]; then
+	source $(dirname ${BASH_SOURCE[0]})/config
+else
+	echo "Requires config to be present."
+	echo "$(dirname ${BASH_SOURCE[0]})/config couldn't be found."
+	exit 1
+fi
+
+if [ -z $1 ]; then
+	echo "Usage get-spice-agent.sh <destination directory>"
+	echo "Note!: Destination directory requires full path."
+	exit 1
+fi
+
+TMP_LOC=/tmp/$$-${RANDOM}
+mkdir ${TMP_LOC}
+pushd ${TMP_LOC}
+
+for file in mingw32-spice-vdagent-0.7.2-1.fc19.noarch.rpm mingw64-spice-vdagent-0.7.2-1.fc19.noarch.rpm
+do
+	wget ${SPICE_URL}/${file}
+	rpm2cpio ${file} | cpio -idmv
+done
+
+mkdir -p $1/bin/{vdagent_x86,vdagent_x64}
+cp -v ./usr/i686-w64-mingw32/sys-root/mingw/bin/vdagent.exe $1/bin/vdagent_x86/
+cp -v ./usr/i686-w64-mingw32/sys-root/mingw/bin/vdservice.exe $1/bin/vdagent_x86/
+cp -v ./usr/x86_64-w64-mingw32/sys-root/mingw/bin/vdagent.exe $1/bin/vdagent_x64/
+cp -v ./usr/x86_64-w64-mingw32/sys-root/mingw/bin/vdservice.exe $1/bin/vdagent_x64/
+
+popd
+
+rm -rf ${TMP_LOC}
-- 
2.1.4



More information about the Spice-devel mailing list