Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
WYH2004-MC committed Sep 30, 2024
2 parents ee7f3f7 + a2cf70c commit c5f1801
Show file tree
Hide file tree
Showing 3 changed files with 290 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Build and Test C# Project (Framework 4.7.2)


on:
push:
branches: [ master ] # 触发条件,当main分支有push时触发
pull_request:
branches: [ master ] # 当向main分支发起pull request时也触发

jobs:
build:

runs-on: windows-latest # 使用Windows环境,因为.NET Framework在Windows上运行

env:
MELONLOADER_REPO: https://api.github.com/repos/LavaGang/MelonLoader/releases/latest
MELONLOADER_ASSET_NAME: MelonLoader.x64.zip
OUTPUT_URL: ${{ secrets.OUTPUT_URL }}
OUTPUT_FILE: Output.7z

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: scripts
run: |
choco install 7zip.install -y
mkdir cache
Invoke-WebRequest -Uri https://github.com/LavaGang/MelonLoader/releases/download/v0.6.5/MelonLoader.x64.zip -OutFile "$(Get-Location)\cache\MelonLoader.x64.zip"
7z x "$(Get-Location)\cache\MelonLoader.x64.zip" -o"$(Get-Location)\Out"
Invoke-WebRequest -Uri ${{ secrets.OUTPUT_URL }} -OutFile "$(Get-Location)\cache\Output.7z"
7z x "$(Get-Location)\cache\Output.7z" -o"$(Get-Location)\Output"
if (-not $(git --version 2>$null)) {
$commitHash = "NOT SET"
} else {
$commitHash = git rev-parse --short HEAD
}
$timestamp = Get-Date -Format 'o'
@"
namespace SinmaiAssist {
public static partial class BuildInfo {
public const string CommitHash = "$commitHash";
public const string BuildDate = "$timestamp";
}
}
"@ | Out-File -FilePath ".\BuildInfo.cs" -Encoding ascii
dotnet build
mkdir ".\Out\Mods\"
mkdir ".\Out\UserLibs\"
mkdir ".\Out\Sinmai-Assist\"
cmd /c copy /y ".\Output\Sinmai-Assist.dll" ".\Out\Mods\Sinmai-Assist.dll"
cmd /c copy /y ".\Output\YamlDotNet.dll" ".\Out\UserLibs\YamlDotNet.dll"
cmd /c copy /y ".\config - zh_CN.yml" ".\Out\Sinmai-Assist\config.yml"
Compress-Archive -Path "$(Get-Location)\Out\*" -DestinationPath "$(Get-Location)\Out.zip" -Update
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: artifact
path: Out.zip
25 changes: 25 additions & 0 deletions PostBuild.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off

where git >nul 2>nul
if errorlevel 1 (
echo Git is not installed. Using default commit hash.
set COMMIT_HASH="NOT SET"
) else (
for /f "tokens=1" %%i in ('git rev-parse --short HEAD') do set COMMIT_HASH=%%i
)

for /f "usebackq delims=" %%t in (`powershell -Command "( Get-Date -Format 'yyyyMMddHHmmss')"`) do (
set TIMESTAMP=%%t
)

echo CommitHash="%COMMIT_HASH%"
echo BuildDate="%TIMESTAMP%"

copy /y ".\Sinmai-Assist.dll" "..\Out\Mods\"
copy /y ".\YamlDotNet.dll" "..\Out\UserLibs\"
copy /y "..\config - zh_CN.yml" "..\Out\Sinmai-Assist\config.yml"
@REM 7z a -tzip "..\PostBuilds\Sinmai-Assist_%COMMIT_HASH%_%TIMESTAMP%".zip "..\Out\*"
@REM
@REM set GamePath="G:\maimai\maimai2024\Package\"
@REM copy /y ".\Sinmai-Assist.dll" "%GamePath%Mods\"
@REM copy /y ".\YamlDotNet.dll" "%GamePath%UserLibs\"
202 changes: 202 additions & 0 deletions Sinmai-Assist.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,208 @@
<ItemGroup>
<None Include="config.yml" />
<Content Include="BeforeBuild.bat" />
<Content Include="Out\dobby.dll" />
<Content Include="Out\MelonLoader\Dependencies\Bootstrap.dll" />
<Content Include="Out\MelonLoader\Dependencies\CompatibilityLayers\Demeo.dll" />
<Content Include="Out\MelonLoader\Dependencies\CompatibilityLayers\EOS.dll" />
<Content Include="Out\MelonLoader\Dependencies\CompatibilityLayers\IPA.dll" />
<Content Include="Out\MelonLoader\Dependencies\CompatibilityLayers\Muse_Dash_Mono.dll" />
<Content Include="Out\MelonLoader\Dependencies\CompatibilityLayers\Stress_Level_Zero_Il2Cpp.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\0Harmony.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Iced.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppAssemblyGenerator.deps.json" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppAssemblyGenerator.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppInterop.HarmonySupport.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Microsoft.Extensions.Logging.Abstractions.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\MonoMod.RuntimeDetour.dll" />
<Content Include="Out\MelonLoader\Dependencies\Il2CppAssemblyGenerator\MonoMod.Utils.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Iced.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Il2Cpp.deps.json" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Il2Cpp.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Il2CppInterop.Common.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Il2CppInterop.HarmonySupport.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Il2CppInterop.Runtime.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Microsoft.Extensions.Logging.Abstractions.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Mono.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\MonoMod.Backports.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\MonoMod.ILHelpers.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Preload.dll" />
<Content Include="Out\MelonLoader\Dependencies\SupportModules\Tomlet.dll" />
<Content Include="Out\MelonLoader\Documentation\CHANGELOG.md" />
<Content Include="Out\MelonLoader\Documentation\LICENSE.md" />
<Content Include="Out\MelonLoader\Documentation\NOTICE.txt" />
<Content Include="Out\MelonLoader\Documentation\README.md" />
<Content Include="Out\MelonLoader\Managed\Accessibility.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.Compiler.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.Extensions.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.Parser.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.PatternMatching.dll" />
<Content Include="Out\MelonLoader\Managed\Boo.Lang.Useful.dll" />
<Content Include="Out\MelonLoader\Managed\Commons.Xml.Relaxng.dll" />
<Content Include="Out\MelonLoader\Managed\cscompmgd.dll" />
<Content Include="Out\MelonLoader\Managed\CustomMarshalers.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.CJK.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.MidEast.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.Other.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.Rare.dll" />
<Content Include="Out\MelonLoader\Managed\I18N.West.dll" />
<Content Include="Out\MelonLoader\Managed\IBM.Data.DB2.dll" />
<Content Include="Out\MelonLoader\Managed\Microsoft.CSharp.dll" />
<Content Include="Out\MelonLoader\Managed\Microsoft.Web.Infrastructure.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.CompilerServices.SymbolWriter.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.CSharp.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.Data.Sqlite.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.Data.Tds.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.Messaging.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.Posix.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.Security.dll" />
<Content Include="Out\MelonLoader\Managed\Mono.WebBrowser.dll" />
<Content Include="Out\MelonLoader\Managed\mscorlib.dll" />
<Content Include="Out\MelonLoader\Managed\netstandard.dll" />
<Content Include="Out\MelonLoader\Managed\Newtonsoft.Json.dll" />
<Content Include="Out\MelonLoader\Managed\Newtonsoft.Json.xml" />
<Content Include="Out\MelonLoader\Managed\Novell.Directory.Ldap.dll" />
<Content Include="Out\MelonLoader\Managed\SMDiagnostics.dll" />
<Content Include="Out\MelonLoader\Managed\System.ComponentModel.Composition.dll" />
<Content Include="Out\MelonLoader\Managed\System.ComponentModel.DataAnnotations.dll" />
<Content Include="Out\MelonLoader\Managed\System.Configuration.dll" />
<Content Include="Out\MelonLoader\Managed\System.Configuration.Install.dll" />
<Content Include="Out\MelonLoader\Managed\System.Core.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.DataSetExtensions.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.Entity.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.Linq.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.OracleClient.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.Services.Client.dll" />
<Content Include="Out\MelonLoader\Managed\System.Data.Services.dll" />
<Content Include="Out\MelonLoader\Managed\System.Design.dll" />
<Content Include="Out\MelonLoader\Managed\System.DirectoryServices.dll" />
<Content Include="Out\MelonLoader\Managed\System.DirectoryServices.Protocols.dll" />
<Content Include="Out\MelonLoader\Managed\System.dll" />
<Content Include="Out\MelonLoader\Managed\System.Drawing.Design.dll" />
<Content Include="Out\MelonLoader\Managed\System.Drawing.dll" />
<Content Include="Out\MelonLoader\Managed\System.EnterpriseServices.dll" />
<Content Include="Out\MelonLoader\Managed\System.IdentityModel.dll" />
<Content Include="Out\MelonLoader\Managed\System.IdentityModel.Selectors.dll" />
<Content Include="Out\MelonLoader\Managed\System.IO.Compression.dll" />
<Content Include="Out\MelonLoader\Managed\System.IO.Compression.FileSystem.dll" />
<Content Include="Out\MelonLoader\Managed\System.Json.dll" />
<Content Include="Out\MelonLoader\Managed\System.Management.dll" />
<Content Include="Out\MelonLoader\Managed\System.Messaging.dll" />
<Content Include="Out\MelonLoader\Managed\System.Net.dll" />
<Content Include="Out\MelonLoader\Managed\System.Net.Http.dll" />
<Content Include="Out\MelonLoader\Managed\System.Net.Http.Formatting.dll" />
<Content Include="Out\MelonLoader\Managed\System.Net.Http.WebRequest.dll" />
<Content Include="Out\MelonLoader\Managed\System.Numerics.dll" />
<Content Include="Out\MelonLoader\Managed\System.Numerics.Vectors.dll" />
<Content Include="Out\MelonLoader\Managed\System.Reflection.Context.dll" />
<Content Include="Out\MelonLoader\Managed\System.Runtime.Caching.dll" />
<Content Include="Out\MelonLoader\Managed\System.Runtime.DurableInstancing.dll" />
<Content Include="Out\MelonLoader\Managed\System.Runtime.Remoting.dll" />
<Content Include="Out\MelonLoader\Managed\System.Runtime.Serialization.dll" />
<Content Include="Out\MelonLoader\Managed\System.Runtime.Serialization.Formatters.Soap.dll" />
<Content Include="Out\MelonLoader\Managed\System.Security.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.Activation.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.Discovery.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.Internals.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.Routing.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceModel.Web.dll" />
<Content Include="Out\MelonLoader\Managed\System.ServiceProcess.dll" />
<Content Include="Out\MelonLoader\Managed\System.Transactions.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Abstractions.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.ApplicationServices.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.DynamicData.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Extensions.Design.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Extensions.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Http.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Http.SelfHost.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Http.WebHost.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Mvc.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Razor.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.RegularExpressions.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Routing.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.Services.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.WebPages.Deployment.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.WebPages.dll" />
<Content Include="Out\MelonLoader\Managed\System.Web.WebPages.Razor.dll" />
<Content Include="Out\MelonLoader\Managed\System.Windows.Forms.DataVisualization.dll" />
<Content Include="Out\MelonLoader\Managed\System.Windows.Forms.dll" />
<Content Include="Out\MelonLoader\Managed\System.Xaml.dll" />
<Content Include="Out\MelonLoader\Managed\System.Xml.dll" />
<Content Include="Out\MelonLoader\Managed\System.Xml.Linq.dll" />
<Content Include="Out\MelonLoader\Managed\SystemWebTestShim.dll" />
<Content Include="Out\MelonLoader\Managed\UnityEngine.Il2CppAssetBundleManager.dll" />
<Content Include="Out\MelonLoader\Managed\UnityEngine.Il2CppImageConversionManager.dll" />
<Content Include="Out\MelonLoader\Managed\ValueTupleBridge.dll" />
<Content Include="Out\MelonLoader\Managed\WindowsBase.dll" />
<Content Include="Out\MelonLoader\net35\0Harmony.dll" />
<Content Include="Out\MelonLoader\net35\AssetRipper.VersionUtilities.dll" />
<Content Include="Out\MelonLoader\net35\AssetsTools.NET.dll" />
<Content Include="Out\MelonLoader\net35\bHapticsLib.dll" />
<Content Include="Out\MelonLoader\net35\IndexRange.dll" />
<Content Include="Out\MelonLoader\net35\MelonLoader.dll" />
<Content Include="Out\MelonLoader\net35\MelonLoader.xml" />
<Content Include="Out\MelonLoader\net35\MelonStartScreen.dll" />
<Content Include="Out\MelonLoader\net35\Mono.Cecil.dll" />
<Content Include="Out\MelonLoader\net35\Mono.Cecil.Mdb.dll" />
<Content Include="Out\MelonLoader\net35\Mono.Cecil.Pdb.dll" />
<Content Include="Out\MelonLoader\net35\Mono.Cecil.Rocks.dll" />
<Content Include="Out\MelonLoader\net35\MonoMod.RuntimeDetour.dll" />
<Content Include="Out\MelonLoader\net35\MonoMod.Utils.dll" />
<Content Include="Out\MelonLoader\net35\Tomlet.dll" />
<Content Include="Out\MelonLoader\net35\ValueTupleBridge.dll" />
<Content Include="Out\MelonLoader\net35\WebSocketDotNet.dll" />
<Content Include="Out\MelonLoader\net6\0Harmony.dll" />
<Content Include="Out\MelonLoader\net6\AsmResolver.dll" />
<Content Include="Out\MelonLoader\net6\AsmResolver.DotNet.dll" />
<Content Include="Out\MelonLoader\net6\AsmResolver.PE.dll" />
<Content Include="Out\MelonLoader\net6\AsmResolver.PE.File.dll" />
<Content Include="Out\MelonLoader\net6\AssetRipper.VersionUtilities.dll" />
<Content Include="Out\MelonLoader\net6\AssetsTools.NET.dll" />
<Content Include="Out\MelonLoader\net6\bHapticsLib.dll" />
<Content Include="Out\MelonLoader\net6\Iced.dll" />
<Content Include="Out\MelonLoader\net6\Il2CppInterop.Common.dll" />
<Content Include="Out\MelonLoader\net6\Il2CppInterop.Generator.dll" />
<Content Include="Out\MelonLoader\net6\Il2CppInterop.Runtime.dll" />
<Content Include="Out\MelonLoader\net6\IndexRange.dll" />
<Content Include="Out\MelonLoader\net6\MelonLoader.deps.json" />
<Content Include="Out\MelonLoader\net6\MelonLoader.dll" />
<Content Include="Out\MelonLoader\net6\MelonLoader.NativeHost.deps.json" />
<Content Include="Out\MelonLoader\net6\MelonLoader.NativeHost.dll" />
<Content Include="Out\MelonLoader\net6\MelonLoader.runtimeconfig.json" />
<Content Include="Out\MelonLoader\net6\MelonLoader.xml" />
<Content Include="Out\MelonLoader\net6\MelonStartScreen.deps.json" />
<Content Include="Out\MelonLoader\net6\MelonStartScreen.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Bcl.AsyncInterfaces.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Diagnostics.NETCore.Client.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Diagnostics.Runtime.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Configuration.Abstractions.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Configuration.Binder.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Configuration.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.DependencyInjection.Abstractions.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Logging.Abstractions.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Logging.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Options.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Extensions.Primitives.dll" />
<Content Include="Out\MelonLoader\net6\Microsoft.Win32.SystemEvents.dll" />
<Content Include="Out\MelonLoader\net6\Mono.Cecil.dll" />
<Content Include="Out\MelonLoader\net6\Mono.Cecil.Mdb.dll" />
<Content Include="Out\MelonLoader\net6\Mono.Cecil.Pdb.dll" />
<Content Include="Out\MelonLoader\net6\Mono.Cecil.Rocks.dll" />
<Content Include="Out\MelonLoader\net6\MonoMod.RuntimeDetour.dll" />
<Content Include="Out\MelonLoader\net6\MonoMod.Utils.dll" />
<Content Include="Out\MelonLoader\net6\runtimes\win\lib\net6.0\Microsoft.Win32.SystemEvents.dll" />
<Content Include="Out\MelonLoader\net6\System.Configuration.ConfigurationManager.dll" />
<Content Include="Out\MelonLoader\net6\System.Drawing.Common.dll" />
<Content Include="Out\MelonLoader\net6\System.Security.Cryptography.ProtectedData.dll" />
<Content Include="Out\MelonLoader\net6\System.Text.Json.dll" />
<Content Include="Out\MelonLoader\net6\Tomlet.dll" />
<Content Include="Out\MelonLoader\net6\WebSocketDotNet.dll" />
<Content Include="Out\version.dll" />
<Content Include="PostBuild.bat" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down

0 comments on commit c5f1801

Please sign in to comment.