Http://www.spice-space.org/download.html can be downloaded to the Windows version of the Virt viewer
Virt-viewer-x86-0.5.7.msi and Virt-viewer-x64-0.5.7.msi are compiled using MinGW, the source code is the use of virt-viewer-0.5.7.tar.gz
If you need to customize the Virt viewer, you need to compile the executable binary code from the source code, this article describes the process of compiling the Windows Edition Virt Viewer.
MinGW
Before compiling the Virt viewer with MinGW, let's briefly introduce MinGW. Given that MinGW is too big, we can only donuts.
MinGW is a minimalist GUN for Windows abbreviation. MinGW provides a set of development environments for developing Microsoft Windows native Apps.
MinGW provides a set of fully open source programming tools that you can use to develop Windows native apps without relying on third-party C-run DLLs. Of course MinGW still relies on several operating system DLLs provided by Microsoft, such as MSVCRT.DLL.
The MinGW compiler provides access to Microsoft C Runtime and some language-specific runtimes. MinGW's minimalist, which is reflected here, MinGW did not attempt to provide a POSIX runtime environment.
[HTML]View Plaincopy
- <span style="font-size:10px;" >microsoft C Runtime
- C Runtime is a concept of the Windows platform, in general CRT functions (c runtime functions) are standard C language functions. For example, printf, scanf, strlen, fopen, and so on are functions that belong to CRT functions.
- But all CRT functions under windows are eventually translated into the Win32 API for execution. The Windows kernel itself, and does not provide support for the CRT.
- </span>
Since MinGW is based on GNU, Nature can provide a set of cross-compilation environments in Linux. With MinGW, we can develop, compile, and run Windows applications under Linux.
The Virt-viewer-x86-0.5.7.msi and Virt-viewer-x64-0.5.7.msi mentioned above are the product of the MINGW compilation environment.
After installing them, you can go to the installation directory to see the directory structure on my machine as follows.
For Linux developers, this directory hierarchy is not familiar.
That's right! The installation directory contains executable files, configuration scripts, and various GNU libraries (of course, these are Windows DLLs, not Linux. So)
Since the Virt Viewer uses a large number of GNU libraries, it is necessary to re-compile the Virt viewer with the help of MinGW.
Preparing the development environment
MINGW Development environment
Build MINGW development environment on windows, refer to Http://www.mingw.org/wiki/InstallationHOWTOforMinGW, MINGW development environment under Windows is officially supported
Here we only describe the construction of Linux under the MinGW development environment. Note that because the Linux MinGW cross-compilation environment is provided by distributors, these cross-tool chains are not mingw.org provided directly.
The MinGW development package is available on the Linux distribution fedora, so we chose Fedora 19 as the software environment.
Fedora MinGW has a considerable number of packages, we choose to install all here, a total of 700MB, fortunately, today fast speed.
[CPP]View Plaincopy
- # su
- # yum Install mingw*
- # yum Install Intltool
- # yum Install icoutils.i686
Compiling Virt Viewer
1. Download Virt-viewer Source code
There are many virt_viewer versions in https://fedorahosted.org/released/virt-viewer/, here we use virt-viewer-0.5.6.tar.gz
2. Unzip
[HTML]View Plaincopy
- # tar ZXVF virt-viewer-0.5.76.tar.gz
- # CD virt-viewer-0.5.6
3. First execute the MinGW configure tool
[HTML]View Plaincopy
- # mingw32-configure --with-gtk=2.0--with-spice-gtk
Since we have installed the vast majority of libraries in the MINGW environment above, we generally do not fail here, and if you fail, follow the prompts to install with Yum.
Shown below on my machine
[HTML]View Plaincopy
- Configure:configuration Summary
- Configure: =====================
- Configure
- Configure:features:
- Configure
- configure:gtk:2.0
- Configure
- Configure:libraries:
- Configure
- CONFIGURE:GLIB2:-mms-bitfields-i/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0-i/usr/i686-w64-mingw32/s ys-root/mingw/lib/glib-2.0/include-l/usr/i686-w64-mingw32/sys-root/mingw/lib-lgthread-2.0-lgmodule-2.0- Lglib-2.0-lintl
- Configure
- configure: gtk: -mms-bitfields -i/usr/ i686-w64-mingw32/sys-root/mingw/include/gtk-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/lib/gtk-2.0/ include -i/usr/i686-w64-mingw32/sys-root/mingw/include/atk-1.0 -i/usr/i686-w64-mingw32/sys-root/ mingw/include/cairo -i/usr/i686-w64-mingw32/sys-root/mingw/include/gdk-pixbuf-2.0 -i/usr/ i686-w64-mingw32/sys-root/mingw/include/pango-1.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -i/usr/i686-w64-mingw32/sys-root/mingw/ include/pixman-1 -i/usr/i686-w64-mingw32/sys-root/mingw/include -i/usr/i686-w64-mingw32/sys-root/ mingw/include/freetype2 -i/usr/i686-w64-mingw32/sys-root/mingw/include/libpng15 -i/usr/ i686-w64-mingw32/sys-root/mingw/include/harfbuzz -wl,-luuid -l/usr/i686-w64-mingw32/ Sys-root/mingw/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -latk-1.0 -lpangocairo-1.0 -lgio-2.0 -lgdk _pixbuf-2.0 -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lfontconfig - lpango-1.0 -lm -lcairo -lgobject-2.0 -lglib-2.0 -lintl
- CONFIGURE:&NBSP;&NBSP;&NBSP;
- configure: gtk_vnc: -mms-bitfields -i/usr/i686-w64-mingw32/ sys-root/mingw/include/gtk-vnc-1.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/gvnc-1.0 -i/usr/ i686-w64-mingw32/sys-root/mingw/include/gtk-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -i/usr/i686-w64-mingw32/sys-root/mingw/ lib/gtk-2.0/include -i/usr/i686-w64-mingw32/sys-root/mingw/include/atk-1.0 -i/usr/i686-w64-mingw32/ sys-root/mingw/include/cairo -i/usr/i686-w64-mingw32/sys-root/mingw/include/gdk-pixbuf-2.0 -i/usr/ I686-w64-mingw32/sys-root/mingw/include/pango-1.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/pixman-1 -i/usr/i686-w64-mingw32/sys-root/mingw/include -i/usr/i686-w64-mingw32/sys-root/mingw/include/ freetype2 -i/usr/i686-w64-mingw32/sys-root/mingw/include/libpng15 -i/usr/i686-w64-mingw32/sys-root/ mingw/include/harfbuzz -wl,-luuid -l/usr/i686-w64-mingw32/sys-root/mingw/lib -lgtk-vnc-1.0 -lgvnc-1.0 -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -latk-1.0 - Lpangocairo-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lfontconfig -lpango-1.0 -lm -lcairo -lgobject-2.0 -lglib-2.0 -lintl
- CONFIGURE:&NBSP;&NBSP;&NBSP;
- configure: spice_gtk: -mms-bitfields -i/usr/i686-w64-mingw32/sys-root/mingw/ include/spice-client-gtk-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/gtk-2.0 -i/usr/ i686-w64-mingw32/sys-root/mingw/include/spice-client-glib-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/lib/ gtk-2.0/include -i/usr/i686-w64-mingw32/sys-root/mingw/include/atk-1.0 -i/usr/i686-w64-mingw32/ sys-root/mingw/include/cairo -i/usr/i686-w64-mingw32/sys-root/mingw/include/gdk-pixbuf-2.0 -i/usr/ i686-w64-mingw32/sys-root/mingw/include/pango-1.0 -i/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0 -i/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -i/usr/i686-w64-mingw32/sys-root/mingw/ include/pixman-1 -i/usr/i686-w64-mingw32/sys-root/mingw/include -i/usr/i686-w64-mingw32/sys-root/ mingw/include/freetype2 -i/usr/i686-w64-mingw32/sys-root/mingw/include/libpng15 -i/usr/ I686-w64-mingw32/sys-root/mingw/include/harfbuzz -i/usr/i686-w64-mingw32/sys-root/mingw/include/spice-1 -wl,-luuid -l/usr/ i686-w64-mingw32/sys-root/mingw/lib -lspice-client-gtk-2.0 -lgtk-win32-2.0 - lspice-client-glib-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -lole32 -latk-1.0 - Lpangocairo-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpangowin32-1.0 -lgdi32 -lfreetype -lfontconfig -lpango-1.0 -lm -lcairo -lgobject-2.0 -lglib-2.0 -lintl
- Configure
- CONFIGURE:LIBXML2:-i/usr/i686-w64-mingw32/sys-root/mingw/include/libxml2-l/usr/i686-w64-mingw32/sys-root/mingw /lib-lxml2
- Configure
- Configure:libvirt:-i/usr/i686-w64-mingw32/sys-root/mingw/include-l/usr/i686-w64-mingw32/sys-root/mingw/lib-lvi Rt-lportablexdr-lintl
- Configure
- Configure:ovirt:
- Configure
Compile
[HTML]View Plaincopy
- Mingw32-make
The compilation process may also be dependent on the tool error, download the required toolkit to solve
Installation
[HTML]View Plaincopy
- Mingw32-make Install
After executing the installation command, the compiled generated files are copied to/usr/i686-w64-mingw32/sys-root/mingw, and the execution of the files depends on the bin, etc, Conf, Lib and share in this directory, We need to copy the contents of these directories to Windows.
These directories are the basic operating environment for MINGW Windows applications, most of which are not virt-viewer necessary, and we will list the files that are required to run virt-viewer.
Perform
[HTML]View Plaincopy
- CD MinGW
- CD bin
- Remote-viewer.exe
You can see the GTK-style remote viewer.
MinGW compiling Virt-viewer