From a12bad570079af1a41598df9bc640061c89a1221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DOTTEL=20Ga=C3=ABl?= Date: Sun, 22 Jan 2023 16:31:30 +0100 Subject: [PATCH] convenience changes --- .github/workflows/csharp-ci-pkhex.yml | 43 +++++++++++++++++++ AutoLegalityMod/AutoModPlugins.csproj | 2 +- AutoModTests/AutoModTests.csproj | 2 +- PKHeX-Plugins.sln | 6 +++ .../AutoMod/Util/LivingDexUtils.cs | 2 +- PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj | 2 +- .../PKHeX.Core.Enhancements.csproj | 2 +- .../PKHeX.Core.Injection.csproj | 2 +- 8 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/csharp-ci-pkhex.yml diff --git a/.github/workflows/csharp-ci-pkhex.yml b/.github/workflows/csharp-ci-pkhex.yml new file mode 100644 index 00000000..f3cdf1eb --- /dev/null +++ b/.github/workflows/csharp-ci-pkhex.yml @@ -0,0 +1,43 @@ +name: C# CI PKHex + +on: [push, pull_request, workflow_dispatch] + +jobs: + build: + runs-on: windows-2022 + strategy: + matrix: + configuration: [Debug, Release] + + steps: + - uses: actions/checkout@v4 + with: + repository: 'pifopi/PKHeX' + path: PKHex + - uses: actions/checkout@v4 + with: + repository: 'pifopi/PKHeX-Plugins' + path: PKHeX-Plugins + - uses: microsoft/setup-msbuild@v1 + - name: Generate binaries + run: | + cd PKHeX + dotnet restore /p:Configuration=${{ matrix.configuration }} /p:Platform="Any CPU" + MSBuild.exe PKHeX.WinForms/PKHeX.WinForms.csproj /p:Configuration=${{ matrix.configuration }} + cd ../PKHeX-Plugins + dotnet restore /p:Configuration=${{ matrix.configuration }} /p:Platform="Any CPU" + MSBuild.exe AutoLegalityMod/AutoModPlugins.csproj /p:Configuration=${{ matrix.configuration }} + robocopy AutoLegalityMod\bin\${{ matrix.configuration }}\net8.0-windows ..\PKHeX\PKHeX.WinForms\bin\x64\${{ matrix.configuration }}\net8.0-windows\win-x64\plugins\ AutoModPlugins.dll LibUsbDotNet.LibUsbDotNet.dll NtrSharp.dll PKHeX.Core.AutoMod.dll PKHeX.Core.Enhancements.dll PKHeX.Core.Injection.dll + write-host "Robocopy exited with exit code:" $lastexitcode + if ($lastexitcode -eq 1) + { + exit 0 + } + else + { + exit 1 + } + - uses: actions/upload-artifact@v4 + with: + name: PKHeX for windows (${{ matrix.configuration }}) + path: PKHeX/PKHeX.WinForms/bin/x64/${{ matrix.configuration }}/net8.0-windows/win-x64 diff --git a/AutoLegalityMod/AutoModPlugins.csproj b/AutoLegalityMod/AutoModPlugins.csproj index d42e461d..abca4f71 100644 --- a/AutoLegalityMod/AutoModPlugins.csproj +++ b/AutoLegalityMod/AutoModPlugins.csproj @@ -11,7 +11,7 @@ - + diff --git a/AutoModTests/AutoModTests.csproj b/AutoModTests/AutoModTests.csproj index 9b007dee..9d8c964a 100644 --- a/AutoModTests/AutoModTests.csproj +++ b/AutoModTests/AutoModTests.csproj @@ -6,7 +6,7 @@ - + all diff --git a/PKHeX-Plugins.sln b/PKHeX-Plugins.sln index 29bd4feb..5d6ee773 100644 --- a/PKHeX-Plugins.sln +++ b/PKHeX-Plugins.sln @@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.Core.Injection", "PKH EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.Core.Enhancements", "PKHeX.Core.Enhancements\PKHeX.Core.Enhancements.csproj", "{165D144A-DBB4-4F3B-BF39-E783B41008C3}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PKHeX.Core", "..\PKHeX\PKHeX.Core\PKHeX.Core.csproj", "{85483679-4605-4558-B7CB-4B818BB5D2C3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -41,6 +43,10 @@ Global {165D144A-DBB4-4F3B-BF39-E783B41008C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {165D144A-DBB4-4F3B-BF39-E783B41008C3}.Release|Any CPU.ActiveCfg = Release|Any CPU {165D144A-DBB4-4F3B-BF39-E783B41008C3}.Release|Any CPU.Build.0 = Release|Any CPU + {85483679-4605-4558-B7CB-4B818BB5D2C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85483679-4605-4558-B7CB-4B818BB5D2C3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85483679-4605-4558-B7CB-4B818BB5D2C3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85483679-4605-4558-B7CB-4B818BB5D2C3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/PKHeX.Core.AutoMod/AutoMod/Util/LivingDexUtils.cs b/PKHeX.Core.AutoMod/AutoMod/Util/LivingDexUtils.cs index 202c33f2..379a37dc 100644 --- a/PKHeX.Core.AutoMod/AutoMod/Util/LivingDexUtils.cs +++ b/PKHeX.Core.AutoMod/AutoMod/Util/LivingDexUtils.cs @@ -2,7 +2,7 @@ { public class LivingDexConfig { - public bool IncludeForms { get; init; } + public bool IncludeForms { get; init; } = true; public bool SetShiny { get; init; } public bool SetAlpha { get; init; } public bool NativeOnly { get; init; } diff --git a/PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj b/PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj index 1669feda..ff71ae48 100644 --- a/PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj +++ b/PKHeX.Core.AutoMod/PKHeX.Core.AutoMod.csproj @@ -3,6 +3,6 @@ net8.0 - + \ No newline at end of file diff --git a/PKHeX.Core.Enhancements/PKHeX.Core.Enhancements.csproj b/PKHeX.Core.Enhancements/PKHeX.Core.Enhancements.csproj index 1669feda..ff71ae48 100644 --- a/PKHeX.Core.Enhancements/PKHeX.Core.Enhancements.csproj +++ b/PKHeX.Core.Enhancements/PKHeX.Core.Enhancements.csproj @@ -3,6 +3,6 @@ net8.0 - + \ No newline at end of file diff --git a/PKHeX.Core.Injection/PKHeX.Core.Injection.csproj b/PKHeX.Core.Injection/PKHeX.Core.Injection.csproj index f849d09d..4316e9a6 100644 --- a/PKHeX.Core.Injection/PKHeX.Core.Injection.csproj +++ b/PKHeX.Core.Injection/PKHeX.Core.Injection.csproj @@ -4,6 +4,6 @@ - + \ No newline at end of file