Added support for building version.rc in Windows build. SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Mon, 16 Jul 2007 03:27:26 +0000
branchSDL-1.2
changeset 40785e6f2972f963
parent 4077 a9df0628d256
child 4079 fda6e33893b7
Added support for building version.rc in Windows build.
Makefile.in
build-scripts/makedep.sh
configure.in
src/main/win32/version.rc
     1.1 --- a/Makefile.in	Mon Jul 16 00:07:02 2007 +0000
     1.2 +++ b/Makefile.in	Mon Jul 16 03:27:26 2007 +0000
     1.3 @@ -30,6 +30,7 @@
     1.4  NASM	= @NASM@ @NASMFLAGS@
     1.5  AR	= @AR@
     1.6  RANLIB	= @RANLIB@
     1.7 +WINDRES	= @WINDRES@
     1.8  
     1.9  TARGET  = libSDL.la
    1.10  SOURCES = @SOURCES@
     2.1 --- a/build-scripts/makedep.sh	Mon Jul 16 00:07:02 2007 +0000
     2.2 +++ b/build-scripts/makedep.sh	Mon Jul 16 03:27:26 2007 +0000
     2.3 @@ -41,7 +41,11 @@
     2.4  for src in $SOURCES
     2.5  do  echo "Generating dependencies for $src"
     2.6      ext=`echo $src | sed 's|.*\.\(.*\)|\1|'`
     2.7 -    obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
     2.8 +    if test x"$ext" = x"rc"; then
     2.9 +        obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.o|g"`
    2.10 +    else
    2.11 +        obj=`echo $src | sed "s|^.*/\([^ ]*\)\..*|\1.lo|g"`
    2.12 +    fi
    2.13      echo "\$(objects)/$obj: $src \\" >>${output}.new
    2.14      search_deps $src | sort | uniq >>${output}.new
    2.15      case $ext in
    2.16 @@ -75,6 +79,12 @@
    2.17  
    2.18  __EOF__
    2.19          ;;
    2.20 +        rc) cat >>${output}.new <<__EOF__
    2.21 +
    2.22 +	\$(WINDRES) $src \$@
    2.23 +
    2.24 +__EOF__
    2.25 +        ;;
    2.26          *)   echo "Unknown file extension: $ext";;
    2.27      esac
    2.28      echo "" >>${output}.new
     3.1 --- a/configure.in	Mon Jul 16 00:07:02 2007 +0000
     3.2 +++ b/configure.in	Mon Jul 16 03:27:26 2007 +0000
     3.3 @@ -96,6 +96,7 @@
     3.4  AC_PROG_CXX
     3.5  AC_PROG_INSTALL
     3.6  AC_PROG_MAKE_SET
     3.7 +AC_CHECK_PROGS(WINDRES, windres i386-mingw32-windres)
     3.8  
     3.9  dnl Check for compiler characteristics
    3.10  AC_C_CONST
    3.11 @@ -2436,6 +2437,7 @@
    3.12              EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldxguid"
    3.13          fi
    3.14          # The Win32 platform requires special setup
    3.15 +        SOURCES="$SOURCES $srcdir/src/main/win32/*.rc"
    3.16          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
    3.17          SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
    3.18          SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
    3.19 @@ -2702,6 +2704,7 @@
    3.20  OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
    3.21  OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
    3.22  OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.S,$(objects)/\1.lo,g'`
    3.23 +OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
    3.24  
    3.25  SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.o,g'`
    3.26  SDLMAIN_OBJECTS=`echo $SDLMAIN_OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.o,g'`
    3.27 @@ -2771,6 +2774,7 @@
    3.28  AC_SUBST(EXTRA_CFLAGS)
    3.29  AC_SUBST(BUILD_LDFLAGS)
    3.30  AC_SUBST(EXTRA_LDFLAGS)
    3.31 +AC_SUBST(WINDRES)
    3.32  
    3.33  AC_OUTPUT([
    3.34      Makefile sdl-config SDL.spec SDL.qpg sdl.pc
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/main/win32/version.rc	Mon Jul 16 03:27:26 2007 +0000
     4.3 @@ -0,0 +1,39 @@
     4.4 +#define APSTUDIO_READONLY_SYMBOLS
     4.5 +#include "afxres.h"
     4.6 +#undef APSTUDIO_READONLY_SYMBOLS
     4.7 +
     4.8 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
     4.9 +
    4.10 +/////////////////////////////////////////////////////////////////////////////
    4.11 +//
    4.12 +// Version
    4.13 +//
    4.14 +
    4.15 +VS_VERSION_INFO VERSIONINFO
    4.16 + FILEVERSION 1,2,12,0
    4.17 + PRODUCTVERSION 1,2,12,0
    4.18 + FILEFLAGSMASK 0x3fL
    4.19 + FILEFLAGS 0x0L
    4.20 + FILEOS 0x40004L
    4.21 + FILETYPE 0x2L
    4.22 + FILESUBTYPE 0x0L
    4.23 +BEGIN
    4.24 +    BLOCK "StringFileInfo"
    4.25 +    BEGIN
    4.26 +        BLOCK "040904b0"
    4.27 +        BEGIN
    4.28 +            VALUE "CompanyName", "\0"
    4.29 +            VALUE "FileDescription", "SDL\0"
    4.30 +            VALUE "FileVersion", "1, 2, 12, 0\0"
    4.31 +            VALUE "InternalName", "SDL\0"
    4.32 +            VALUE "LegalCopyright", "Copyright  2007 Sam Lantinga\0"
    4.33 +            VALUE "OriginalFilename", "SDL.dll\0"
    4.34 +            VALUE "ProductName", "Simple DirectMedia Layer\0"
    4.35 +            VALUE "ProductVersion", "1, 2, 12, 0\0"
    4.36 +        END
    4.37 +    END
    4.38 +    BLOCK "VarFileInfo"
    4.39 +    BEGIN
    4.40 +        VALUE "Translation", 0x409, 1200
    4.41 +    END
    4.42 +END