-
Notifications
You must be signed in to change notification settings - Fork 29
/
release.ps1
118 lines (78 loc) · 7.29 KB
/
release.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
if ($PSScriptRoot -match '.+?\\bin\\?') {
$dir = $PSScriptRoot + "\"
}
else {
$dir = $PSScriptRoot + "\bin\"
}
$copy = $dir + "\copy\BepInEx"
New-Item -ItemType Directory -Force -Path ($dir + "\out")
Remove-Item -Force -Path ($dir + "\copy") -Recurse -ErrorAction SilentlyContinue
# IL2CPP grabbag ------------------------------------------------------------------------------------------------------------------------------
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($dir + "\IL2CPP" + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path ($dir + "\IL2CPP\BepInEx") -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_IL2CPP_v" + $ver + ".zip")
# AIS -----------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "AI_*.*" /R:5 /W:5
& robocopy ($dir + "\BepInEx\patchers\") ($copy + "\patchers") /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_AIGirl_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse -ErrorAction SilentlyContinue
# HS2 -----------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "HS2_*.*" /R:5 /W:5
& robocopy ($dir + "\BepInEx\patchers\") ($copy + "\patchers") /R:5 /W:5
# Get rid of incompatible patchers
Remove-Item -Force -Path ($copy + "\patchers\AI_*")
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_HoneySelect2_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# EC ------------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "EC_*.*" /R:5 /W:5
& robocopy ($dir + "\BepInEx\patchers\") ($copy + "\patchers") /R:5 /W:5
# Get rid of incompatible patchers
Remove-Item -Force -Path ($copy + "\patchers\AI_*")
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_EmotionCreators_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# KK ------------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "KK_*.*" /R:5 /W:5
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "KKP_*.*" /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_Koikatsu_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# HS ------------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "HS_*.*" /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_HoneySelect_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# PH ------------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "PH_*.*" /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_PlayHome_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# SBPR ----------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "SBPR_*.*" /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_SBPR_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse
# KKS -----------------------------------------------------------------------------------------------------------------------------------------
& robocopy ($dir + "\BepInEx\plugins\IllusionFixes\") ($copy + "\plugins\IllusionFixes") "KKS_*.*" /R:5 /W:5
Copy-Item ($dir + "\..\README.md") -Destination ($copy + "\plugins\IllusionFixes")
Copy-Item ($dir + "\..\LICENSE") -Destination ($copy + "\plugins\IllusionFixes")
& mkdir ($copy + "\patchers")
& copy ($dir + "\BepInEx\patchers\CultureFix.dll") ($copy + "\patchers\")
$ver = [System.Diagnostics.FileVersionInfo]::GetVersionInfo((Get-ChildItem -Path ($copy + "\*.dll") -Recurse -Force)[0]).FileVersion.ToString()
Compress-Archive -Path $copy -Force -CompressionLevel "Optimal" -DestinationPath ($dir + "out\" + "IllusionFixes_KoikatsuSunshine_v" + $ver + ".zip")
Remove-Item -Force -Path ($dir + "\copy") -Recurse