chore.移动 MaaBuilder 项目位置

This commit is contained in:
Liam Sho
2022-05-23 23:17:28 +08:00
parent 8476553be5
commit ca85f31fd9
21 changed files with 58 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "MeoAssistantArknights.sln"
}
"Solution": "tools/MaaBuilder.sln"
}

View File

@@ -28,6 +28,8 @@ 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
@@ -38,6 +40,8 @@ Global
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

View File

@@ -13,7 +13,7 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
# CONFIGURATION
###########################################################################
$BuildProjectFile = "$PSScriptRoot\src\MeoAssistantBuilder\MeoAssistantBuilder.csproj"
$BuildProjectFile = "$PSScriptRoot\tools\MaaBuilder\MaaBuilder.csproj"
$TempDirectory = "$PSScriptRoot\\.nuke\temp"
$DotNetGlobalFile = "$PSScriptRoot\\global.json"

View File

@@ -9,7 +9,7 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
# CONFIGURATION
###########################################################################
BUILD_PROJECT_FILE="$SCRIPT_DIR/src/MeoAssistantBuilder/MeoAssistantBuilder.csproj"
BUILD_PROJECT_FILE="$SCRIPT_DIR/tools/MaaBuilder/MaaBuilder.csproj"
TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp"
DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json"

View File

@@ -1,8 +0,0 @@
{
"profiles": {
"MeoAssistantBuilder": {
"commandName": "Project",
"commandLineArgs": "--target DevTest"
}
}
}

23
tools/MaaBuilder.sln Normal file
View File

@@ -0,0 +1,23 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32505.173
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MaaBuilder", "MaaBuilder\MaaBuilder.csproj", "{C62E485E-4851-42F9-A4D4-B098B1135E5E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C62E485E-4851-42F9-A4D4-B098B1135E5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C62E485E-4851-42F9-A4D4-B098B1135E5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DE56D63D-A051-4FA1-9F1F-95FBF1002B70}
EndGlobalSection
EndGlobal

View File

@@ -1,7 +1,7 @@
using Nuke.Common.Tooling;
using System.ComponentModel;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[TypeConverter(typeof(TypeConverter<ActionConfiguration>))]
public class ActionConfiguration : Enumeration

View File

@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[GitHubActions(
name: "dev-build",

View File

@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[GitHubActions(
name: "release-maa",

View File

@@ -1,6 +1,6 @@
/*using Nuke.Common.CI.GitHubActions;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[GitHubActions(
name: "release-maa-core",

View File

@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[GitHubActions(
name: "release-maa-resource",

View File

@@ -3,6 +3,7 @@ using Nuke.Common;
using Nuke.Common.Execution;
using Nuke.Common.Git;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.GitHub;
using Nuke.Common.Tools.MSBuild;
@@ -15,7 +16,7 @@ using System.Linq;
using System.Runtime.InteropServices;
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[CheckBuildProjectConfigurations]
public partial class Build : NukeBuild
@@ -38,7 +39,7 @@ public partial class Build : NukeBuild
}
return Execute<Build>(_ => _.Default);
}
BuildParameters Parameters;
const string MasterBranch = "master";
@@ -92,6 +93,7 @@ public partial class Build : NukeBuild
Information($"在 GitHub Actions 中运行:{Parameters.IsGitHubActions}");
Information($"是 Pull Request{Parameters.IsPullRequest}");
Information($"是 Workflow Dispatch 触发:{Parameters.IsWorkflowDispatch}");
Information($"是 PreRelease 版本:{Parameters.IsPreRelease}");
Information($"Actions 名称:{Parameters.GhActionName ?? "Null"}");
Information($"Actions 分支:{Parameters.GhBranch ?? "Null"}");
Information($"Actions PR{Parameters.GhPullRequestId ?? "Null"}");

View File

@@ -1,7 +1,7 @@
using Nuke.Common.Tooling;
using System.ComponentModel;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[TypeConverter(typeof(TypeConverter<BuildConfiguration>))]
public class BuildConfiguration : Enumeration

View File

@@ -15,7 +15,7 @@ using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using static Nuke.Common.Tools.VSWhere.VSWhereTasks;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
public partial class Build
{
@@ -122,8 +122,11 @@ public partial class Build
MaaResourceChangeLogFile = RootDirectory / "CHANGELOG_RES.md";
// 项目
MaaCoreProject = b.Solution.GetProject("MeoAssistant");
MaaWpfProject = b.Solution.GetProject("MeoAsstGui");
var mySln = b.Solution;
var maaSolution = ProjectModelTasks.ParseSolution(RootDirectory / "MeoAssistantArknights.sln");
Assert.True(maaSolution is not null, "无法载入 MeoAssistantArknights.sln");
MaaCoreProject = maaSolution.GetProject("MeoAssistant");
MaaWpfProject = maaSolution.GetProject("MeoAsstGui");
// 配置
CultureInfo.CurrentCulture = CultureInfo.GetCultureInfo("zh-Hans-CN");

View File

@@ -8,15 +8,8 @@
<NukeRootDirectory>..\..</NukeRootDirectory>
<NukeScriptDirectory>..\..</NukeScriptDirectory>
<NukeTelemetryVersion>1</NukeTelemetryVersion>
<PlatformTarget>x64</PlatformTarget>
<Configurations>Release</Configurations>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Nuke.Common" Version="6.0.3" />
</ItemGroup>
@@ -25,6 +18,10 @@
<PackageDownload Include="vswhere" Version="[3.0.2]" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<None Remove="..\..\.github\workflows\release-maa-core.yml" />
</ItemGroup>

View File

@@ -0,0 +1,7 @@
{
"profiles": {
"MaaBuilder": {
"commandName": "Project"
}
}
}