mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-13 10:32:03 +08:00
初步termux支持
This commit is contained in:
@@ -5,9 +5,12 @@ import binascii
|
||||
def Replace(fileName: str):
|
||||
with open(f"{fileName}", "rb") as file:
|
||||
data = file.read()
|
||||
|
||||
data = data.replace(bytes("/lib64/ld-linux-x86-64.so.2".encode()),
|
||||
if (sys.argv[2] == "x86_64"):
|
||||
data = data.replace(bytes("/lib64/ld-linux-x86-64.so.2".encode()),
|
||||
bytes("/data/data/com.termux/gfdgd".encode())) # 替换与被替换需要保证字符数量相同
|
||||
if (sys.argv[2] == "aarch64"):
|
||||
data = data.replace(bytes("/lib/ld-linux-aarch64.so.1".encode()),
|
||||
bytes("/data/data/com.termux/gfdg".encode())) # 替换与被替换需要保证字符数量相同
|
||||
with open(f"{fileName}", "wb") as file:
|
||||
file.write(data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user