-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall_bepinex-utf8.zip
More file actions
183 lines (172 loc) · 6.12 KB
/
Copy pathuninstall_bepinex-utf8.zip
File metadata and controls
183 lines (172 loc) · 6.12 KB
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
#RF BepInEX卸载工具
#退出脚本递归
function Exit-IScript {
Read-Host "您现在可以关闭窗口了"
Exit
Exit-IScript
}
function MLangWrite-Output ([string]$cn, [string]$en) {
if ((Get-Culture).Name -eq "zh-CN") { Write-Output $cn }
else { Write-Output $en }
}
function MLangWrite-Warning ([string]$cn, [string]$en) {
if ((Get-Culture).Name -eq "zh-CN") { Write-Warning $cn }
else { Write-Output $en }
}
$w=(New-Object System.Net.WebClient);
$w.Encoding=[System.Text.Encoding]::UTF8;
$global:corelibSrc = $null
$global:corelibSrc = $w.DownloadString('http://ravenfieldcommunity.github.io/static/corelib-utf8.ps1');
if ( $global:corelibSrc -eq $null ) {
$global:corelibSrc = $w.DownloadString('http://ravenfieldcommunity-static.netlify.app/corelib-utf8.ps1');
}
if ( $global:corelibSrc -eq $null ) {
$global:corelibSrc = $w.DownloadString('https://ghproxy.net/github.com/RavenfieldCommunity/UnionSetup/releases/download/1/corelib-utf8.appx');
}
if ( $global:corelibSrc -eq $null ) {
MLangWrite-Warning "无法初始化依赖库" "Cannot init corelib";
Exit-IScript;
}
else { iex $global:corelibSrc; }
function Remove-BepInEX {
#定义文件位置
MLangWrite-Output "将要执行的操作:
删除 BepInEX 文件夹
删除 hook (winhttp.dll)
删除 doorstop配置" "Steps to do:
Delete BepInEX folder
Delete hook (winhttp.dll)
Delete doorstop config"
$file1 = "$global:gamePath\BepInEX"
$file2 = "$global:gamePath\winhttp.dll"
$file3 = "$global:gamePath\doorstop_config.ini"
if ( (Test-Path -Path $file1) -eq $true ){
MLangWrite-Output "删除 BepInEX 文件夹 ..." "Deleting BepInEX folder ..."
rm $file1 -Recurse }
if ( (Test-Path -Path $file2) -eq $true ){
MLangWrite-Output "删除 hook ..." "Deleting hook ..."
rm $file2 }
if ( (Test-Path -Path $file3) -eq $true ){
MLangWrite-Output "删除 doorstop配置 ..." "Deleting doorstop config (2/3) ..."
rm $file3}
}
function Remove-MLang {
#定义文件位置
$file1 = "$global:gamePath\BepInEX\plugins\XUnity.AutoTranslator"
$file2 = "$global:gamePath\BepInEX\plugins\XUnity.ResourceRedirector"
$file3 = "$global:gamePath\BepInEx\core\XUnity.Common.dll"
$file4 = "$global:gamePath\BepInEx\Translation"
$file5 = "$global:gamePath\BepInEx\config\AutoTranslatorConfig.ini"
$file6 = "$global:gamePath\tmpchinesefont"
$file7 = "$global:gamePath\arialuni_sdf_u2019"
$file8 = "$global:gamePath\wenquanyi_bitmap_song_12px_sdf"
Write-Output "将要执行的操作:
删除 XUnity.AutoTranslator
删除 XUnity.ResourceRedirector
删除 XUnity.Common
删除 配置文件
删除 翻译文件
删除 字体补丁"
if ( (Test-Path -Path $file1) -eq $true )
{
Write-Host "删除 XUnity.AutoTranslator文件夹 ..."
rm $file1 -Recurse}
if ( (Test-Path -Path $file2) -eq $true )
{
Write-Host "删除 XUnity.ResourceRedirector ..."
rm $file2 -Recurse}
if ( (Test-Path -Path $file3) -eq $true )
{
Write-Host "删除 XUnity.Common ..."
rm $file3}
if ( (Test-Path -Path $file5) -eq $true )
{
Write-Host "删除 配置文件 ..."
rm $file5}
if ( (Test-Path -Path $file4) -eq $true )
{
Write-Host "删除 翻译文件 ..."
rm $file4 -Recurse}
if ( (Test-Path -Path $file6) -eq $true ){
Write-Host "删除 字体补丁 ..."
rm $file6 -Recurse
}
if ( (Test-Path -Path $file7) -eq $true ){
Write-Host "删除 字体补丁 ..."
rm $file7 -Recurse
}
if ( (Test-Path -Path $file8) -eq $true ){
Write-Host "删除 字体补丁 ..."
rm $file8 -Recurse
}
}
function Remove-RavenMCN {
#定义文件位置
$file1 = "$global:gamePath\BepInEx\plugins\RavenM.dll" #如果文件存在
$file2 = "$global:gamePath\BepInEx\plugins\RavenM0.dll" #如果文件存在
$file3 = "$global:gamePath\BepInEx\config\RavenM.cfg" #如果文件存在
Write-Output "将要执行的操作:
删除 联机插件
删除 配置文件"
if ( (Test-Path -Path $file1) -eq $true ) {
Write-Host "删除 联机插件 ..."
rm $file1
}
if ( (Test-Path -Path $file2) -eq $true ) {
Write-Host "删除 联机插件 ..."
rm $file2
}
if ( (Test-Path -Path $file3) -eq $true ) {
Write-Host "删除 配置文件 ..."
rm $file3
}
}
function Remove-HavenM {
#定义文件位置
MLangWrite-Output "将要执行的操作:
删除 更新服务
替换已修改的文件至原版" "Steps to do:
Delete ACUpdater
Replace the changed file to orignal one"
$file1 = "$global:gamePath\BepInEX\plugins\HavenM.ACUpdater.dll"
$file2 = "$global:gamePath\BepInEX\plugins\HavenM.ACUpdater0.dll"
if ( (Test-Path -Path $file1) -eq $true ) {
MLangWrite-Output "删除 自动更新服务 ..." "Deleting ACUpdater ..."
rm $file1
}
if ( (Test-Path -Path $file2) -eq $true ) {
MLangWrite-Output "删除 自动更新服务 ..." "Deleting ACUpdater ..."
rm $file2
}
$temp_ = Remove-HavenM
MLangWrite-Output "正在调用 Steam 修补游戏文件 ..." "Using Steam validate the game ..."
start "steam://validate/636480"
}
###主程序
MLangWrite-Output "# RF BepInEX插件 卸载脚本
# 卸载脚本 由 Github@RavenfieldCommunity 维护
# 参见: https://ravenfieldcommunity.github.io/docs/cn/Project/mlang.html
# 提示:报错请反馈!
" "# RF BepInEX plugins uninstallation script
# The script is made by Github@RavenfieldCommunity
# Refer: https://ravenfieldcommunity.github.io/docs/cn/Project/mlang.html
# Tip: if buggy, please feedback!
"
MLangWrite-Output "请选择操作:
1. 删除多语言
2. 删除多人联机国内版
3. 删除HavenM
4. 完全删除BepInEX框架及其附属插件
直接按 回车键 则取消执行,按 对应数字序号 并回车 执行对应操作" "Choose an action:
1. Delete MLang
2. Deletw RavenMCN
3. Delete HavenM
4. Competely detele BepInEX and plugins inside
Press Enter only to do nothing, press corresponding number and Enter to run the action"
$yesRun = Read-Host -Prompt ":>"
if ($yesRun -eq "1") { $temp_ = Remove-MLang }
elseif ($yesRun -eq "2") { $temp_ = Remove-RavenMCN }
elseif ($yesRun -eq "3") { $temp_ = Remove-HavenM }
elseif ($yesRun -eq "4") { $temp_ = Remove-BepInEX }
MLangWrite-Output "操作结束" "Finished"
Exit-IScript