diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index 82707ee91f..19627b9e33 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -72,7 +72,6 @@
"SetPackageBundled",
"SetVersion",
"UseCleanArtifact",
- "UseCleanCICD",
"UseCleanRelease",
"UseCommitVersion",
"UseMaaChangeLog",
@@ -84,17 +83,12 @@
"UsePublishArtifact",
"UsePublishRelease",
"UseTagVersion",
- "WithCompileCoreCICD",
"WithCompileCoreRelease",
"WithCompileResourceRelease",
"WithCompileWpfRelease"
]
}
},
- "Solution": {
- "type": "string",
- "description": "Path to a solution file that is automatically loaded"
- },
"Target": {
"type": "array",
"description": "List of targets to be invoked. Default is '{default_target}'",
@@ -110,7 +104,6 @@
"SetPackageBundled",
"SetVersion",
"UseCleanArtifact",
- "UseCleanCICD",
"UseCleanRelease",
"UseCommitVersion",
"UseMaaChangeLog",
@@ -122,7 +115,6 @@
"UsePublishArtifact",
"UsePublishRelease",
"UseTagVersion",
- "WithCompileCoreCICD",
"WithCompileCoreRelease",
"WithCompileResourceRelease",
"WithCompileWpfRelease"
diff --git a/MeoAssistantArknights.sln b/MeoAssistantArknights.sln
index 649dbaef43..464cebec5e 100644
--- a/MeoAssistantArknights.sln
+++ b/MeoAssistantArknights.sln
@@ -28,24 +28,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MeoAssistantBuilder", "src\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ItemMappingCvt", "tools\ItemMappingCvt\ItemMappingCvt.vcxproj", "{C9EA2837-0A4B-488F-A289-643B9D0BFCEB}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MeoAssistantBuilder", "tools\MeoAssistantBuilder\MeoAssistantBuilder.csproj", "{834C1184-5CF8-4FF8-B538-64A09E1EAED5}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- CICD|x64 = CICD|x64
- CICD|x86 = CICD|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
RelWithDebInfo|x64 = RelWithDebInfo|x64
RelWithDebInfo|x86 = RelWithDebInfo|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {834C1184-5CF8-4FF8-B538-64A09E1EAED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {834C1184-5CF8-4FF8-B538-64A09E1EAED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.CICD|x64.ActiveCfg = RelWithDebInfo|x64
- {63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.CICD|x64.Build.0 = RelWithDebInfo|x64
- {63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.CICD|x86.ActiveCfg = Release|x64
- {63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.CICD|x86.Build.0 = Release|x64
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.ActiveCfg = Release|x64
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x64.Build.0 = Release|x64
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.Release|x86.ActiveCfg = Release|x64
@@ -54,22 +44,14 @@ Global
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{63B4F1A2-291C-4C85-91E1-A1F6DAE30D64}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.CICD|x64.ActiveCfg = CICD|x64
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.CICD|x64.Build.0 = CICD|x64
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.CICD|x86.ActiveCfg = CICD|Any CPU
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.CICD|x86.Build.0 = CICD|Any CPU
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.ActiveCfg = Release|x64
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x64.Build.0 = Release|x64
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.ActiveCfg = Release|Any CPU
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.Release|x86.Build.0 = Release|Any CPU
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64
{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Any CPU
- {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Any CPU
- {093A3174-A27E-4D23-B64E-16F9448AD5AC}.CICD|x64.ActiveCfg = Release|x64
- {093A3174-A27E-4D23-B64E-16F9448AD5AC}.CICD|x64.Build.0 = Release|x64
- {093A3174-A27E-4D23-B64E-16F9448AD5AC}.CICD|x86.ActiveCfg = Release|Win32
- {093A3174-A27E-4D23-B64E-16F9448AD5AC}.CICD|x86.Build.0 = Release|Win32
+ {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
+ {FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.ActiveCfg = Release|x64
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x64.Build.0 = Release|x64
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.Release|x86.ActiveCfg = Release|Win32
@@ -77,10 +59,6 @@ Global
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.ActiveCfg = Release|Win32
{093A3174-A27E-4D23-B64E-16F9448AD5AC}.RelWithDebInfo|x86.Build.0 = Release|Win32
- {362D1E30-F5AE-4279-9985-65C27B3BA300}.CICD|x64.ActiveCfg = CICD|x64
- {362D1E30-F5AE-4279-9985-65C27B3BA300}.CICD|x64.Build.0 = CICD|x64
- {362D1E30-F5AE-4279-9985-65C27B3BA300}.CICD|x86.ActiveCfg = CICD|x64
- {362D1E30-F5AE-4279-9985-65C27B3BA300}.CICD|x86.Build.0 = CICD|x64
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.ActiveCfg = Release|x64
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x64.Build.0 = Release|x64
{362D1E30-F5AE-4279-9985-65C27B3BA300}.Release|x86.ActiveCfg = Release|x64
@@ -89,16 +67,10 @@ Global
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x64
{362D1E30-F5AE-4279-9985-65C27B3BA300}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x64
- {8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.CICD|x64.ActiveCfg = Release|x64
- {8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.CICD|x86.ActiveCfg = Release|Any CPU
{8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.Release|x64.ActiveCfg = Release|x64
{8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.Release|x86.ActiveCfg = Release|Any CPU
{8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.RelWithDebInfo|x64.ActiveCfg = Release|x64
{8D9036DD-75F1-4BD0-89E2-DFB37B925DA3}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
- {C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.CICD|x64.ActiveCfg = Release|x64
- {C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.CICD|x64.Build.0 = Release|x64
- {C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.CICD|x86.ActiveCfg = Release|Win32
- {C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.CICD|x86.Build.0 = Release|Win32
{C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.Release|x64.ActiveCfg = Release|x64
{C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.Release|x64.Build.0 = Release|x64
{C9EA2837-0A4B-488F-A289-643B9D0BFCEB}.Release|x86.ActiveCfg = Release|Win32
diff --git a/src/MeoAssistant/MeoAssistant.vcxproj b/src/MeoAssistant/MeoAssistant.vcxproj
index 1cb32d19a8..b50956b13d 100644
--- a/src/MeoAssistant/MeoAssistant.vcxproj
+++ b/src/MeoAssistant/MeoAssistant.vcxproj
@@ -9,10 +9,6 @@
RelWithDebInfo
x64
-
- CICD
- x64
-
@@ -191,13 +187,6 @@
true
Unicode
-
- DynamicLibrary
- false
- v143
- true
- Unicode
-
DynamicLibrary
false
@@ -213,9 +202,6 @@
-
-
-
@@ -226,12 +212,6 @@
$(TargetDir);$(ProjectDir)..\..\3rdparty\lib;$(LibraryPath)
$(ProjectDir)..\..\$(Platform)\$(Configuration)\
-
- false
- $(ProjectDir)..\..\include;$(ProjectDir)..\..\3rdparty\include;$(IncludePath)
- $(TargetDir);$(ProjectDir)..\..\3rdparty\lib;$(LibraryPath)
- $(ProjectDir)..\..\$(Platform)\$(Configuration)\
-
false
$(ProjectDir)..\..\include;$(ProjectDir)..\..\3rdparty\include;$(IncludePath)
@@ -287,34 +267,6 @@
Copy 3rd party dll
-
-
- Level4
- true
- true
- true
- NDEBUG;_CONSOLE;ASST_DLL_EXPORTS;%(PreprocessorDefinitions)
- true
- stdcpp17
- stdc11
- MultiThreaded
- MaxSpeed
- /utf-8 /MP $(ExternalCompilerOptions) %(AdditionalOptions)
- true
-
-
- Console
- true
- true
- true
- ppocr.lib;opencv_world453.lib;zlibstatic.lib;%(AdditionalDependencies)
- RequireAdministrator
-
-
- true
- msvcrt.lib
-
-
Level4
@@ -375,4 +327,4 @@
-
+
\ No newline at end of file
diff --git a/src/MeoAsstGui/MeoAsstGui.csproj b/src/MeoAsstGui/MeoAsstGui.csproj
index fe34dacb65..66fe563800 100644
--- a/src/MeoAsstGui/MeoAsstGui.csproj
+++ b/src/MeoAsstGui/MeoAsstGui.csproj
@@ -65,16 +65,6 @@
7.3
prompt
-
- ..\..\x64\CICD\
- TRACE
- true
- pdbonly
- x64
- 7.3
- prompt
- true
-
diff --git a/tools/MaaBuilder/Build.cs b/tools/MaaBuilder/Build.cs
index 8c892d47ce..efa48c1cad 100644
--- a/tools/MaaBuilder/Build.cs
+++ b/tools/MaaBuilder/Build.cs
@@ -123,12 +123,6 @@ public partial class Build : NukeBuild
FileSystemTasks.EnsureCleanDirectory(Parameters.BuildOutput / BuildConfiguration.Release);
});
- Target UseCleanCICD => _ => _
- .Executes(() =>
- {
- FileSystemTasks.EnsureCleanDirectory(Parameters.BuildOutput / BuildConfiguration.CICD);
- });
-
#endregion
#region 设置版本
@@ -199,30 +193,6 @@ public partial class Build : NukeBuild
);
});
- Target WithCompileCoreCICD => _ => _
- .DependsOn(UseCleanCICD)
- .After(SetVersion)
- .Executes(() =>
- {
- var versionEnv = $"/DMAA_VERSION=\\\"{_version}\\\"";
- Information($"MaaCore 编译环境变量:ExternalCompilerOptions = {versionEnv}");
- MSBuild(c => c
- .SetProcessToolPath(Parameters.MsBuildPath)
- .SetProjectFile(Parameters.MaaCoreProject)
- .SetTargets("ReBuild")
- .SetConfiguration(BuildConfiguration.CICD)
- .SetTargetPlatform(MSBuildTargetPlatform.x64)
- .SetProcessEnvironmentVariable("ExternalCompilerOptions", versionEnv)
- );
-
- var output = Parameters.BuildOutput / BuildConfiguration.CICD;
- var dlls = RootDirectory / "3rdparty" / "bin";
-
- Information($"复制目录:{dlls} -> {output}");
- FileSystemTasks.CopyDirectoryRecursively(dlls, output,
- DirectoryExistsPolicy.Merge, FileExistsPolicy.OverwriteIfNewer);
- });
-
// TODO 在 MaaElectronUI 发布后移除
Target WithCompileWpfRelease => _ => _
.DependsOn(UseCleanRelease)
@@ -283,13 +253,14 @@ public partial class Build : NukeBuild
});
Target UseMaaCore => _ => _
- .DependsOn(UseCleanArtifact, WithCompileCoreCICD)
+ .DependsOn(UseCleanArtifact, WithCompileCoreRelease)
.Triggers(SetPackageBundled)
.Executes(() =>
{
- var buildOutput = Parameters.BuildOutput / BuildConfiguration.CICD;
+ var buildOutput = Parameters.BuildOutput / BuildConfiguration.Release;
RemoveDebugSymbols(buildOutput);
-
+ RemoveReleaseResource(buildOutput);
+
BundlePackage(buildOutput, MaaCorePackageName);
});
@@ -505,6 +476,19 @@ public partial class Build : NukeBuild
Information($"删除文件:{file}");
}
}
+ private void RemoveReleaseResource(AbsolutePath outputDir)
+ {
+ var resourceDir = outputDir / "resource";
+ if (FileSystemTasks.Exists(resourceDir))
+ {
+ FileSystemTasks.DeleteDirectory(resourceDir);
+ Information("移除了发布中的资源目录");
+ }
+ else
+ {
+ Warning("发布中的资源目录不存在");
+ }
+ }
private void CreateGitHubRelease(string repo, string commitish, string releaseName)
{
diff --git a/tools/MaaBuilder/BuildConfiguration.cs b/tools/MaaBuilder/BuildConfiguration.cs
index dc997cd6fc..df92c6db73 100644
--- a/tools/MaaBuilder/BuildConfiguration.cs
+++ b/tools/MaaBuilder/BuildConfiguration.cs
@@ -6,24 +6,8 @@ namespace MaaBuilder;
[TypeConverter(typeof(TypeConverter))]
public class BuildConfiguration : Enumeration
{
- ///
- /// MaaCore 在此配置下会自动复制资源文件,在直接发布 MaaBundle 时使用;
- /// MaaWpf 在此配置下开启了优化,在直接发布 MaaBundle 时使用;
- ///
public static readonly BuildConfiguration Release = new() { Value = nameof(Release) };
- ///
- /// MaaCore 在此配置下会生成完整的 Debug 信息,在 DevBuild 中使用;
- /// MaaWpf 在此配置下关闭了优化,在 DevBuild 中使用;
- ///
- public static readonly BuildConfiguration RelWithDebInfo = new() { Value = nameof(RelWithDebInfo) };
-
- ///
- /// MaaCore 在此配置下不会自动复制资源文件,其余配置和 相同,在发布 MaaCore 时使用
- /// MaaWpf 在此配置下与 相同,不建议使用
- ///
- public static readonly BuildConfiguration CICD = new() { Value = nameof(CICD) };
-
public static implicit operator string(BuildConfiguration configuration)
{
return configuration.Value;
diff --git a/tools/MaaBuilder/BuildParameters.cs b/tools/MaaBuilder/BuildParameters.cs
index f53151734f..f7e5631a81 100644
--- a/tools/MaaBuilder/BuildParameters.cs
+++ b/tools/MaaBuilder/BuildParameters.cs
@@ -21,7 +21,6 @@ public partial class Build
{
#region Nuke 默认全局参数
- [Solution] readonly Solution Solution;
[CI] readonly GitHubActions GitHubActions;
#endregion
@@ -122,7 +121,6 @@ public partial class Build
MaaResourceChangeLogFile = RootDirectory / "CHANGELOG_RES.md";
// 项目
- var mySln = b.Solution;
var maaSolution = ProjectModelTasks.ParseSolution(RootDirectory / "MeoAssistantArknights.sln");
Assert.True(maaSolution is not null, "无法载入 MeoAssistantArknights.sln");
MaaCoreProject = maaSolution.GetProject("MeoAssistant");