Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added support for building version.rc in Windows build.
  • Loading branch information
slouken committed Jul 16, 2007
1 parent c925c6d commit 67b71e1
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile.in
Expand Up @@ -30,6 +30,7 @@ INSTALL = @INSTALL@
NASM = @NASM@ @NASMFLAGS@
AR = @AR@
RANLIB = @RANLIB@
WINDRES = @WINDRES@

TARGET = libSDL.la
SOURCES = @SOURCES@
Expand Down
12 changes: 11 additions & 1 deletion build-scripts/makedep.sh
Expand Up @@ -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
Expand Down Expand Up @@ -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";;
Expand Down
4 changes: 4 additions & 0 deletions configure.in
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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'`
Expand Down Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions src/main/win32/version.rc
@@ -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.