1. 安装Fedora21;
2. 安装mingw
root@localhost#yum installmingw* --skip-broken
3. 安装其他依赖
root@localhost#yum install intltool
root@localhost#yum install icoutils.i686 pyparsing glib2-devel vala-tools vala
yum install eclipse
yum install cdt
sudo yum groupinstall development-libs development-tools gnome-software-development
yum install pyparsing
4. 下载并编译spice-gtk
为了支持windows下的usbredir,需要编译支持usbredir的spice-gtk,默认从软件库下载安装的似乎不支持usbredir。
从 http://www.spice-space.org/download.html下载最新版本spice-gtk-0.21.tar.bz2,解开并编译:
root@localhost# mingw64-configure --with-gtk=3.0 --enable-usbredir=yes --with-sasl=no --with-audio=gstreamer --with-python=no --enable-smartcard=no --enable-vala
root@localhost#mingw32-make
root@localhost#mingw32-make install
5. 下载Virtviewer
从 https://fedorahosted.org/released/virt-viewer/下载virt-viewer-0.5.7.tar.gz
并解压: tar –xvf virt-viewer-0.5.7.tar.gz
编译
root@localhost# cd virt-viewer-0.5.7
root@localhost# mingw32-configure --with-gtk = 2 .0 --with-spice-gtk
mingw64-configure LIBS=-lwsock32 --with-spice-gtk
root@localhost# mingw32-make
root@localhost# mingw32-makeinstall
编译完成后在 /usr/i686-w64-mingw32/sys-root/mingw 下找生成的相关结果。