※6、修复了容器自动配置脚本 GUI 解析器无法指定 Wine、容器以及位数的功能

This commit is contained in:
gfdgd xi 2022-10-23 21:26:47 +08:00
parent cb6fd9e202
commit e3d944e448
39 changed files with 94 additions and 42 deletions

View File

@ -89,7 +89,7 @@ class Connect:
if "($" in things:
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '{path[0]}' --system")
# 执行脚本
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
OpenTerminal(f"env WINEARCH='{os.getenv('WINEARCH')}' WINEDEBUG='{os.getenv('WINEDEBUG')}' WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '{path[0]}'")
#process = QtCore.QProcess()
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
#process.waitForFinished()

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -0,0 +1,6 @@
import os
for i in os.listdir():
with open(i, "r") as file:
things = file.read().replace("sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))", "sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))")
with open(i, "w") as file:
file.write(things)

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,5 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -11,3 +11,4 @@ for i in sys.argv[1:]:
argv.append(i.replace(" ", "\\ "))
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
sys.exit(int(ConfigLanguareRunner.programEnv[9][1]))

View File

@ -553,6 +553,10 @@ class Command():
break
app = QtWidgets.QApplication(sys.argv)
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if __name__ == "__main__":
optionAll = 0
if "--debug" in sys.argv:
@ -560,10 +564,6 @@ if __name__ == "__main__":
if "--system" in sys.argv:
programEnv[2][1] = "1"
optionAll += 1
if os.getenv("WINE") != None:
programEnv[1][1] = os.getenv("WINE")
if os.getenv("WINEPREFIX") != None:
programEnv[0][1] = os.getenv("WINEPREFIX")
if len(sys.argv) - optionAll < 2:
print("Wine 运行器自动配置文件解析器交互环境")
print(f"版本:{version}")
@ -575,7 +575,7 @@ if __name__ == "__main__":
break
com = Command(commandLine)
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
exit()
sys.exit(int(programEnv[9][1]))
# 读取文件
try:
file = open(sys.argv[1], "r")
@ -589,3 +589,4 @@ if __name__ == "__main__":
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
print("--------------------------------------------------------------")
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
sys.exit(int(programEnv[9][1]))

View File

@ -616,7 +616,16 @@ def WineBottonAutoConfig():
wineBottonPath = setting["DefultBotton"]
else:
wineBottonPath = e1.currentText()
os.system(f"'{programPath}/AutoConfig.py' '{wine[o1.currentText()]}' '{wineBottonPath}'")
option = ""
if setting["Architecture"] != "Auto":
option += f"WINEARCH={setting['Architecture']} "
if setting["MonoGeckoInstaller"]:
option += f"WINEDLLOVERRIDES=\"mscoree,mshtml=\" "
if not setting["Debug"]:
option += "WINEDEBUG=-all "
else:
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message "
os.system(f"env WINEPREFIX='{wineBottonPath}' {option} WINE='{wine[o1.currentText()]}' '{programPath}/AutoConfig.py' '{wine[o1.currentText()]}' '{wineBottonPath}'")
def InstallMonoGecko(program):
if e1.currentText() == "":
@ -1840,10 +1849,11 @@ updateThingsString = '''※1、新增 VB Runtime 组件安装工具
3新增 Wine 容器快捷键映射功能
4修复在 arm 架构运行 Wine 时提示无法解压资源的问题
5修复右键无法找到 Wine 运行器打开方式的问题
6修复了容器自动配置脚本 GUI 解析器无法指定 Wine容器以及位数的功能
'''
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2022年10月22"
updateTime = "2022年10月23"
about = f'''<h1>关于</h1>
<p>一个能让Linux用户更加方便运行Windows应用的程序内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器运行库安装工具等等</p>
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具可以做到只需要用户下载系统镜像并点击安装即可无需顾及虚拟机安装创建虚拟机的分区等等</p>