changeset 2204:9f64d06fa168

Added support for building version.rc in Windows build.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 16 Jul 2007 03:28:48 +0000
parents fca1cdc673b2
children a64c891037fd
files Makefile.in build-scripts/makedep.sh configure.in src/main/win32/version.rc
diffstat 4 files changed, 55 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.in	Mon Jul 16 00:08:35 2007 +0000
+++ b/Makefile.in	Mon Jul 16 03:28:48 2007 +0000
@@ -30,6 +30,7 @@
 NASM	= @NASM@ @NASMFLAGS@
 AR	= @AR@
 RANLIB	= @RANLIB@
+WINDRES	= @WINDRES@
 
 TARGET  = libSDL.la
 SOURCES = @SOURCES@
--- a/build-scripts/makedep.sh	Mon Jul 16 00:08:35 2007 +0000
+++ b/build-scripts/makedep.sh	Mon Jul 16 03:28:48 2007 +0000
@@ -41,7 +41,11 @@
 for src in $SOURCES
 do  echo "Generating dependencies for $src"
     ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
-    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
+    if test x"$ext" = x"rc"; then
+        obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.o|g"`
+    else
+        obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
+    fi
     echo "\$(objects)/$obj: $src \\" >>${output}.new
     search_deps $src | sort | uniq >>${output}.new
     case $ext in
@@ -75,6 +79,12 @@
 
 __EOF__
         ;;
+        rc) cat >>${output}.new <<__EOF__
+
+	\$(WINDRES) $src \$@
+
+__EOF__
+        ;;
         *)   echo "Unknown file extension: $ext";;
     esac
     echo "" >>${output}.new
--- a/configure.in	Mon Jul 16 00:08:35 2007 +0000
+++ b/configure.in	Mon Jul 16 03:28:48 2007 +0000
@@ -96,6 +96,7 @@
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
+AC_CHECK_PROGS(WINDRES, windres i386-mingw32-windres)
 
 dnl Check for compiler characteristics
 AC_C_CONST
@@ -2261,6 +2262,7 @@
         # Set up the system libraries we need
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows -luser32 -lgdi32 -lmsimg32 -lwinmm"
         # The Win32 platform requires special setup
+        SOURCES="$SOURCES $srcdir/src/main/win32/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
         SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
         SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
@@ -2512,6 +2514,7 @@
 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
 OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
+OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
 
 SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
 SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
@@ -2574,6 +2577,7 @@
 AC_SUBST(EXTRA_CFLAGS)
 AC_SUBST(BUILD_LDFLAGS)
 AC_SUBST(EXTRA_LDFLAGS)
+AC_SUBST(WINDRES)
 
 AC_OUTPUT([
     Makefile sdl-config SDL.spec SDL.qpg sdl.pc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/win32/version.rc	Mon Jul 16 03:28:48 2007 +0000
@@ -0,0 +1,39 @@
+#define APSTUDIO_READONLY_SYMBOLS
+#include "afxres.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,3,0,0
+ PRODUCTVERSION 1,3,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x0L
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName", "\0"
+            VALUE "FileDescription", "SDL\0"
+            VALUE "FileVersion", "1, 3, 0, 0\0"
+            VALUE "InternalName", "SDL\0"
+            VALUE "LegalCopyright", "Copyright © 2007 Sam Lantinga\0"
+            VALUE "OriginalFilename", "SDL.dll\0"
+            VALUE "ProductName", "Simple DirectMedia Layer\0"
+            VALUE "ProductVersion", "1, 3, 0, 0\0"
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END