调整Makefile

This commit is contained in:
gfdgd xi 2023-09-29 14:38:27 +08:00
parent dc7cb37d7f
commit 368a9d218a
2 changed files with 14 additions and 2 deletions

View File

@ -14,6 +14,7 @@ install:
mkdir -pv $(DESTDIR)/usr/bin mkdir -pv $(DESTDIR)/usr/bin
mkdir -pv $(DESTDIR)/usr/share/applications mkdir -pv $(DESTDIR)/usr/share/applications
mkdir -pv $(DESTDIR)/opt/apps/deepin-wine-runner/entries/applications mkdir -pv $(DESTDIR)/opt/apps/deepin-wine-runner/entries/applications
mkdir -pv $(DESTDIR)/opt/apps/deepin-wine-runner/VM
cp -rv helperset $(DESTDIR)/opt/apps/deepin-wine-runner/ cp -rv helperset $(DESTDIR)/opt/apps/deepin-wine-runner/
#cp -rv VM-source/VirtualMachine VM #cp -rv VM-source/VirtualMachine VM
cp -rv VM-source/deepin-wine-runner.svg VM cp -rv VM-source/deepin-wine-runner.svg VM
@ -24,7 +25,11 @@ install:
cp -rv information.json package-script cp -rv information.json package-script
zip -v -q -r package-script.zip package-script zip -v -q -r package-script.zip package-script
cp -rv InstallBox86-cn.sh $(DESTDIR)/opt/apps/deepin-wine-runner/ cp -rv InstallBox86-cn.sh $(DESTDIR)/opt/apps/deepin-wine-runner/
cp -rv VM $(DESTDIR)/opt/apps/deepin-wine-runner cp -rv VM/VirtualMachine $(DESTDIR)/opt/apps/deepin-wine-runner/VM
cp -rv VM/OVMF.fd $(DESTDIR)/opt/apps/deepin-wine-runner/VM
cp -rv VM/StartQemu.py $(DESTDIR)/opt/apps/deepin-wine-runner/VM
rm -rfv $(DESTDIR)/opt/apps/deepin-wine-runner/VM/vm.tar.gz
cd VM ; tar -cvzf $(DESTDIR)/opt/apps/deepin-wine-runner/VM/vm.tar.gz .
cp -rv 2048 $(DESTDIR)/opt/apps/deepin-wine-runner/ cp -rv 2048 $(DESTDIR)/opt/apps/deepin-wine-runner/
cp -rv Download.py $(DESTDIR)/opt/apps/deepin-wine-runner/ cp -rv Download.py $(DESTDIR)/opt/apps/deepin-wine-runner/
cp -rv AllInstall.py $(DESTDIR)/opt/apps/deepin-wine-runner cp -rv AllInstall.py $(DESTDIR)/opt/apps/deepin-wine-runner
@ -127,7 +132,7 @@ install:
#sudo rm -rfv $(DESTDIR)/ #sudo rm -rfv $(DESTDIR)/
#cp -rv deb /tmp/spark-deepin-wine-runner-builder #cp -rv deb /tmp/spark-deepin-wine-runner-builder
rm -rfv package-script.zip rm -rfv package-script.zip
chmod 777 -Rv $(DESTDIR)/opt/apps/deepin-wine-runner
ln -fs /opt/apps/deepin-wine-runner/deepin-wine-packager.py $(DESTDIR)/usr/bin/deepin-wine-package-builder ln -fs /opt/apps/deepin-wine-runner/deepin-wine-packager.py $(DESTDIR)/usr/bin/deepin-wine-package-builder
ln -fs /opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py $(DESTDIR)/usr/bin/deepin-wine-packager-easy-builder ln -fs /opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py $(DESTDIR)/usr/bin/deepin-wine-packager-easy-builder
ln -fs /opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py $(DESTDIR)/usr/bin/deepin-wine-packager-with-script ln -fs /opt/apps/deepin-wine-runner/deepin-wine-packager-with-script.py $(DESTDIR)/usr/bin/deepin-wine-packager-with-script

View File

@ -6,6 +6,13 @@ arch = subprocess.getoutput("dpkg --print-architecture").replace(" ", "").replac
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"): if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
os.system(f"{programPath}/VirtualMachine-{arch}") os.system(f"{programPath}/VirtualMachine-{arch}")
exit() exit()
# 判断文件是否解压
if not os.path.exists(f"{programPath}/VirtualMachine-amd64"):
# 解压文件
os.system(f"cd '{programPath}' ; tar -xvf vm.tar.gz")
if os.path.exists(f"{programPath}/VirtualMachine-{arch}"):
os.system(f"{programPath}/VirtualMachine-{arch}")
exit()
# 只能使用 Qemu User 运行程序 # 只能使用 Qemu User 运行程序
if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x86_64"): if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x86_64"):
os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'") os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'")