forked from KnatteAnka/MinimalModSetup
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPublicize.ps1
More file actions
25 lines (18 loc) · 916 Bytes
/
Publicize.ps1
File metadata and controls
25 lines (18 loc) · 916 Bytes
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
# 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 { ".\Packages\Timberborn\$($_.Name)" } )"
assembly-publicizer --overwrite --publicize-compiler-generated $($timberbornDlls | ForEach-Object { "$($timberbornDir)\$($_.Name)" } )
# Restore the original dlls
#$timberbornDlls | ForEach-Object {
# $backupPath = $_.FullName + ".bak"
# Copy-Item $backupPath $_.FullName
# Remove-Item $backupPath
#}