[gens-sdl] Copied the Win32 resource script from gens-qt4.
authorDavid Korth <gerbilsoft@gerbilsoft.com>
Thu, 3 Sep 2015 03:17:04 +0000 (23:17 -0400)
committerDavid Korth <gerbilsoft@gerbilsoft.com>
Thu, 3 Sep 2015 03:17:04 +0000 (23:17 -0400)
config.gens-sdl.h.in: Added version macros from the root CMakeLists.txt.

FIXME: The version information isn't showing up in the file properties
dialog. ResEdit shows that it has actual strings as the resource IDs
instead of the values those strings are supposed to represent.

src/gens-sdl/CMakeLists.txt
src/gens-sdl/config.gens-sdl.h.in
src/gens-sdl/win32/gens-sdl.exe.manifest [new file with mode: 0644]
src/gens-sdl/win32/gens-sdl.h [new file with mode: 0644]
src/gens-sdl/win32/gens-sdl.rc [new file with mode: 0644]
src/gens-sdl/win32/gens.ico [new file with mode: 0644]
src/gens-sdl/win32/gens_md.ico [new file with mode: 0644]
src/gens-sdl/win32/gensgs.ico [new file with mode: 0644]
src/gens-sdl/win32/sonic.ico [new file with mode: 0644]
src/gens-sdl/win32/sonic_wait.ico [new file with mode: 0644]

index 59a89b9..4c26f6d 100644 (file)
@@ -84,6 +84,13 @@ SET(gens-sdl_SHADER_H
        GLShaderFastBlur.hpp
        )
 
+# Win32 resources.
+IF(WIN32)
+       SET(gens-sdl_PLATFORM_SRCS
+               win32/gens-sdl.rc
+               )
+ENDIF(WIN32)
+
 # Main target.
 ADD_EXECUTABLE(gens-sdl
        ${gens-sdl_SRCS}
@@ -92,6 +99,7 @@ ADD_EXECUTABLE(gens-sdl
        ${gens-sdl_OSD_H}
        ${gens-sdl_SHADER_SRCS}
        ${gens-sdl_SHADER_H}
+       ${gens-sdl_PLATFORM_SRCS}
        )
 TARGET_LINK_LIBRARIES(gens-sdl compat gens genskeys zomg)
 DO_SPLIT_DEBUG(gens-sdl)
index 9435feb..35a365c 100644 (file)
@@ -1,6 +1,6 @@
 /***************************************************************************
  * gens-qt4: Gens Qt4 UI.                                                  *
- * config.gens-sdl.h.in: GensSdl configuration. (source file)              *
+ * config.gens-sdl.hcd.in: GensSdl configuration. (source file)              *
  *                                                                         *
  * Copyright (c) 1999-2002 by Stéphane Dallongeville.                      *
  * Copyright (c) 2003-2004 by Stéphane Akhoun.                             *
 /* Define to 1 if CPU emulation code should be enabled. */
 #cmakedefine GENS_ENABLE_EMULATION 1
 
+/* CMake version macros. */
+#define VERSION_MAJOR @VERSION_MAJOR@
+#define VERSION_MINOR @VERSION_MINOR@
+#define VERSION_PATCH @VERSION_PATCH@
+#define VERSION_DEVEL @VERSION_DEVEL@
+#define VERSION_STRING "@VERSION_STRING@"
+#define VERSION_STRING_WIN32 "@VERSION_STRING_WIN32@"
+
 #endif /* __GENS_QT4_CONFIG_H__ */
diff --git a/src/gens-sdl/win32/gens-sdl.exe.manifest b/src/gens-sdl/win32/gens-sdl.exe.manifest
new file mode 100644 (file)
index 0000000..c8b3df8
--- /dev/null
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+       <assemblyIdentity
+               type="win32"
+               name="Gens/GS II (Basic SDL2 frontend)"
+               version="0.0.0.1"
+               processorArchitecture="x86"
+       />
+
+       <description>Gens/GS II (Basic SDL2 frontend)</description>
+
+       <!-- Common Controls 6. Needed for visual styles on XP and later. -->
+       <dependency>
+               <dependentAssembly>
+                       <assemblyIdentity
+                               type="win32"
+                               name="Microsoft.Windows.Common-Controls"
+                               version="6.0.0.0"
+                               processorArchitecture="x86"
+                               publicKeyToken="6595b64144ccf1df"
+                               language="*"
+                       />
+               </dependentAssembly>
+       </dependency>
+
+       <!-- Application security requirements. Used for Vista UAC. -->
+       <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+               <security>
+                       <requestedPrivileges>
+                               <requestedExecutionLevel
+                                       level="asInvoker"
+                                       uiAccess="false"
+                               />
+                       </requestedPrivileges>
+               </security>
+       </trustInfo>
+
+       <!-- Mark this program as DPI-aware on Windows Vista and later. -->
+       <asmv3:application>
+               <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+                       <dpiAware>true</dpiAware>
+               </asmv3:windowsSettings>
+       </asmv3:application>
+</assembly>  
diff --git a/src/gens-sdl/win32/gens-sdl.h b/src/gens-sdl/win32/gens-sdl.h
new file mode 100644 (file)
index 0000000..5cb77c4
--- /dev/null
@@ -0,0 +1,34 @@
+/***************************************************************************
+ * gens-qt4: Gens Qt4 UI.                                                  *
+ * gens-qt4.h: Win32 resource script.                                      *
+ *                                                                         *
+ * Copyright (c) 1999-2002 by Stéphane Dallongeville.                      *
+ * Copyright (c) 2003-2004 by Stéphane Akhoun.                             *
+ * Copyright (c) 2008-2010 by David Korth.                                 *
+ *                                                                         *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU General Public License as published by the   *
+ * Free Software Foundation; either version 2 of the License, or (at your  *
+ * option) any later version.                                              *
+ *                                                                         *
+ * This program is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of              *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
+ * GNU General Public License for more details.                            *
+ *                                                                         *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.           *
+ ***************************************************************************/
+
+#ifndef __GENS_QT4_RESOURCE_H__
+#define __GENS_QT4_RESOURCE_H__
+
+// Icons,
+#define IDI_GENS_APP           0x0001
+#define IDI_GENS_APP_OLD       0x0002
+#define IDI_GENS_MD            0x0003
+#define IDI_SONIC              0x0004
+#define IDI_SONIC_WAITING      0x0005
+
+#endif /* __GENS_QT4_RESOURCE_H__ */
diff --git a/src/gens-sdl/win32/gens-sdl.rc b/src/gens-sdl/win32/gens-sdl.rc
new file mode 100644 (file)
index 0000000..5eabf19
--- /dev/null
@@ -0,0 +1,87 @@
+/***************************************************************************
+ * gens-sdl: Gens/GS II basic SDL frontend.                                *
+ * gens-sdl.rc: Win32 resource script.                                     *
+ *                                                                         *
+ * Copyright (c) 1999-2002 by Stéphane Dallongeville.                      *
+ * Copyright (c) 2003-2004 by Stéphane Akhoun.                             *
+ * Copyright (c) 2008-2015 by David Korth.                                 *
+ *                                                                         *
+ * This program is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU General Public License as published by the   *
+ * Free Software Foundation; either version 2 of the License, or (at your  *
+ * option) any later version.                                              *
+ *                                                                         *
+ * This program is distributed in the hope that it will be useful, but     *
+ * WITHOUT ANY WARRANTY; without even the implied warranty of              *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
+ * GNU General Public License for more details.                            *
+ *                                                                         *
+ * You should have received a copy of the GNU General Public License along *
+ * with this program; if not, write to the Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.           *
+ ***************************************************************************/
+
+// Resource script for Gens/GS Win32
+#include "gens-sdl.h"
+#include "winnt.rh"
+
+// git version
+#include "libgens/macros/git.h"
+
+// Icons.
+IDI_GENS_APP           ICON            "gensgs.ico"
+IDI_GENS_APP_OLD       ICON            "gens.ico"
+IDI_GENS_MD            ICON            "gens_md.ico"
+IDI_SONIC              ICON            "sonic.ico"
+IDI_SONIC_WAITING      ICON            "sonic_wait.ico"
+
+// Manifest.
+CREATEPROCESS_MANIFEST_RESOURCE_ID     RT_MANIFEST     "gens-sdl.exe.manifest"
+
+// TODO: Gens/GS version number.
+#define GENS_GS_VERSION "0.0.0 (Development Build)"
+#define GENS_VERSION_WIN32 0,0,0,0
+
+#ifdef GENS_GIT_VERSION
+#define Win32_RC_FileVersion GENS_GS_VERSION "\r\n" GENS_GIT_VERSION
+#else /* !GENS_GIT_VERSION */
+#define Win32_RC_FileVersion GENS_GS_VERSION
+#endif /* GENS_GIT_VERSION */
+
+// Application Version
+VS_VERSION_INFO VERSIONINFO
+       FILEVERSION GENS_VERSION_WIN32
+       PRODUCTVERSION GENS_VERSION_WIN32
+       FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+       FILEFLAGS 0x1L
+#else
+       FILEFLAGS 0x0L
+#endif
+       FILEOS 0x40004L
+       FILETYPE 0x1L
+       FILESUBTYPE 0x0L
+BEGIN
+       BLOCK "StringFileInfo"
+       BEGIN
+               BLOCK "040904b0"
+               BEGIN
+                       //VALUE "Comments", "\0"
+                       //VALUE "CompanyName", "\0"
+                       VALUE "FileDescription", "Gens/GS II " GENS_GS_VERSION "\0"
+                       VALUE "FileVersion", "Gens/GS II " Win32_RC_FileVersion "\0"
+                       VALUE "InternalName", "Gens/GS II\0"
+                       //VALUE "LegalCopyright", "\0"
+                       //VALUE "LegalTrademarks", "\0"
+                       //VALUE "OriginalFilename", "\0"
+                       //VALUE "PrivateBuild", "\0"
+                       VALUE "ProductName", "Gens/GS II\0"
+                       VALUE "ProductVersion", "Gens/GS II " Win32_RC_FileVersion "\0"
+                       //VALUE "SpecialBuild", "\0"
+               END
+       END
+       BLOCK "VarFileInfo"
+       BEGIN
+               VALUE "Translation", 0x409, 1200
+       END
+END
diff --git a/src/gens-sdl/win32/gens.ico b/src/gens-sdl/win32/gens.ico
new file mode 100644 (file)
index 0000000..9ca3040
Binary files /dev/null and b/src/gens-sdl/win32/gens.ico differ
diff --git a/src/gens-sdl/win32/gens_md.ico b/src/gens-sdl/win32/gens_md.ico
new file mode 100644 (file)
index 0000000..bf8bab3
Binary files /dev/null and b/src/gens-sdl/win32/gens_md.ico differ
diff --git a/src/gens-sdl/win32/gensgs.ico b/src/gens-sdl/win32/gensgs.ico
new file mode 100644 (file)
index 0000000..1dd3cb8
Binary files /dev/null and b/src/gens-sdl/win32/gensgs.ico differ
diff --git a/src/gens-sdl/win32/sonic.ico b/src/gens-sdl/win32/sonic.ico
new file mode 100644 (file)
index 0000000..f9578b7
Binary files /dev/null and b/src/gens-sdl/win32/sonic.ico differ
diff --git a/src/gens-sdl/win32/sonic_wait.ico b/src/gens-sdl/win32/sonic_wait.ico
new file mode 100644 (file)
index 0000000..113df3e
Binary files /dev/null and b/src/gens-sdl/win32/sonic_wait.ico differ