Skip to contentSkip to conversation

Using GNU windres in QEMU

Qemu-devel Robert Riebisch 3 participants 4 messages Mar 31, 2009 – Apr 5, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi!

What's the best (easy to understand, flexible) solution to add a quiet call GNU to windres?

Here's what I have for rules.mak:

%.o: %.rc

	$(call quiet-command,${cross_prefix}windres -I. -I..

-DWIN32_QEMU_FILENAME='\"$(QEMU_PROG)\"' -o $@ $<," RC $(TARGET_DIR)$@")

Again I'm working on adding icon and VERSIONINFO resources to QEMU's EXE files and this time I'd like to see this included to QEMU trunk. ;-)

Adding resources to qemu.exe or qemu-system-x86_64.exe already works. qemu-img still to do.

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
#1 lore raw

Here's my work:

Makefile.target +1 -0
Index: Makefile.target
===================================================================
@@ -726,6 +728,7 @@
 
 ifdef CONFIG_WIN32
 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
+OBJS+=version.o
 endif
 
 # profiling code
configure +0 -0
Index: configure
===================================================================
@@ -1620,6 +1620,10 @@
 echo "# Automatically generated by configure - do not modify" >  

$config_mak
echo "/* Automatically generated by configure - do not modify */" >
$config_h

+if test "$mingw32" = "yes" ; then
+echo "#define QEMU_FILEVERSION $(tr . , < $source_path/VERSION),0" >> $config_h +echo "#define QEMU_PRODUCTVERSION $(tr . , < $source_path/VERSION),0" >> $config_h +fi

echo "include ../config-host.mak" >> $config_mak echo "#include \"../config-host.h\"" >> $config_h

version.rc new file +22 -0
Index: version.rc
===================================================================
@@ -0,0 +1,22 @@
+#include "config.h"
+
+1 VERSIONINFO
+FILEVERSION QEMU_FILEVERSION
+PRODUCTVERSION QEMU_PRODUCTVERSION
+FILETYPE 0x1 //VFT_APP
+ {
+BLOCK "StringFileInfo"
+  {
+  BLOCK "040904E4"
+  {
+   VALUE "FileDescription", "Qemu System emulator, " TARGET_ARCH " version"
+   VALUE "FileVersion", QEMU_VERSION
+   VALUE "LegalCopyright", "GNU General Public License"
+   VALUE "ProductName", "Qemu"
+  }
+ }
+BLOCK "VarFileInfo"
+ {
+  VALUE "Translation", 0x0409, 1252
+ }
+}
Quoted 12 lines · Robert Riebisch

Hi!

What's the best (easy to understand, flexible) solution to add a quiet call GNU to windres?

Here's what I have for rules.mak:

%.o: %.rc

	$(call quiet-command,${cross_prefix}windres -I. -I..

-DWIN32_QEMU_FILENAME='\"$(QEMU_PROG)\"' -o $@ $<," RC $
(TARGET_DIR)$@")

Quoted 12 lines

Again I'm working on adding icon and VERSIONINFO resources to QEMU's EXE files and this time I'd like to see this included to QEMU trunk. ;-)

Adding resources to qemu.exe or qemu-system-x86_64.exe already works. qemu-img still to do.

Robert Riebisch

Signature · 2 lines
BTTR Software
http://www.bttr-software.de/
Makefile.target +1 -0
Index: Makefile.target
===================================================================
@@ -726,6 +728,7 @@
 
 ifdef CONFIG_WIN32
 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
+OBJS+=version.o
 endif
 
 # profiling code
configure +4 -0
Index: configure
===================================================================
@@ -1620,6 +1620,10 @@
 echo "# Automatically generated by configure - do not modify" > $config_mak
 echo "/* Automatically generated by configure - do not modify */" > $config_h
 
+if test "$mingw32" = "yes" ; then
+echo "#define QEMU_FILEVERSION $(tr . , < $source_path/VERSION),0" >> $config_h
+echo "#define QEMU_PRODUCTVERSION $(tr . , < $source_path/VERSION),0" >> $config_h
+fi
 
 echo "include ../config-host.mak" >> $config_mak
 echo "#include \"../config-host.h\"" >> $config_h
version.rc new file +22 -0
Index: version.rc
===================================================================
@@ -0,0 +1,22 @@
+#include "config.h"
+
+1 VERSIONINFO
+FILEVERSION QEMU_FILEVERSION
+PRODUCTVERSION QEMU_PRODUCTVERSION
+FILETYPE 0x1 //VFT_APP
+ {
+BLOCK "StringFileInfo"
+  {
+  BLOCK "040904E4"
+  {
+   VALUE "FileDescription", "Qemu System emulator, " TARGET_ARCH " version"
+   VALUE "FileVersion", QEMU_VERSION
+   VALUE "LegalCopyright", "GNU General Public License"
+   VALUE "ProductName", "Qemu"
+  }
+ }
+BLOCK "VarFileInfo"
+ {
+  VALUE "Translation", 0x0409, 1252
+ }
+}
#2 lore raw
Quoted 4 lines · C.W. Betts

Here's my work:

+ VALUE "FileDescription", "Qemu System emulator, " TARGET_ARCH " version"

QEMU

Quoted 1 line

+ VALUE "ProductName", "Qemu"

QEMU