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
66ace92775
commit
b31c4bf134
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
cd $CURRENT_DIR
|
||||
if [[ -f $CURRENT_DIR/usr/lib/ld-linux-x86-64.so.2 ]]; then
|
||||
if [[ -f $CURRENT_DIR/usr/ ]]; then
|
||||
echo 运行库已安装,按回车键退出
|
||||
read
|
||||
exit
|
||||
@ -11,7 +11,7 @@ if [[ $? != 0 ]]; then
|
||||
echo 安装包下载失败!按回车键退出
|
||||
read
|
||||
fi
|
||||
sudo chmod 777 -Rv .
|
||||
chmod 777 -Rv .
|
||||
tar -xvf /tmp/library.tar.xz
|
||||
rm -vf /tmp/library.tar.xz
|
||||
echo 安装完成!按回车键退出
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
cd $CURRENT_DIR
|
||||
if [[ ! -f $CURRENT_DIR/usr/lib/ld-linux-x86-64.so.2 ]]; then
|
||||
if [[ ! -f $CURRENT_DIR/usr/ ]]; then
|
||||
echo 运行库未安装,按回车键退出
|
||||
read
|
||||
exit
|
||||
fi
|
||||
sudo rm -rfv lib
|
||||
sudo rm -rfv lib64
|
||||
sudo rm -rfv usr
|
||||
sudo chmod 777 -Rv .
|
||||
rm -rfv lib
|
||||
rm -rfv lib64
|
||||
rm -rfv usr
|
||||
chmod 777 -Rv .
|
||||
echo 删除完成!按回车键退出
|
||||
read
|
@ -3071,10 +3071,16 @@ if os.path.exists(f"{programPath}/WineLib/usr"):
|
||||
diyRunnerLib.setEnabled(True)
|
||||
statusRunnerLib.setText("当前状态:已安装")
|
||||
libPathList = []
|
||||
def AddLib(number, name):
|
||||
mapLink = []
|
||||
def AddRunnerLib(number, name):
|
||||
global diyRunnerLib
|
||||
action = QtWidgets.QAction(f"{name}")
|
||||
action.triggered.connect(lambda: print(int(str(number))))
|
||||
mapLink.append(action)
|
||||
action.triggered.connect(lambda: AddRunnerLib(int(str(number))))
|
||||
diyRunnerLib.addAction(action)
|
||||
def DelRunnerLib(number):
|
||||
os.system(f"rm -rf '{libPathList[number]}'")
|
||||
mapLink[number].setDisabled(True)
|
||||
for libPath in [f"{programPath}/WineLib/usr/lib", f"{programPath}/WineLib/usr/lib64"]:
|
||||
for i in os.listdir(libPath):
|
||||
if not os.path.isdir(f"{libPath}/{i}"):
|
||||
@ -3084,12 +3090,12 @@ if os.path.exists(f"{programPath}/WineLib/usr"):
|
||||
except:
|
||||
continue
|
||||
libPathList.append(f"{libPath}/{i}")
|
||||
AddLib(len(libPathList), f"{i}")
|
||||
AddRunnerLib(len(libPathList) - 1, f"{i}")
|
||||
else:
|
||||
if not os.path.exists(f"{libPath}/{i}/libc.so.6"):
|
||||
continue
|
||||
libPathList.append(f"{libPath}/{i}/")
|
||||
AddLib(len(libPathList), f"{i}/")
|
||||
AddRunnerLib(len(libPathList) - 1, f"{i}/")
|
||||
print(libPathList)
|
||||
if os.path.exists(f"{programPath}/InstallRuntime"):
|
||||
installLib.addSeparator()
|
||||
|
Loading…
Reference in New Issue
Block a user