Skip to content

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
dvrp0 committed Jul 30, 2022
0 parents commit 08c6ab9
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
__pycache__/
venv/
dist/
build/
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<div align="center">
<img src="./images/bTitle_0_Bigger.png" width="80%" height="80%" />

# RoRKorean

Risk of Rain 한국어화 패쳐

[![GitHub release (latest by date)](https://img.shields.io/github/v/release/dvrp0/RoRKorean)](https://github.com/dvrp0/RoRKorean/releases)
</div>

## 사용 방법

1. [releases](https://github.com/dvrp0/RoRKorean/releases)에서 `.zip` 파일 다운로드
2. 압축 해제하고 `RoRKoreanPatcher.exe` 실행

## 스크린샷

<img src="./images/RoR1KorFirstDraft-1.png" />
<img src="./images/RoR1KorFirstDraft-2.png" />
<img src="./images/RoR1KorFirstDraft-3.png" />
<img src="./images/RoR1KorFirstDraft-4.gif" />
<img src="./images/RoR1KorFirstDraft-5.gif" />

## 기타
문제가 있다면 [이슈](https://github.com/dvrp0/RoRKorean/issues) 남겨주시면 감사하겠습니다 👍

## TODO
- [ ] 로그북 번역
- [x] 생존자 번역
- [x] 아이템 번역
- [x] UI 번역
- [x] 대사 번역
- [x] 스프라이트 번역
Binary file added data.win
Binary file not shown.
Binary file added images/RoR1KorFirstDraft-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/RoR1KorFirstDraft-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/RoR1KorFirstDraft-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/RoR1KorFirstDraft-4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/RoR1KorFirstDraft-5.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bTitle_0_Bigger.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from patcher import Patcher

patcher = Patcher()

print("Risk of Rain 한국어화 패쳐에 오신 것을 환영합니다! (v1.0)")
print()
print("실행할 작업을 선택하세요.")
print("1. 패치 2. 되돌리기")
print()

while True:
action = int(input("> "))

if action not in [1, 2]:
print("입력이 올바르지 않습니다.")
continue
else:
break

print()

if action == 1:
patcher.backup()
patcher.download()
else:
patcher.revert()

print()
print("모두 완료.")
print("계속하려면 아무 키나 누르십시오...")
input()
64 changes: 64 additions & 0 deletions patcher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import os, shutil, wget, winreg

class Patcher:
def __init__(self):
try:
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Valve\Steam", 0, winreg.KEY_ALL_ACCESS)
path, _ = winreg.QueryValueEx(key, "InstallPath")
except:
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\Wow6432Node\Valve\Steam", 0, winreg.KEY_ALL_ACCESS)
path, _ = winreg.QueryValueEx(key, "InstallPath")
finally:
winreg.CloseKey(key)

path_first = os.path.join(path, "steamapps", "common", "Risk of Rain")
path_second = os.path.join(path, "SteamLibrary", "steamapps", "common", "Risk of Rain")

self.path_failed = False
self.download_url = "http://raw.githubusercontent.com/dvrp0/RoRKorean/main/"
self.filename = "data.win"

if os.path.exists(path_first):
self.data_path = path_first
elif os.path.exists(path_second):
self.data_path = path_second
else:
print("게임 경로 발견되지 않음.")
print(f"다운로드되는 {self.filename} 파일을 게임 경로로 직접 이동시키세요.")
self.path_failed = True

def download(self):
print("패치 파일 다운로드 중...")
wget.download(f"{self.download_url}/{self.filename}")
print()
print(f"완료. ({self.filename})")

if self.path_failed:
return

target = os.path.join(os.getcwd(), self.filename)
new = os.path.join(self.data_path, self.filename)

print(f"{new}로 파일 이동 중...")
shutil.move(target, new)
print("완료.")

def backup(self):
target = os.path.join(self.data_path, self.filename)
new = os.path.join(self.data_path, f"{self.filename}BACKUP")

print(f"기존 번역 파일 백업 중...")

if os.path.isfile(target):
shutil.move(target, new)
print("완료.")
else:
print("기존 번역 파일 발견되지 않음, 건너뜀.")

def revert(self):
target = os.path.join(self.data_path, f"{self.filename}BACKUP")
new = os.path.join(self.data_path, self.filename)

print(f"패치 되돌리는 중...")
shutil.move(target, new)
print("완료.")
12 changes: 12 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from cx_Freeze import setup, Executable

build_options = dict(packages=["wget", "os", "shutil"])
exe = [Executable("main.py", target_name="RoRKoreanPatcher.exe")]
setup(
name="RoRKoreanPatcher",
version="0.1",
author="DVRP",
description="Risk of Rain 한국어화 패쳐",
options=dict(build_exe=build_options),
executables=exe
)

0 comments on commit 08c6ab9

Please sign in to comment.