diff --git a/configure.ac b/configure.ac index 88b868ec..4edc0fc7 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/dists/rules.mk b/dists/rules.mk index bb82fc8d..3b4023c9 100644 --- a/dists/rules.mk +++ b/dists/rules.mk @@ -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) diff --git a/dists/win32/phaethon.ico b/dists/win32/phaethon.ico new file mode 100644 index 00000000..20d25c99 Binary files /dev/null and b/dists/win32/phaethon.ico differ diff --git a/dists/win32/phaethon.rc b/dists/win32/phaethon.rc new file mode 100644 index 00000000..20a2ac33 --- /dev/null +++ b/dists/win32/phaethon.rc @@ -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 diff --git a/src/rules.mk b/src/rules.mk index ab0b7988..1ab8dd88 100644 --- a/src/rules.mk +++ b/src/rules.mk @@ -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 = @@ -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 \