mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
初步环境实现
This commit is contained in:
parent
3215713f2d
commit
2bd02b94c5
@ -61,7 +61,7 @@ class Connect:
|
|||||||
QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
|
QtWidgets.QMessageBox.critical(window, "错误", "无法获取配置文件")
|
||||||
return
|
return
|
||||||
# 执行脚本
|
# 执行脚本
|
||||||
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/ConfigLanguareRunner.py' '/tmp/wine-runner-auto-config.wsh' --system")
|
OpenTerminal(f"env WINE='{wine}' WINEPREFIX='{wineprefix}' '{programPath}/AutoShell/main.py' '/tmp/wine-runner-auto-config.wsh'")
|
||||||
#process = QtCore.QProcess()
|
#process = QtCore.QProcess()
|
||||||
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh", "--system"])
|
#process.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", "/tmp/wine-runner-auto-config.wsh", "--system"])
|
||||||
#process.waitForFinished()
|
#process.waitForFinished()
|
||||||
@ -71,7 +71,7 @@ class Connect:
|
|||||||
if path[0] == "":
|
if path[0] == "":
|
||||||
return
|
return
|
||||||
# 执行脚本
|
# 执行脚本
|
||||||
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]}'")
|
||||||
#process = QtCore.QProcess()
|
#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.start(f"{programPath}/launch.sh", ["deepin-terminal", "-e", "env", f"WINE={wine}", f"WINEPREFIX={wineprefix}", f"{programPath}/ConfigLanguareRunner.py", path[0], "--system"])
|
||||||
#process.waitForFinished()
|
#process.waitForFinished()
|
||||||
|
13
AutoShell/command/bat
Executable file
13
AutoShell/command/bat
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/changeversion
Executable file
13
AutoShell/command/changeversion
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/createbotton
Executable file
13
AutoShell/command/createbotton
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/disbledopengl
Executable file
13
AutoShell/command/disbledopengl
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/download
Executable file
13
AutoShell/command/download
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/enabledopengl
Executable file
13
AutoShell/command/enabledopengl
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/error
Executable file
13
AutoShell/command/error
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/info
Executable file
13
AutoShell/command/info
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
@ -8,6 +8,6 @@ import ConfigLanguareRunner
|
|||||||
# 符号转移
|
# 符号转移
|
||||||
argv = []
|
argv = []
|
||||||
for i in sys.argv[1:]:
|
for i in sys.argv[1:]:
|
||||||
argv = i.replace(" ", "\\ ")
|
argv.append(i.replace(" ", "\\ "))
|
||||||
com = ConfigLanguareRunner.Command(f"installdll {''.join(argv)}")
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
13
AutoShell/command/installdxvk
Executable file
13
AutoShell/command/installdxvk
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
@ -8,6 +8,6 @@ import ConfigLanguareRunner
|
|||||||
# 符号转移
|
# 符号转移
|
||||||
argv = []
|
argv = []
|
||||||
for i in sys.argv[1:]:
|
for i in sys.argv[1:]:
|
||||||
argv = i.replace(" ", "\\ ")
|
argv.append(i.replace(" ", "\\ "))
|
||||||
com = ConfigLanguareRunner.Command(f"installfont {''.join(argv)}")
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
@ -8,6 +8,6 @@ import ConfigLanguareRunner
|
|||||||
# 符号转移
|
# 符号转移
|
||||||
argv = []
|
argv = []
|
||||||
for i in sys.argv[1:]:
|
for i in sys.argv[1:]:
|
||||||
argv = i.replace(" ", "\\ ")
|
argv.append(i.replace(" ", "\\ "))
|
||||||
com = ConfigLanguareRunner.Command(f"installgecko {''.join(argv)}")
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
@ -8,6 +8,6 @@ import ConfigLanguareRunner
|
|||||||
# 符号转移
|
# 符号转移
|
||||||
argv = []
|
argv = []
|
||||||
for i in sys.argv[1:]:
|
for i in sys.argv[1:]:
|
||||||
argv = i.replace(" ", "\\ ")
|
argv.append(i.replace(" ", "\\ "))
|
||||||
com = ConfigLanguareRunner.Command(f"installmono {''.join(argv)}")
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
13
AutoShell/command/installmsxml
Executable file
13
AutoShell/command/installmsxml
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/installnet
Executable file
13
AutoShell/command/installnet
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
@ -8,6 +8,6 @@ import ConfigLanguareRunner
|
|||||||
# 符号转移
|
# 符号转移
|
||||||
argv = []
|
argv = []
|
||||||
for i in sys.argv[1:]:
|
for i in sys.argv[1:]:
|
||||||
argv = i.replace(" ", "\\ ")
|
argv.append(i.replace(" ", "\\ "))
|
||||||
com = ConfigLanguareRunner.Command(f"installsparkcorefont {''.join(argv)}")
|
com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}")
|
||||||
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE"))
|
13
AutoShell/command/installvcpp
Executable file
13
AutoShell/command/installvcpp
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/pause
Executable file
13
AutoShell/command/pause
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/reg
Executable file
13
AutoShell/command/reg
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/stopdll
Executable file
13
AutoShell/command/stopdll
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/thank
Executable file
13
AutoShell/command/thank
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/version
Executable file
13
AutoShell/command/version
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/warning
Executable file
13
AutoShell/command/warning
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/winecfg
Executable file
13
AutoShell/command/winecfg
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
13
AutoShell/command/winver
Executable file
13
AutoShell/command/winver
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# 加入路径
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||||
|
sys.path.append(f"{programPath}/../../")
|
||||||
|
import ConfigLanguareRunner
|
||||||
|
# 符号转移
|
||||||
|
argv = []
|
||||||
|
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"))
|
9
AutoShell/main.py
Normal file → Executable file
9
AutoShell/main.py
Normal file → Executable file
@ -57,10 +57,15 @@ if os.getenv("WINEPREFIX") != None:
|
|||||||
commandEnv = ""
|
commandEnv = ""
|
||||||
for i in programEnv:
|
for i in programEnv:
|
||||||
commandEnv += f"{i[0]}=\"{i[1]}\" "
|
commandEnv += f"{i[0]}=\"{i[1]}\" "
|
||||||
commandEnv += f"PATH=\"$PATH:{programPath}/command\" "
|
commandEnv += f"PATH=\"{programPath}/command:$PATH\" "
|
||||||
if len(sys.argv) - optionAll < 2:
|
if len(sys.argv) - optionAll < 2:
|
||||||
print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
|
print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
|
||||||
print(f"版本:{version}")
|
print(f"版本:{version}")
|
||||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||||
print("--------------------------------------------------------------")
|
print("--------------------------------------------------------------")
|
||||||
os.system(f"{commandEnv} bash")
|
os.system(f"{commandEnv} bash ")
|
||||||
|
exit()
|
||||||
|
command = ""
|
||||||
|
for i in sys.argv[1:]:
|
||||||
|
command += f"\"{i}\" "
|
||||||
|
os.system(f"{commandEnv} bash {command}")
|
@ -30,7 +30,8 @@ for i in information["Thank"]:
|
|||||||
programEnv = [
|
programEnv = [
|
||||||
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"],
|
||||||
["($WINE)", "deepin-wine6-stable"],
|
["($WINE)", "deepin-wine6-stable"],
|
||||||
["($DANGER)", "0"],
|
#["($DANGER)", "0"],
|
||||||
|
["($DANGER)", "1"],
|
||||||
["($HOME)", os.path.expanduser('~')],
|
["($HOME)", os.path.expanduser('~')],
|
||||||
["($PROGRAMPATH)", programPath],
|
["($PROGRAMPATH)", programPath],
|
||||||
["($VERSION)", version],
|
["($VERSION)", version],
|
||||||
@ -39,7 +40,8 @@ programEnv = [
|
|||||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||||
["($?)", "0"],
|
["($?)", "0"],
|
||||||
["($PLATFORM)", platform.system()],
|
["($PLATFORM)", platform.system()],
|
||||||
["($DEBUG)", str(int("--debug" in sys.argv))]
|
["($DEBUG)", "1"]
|
||||||
|
#["($DEBUG)", str(int("--debug" in sys.argv))]
|
||||||
]
|
]
|
||||||
readOnlyEnv = [
|
readOnlyEnv = [
|
||||||
"($DANGER)",
|
"($DANGER)",
|
||||||
@ -259,7 +261,6 @@ class Command():
|
|||||||
commandStr = command[0] + " "
|
commandStr = command[0] + " "
|
||||||
for i in command[1:]:
|
for i in command[1:]:
|
||||||
commandStr += f"'{i}' "
|
commandStr += f"'{i}' "
|
||||||
print(commandStr)
|
|
||||||
return os.system(commandStr)
|
return os.system(commandStr)
|
||||||
|
|
||||||
def Version(self):
|
def Version(self):
|
||||||
@ -448,8 +449,8 @@ class Command():
|
|||||||
if self.close:
|
if self.close:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
app = QtWidgets.QApplication(sys.argv)
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
app = QtWidgets.QApplication(sys.argv)
|
|
||||||
optionAll = 0
|
optionAll = 0
|
||||||
if "--debug" in sys.argv:
|
if "--debug" in sys.argv:
|
||||||
optionAll += 1
|
optionAll += 1
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user