Skip to content

Commit

Permalink
chore.移动 MaaBuilder 项目位置
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisaAkiron committed May 23, 2022
1 parent e8175c6 commit e998cf7
Show file tree
Hide file tree
Showing 21 changed files with 58 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .nuke/parameters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "./build.schema.json",
"Solution": "MeoAssistantArknights.sln"
}
"Solution": "tools/MaaBuilder.sln"
}
4 changes: 4 additions & 0 deletions MeoAssistantArknights.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 0 additions & 8 deletions src/MeoAssistantBuilder/Properties/launchSettings.json

This file was deleted.

23 changes: 23 additions & 0 deletions tools/MaaBuilder.sln
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Nuke.Common.Tooling;
using System.ComponentModel;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[TypeConverter(typeof(TypeConverter<ActionConfiguration>))]
public class ActionConfiguration : Enumeration
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[GitHubActions(
name: "dev-build",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[GitHubActions(
name: "release-maa",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*using Nuke.Common.CI.GitHubActions;
namespace MeoAssistantBuilder;
namespace MaaBuilder;
[GitHubActions(
name: "release-maa-core",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Nuke.Common.CI.GitHubActions;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[GitHubActions(
name: "release-maa-resource",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
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;
Expand All @@ -15,7 +16,7 @@
using System.Runtime.InteropServices;
using static Nuke.Common.Tools.MSBuild.MSBuildTasks;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[CheckBuildProjectConfigurations]
public partial class Build : NukeBuild
Expand All @@ -38,7 +39,7 @@ public static int Main()
}
return Execute<Build>(_ => _.Default);
}

BuildParameters Parameters;

const string MasterBranch = "master";
Expand Down Expand Up @@ -92,6 +93,7 @@ protected override void OnBuildInitialized()
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"}");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Nuke.Common.Tooling;
using System.ComponentModel;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

[TypeConverter(typeof(TypeConverter<BuildConfiguration>))]
public class BuildConfiguration : Enumeration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using System.Text.RegularExpressions;
using static Nuke.Common.Tools.VSWhere.VSWhereTasks;

namespace MeoAssistantBuilder;
namespace MaaBuilder;

public partial class Build
{
Expand Down Expand Up @@ -122,8 +122,11 @@ public BuildParameters(Build b)
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");
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
7 changes: 7 additions & 0 deletions tools/MaaBuilder/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"profiles": {
"MaaBuilder": {
"commandName": "Project"
}
}
}
File renamed without changes.

0 comments on commit e998cf7

Please sign in to comment.