Skip to content
Permalink
Browse files

Added support for building version.rc in Windows build.

  • Loading branch information
slouken committed Jul 16, 2007
1 parent c925c6d commit 67b71e174d3eae4c0265214c7e898ed65dbb6286
Showing with 55 additions and 1 deletion.
  1. +1 −0 Makefile.in
  2. +11 −1 build-scripts/makedep.sh
  3. +4 −0 configure.in
  4. +39 −0 src/main/win32/version.rc
@@ -30,6 +30,7 @@ INSTALL = @INSTALL@
NASM = @NASM@ @NASMFLAGS@
AR = @AR@
RANLIB = @RANLIB@
WINDRES = @WINDRES@

TARGET = libSDL.la
SOURCES = @SOURCES@
@@ -41,7 +41,11 @@ search_deps()
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
@@ -73,6 +77,12 @@ __EOF__
\$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@
__EOF__
;;
rc) cat >>${output}.new <<__EOF__
\$(WINDRES) $src \$@
__EOF__
;;
*) echo "Unknown file extension: $ext";;
@@ -96,6 +96,7 @@ AC_PROG_CC
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
@@ -2436,6 +2437,7 @@ case "$host" in
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
fi
# 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"
@@ -2702,6 +2704,7 @@ OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
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,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
@@ -2771,6 +2774,7 @@ AC_SUBST(BUILD_CFLAGS)
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
@@ -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,2,12,0
PRODUCTVERSION 1,2,12,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, 2, 12, 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, 2, 12, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

0 comments on commit 67b71e1

Please sign in to comment.