summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpodi <spodi2290@aol.com>2025-02-22 22:14:27 +0100
committerLywx <kiritodev01@gmail.com>2025-03-28 16:34:12 -0600
commit09cae564d624995b58115c70e1ed2b4e83308de9 (patch)
treef5bde83d8077e5c05633c8583e8d28b583fe258b
parent269596a9c30b8a99356c9431e65361e08bbc5e46 (diff)
Add Windows resources
- executable icon - manifest for DPI awareness - version info
-rw-r--r--.gitignore4
-rw-r--r--CMakeLists.txt3
-rw-r--r--Resource.rc115
-rw-r--r--properties.h.in14
-rw-r--r--resource.h16
-rw-r--r--starship.icobin0 -> 87382 bytes
-rw-r--r--starship.manifest37
7 files changed, 188 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b26df723..a516fcfe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,4 +55,6 @@ _packages/*
*.DS_Store
src/jp/
src/eu/
-src/cn/ \ No newline at end of file
+src/cn/
+
+properties.h \ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b049ca2..24039fb6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,8 @@ if (UNIX AND NOT APPLE)
find_package(OpenGL REQUIRED)
endif()
+configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/properties.h.in ${CMAKE_CURRENT_SOURCE_DIR}/properties.h @ONLY)
+
# Include directories
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
@@ -141,6 +143,7 @@ file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
"src/dmatable.c"
"src/libc_math64.c"
"src/libc_sprintf.c"
+ "Resource.rc"
)
# Exclude specific files from the ALL_FILES list
diff --git a/Resource.rc b/Resource.rc
new file mode 100644
index 00000000..aa987e81
--- /dev/null
+++ b/Resource.rc
@@ -0,0 +1,115 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+#include "properties.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (United States) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version Info
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION VER_FILEVERSION
+ PRODUCTVERSION VER_PRODUCTVERSION
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", VER_COMPANYNAME_STR
+ VALUE "FileDescription", VER_FILEDESCRIPTION_STR
+ VALUE "FileVersion", VER_FILEVERSION_STR
+ VALUE "InternalName", VER_INTERNALNAME_STR
+ VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
+ VALUE "ProductName", VER_PRODUCTNAME_STR
+ VALUE "ProductVersion", VER_PRODUCTVERSION_str
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "starship.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "starship.manifest"
+
+#endif // English (United States) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/properties.h.in b/properties.h.in
new file mode 100644
index 00000000..170ceba1
--- /dev/null
+++ b/properties.h.in
@@ -0,0 +1,14 @@
+
+#define VER_FILEVERSION @CMAKE_PROJECT_VERSION_MAJOR@, @CMAKE_PROJECT_VERSION_MINOR@, @CMAKE_PROJECT_VERSION_PATCH@, 0
+#define VER_FILEVERSION_STR "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@\0"
+
+#define VER_PRODUCTVERSION @CMAKE_PROJECT_VERSION_MAJOR@, @CMAKE_PROJECT_VERSION_MINOR@, @CMAKE_PROJECT_VERSION_PATCH@, 0
+#define VER_PRODUCTVERSION_str "@CMAKE_PROJECT_VERSION_MAJOR@.@CMAKE_PROJECT_VERSION_MINOR@.@CMAKE_PROJECT_VERSION_PATCH@\0"
+
+#define VER_COMPANYNAME_STR "@PROJECT_TEAM@\0"
+#define VER_PRODUCTNAME_STR "Starship\0"
+
+#define VER_INTERNALNAME_STR "@PROJECT_NAME@\0"
+#define VER_ORIGINALFILENAME_STR "@PROJECT_NAME@.exe\0"
+
+#define VER_FILEDESCRIPTION_STR "Starship - @PROJECT_BUILD_NAME@\0"
diff --git a/resource.h b/resource.h
new file mode 100644
index 00000000..8a193b3e
--- /dev/null
+++ b/resource.h
@@ -0,0 +1,16 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Resource.rc
+//
+#define IDI_ICON1 111
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 113
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/starship.ico b/starship.ico
new file mode 100644
index 00000000..736ba520
--- /dev/null
+++ b/starship.ico
Binary files differ
diff --git a/starship.manifest b/starship.manifest
new file mode 100644
index 00000000..6f47a937
--- /dev/null
+++ b/starship.manifest
@@ -0,0 +1,37 @@
+<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ processorArchitecture="*" />
+ </dependentAssembly>
+ </dependency>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel level='asInvoker' uiAccess='false' />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+ <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+ <application>
+ <!-- Windows 8 -->
+ <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
+ <!-- Windows 8.1 -->
+ <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
+ <!-- Windows 10 -->
+ <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
+ </application>
+ </compatibility>
+ <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <asmv3:windowsSettings>
+ <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware> <!-- legacy -->
+ <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">permonitorv2,permonitor</dpiAwareness> <!-- falls back to pm if pmv2 is not available -->
+ </asmv3:windowsSettings>
+ </asmv3:application>
+</assembly>