Skip to content

Commit

Permalink
DIST: Add a Windows resource file and icon
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Jun 25, 2018
1 parent 7854a93 commit 3788afc
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ case "$target" in
AM_CONDITIONAL(WIN32, false)
;;
*mingw*)
AC_CHECK_TOOL([RC], [windres], [:])
if test "x$RC" = "x:"; then
AC_MSG_ERROR([A Windows resource compiler (windres) is required and could not be found!])
fi

PHAETHON_CFLAGS="-mwindows -municode"
PHAETHON_LIBS=""
AM_CONDITIONAL(WIN32, true)
Expand Down
6 changes: 6 additions & 0 deletions dists/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ EXTRA_DIST += \
dists/fedora/build-from-git.sh \
dists/fedora/phaethon.spec \
$(EMPTY)

# Windows
EXTRA_DIST += \
dists/win32/phaethon.ico \
dists/win32/phaethon.rc \
$(EMPTY)
Binary file added dists/win32/phaethon.ico
Binary file not shown.
39 changes: 39 additions & 0 deletions dists/win32/phaethon.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#include "winresrc.h"

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#define IDI_ICON 1001

IDI_ICON ICON DISCARDABLE "dists/win32/phaethon.ico"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,4,0
PRODUCTVERSION 0,0,4,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VS_FF_DEBUG | VS_FF_PRERELEASE
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0" // US English, Unicode
BEGIN
VALUE "FileDescription", "https://xoreos.org/\0"
VALUE "FileVersion", "0.0.4+git\0"
VALUE "InternalName", "Phaethon\0"
VALUE "LegalCopyright", "Copyright � 2014-2018 The xoreos Team\0"
VALUE "LegalTrademarks", "The Infinity engine, Aurora engine, Odyssey engine and Eclipse engine are registered trademarks of BioWare Corp., a subsidiary of Electronic Arts, Inc. The Electron engine and Lycium engine are trademarks of BioWare Corp., a subsidiary of Electronic Arts, Inc. Bink is a registered trademark of RAD Game Tools, Inc. Neverwinter Nights is a registered trademark of Wizards of the Coast, a subsidiary of Hasbro Inc. Star Wars, Knights of the Old Republic and The Sith Lords are registered trademarks of Lucasfilm Entertainment Company Ltd., a subsidiary of The Walt Disney Company. Jade Empire is a registered trademark of BioWare Corp., a subsidiary of Electronic Arts, Inc. Sonic the Hedgehog is a registered trademark of Sega Corporation. The Witcher is a registered trademark of CD Projekt S.A. Dragon Age is a registered trademark of Electronic Arts, Inc. All rights reserved.\0"
VALUE "OriginalFilename", "phaethon.exe\0"
VALUE "ProductName", "phaethon\0"
VALUE "ProductVersion", "0.0.4+git\0"
END
END

BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200 // US English, Unicode
END
END
8 changes: 8 additions & 0 deletions src/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

# Main Phaethon entry point.

# Windows resources
.rc.o:
$(AM_V_GEN)$(RC) -DHAVE_CONFIG_H -I$(srcdir) -o $@ $<

bin_PROGRAMS += src/phaethon
src_phaethon_SOURCES =

Expand All @@ -31,6 +35,10 @@ src_phaethon_SOURCES += \
src/phaethon.cpp \
$(EMPTY)

if WIN32
src_phaethon_SOURCES += dists/win32/phaethon.rc
endif

src_phaethon_LDADD = \
src/gui/libgui.la \
src/sound/libsound.la \
Expand Down

0 comments on commit 3788afc

Please sign in to comment.