Skip to content

Commit 1c24ace

Browse files
committed
Put preloader patcher into correct folder in release ZIPs
1 parent 570c826 commit 1c24ace

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

release.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ else {
66
$dir = $PSScriptRoot + "\bin\"
77
}
88

9-
$copy = $dir + "\copy\BepInEx\plugins"
9+
# These DLLs are preloader patchers and should be put into a different folder
10+
$patchers = @("CtorShotgun.dll", "DemystifyExceptions.dll", "MirrorInternalLogs.dll", "StartupProfiler.dll")
11+
function GetCopyPath($pluginFile)
12+
{
13+
if ($patchers.Contains($pluginFile)) {
14+
return $dir + "\copy\BepInEx\patchers";
15+
}
16+
return $dir + "\copy\BepInEx\plugins";
17+
}
18+
1019
$plugins = $dir + "\Release"
1120

1221
# Create releases ---------
1322
function CreateZip ($pluginFile)
1423
{
24+
$copy = GetCopyPath($pluginFile.Name)
1525
Remove-Item -Force -Path ($dir + "\copy") -Recurse -ErrorAction SilentlyContinue
1626
New-Item -ItemType Directory -Force -Path $copy
1727

@@ -41,7 +51,7 @@ Remove-Item -Force -Path ($dir + "\copy") -Recurse
4151
# Create Starup profiler release
4252
$profilerdir = $dir + "\..\src\SimpleProfiler\bin"
4353

44-
Get-ChildItem -Path ($profilerdir) | Where{$_.Name -Match "^MonoProfiler(32|64)\.(?!dll)"} | Remove-Item
54+
Get-ChildItem -Path ($profilerdir) | Where-Object{$_.Name -Match "^MonoProfiler(32|64)\.(?!dll)"} | Remove-Item
4555

4656
$ver = (Get-ChildItem -Path $profilerdir -Filter "MonoProfilerController.dll" -Recurse -Force)[0].VersionInfo.FileVersion.ToString() -replace "^([\d+\.]+?\d+)[\.0]*$", '${1}'
4757

0 commit comments

Comments
 (0)