diff --git a/BepInEx.Core/BepInEx.Core.csproj b/BepInEx.Core/BepInEx.Core.csproj
index ff5346d..d4889a6 100644
--- a/BepInEx.Core/BepInEx.Core.csproj
+++ b/BepInEx.Core/BepInEx.Core.csproj
@@ -1,24 +1,15 @@
BepInEx Core library
- net35;netstandard2.0;netstandard2.1
+ net35;netstandard2.0
true
BepInEx
BepInEx
- 10
..\bin\Core\
- $(OutputPath)\$(TargetFramework)\BepInEx.Core.xml
Unity plugin injection framework
true
-
- none
- true
-
-
- portable
-
@@ -28,7 +19,6 @@
-
diff --git a/BepInEx.Core/Paths.cs b/BepInEx.Core/Paths.cs
index 4e8d186..b64bb05 100644
--- a/BepInEx.Core/Paths.cs
+++ b/BepInEx.Core/Paths.cs
@@ -11,6 +11,10 @@ namespace BepInEx;
///
public static class Paths
{
+ // TODO: Why is this in Paths?
+ ///
+ /// BepInEx version.
+ ///
public static Version BepInExVersion { get; } =
Version.Parse(MetadataHelper.GetAttributes(typeof(Paths).Assembly)[0]
.InformationalVersion);
diff --git a/BepInEx.IL2CPP/BepInEx.IL2CPP.csproj b/BepInEx.IL2CPP/BepInEx.IL2CPP.csproj
index 4ed2e6f..af1671a 100644
--- a/BepInEx.IL2CPP/BepInEx.IL2CPP.csproj
+++ b/BepInEx.IL2CPP/BepInEx.IL2CPP.csproj
@@ -7,18 +7,8 @@
BepInEx.IL2CPP
true
..\bin\IL2CPP\
- 10
- Debug;Release
- AnyCPU
false
-
- embedded
-
-
- none
- true
-
@@ -35,11 +25,10 @@
-
-
+
diff --git a/BepInEx.NetCore/BepInEx.NetCore.csproj b/BepInEx.NetCore/BepInEx.NetCore.csproj
index 3f2a321..2c6489e 100644
--- a/BepInEx.NetCore/BepInEx.NetCore.csproj
+++ b/BepInEx.NetCore/BepInEx.NetCore.csproj
@@ -4,21 +4,10 @@
netcoreapp3.1;net6
-
- 10
-
-
-
- 10
-
-
-
-
-
diff --git a/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj b/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj
index afd7eb0..4859234 100644
--- a/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj
+++ b/BepInEx.NetLauncher/BepInEx.NetLauncher.csproj
@@ -6,20 +6,9 @@
true
BepInEx.NetLauncher
BepInEx.NetLauncher
- 10
false
-
-
- full
- bin\Debug
x86
-
-
- portable
..\bin\NetLauncher\
-
- x86
- true
@@ -30,6 +19,5 @@
-
diff --git a/BepInEx.Preloader.Core/BepInEx.Preloader.Core.csproj b/BepInEx.Preloader.Core/BepInEx.Preloader.Core.csproj
index ff536b7..01fcd96 100644
--- a/BepInEx.Preloader.Core/BepInEx.Preloader.Core.csproj
+++ b/BepInEx.Preloader.Core/BepInEx.Preloader.Core.csproj
@@ -1,24 +1,14 @@
Core classes and utilities for BepInEx Preloader
- net35;netstandard2.0;netstandard2.1
+ net35;netstandard2.0
BepInEx.Preloader.Core
BepInEx.Preloader.Core
..\bin\Core
- $(OutputPath)\$(TargetFramework)\BepInEx.Preloader.Core.xml
- 10
-
-
- full
-
-
- none
- true
-
diff --git a/BepInEx.Preloader.Core/Logging/ChainloaderLogHelper.cs b/BepInEx.Preloader.Core/Logging/ChainloaderLogHelper.cs
index afc8740..d985ed6 100644
--- a/BepInEx.Preloader.Core/Logging/ChainloaderLogHelper.cs
+++ b/BepInEx.Preloader.Core/Logging/ChainloaderLogHelper.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using BepInEx.Logging;
-using BepInEx.Shared;
using MonoMod.Utils;
namespace BepInEx.Preloader.Core.Logging;
@@ -35,20 +34,17 @@ public static class ChainloaderLogHelper
public static void PrintLogInfo(ManualLogSource log)
{
- var consoleTitle = $"BepInEx {Paths.BepInExVersion} - {Paths.ProcessName}";
+ var bepinVersion = Paths.BepInExVersion;
+ var versionMini = new SemanticVersioning.Version(bepinVersion.Major, bepinVersion.Minor, bepinVersion.Patch,
+ bepinVersion.PreRelease);
+ var consoleTitle = $"BepInEx {versionMini} - {Paths.ProcessName}";
log.Log(LogLevel.Message, consoleTitle);
if (ConsoleManager.ConsoleActive)
ConsoleManager.SetConsoleTitle(consoleTitle);
- //See BuildInfoAttribute for more information about this section.
- var attributes = typeof(BuildInfoAttribute).Assembly.GetCustomAttributes(typeof(BuildInfoAttribute), false);
-
- if (attributes.Length > 0)
- {
- var attribute = (BuildInfoAttribute) attributes[0];
- log.Log(LogLevel.Message, attribute.Info);
- }
+ if (!string.IsNullOrEmpty(bepinVersion.Build))
+ log.Log(LogLevel.Message, $"Build information: {bepinVersion.Build}");
Logger.Log(LogLevel.Info, $"System platform: {GetPlatformString()}");
Logger.Log(LogLevel.Info,
diff --git a/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj b/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj
index 637b38a..387846c 100644
--- a/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj
+++ b/BepInEx.Preloader.Unity/BepInEx.Preloader.Unity.csproj
@@ -3,20 +3,13 @@
net35;netstandard2.0
BepInEx.Preloader.Unity
BepInEx.Preloader.Unity
- 10
+ true
..\bin\Unity\
- $(OutputPath)\BepInEx.Preloader.Unity.xml
false
-
- full
-
-
- none
-
@@ -25,5 +18,4 @@
-
diff --git a/BepInEx.Shared/BepInEx.Shared.projitems b/BepInEx.Shared/BepInEx.Shared.projitems
deleted file mode 100644
index fad8207..0000000
--- a/BepInEx.Shared/BepInEx.Shared.projitems
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
- $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
- true
- E312EFD4-47ED-4DCE-B279-6B0EE314989F
- Copyright © 2021 BepInEx Team
- 6.0.0
- BepInEx
- https://github.com/BepInEx/BepInEx
- https://github.com/BepInEx/BepInEx/blob/master/LICENSE
- false
- logo.png
- ../bin/NuGet
-
-
- BepInEx.Shared
-
-
-
-
-
-
-
-
-
-
- <_Parameter1>$(BuildInfo)
-
-
-
diff --git a/BepInEx.Shared/BepInEx.Shared.shproj b/BepInEx.Shared/BepInEx.Shared.shproj
deleted file mode 100644
index 7a5c502..0000000
--- a/BepInEx.Shared/BepInEx.Shared.shproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
- {5C7847FB-C16D-47BD-BB17-1045669F9AA7}
-
-
-
-
-
-
-
diff --git a/BepInEx.Shared/BuildInfoAttribute.cs b/BepInEx.Shared/BuildInfoAttribute.cs
deleted file mode 100644
index 166048b..0000000
--- a/BepInEx.Shared/BuildInfoAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-
-namespace BepInEx.Shared;
-
-///
-/// This class is appended to AssemblyInfo.cs when BepInEx is built via a CI pipeline.
-/// It is mainly intended to signify that the current build is not a release build and is special, like for instance a
-/// bleeding edge build.
-///
-[AttributeUsage(AttributeTargets.Assembly)]
-public class BuildInfoAttribute : Attribute
-{
- public BuildInfoAttribute(string info)
- {
- Info = info;
- }
-
- public string Info { get; }
-}
diff --git a/BepInEx.Unity/BepInEx.Unity.csproj b/BepInEx.Unity/BepInEx.Unity.csproj
index 7a50df0..45b2f7f 100644
--- a/BepInEx.Unity/BepInEx.Unity.csproj
+++ b/BepInEx.Unity/BepInEx.Unity.csproj
@@ -4,21 +4,13 @@
net35;netstandard2.0
BepInEx.Unity
BepInEx.Unity
- 10
+ true
..\bin\Unity\
- $(OutputPath)\BepInEx.Unity.xml
false
-
- full
-
-
- none
- true
-
@@ -29,5 +21,4 @@
-
diff --git a/BepInEx.sln b/BepInEx.sln
index 3729add..f9369b4 100644
--- a/BepInEx.sln
+++ b/BepInEx.sln
@@ -31,8 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Markdown", "Markdown", "{68
README.md = README.md
EndProjectSection
EndProject
-Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BepInEx.Shared", "BepInEx.Shared\BepInEx.Shared.shproj", "{5C7847FB-C16D-47BD-BB17-1045669F9AA7}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.NetLauncher.Common", "BepInEx.NetLauncher.Common\BepInEx.NetLauncher.Common.csproj", "{76EB1952-7826-471C-9CF3-815D094DA077}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BepInEx.NetCore", "BepInEx.NetCore\BepInEx.NetCore.csproj", "{08083F40-98AA-4176-BA01-817C18C35C7F}"
@@ -40,12 +38,17 @@ EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "BepInEx.NetLauncher.Shared", "BepInEx.NetLauncher.Shared\BepInEx.NetLauncher.Shared.shproj", "{067BCC8C-FC25-4929-B4F4-C6A5A7496994}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{A6DDBD9E-773C-437A-88AA-995BC5FE90DF}"
- ProjectSection(SolutionItems) = preProject
- build.bat = build.bat
- build.sh = build.sh
- build.ps1 = build.ps1
- build.cake = build.cake
- EndProjectSection
+ ProjectSection(SolutionItems) = preProject
+ build.bat = build.bat
+ build.sh = build.sh
+ build.ps1 = build.ps1
+ build.cake = build.cake
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{12081C35-76DF-450C-AC83-1E1CB84516AA}"
+ ProjectSection(SolutionItems) = preProject
+ Directory.Build.props = Directory.Build.props
+ EndProjectSection
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
@@ -146,6 +149,8 @@ Global
{76EB1952-7826-471C-9CF3-815D094DA077} = {6EC98884-A3DC-4828-85EF-5F10F7519429}
{08083F40-98AA-4176-BA01-817C18C35C7F} = {6EC98884-A3DC-4828-85EF-5F10F7519429}
{067BCC8C-FC25-4929-B4F4-C6A5A7496994} = {6EC98884-A3DC-4828-85EF-5F10F7519429}
+ {68C57430-3E92-4B50-A9A5-208FE9CCD914} = {12081C35-76DF-450C-AC83-1E1CB84516AA}
+ {A6DDBD9E-773C-437A-88AA-995BC5FE90DF} = {12081C35-76DF-450C-AC83-1E1CB84516AA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {55AC11EF-F568-4C79-A356-7ED9510145B1}
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 0000000..2433fd6
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,25 @@
+
+
+ 6.0.0
+ BepInEx
+ latest
+ disable
+ true
+ LGPL-2.1-only
+ true
+ embedded
+ Debug;Release
+ https://github.com/BepInEx/BepInEx
+ https://github.com/BepInEx/BepInEx
+ git
+ Copyright © 2022 BepInEx Team
+ ../bin/NuGet
+ logo.png
+
+
+ true
+
+
+
+
+
diff --git a/build.cake b/build.cake
index cf04712..1de93bf 100644
--- a/build.cake
+++ b/build.cake
@@ -13,7 +13,6 @@ var cleanDependencyCache = Argument("clean_build_cache", false);
var lastBuildCommit = Argument("last_build_commit", "");
var nugetPushSource = Argument("nuget_push_source", "https://nuget.bepinex.dev/v3/index.json");
var nugetPushKey = Argument("nuget_push_key", "");
-var customBuildVersion = Argument("build_version", "");
var buildVersion = "";
var currentCommit = RunGit("rev-parse HEAD");
@@ -83,9 +82,8 @@ Task("Build")
.IsDependentOn("Cleanup")
.Does(() =>
{
- var bepinExProperties = Directory("./BepInEx.Shared");
-
- buildVersion = FindRegexMatchGroupInFile(bepinExProperties + File("BepInEx.Shared.projitems"), @"\([0-9]+\.[0-9]+\.[0-9]+)\<\/Version\>", 1, System.Text.RegularExpressions.RegexOptions.None).Value;
+ // Used in later phases
+ buildVersion = FindRegexMatchGroupInFile(File("Directory.Build.props"), @"\([0-9]+\.[0-9]+\.[0-9]+)\<\/VersionPrefix\>", 1, System.Text.RegularExpressions.RegexOptions.None).Value;
var buildSettings = new DotNetBuildSettings {
Configuration = "Release",
@@ -93,21 +91,10 @@ Task("Build")
};
if (isBleedingEdge) {
- buildSettings.MSBuildSettings.Properties["BuildInfo"] = new[] {
- TransformText("BLEEDING EDGE Build #<%buildNumber%> from <%shortCommit%> at <%branchName%>")
- .WithToken("buildNumber", buildId)
- .WithToken("shortCommit", currentCommit)
- .WithToken("branchName", currentBranch)
- .ToString()
- };
-
- buildSettings.MSBuildSettings.Properties["AssemblyVersion"] = new[] { buildVersion + "." + buildId };
- buildVersion += "-be." + buildId;
- buildSettings.MSBuildSettings.Properties["Version"] = new[] { buildVersion };
- } else if (!string.IsNullOrEmpty(customBuildVersion))
- {
- buildVersion = customBuildVersion;
- buildSettings.MSBuildSettings.Properties["Version"] = new[] { buildVersion };
+ buildSettings.MSBuildSettings.Properties["VersionSuffix"] = new[] { $"be.{buildId}" };
+ buildSettings.MSBuildSettings.Properties["SourceRevisionId"] = new[] { currentCommit };
+ buildSettings.MSBuildSettings.Properties["RepositoryBranch"] = new[] { currentBranch };
+ buildVersion += $"-be.{buildId}+{currentCommitShort}";
}
foreach (var file in GetFiles("./BepInEx.*/*.csproj")) {
@@ -116,7 +103,7 @@ Task("Build")
});
const string DOORSTOP_VER = "4.0.0-rc.4";
-const string DOTNET_MINI_VER = "2022.06.15.1";
+const string DOTNET_MINI_VER = "20220709.38";
const string DOORSTOP_PROXY_DLL = "winhttp.dll";
const string DOBBY_VER = "1.0.0";
@@ -178,7 +165,7 @@ Task("DownloadDependencies")
var dotnetZipPath = depCachePath + File("dotnet-mini.zip");
- DownloadFile($"https://github.com/BepInEx/dotnet-runtime/releases/download/{DOTNET_MINI_VER}/dotnet-mini.zip", dotnetZipPath);
+ DownloadFile($"https://github.com/BepInEx/dotnet-runtime/releases/download/{DOTNET_MINI_VER}/mini-coreclr-Release.zip", dotnetZipPath);
ZipUncompress(dotnetZipPath, dotnetPath);
}
@@ -294,11 +281,10 @@ Task("Pack")
.Does(() =>
{
var distDir = Directory("./bin/dist");
- var commitSuffix = isBleedingEdge ? $"+{currentCommitShort}" : "";
Information("Packing BepInEx");
foreach (Target target in targets) {
- ZipCompress(distDir + Directory($"{target}"), distDir + File($"BepInEx-{target}-{buildVersion}{commitSuffix}.zip"));
+ ZipCompress(distDir + Directory($"{target}"), distDir + File($"BepInEx-{target}-{buildVersion}.zip"));
}
if(isBleedingEdge) {
@@ -332,7 +318,7 @@ Task("Pack")
var cpu => $" {cpu}",
};
return new Dictionary() {
- ["file"] = $"BepInEx-{target}-{buildVersion}{commitSuffix}.zip",
+ ["file"] = $"BepInEx-{target}-{buildVersion}.zip",
["description"] = $"BepInEx {abiName} for {osName}{cpuOsNameSuffix} {abiGamesPrefix}games{osGamesSuffix}",
};
}).ToArray(),
diff --git a/doorstop/doorstop_config_il2cpp.ini b/doorstop/doorstop_config_il2cpp.ini
index 7f69d68..13e3b8c 100644
--- a/doorstop/doorstop_config_il2cpp.ini
+++ b/doorstop/doorstop_config_il2cpp.ini
@@ -46,4 +46,4 @@ debug_suspend=false
coreclr_path=dotnet\coreclr.dll
# Path to the directory containing the managed core libraries for CoreCLR (mscorlib, System, etc.)
-corlib_dir=dotnet\corlib
+corlib_dir=dotnet