2024-04-08 12:55:41 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using CopyBuildAssembly;
|
|
|
|
|
|
|
|
|
|
// ReSharper disable ClassNeverInstantiated.Global
|
|
|
|
|
|
|
|
|
|
namespace Build
|
|
|
|
|
{
|
|
|
|
|
internal class Program
|
|
|
|
|
{
|
|
|
|
|
private static void Main(string[] args)
|
|
|
|
|
{
|
|
|
|
|
var baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
|
|
|
|
|
var arg = args.ElementAtOrDefault(0);
|
|
|
|
|
var sha = Copy.GetTipSha(args.ElementAtOrDefault(1));
|
|
|
|
|
|
|
|
|
|
const string modPath =
|
2024-11-27 11:40:32 +08:00
|
|
|
|
@"R:\Battlestate Games\Client.0.15.5.1.33420\BepInEx\plugins\kmyuhkyuk-HideDress";
|
2024-04-08 12:55:41 +08:00
|
|
|
|
|
2024-11-27 11:40:32 +08:00
|
|
|
|
const string versionName = "1.3.0";
|
2024-04-08 12:55:41 +08:00
|
|
|
|
|
|
|
|
|
var releaseName = $"{new DirectoryInfo(modPath).Name}-(Release_{versionName}).7z";
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-04-08 13:15:51 +08:00
|
|
|
|
Copy.CopyFolder(arg, "Release", Path.Combine(baseDirectory, "localized"),
|
|
|
|
|
Path.Combine(modPath, "localized"));
|
2024-04-08 12:55:41 +08:00
|
|
|
|
|
|
|
|
|
Copy.CopyAssembly(arg, "Release", baseDirectory, modPath, new[]
|
|
|
|
|
{
|
|
|
|
|
"HideDress"
|
|
|
|
|
}, sha);
|
|
|
|
|
|
|
|
|
|
Copy.GenerateSevenZip(arg, "Release", modPath, releaseName, @"BepInEx\plugins", Array.Empty<string>(),
|
|
|
|
|
Array.Empty<string>(), new[] { Path.Combine(baseDirectory, "ReadMe.txt") }, Array.Empty<string>());
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(ex);
|
|
|
|
|
|
|
|
|
|
Console.ReadKey();
|
|
|
|
|
|
|
|
|
|
Process.GetCurrentProcess().Kill();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|