-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathPublicize.ps1
28 lines (21 loc) · 1.01 KB
/
Publicize.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Install assembly-publicizer: dotnet tool install -g BepInEx.AssemblyPublicizer.Cli
# See: https://github.com/BepInEx/BepInEx.AssemblyPublicizer
$timberbornDir = ".\Packages\Timberborn"
$timberbornDlls = Get-ChildItem $timberbornDir -Filter "Timberborn.*.dll" -Recurse
# Create a backup of the original dlls
$timberbornDlls | ForEach-Object {
$backupPath = $_.FullName + ".bak"
Copy-Item $_.FullName $backupPath
}
# Publicize the dlls
#Write-Host "assembly-publicizer --overwrite --publicize-compiler-generated $($timberbornDlls | ForEach-Object { $timberbornDir."\".$($_.Name) } )"
#assembly-publicizer --overwrite --publicize-compiler-generated $($timberbornDlls | ForEach-Object { "$($timberbornDir)\$($_.Name)" } )
$timberbornDlls | ForEach-Object{
assembly-publicizer --overwrite --publicize-compiler-generated $timberbornDir"\"$_
}
# Restore the original dlls
#$timberbornDlls | ForEach-Object {
# $backupPath = $_.FullName + ".bak"
# Copy-Item $backupPath $_.FullName
# Remove-Item $backupPath
#}