浏览代码

Build: Version information improvements
- Add or cleanup Windows Resource files for engine
- Editor's Managed binary assembly properties are now autogenerated
for version information.

Patrick Rećko 6 年之前
父节点
当前提交
b2141f2a46

+ 1 - 0
.gitignore

@@ -34,3 +34,4 @@ Source/EditorManaged/MBansheeEditor.csproj
 bsfImportToolBuild
 CMakeSettings.json
 .vscode/*
+Source/EditorManaged/Properties/AssemblyInfo.cs

二进制
Source/Banshee3D/BansheeEditorExec.rc


+ 1 - 0
Source/EditorCore/CMakeSources.cmake

@@ -264,6 +264,7 @@ set(BS_BANSHEEEDITOR_INC_WIN32
 set(BS_BANSHEEEDITOR_SRC_WIN32
 	"Private/Win32/BsVSCodeEditor.cpp"
 	"Private/Win32/BsWin32BrowseDialogs.cpp"
+	"Private/Win32/BsEditorWin32Resource.rc"
 )
 
 set(BS_BANSHEEEDITOR_SRC_LINUX

+ 32 - 0
Source/EditorCore/Private/Win32/BsEditorWin32Resource.rc

@@ -0,0 +1,32 @@
+#include "BsFrameworkConfig.h"
+#include "BsEngineConfig.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+#include "winres.h"
+#undef APSTUDIO_READONLY_SYMBOLS
+
+1 VERSIONINFO
+FILEVERSION    	BS_B3D_VERSION_MAJOR,BS_B3D_VERSION_MINOR,BS_B3D_VERSION_PATCH,0
+PRODUCTVERSION 	BS_B3D_VERSION_MAJOR,BS_B3D_VERSION_MINOR,BS_B3D_VERSION_PATCH,0
+FILEOS         	VOS__WINDOWS32
+FILETYPE       	VFT_DLL
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904b0"
+        BEGIN
+            VALUE "CompanyName",            "Marko Pintera and contributors"
+            VALUE "FileDescription",        "Banshee Editor core library"
+            VALUE "FileVersion",            BS_B3D_VERSION_STRING " (based on bs::framework " BS_VERSION_STRING ")"
+            VALUE "ProductName",            "Banshee Engine"
+            VALUE "Licence",                "Released under the under the GNU Lesser General Public License V3 or (at your option) any later version"
+            VALUE "LegalCopyright",         "Copyright (c) 2014-" _MKSTR(BS_B3D_CURRENT_RELEASE_YEAR) " Marko Pintera and contributors"
+            VALUE "Info",                   "https://banshee3d.com"
+            VALUE "ProductVersion",         BS_B3D_VERSION_STRING
+        END
+    END
+    BLOCK "VarFileInfo"
+    BEGIN
+        VALUE "Translation", 0x409, 1200
+    END
+END

+ 3 - 0
Source/EditorManaged/CMakeLists.txt

@@ -1,3 +1,6 @@
+# Generate the assembly info file
+configure_file("${PROJECT_SOURCE_DIR}/Source/EditorManaged/Properties/AssemblyInfo.cs.in" "${PROJECT_SOURCE_DIR}/Source/EditorManaged/Properties/AssemblyInfo.cs")
+
 # Generate the CS project file
 generate_csharp_project(${PROJECT_SOURCE_DIR}/Source/EditorManaged MBansheeEditor bs.Editor MBansheeEditor)
 

+ 0 - 36
Source/EditorManaged/Properties/AssemblyInfo.cs

@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MBansheeEditor")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MBansheeEditor")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ebcdd4b7-909a-4800-be5a-bbc34ba2b49e")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]

+ 21 - 0
Source/EditorManaged/Properties/AssemblyInfo.cs.in

@@ -0,0 +1,21 @@
+// Autogenerated file, please do not edit!
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Banshee Editor managed library")]
+[assembly: AssemblyDescription("Implements managed parts of Banshee Editor")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Marko Pintera and contributors")]
+[assembly: AssemblyProduct("Banshee Engine")]
+[assembly: AssemblyCopyright("Copyright (c) 2014-@BS_B3D_CURRENT_RELEASE_YEAR@ Marko Pintera and contributors")]
+[assembly: AssemblyTrademark("Released under the under the GNU Lesser General Public License V3 or (at your option) any later version")]
+[assembly: AssemblyCulture("")]
+
+[assembly: ComVisible(false)]
+
+[assembly: Guid("ebcdd4b7-909a-4800-be5a-bbc34ba2b49e")]
+
+[assembly: AssemblyVersion("@BS_B3D_VERSION_MAJOR@.@BS_B3D_VERSION_MINOR@.@[email protected]")]
+[assembly: AssemblyFileVersion("@BS_B3D_VERSION_MAJOR@.@BS_B3D_VERSION_MINOR@.@[email protected]")]

+ 1 - 1
Source/Game/CMakeLists.txt

@@ -3,7 +3,7 @@ include(CMakeSources.cmake)
 	
 # Target
 if(WIN32)
-	add_executable(Game WIN32 ${BS_GAME_SRC})
+	add_executable(Game WIN32 ${BS_GAME_SRC} Game.rc)
 else()
 	add_executable(Game ${BS_GAME_SRC})
 endif()

二进制
Source/Game/Game.rc