-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
54 lines (43 loc) · 2.04 KB
/
main.py
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
import shutil
def close():
input("\r\n\r\n만든사람: danics\r\n종료하시려면 Enter 누르세요")
exit()
if __name__ == '__main__':
print(
'=============================================================\r\n' +
'--------------Vampire Survivor 한글 폰트 모드-------------------\r\n' +
'=============================================================\r\n\r\n'
)
originalPath = '.\\resources\\app\\.webpack\\renderer\\main.bundle.js'
newPath = '.\\resources\\app\\.webpack\\renderer\\main.bundle.js.new'
try:
f = open(originalPath, 'r', encoding='UTF8')
# 폰트변경
originalCodes = f.read()
codes = originalCodes
f.close()
codes = codes.replace('Courier', '메이플스토리')
codes = codes.replace('Arial, Helvetica, sans-serif', '메이플스토리')
f = open(newPath, 'w', encoding='UTF-8')
f.write(codes)
f.close()
shutil.move(newPath, originalPath)
# 폰트변경
originalPath = '.\\resources\\app\\.webpack\\renderer\\vendors.bundle.js'
newPath = '.\\resources\\app\\.webpack\\renderer\\vendors.bundle.js.new'
f = open(originalPath, 'r', encoding='UTF8')
originalCodes = f.read()
codes = originalCodes
f.close()
codes = codes.replace('Courier', '메이플스토리')
f = open(newPath, 'w', encoding='UTF-8')
f.write(codes)
f.close()
shutil.move(newPath, originalPath)
print("폰트는 넥슨의 메이플스토리체로 변경되었으며, 같이 압축된 Maplestory Light.ttf 파일을 실행해서 설치해주세요.")
close()
except FileNotFoundError:
print('main.bundle.js를 못찾았어요. Vampire Survivors 홈 경로가 맞나요?' +
'\r\n보통 steamapps\\common\\Vampire Survivors에 있답니다\r\n' +
'스팀 라이브러리 -> 속성 -> 로컬파일 -> 찾아보기... 하면 나오는 곳에 exe 파일을 위치해주세요')
close()