├── .github ├── ISSUE_TEMPLATE │ └── ISSCUE_BUG.md └── workflows │ ├── auto-building.yml │ ├── auto-get-waydroid-system-image.yml │ ├── auto-get-waydroid.yml │ └── auto-push-github.yml ├── AutoConfig.py ├── AutoShell ├── command │ ├── download │ ├── error │ ├── info │ ├── installapk │ ├── pause │ ├── programforum │ ├── thank │ ├── version │ └── warning └── main.py ├── BuildDesktop.py ├── CNAME ├── ConfigLanguareRunner-help.json ├── ConfigLanguareRunner.py ├── Download.py ├── Icon ├── BadStar.svg ├── Star.svg ├── UnStar.svg └── doge.png ├── LICENSE ├── Language.json ├── Makefile ├── Model └── __init__.py ├── ProgramFen.py ├── README.md ├── RemovePycacheFile.py ├── Runner_tools ├── Android-id-reader │ ├── android-id.py │ └── gms.sh ├── Checks │ ├── HoudiniCheck.py │ ├── LSPCheck.py │ ├── Language-Check.py │ ├── MagiskCheck.py │ └── Widevine-Check.py ├── Libhoudini_installer │ └── Install.sh ├── Magisk_Installer │ ├── Magisk.py │ └── data.img ├── Off-function │ ├── Allow-rotate.py │ ├── Off-cursor.py │ └── Off-windows-mode.py ├── Sway-X11 │ └── Sway.png ├── SystemConfigs │ ├── Clipboard-enable.py │ ├── Do-not-rotate.py │ ├── Language.py │ ├── Multi-windows-full.png │ ├── Multi_windows.py │ ├── Show-cursor.py │ └── waydroid-choose-gpu.sh ├── Waydroid_Image_Installer │ └── Install.sh ├── Waydroid_Installer │ ├── Install-cn.sh │ ├── Install.sh │ ├── InstallSway.sh │ ├── InstallWeston.sh │ └── Waydroid-AutoConfig.py └── Widevine_Installer │ └── Install.sh ├── UI ├── AutoConfig.py └── AutoConfig.ui ├── UpdateTime.py ├── aapt ├── aapt ├── aapt2 ├── libaapt.so ├── libaapt.so.0 ├── libandroidfw.so.0 └── run-aapt.sh ├── about └── index.html ├── builer.png ├── builer.svg ├── deb ├── DEBIAN │ ├── control │ ├── postinst │ └── postrm ├── opt │ └── apps │ │ └── spark-waydroid-runner │ │ ├── entries │ │ └── applications │ │ │ └── spark-waydroid-runner.desktop │ │ └── files │ │ ├── AutoConfig.py │ │ ├── AutoShell │ │ ├── command │ │ │ ├── download │ │ │ ├── error │ │ │ ├── info │ │ │ ├── installapk │ │ │ ├── pause │ │ │ ├── programforum │ │ │ ├── thank │ │ │ ├── version │ │ │ └── warning │ │ └── main.py │ │ ├── BuildDesktop.py │ │ ├── ConfigLanguareRunner-help.json │ │ ├── ConfigLanguareRunner.py │ │ ├── Download.py │ │ ├── Icon │ │ ├── BadStar.svg │ │ ├── Star.svg │ │ ├── UnStar.svg │ │ └── doge.png │ │ ├── LICENSE │ │ ├── Language.json │ │ ├── Model │ │ └── __init__.py │ │ ├── ProgramFen.py │ │ ├── Runner_tools │ │ ├── Android-id-reader │ │ │ ├── android-id.py │ │ │ └── gms.sh │ │ ├── Checks │ │ │ ├── HoudiniCheck.py │ │ │ ├── LSPCheck.py │ │ │ ├── Language-Check.py │ │ │ ├── MagiskCheck.py │ │ │ └── Widevine-Check.py │ │ ├── Libhoudini_installer │ │ │ └── Install.sh │ │ ├── Magisk_Installer │ │ │ ├── Magisk.py │ │ │ └── data.img │ │ ├── Off-function │ │ │ ├── Allow-rotate.py │ │ │ ├── Off-cursor.py │ │ │ └── Off-windows-mode.py │ │ ├── Sway-X11 │ │ │ └── Sway.png │ │ ├── SystemConfigs │ │ │ ├── Clipboard-enable.py │ │ │ ├── Do-not-rotate.py │ │ │ ├── Language.py │ │ │ ├── Multi-windows-full.png │ │ │ ├── Multi_windows.py │ │ │ ├── Show-cursor.py │ │ │ └── waydroid-choose-gpu.sh │ │ ├── Waydroid_Image_Installer │ │ │ └── Install.sh │ │ ├── Waydroid_Installer │ │ │ ├── Install-cn.sh │ │ │ ├── Install.sh │ │ │ ├── InstallSway.sh │ │ │ ├── InstallWeston.sh │ │ │ └── Waydroid-AutoConfig.py │ │ ├── Widevine_Installer │ │ │ └── Install.sh │ │ └── auto-setting.py │ │ ├── UI │ │ ├── AutoConfig.py │ │ └── AutoConfig.ui │ │ ├── builer.svg │ │ ├── defult.png │ │ ├── defult.svg │ │ ├── getxmlimg.py │ │ ├── icon.png │ │ ├── information.json │ │ ├── launch.sh │ │ ├── menu.svg │ │ ├── runner.svg │ │ ├── updatekiller.py │ │ ├── waydroid-runner │ │ └── waydroid-runner-update-bug └── usr │ └── share │ ├── applications │ └── spark-waydroid-runner.desktop │ └── icons │ └── apps │ └── 256 │ └── spark-waydroid-runner.svg ├── defult-old.png ├── defult.png ├── defult.svg ├── getxmlimg.py ├── icon.png ├── information.json ├── launch.sh ├── mainwindow.py ├── menu.png ├── menu.svg ├── old-icon.png ├── pkexec ├── com.deepin.pkexec.apt.policy ├── com.deepin.pkexec.bash.policy ├── com.deepin.pkexec.binder.loader.policy ├── com.deepin.pkexec.env.policy ├── com.deepin.pkexec.installscrcpy.policy ├── com.deepin.pkexec.rm.policy ├── com.deepin.pkexec.uengine-bridge.policy ├── com.deepin.pkexec.uengine-session-launch-helper.policy └── com.deepin.pkexec.uengine.window.size.setting.policy ├── runner.png ├── runner.svg ├── uengine_logo.svg ├── updatekiller.py ├── waydroid runner.png ├── waydroid-apk-builder ├── waydroid-apk-builder-more └── waydroid-runner-update-bug /.github/ISSUE_TEMPLATE/ISSCUE_BUG.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 程序bug 3 | about: 反馈程序的故障 4 | --- 5 | 需要把下面的替换成自己的信息,下面为例子 6 | 7 | # 故障表现(最好带图、日志) 8 | 按右上角叉叉可以关闭运行器 9 | ![图片.png](https://storage.deepin.org/thread/202308132203366743_图片.png) 10 | ## 日志(终端输入 `waydroid-runner` 输出的内容) 11 | ``` 12 | gfdgd_xi@gfdgdxi-PC:~$ deepin-wine-runner 13 | /usr/bin/deepin-terminal 14 | /usr/bin/deepin-wine6-stable 15 | /usr/bin/deepin-wine 16 | /usr/bin/qemu-i386-static 17 | /usr/bin/qemu-i386 18 | /usr/bin/qemu-x86_64 19 | ['', ''] 20 | /usr/bin/qemu-i386 21 | /usr/bin/qemu-x86_64 22 | ['', ''] 23 | {'基于 UOS box86 的 deepin-wine6-stable': "WINEPREDLL='/opt/apps/deepin-wine-runner/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ", '基于 UOS exagear 的 deepin-wine6-stable': "WINEPREDLL='/opt/apps/deepin-wine-runner/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix /home/gfdgd_xi/.deepinwine/debian-buster --utmp-paths-list /home/gfdgd_xi/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list /home/gfdgd_xi/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list /home/gfdgd_xi/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ", '使用 Flatpak 安装的 Wine': 'flatpak run org.winehq.Wine', 'deepin-wine6 stable': 'deepin-wine6-stable', 'deepin-wine5 stable': 'deepin-wine5-stable', 'spark-wine': 'spark-wine', 'spark-wine7-devel': 'spark-wine7-devel', 'spark-wine8': 'spark-wine8', 'deepin-wine': 'deepin-wine', 'deepin-wine5': 'deepin-wine5', 'wine': 'wine', 'wine64': 'wine64', 'ukylin-wine': 'ukylin-wine', 'mono(这不是 wine,但可以实现初步调用运行 .net 应用)': 'mono', '基于 linglong 的 deepin-wine6-stable(不推荐)': "ll-cli run '' --exec '/bin/deepin-wine6-stable'", '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-amd64/bin/wine': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-amd64/bin/wine', '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-amd64/bin/wine-aarch64': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-amd64/bin/wine-aarch64', '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine', '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-i386': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-i386', '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-aarch64': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-aarch64', '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-x86_64': '/opt/apps/deepin-wine-runner/wine/wine-ce-8.13-riscv64/bin/wine-x86_64', '/home/gfdgd_xi/.deepinwine/wine-ce-8.13-amd64/bin/wine': '/home/gfdgd_xi/.deepinwine/wine-ce-8.13-amd64/bin/wine'} 24 | [['cmd', 'cmd'], ['cmd', 'cmd.exe'], ['cmd', 'wineBottonPath/drive_c/windows/system32/cmd.exe'], ['Internet Explorer', 'iexplore'], ['Internet Explorer', 'iexplore.exe'], ['Internet Explorer', 'wineBottonPath/drive_c/Program Files/Internet Explorer/iexplore.exe'], ['Internet Explorer', 'wineBottonPath/drive_c/Program Files (x86)/Internet Explorer/iexplore.exe'], ['微信', 'wineBottonPath/drive_c/Program Files/Tencent/WeChat/WeChat.exe'], ['微信', 'wineBottonPath/drive_c/Program Files (x86)/Tencent/WeChat/WeChat.exe'], ['UltraISO', 'wineBottonPath/drive_c/Program Files/UltraISO/UltraISO.exe'], ['UltraISO', 'wineBottonPath/drive_c/Program Files (x86)/UltraISO/UltraISO.exe'], ['迅雷', 'wineBottonPath/drive_c/Program Files/Thunder Network/MiniThunder/Bin/ThunderMini.exe'], ['迅雷', 'wineBottonPath/drive_c/Program Files (x86)/Thunder Network/MiniThunder/Bin/ThunderMini.exe'], ['Microsoft Office Word', 'wineBottonPath/drive_c/Program Files/Microsoft Office/Office12/WINWORD.EXE'], ['Microsoft Office Word', 'wineBottonPath/drive_c/Program Files (x86)/Microsoft Office/Office12/WINWORD.EXE'], ['腾讯会议', 'wineBottonPath/drive_c/Program Files/Tencent/WeMeet/wemeetapp.exe'], ['腾讯会议', 'wineBottonPath/drive_c/Program Files (x86)/Tencent/WeMeet/wemeetapp.exe'], ['腾讯课堂', 'wineBottonPath/drive_c/Program Files/Tencent/EDU/bin/TXEDU.exe'], ['腾讯课堂', 'wineBottonPath/drive_c/Program Files (x86)/Tencent/EDU/bin/TXEDU.exe'], ['QQ', 'wineBottonPath/drive_c/Program Files/Tencent/QQ/Bin/QQ.exe'], ['QQ', 'wineBottonPath/drive_c/Program Files (x86)/Tencent/QQ/Bin/QQ.exe'], ['TIM', 'wineBottonPath/drive_c/Program Files/Tencent/TIM/Bin/TIM.exe'], ['TIM', 'wineBottonPath/drive_c/Program Files (x86)/Tencent/TIM/Bin/TIM.exe']] 25 | lock 26 | libpng warning: iCCP: known incorrect sRGB profile 27 | libpng warning: iCCP: known incorrect sRGB profile 28 | libpng warning: iCCP: known incorrect sRGB profile 29 | libpng warning: iCCP: known incorrect sRGB profile 30 | libpng warning: iCCP: known incorrect sRGB profile 31 | libpng warning: iCCP: known incorrect sRGB profile 32 | libpng warning: iCCP: known incorrect sRGB profile 33 | libpng warning: iCCP: known incorrect sRGB profile 34 | create icon [font] engine failed.[theme:bloom-dark] nonCache[theme].size[0] (No such file or directory) 35 | create icon [floppy_unmount] engine failed.[theme:bloom-dark] nonCache[theme].size[1] (No such file or directory) 36 | create icon [3floppy_unmount] engine failed.[theme:bloom-dark] nonCache[theme].size[2] (No such file or directory) 37 | 检测到库 riscv64 38 | 检测到库 arm64 39 | 检测到库 armhf 40 | 检测到库 i386 41 | 检测到库 s390x 42 | 检测到库 mips64el 43 | 检测到库 ppc64el 44 | 检测到库 amd64 45 | 版本号为:3.4.0 46 | 普通版本 47 | qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 390, resource id: 0, major code: 20 (GetProperty), minor code: 0 48 | ``` 49 | 50 | # 系统版本 51 | - 系统:Deepin 23 52 | - 硬件: 53 | ![图片.png](https://storage.deepin.org/thread/202308132200482953_图片.png) 54 | - 其他补充信息 55 | 56 | # 之前做过什么操作 57 | 在终端里输入了内容 58 | ```bash 59 | sudo apt upgrade 60 | ``` 61 | 更新了系统 62 | 63 | # 复现步骤 64 | 1. 打开运行器,然后点击右上角叉叉可以关闭 65 | 66 | # 推测故障原因(可选) 67 | Qt 默认有一套配置好的退出事件 68 | 69 | -------------------------------------------------------------------------------- /.github/workflows/auto-building.yml: -------------------------------------------------------------------------------- 1 | name: Auto Building Runner 2 | run-name: ${{ github.actor }} Auto Building Runner 🚀 3 | on: 4 | push: 5 | workflow_dispatch: 6 | jobs: 7 | Explore-GitHub-Actions: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Building DEB 11 | run: | 12 | # 配置环境 13 | sudo apt update 14 | sudo apt install git dpkg-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qt5-qmake -y 15 | git clone https://github.com/gfdgd-xi/waydroid-runner 16 | cd waydroid-runner 17 | make build 18 | mv spark-waydroid-runner.deb ~ 19 | - name: upload result 20 | uses: actions/upload-artifact@v1 21 | with: 22 | name: spark-waydroid-runner.deb 23 | path: /home/runner/spark-waydroid-runner.deb 24 | 25 | 26 | -------------------------------------------------------------------------------- /.github/workflows/auto-get-waydroid-system-image.yml: -------------------------------------------------------------------------------- 1 | name: Auto Get Waydroid Image 2 | run-name: ${{ github.actor }} Auto Get Waydroid Image 🚀 3 | on: 4 | # schedule: 5 | # - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | jobs: 8 | Explore-GitHub-Actions: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Get 12 | run: | 13 | # 配置环境 14 | echo 配置环境 15 | sudo apt update 16 | sudo apt install aria2 curl qemu-utils qemu-system gparted -y 17 | echo 下载所需安装包 18 | cd /tmp 19 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/houdini-install.tar.gz 20 | tar -xvf houdini-install.tar.gz 21 | #curl https://repo.waydro.id | sudo bash 22 | #sudo apt install waydroid -y 23 | #sudo waydroid init -s GAPPS -f 24 | 25 | url=https://sourceforge.net/projects/waydroid/files/images/system/lineage/waydroid_x86_64/lineage-18.1-20230422-GAPPS-waydroid_x86_64-system.zip/download 26 | aria2c -x 16 -s 16 $url 27 | u=`dirname $url` 28 | unzip `basename $u` 29 | # 扩容 img 30 | qemu-img resize system.img +1G 31 | sudo modprobe nbd max_ports=8 32 | sudo qemu-nbd system.img --connect=/dev/nbd0 | true 33 | df -H /tmp 34 | sudo resize2fs -p /dev/nbd0 35 | echo 挂载 36 | sudo mkdir /tmp/mount -p 37 | sudo mount /dev/nbd0 /tmp/mount 38 | sudo mkdir -p /tmp/mount/bin | true 39 | sudo mkdir -p /tmp/mount/etc | true 40 | sudo mkdir -p /tmp/mount/etc/init | true 41 | sudo mkdir -p /tmp/mount/lib | true 42 | sudo mkdir -p /tmp/mount/lib64 | true 43 | sudo cp /tmp/houdini-install/overlay/system/bin /tmp/mount/system -rv | true 44 | sudo cp /tmp/houdini-install/overlay/system/etc /tmp/mount/system -rv | true 45 | sudo cp /tmp/houdini-install/overlay/system/lib /tmp/mount/ -rv | true 46 | sudo cp /tmp/houdini-install/overlay/system/lib64 /tmp/mount/ -rv | true 47 | 48 | sudo umount /tmp/mount | true 49 | sudo qemu-nbd -d /dev/nbd0 | true 50 | 51 | 52 | - name: upload result(system.img) 53 | uses: actions/upload-artifact@v1 54 | with: 55 | name: system.img 56 | path: /tmp/system.img 57 | #- name: upload result(vendor.img) 58 | # uses: actions/upload-artifact@v1 59 | # with: 60 | # name: vendor.img 61 | # path: /usr/share/waydroid-extra/images/vendor.img 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /.github/workflows/auto-get-waydroid.yml: -------------------------------------------------------------------------------- 1 | name: Auto Get Waydroid 2 | run-name: ${{ github.actor }} Auto Get Waydroid 🚀 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | jobs: 8 | Explore-GitHub-Actions: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Get 12 | env: 13 | PASSWORD: ${{ secrets.PASSWORD }} 14 | KEYPASSWORD: ${{ secrets.KEYPASSWORD }} 15 | KEY: ${{ secrets.KEY }} 16 | run: | 17 | 18 | # 配置环境 19 | #sudo dpkg --add-architecture i386 20 | #sudo dpkg --add-architecture armhf 21 | #sudo dpkg --add-architecture arm64 22 | downloadDeb="waydroid python3-gbinder libgbinder libglibutil libgbinder-dev libglibutil-dev" 23 | sudo apt update | true 24 | sudo apt install curl git aria2 gpg -y 25 | aria2c $KEY 26 | gpg --import --pinentry-mode loopback --batch --passphrase "$KEYPASSWORD" private-file.key 27 | curl https://repo.waydro.id | sudo bash | true 28 | #apt download $downloadDeb 29 | git clone https://gfdgd-xi:$PASSWORD@github.com/gfdgd-xi/waydroid-deb 30 | cd waydroid-deb 31 | # jammy 32 | mkdir -p jammy 33 | cd jammy 34 | sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ jammy main > /etc/apt/sources.list.d/waydroid.list" 35 | sudo apt update | true 36 | apt download $downloadDeb 37 | #apt download waydroid:i386 python3-gbinder:i386 libgbinder:i386 libglibutil:i386 38 | #apt download waydroid:armhf python3-gbinder:armhf libgbinder:armhf libglibutil:armhf 39 | #apt download waydroid:arm64 python3-gbinder:arm64 libgbinder:arm64 libglibutil:arm64 40 | bash ../mirror.sh 41 | # 源码 42 | #mkdir -p ../source 43 | #cd ../source 44 | #sudo bash -c "echo deb-src [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ jammy main > /etc/apt/sources.list.d/waydroid.list" 45 | #sudo apt update | true 46 | #apt source waydroid python3-gbinder libgbinder libglibutil 47 | # focal 48 | mkdir -p ../focal 49 | cd ../focal 50 | sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ focal main > /etc/apt/sources.list.d/waydroid.list" 51 | sudo apt update 52 | apt download $downloadDeb 53 | bash ../mirror.sh 54 | # bullseye 55 | mkdir -p ../bullseye 56 | cd ../bullseye 57 | sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ bullseye main > /etc/apt/sources.list.d/waydroid.list" 58 | sudo apt update 59 | apt download $downloadDeb 60 | bash ../mirror.sh 61 | # bookworm 62 | mkdir -p ../bookworm 63 | cd ../bookworm 64 | sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ bookworm main > /etc/apt/sources.list.d/waydroid.list" 65 | sudo apt update 66 | apt download $downloadDeb 67 | bash ../mirror.sh 68 | # lunar 69 | mkdir -p ../lunar 70 | cd ../lunar 71 | sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ lunar main > /etc/apt/sources.list.d/waydroid.list" 72 | sudo apt update 73 | apt download $downloadDeb 74 | bash ../mirror.sh 75 | # trixie 76 | #mkdir -p ../trixie 77 | #cd ../trixie 78 | #sudo bash -c "echo deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ trixie main > /etc/apt/sources.list.d/waydroid.list" 79 | #sudo apt update 80 | #apt download $downloadDeb 81 | #bash ../mirror.sh 82 | # 提交 83 | cd .. 84 | python3 build.py 85 | git add . 86 | git config --global user.email 3025613752@qq.com 87 | git config --global user.name gfdgd-xi 88 | git commit -m 更新waydroid | true 89 | git push | true 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /.github/workflows/auto-push-github.yml: -------------------------------------------------------------------------------- 1 | name: Auto Push Waydroid Runner From Gitee To Github 2 | run-name: ${{ github.actor }} Auto Push Waydroid Runner From Gitee To Github 🚀 3 | on: 4 | schedule: 5 | - cron: '0 * * * *' 6 | workflow_dispatch: 7 | jobs: 8 | Explore-GitHub-Actions: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Get 12 | env: 13 | PASSWORD: ${{ secrets.PASSWORD }} 14 | KEYPASSWORD: ${{ secrets.KEYPASSWORD }} 15 | KEY: ${{ secrets.KEY }} 16 | run: | 17 | git clone https://gitee.com/gfdgd-xi/waydroid-runner 18 | cd waydroid-runner 19 | git remote set-url origin https://gfdgd-xi:$PASSWORD@github.com/gfdgd-xi/waydroid-runner 20 | git push 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /AutoShell/command/download: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/error: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/installapk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/pause: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/programforum: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/thank: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/command/warning: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /AutoShell/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import time 5 | import json 6 | import platform 7 | 8 | # 读取文本文档 9 | def readtxt(path): 10 | f = open(path, "r") # 设置文件对象 11 | str = f.read() # 获取内容 12 | f.close() # 关闭文本对象 13 | return str # 返回结果 14 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 15 | information = json.loads(readtxt(f"{programPath}/../information.json")) 16 | version = information["Version"] 17 | thankText = "" 18 | for i in information["Contribute"]: 19 | thankText += f"{i}\n" 20 | programEnv = [ 21 | ["WINEPREFIX", f"{os.path.expanduser('~')}/.wine"], 22 | ["WINE", "deepin-wine6-stable"], 23 | ["DANGER", "0"], 24 | ["PROGRAMPATH", programPath], 25 | ["VERSION", version], 26 | ["THANK", thankText.replace("\n", "\\n")], 27 | ["MAKER", "gfdgd xi"], 28 | ["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi"], 29 | ["PLATFORM", platform.system()], 30 | ["DEBUG", str(int("--debug" in sys.argv))] 31 | ] 32 | '''programEnv = [ 33 | ["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"], 34 | ["($WINE)", "deepin-wine6-stable"], 35 | ["($DANGER)", "0"], 36 | ["($HOME)", os.path.expanduser('~')], 37 | ["($PROGRAMPATH)", programPath], 38 | ["($VERSION)", version], 39 | ["($THANK)", thankText], 40 | ["($MAKER)", "gfdgd xi"], 41 | ["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"], 42 | ["?", "0"], 43 | ["PLATFORM)", platform.system()], 44 | ["DEBUG)", str(int("--debug" in sys.argv))] 45 | ]''' 46 | optionAll = 0 47 | if "--debug" in sys.argv: 48 | optionAll += 1 49 | if "--system" in sys.argv: 50 | programEnv.append(["DANGER", "1"]) 51 | optionAll += 1 52 | if os.getenv("WINE") != None: 53 | programEnv.append(["WINE", os.getenv("WINE")]) 54 | if os.getenv("WINEPREFIX") != None: 55 | programEnv.append(["WINEPREFIX", os.getenv("WINEPREFIX")]) 56 | # 生成可以使用的参数 57 | commandEnv = "" 58 | for i in programEnv: 59 | commandEnv += f"{i[0]}=\"{i[1]}\" " 60 | commandEnv += f"PATH=\"{programPath}/command:$PATH\" " 61 | if len(sys.argv) - optionAll < 2: 62 | print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)") 63 | print(f"版本:{version}") 64 | print(f"©2020~{time.strftime('%Y')} gfdgd xi") 65 | print("--------------------------------------------------------------") 66 | os.system(f"{commandEnv} bash ") 67 | exit() 68 | command = "" 69 | for i in sys.argv[1:]: 70 | command += f"\"{i}\" " 71 | print("UEngine 运行器自动配置文件解析器(基于 Bash)") 72 | print(f"版本:{version}") 73 | print(f"©2020~{time.strftime('%Y')} gfdgd xi") 74 | print("--------------------------------------------------------------") 75 | os.system(f"{commandEnv} bash {command}") -------------------------------------------------------------------------------- /BuildDesktop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 使用系统默认的 python3 运行 3 | ################################################################################################################# 4 | # 作者:gfdgd xi 5 | # 版本:2.5.0 6 | # 更新时间:2022年11月20日 7 | # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 8 | # 基于 Python3 的 PyQt5 构建 9 | ################################################################################################################# 10 | ################# 11 | # 引入所需的库 12 | ################# 13 | import os 14 | import sys 15 | import traceback 16 | import updatekiller 17 | import PyQt5.QtGui as QtGui 18 | import PyQt5.QtCore as QtCore 19 | import PyQt5.QtWidgets as QtWidgets 20 | 21 | desktopList = [] 22 | desktopUsrList = [] 23 | 24 | def GetDesktopList(path): 25 | for i in os.listdir(path): 26 | if os.path.isdir(f"{path}/{i}"): 27 | GetDesktopList(f"{path}/{i}") 28 | if os.path.isfile(f"{path}/{i}"): 29 | try: 30 | desktop = {} 31 | with open(f"{path}/{i}") as file: 32 | things = file.read() 33 | for k in things.splitlines(): 34 | if not "=" in k: 35 | continue 36 | desktop[k[:k.index("=")].lower()] = k[k.index("=") + 1:] 37 | desktopList.append([desktop["Name".lower()], desktop["Icon".lower()], desktop["Exec".lower()], f"{path}/{i}"]) 38 | except: 39 | traceback.print_exc() 40 | delButton.setEnabled(len(desktopList)) 41 | 42 | class DesktopList(QtCore.QThread): 43 | show = QtCore.pyqtSignal(int) 44 | def __init__(self) -> None: 45 | super().__init__() 46 | 47 | def run(self): 48 | if os.path.exists(f"{homePath}/.local/share/applications"): 49 | GetDesktopList(f"{homePath}/.local/share/applications") 50 | self.show.emit(0) 51 | 52 | def ShowDesktop(temp): 53 | nmodel = QtGui.QStandardItemModel(window) 54 | if not len(desktopList): 55 | item = QtGui.QStandardItem("无") 56 | nmodel.appendRow(item) 57 | y = 0 58 | for i in desktopList: 59 | #item = QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0]) 60 | #nmodel.appendRow(item) 61 | if os.path.exists(i[1]): 62 | nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0])) 63 | else: 64 | nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon.fromTheme(i[1]), i[0])) 65 | nmodel.setItem(y, 1, QtGui.QStandardItem(i[2])) 66 | nmodel.setItem(y, 2, QtGui.QStandardItem(i[3])) 67 | y += 1 68 | nmodel.setHeaderData(0, QtCore.Qt.Horizontal, "程序名") 69 | nmodel.setHeaderData(1, QtCore.Qt.Horizontal, "运行路径") 70 | nmodel.setHeaderData(2, QtCore.Qt.Horizontal, ".desktop 文件所在路径") 71 | nmodel.setColumnCount(3) 72 | desktopListView.setModel(nmodel) 73 | 74 | def GetDesktopThread(): 75 | global desktop 76 | desktop = DesktopList() 77 | desktop.show.connect(ShowDesktop) 78 | desktop.start() 79 | 80 | def DeleteButton(): 81 | index = desktopListView.currentIndex().row() 82 | if index < 0: 83 | QtWidgets.QMessageBox.critical(window, "错误", "未选中任何项") 84 | return 85 | print(index) 86 | print(desktopList[index][3]) 87 | #desktopListView.rowMoved(index) 88 | 89 | #desktopListView.removeRow(index) 90 | try: 91 | os.remove(desktopList[index][3]) 92 | del desktopList[index] 93 | ShowDesktop(0) 94 | except: 95 | traceback.print_exc() 96 | QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) 97 | 98 | 99 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 100 | homePath = os.getenv("HOME") 101 | iconPath = "{}/deepin-wine-runner.svg".format(programPath) 102 | #GetDesktopList(f"{homePath}/.local/share/applications") 103 | #print(desktopList) 104 | app = QtWidgets.QApplication(sys.argv) 105 | window = QtWidgets.QMainWindow() 106 | widget = QtWidgets.QWidget() 107 | layout = QtWidgets.QGridLayout() 108 | delButton = QtWidgets.QPushButton("删除指定图标") 109 | delButton.clicked.connect(DeleteButton) 110 | #desktopListView = QtWidgets.QListView() 111 | desktopListView = QtWidgets.QTableView() 112 | desktopListView.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) 113 | desktopListView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)#(QAbstractItemView::SelectRows) 114 | layout.addWidget(desktopListView, 0, 0, 1, 4) 115 | layout.addWidget(delButton, 1, 3, 1, 1) 116 | widget.setLayout(layout) 117 | window.setCentralWidget(widget) 118 | window.setWindowTitle("图标管理") 119 | window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height() * 1.2)) 120 | window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) 121 | window.show() 122 | GetDesktopThread() 123 | app.exec_() -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | waydroid-runner.github.gfdgdxi.top -------------------------------------------------------------------------------- /ConfigLanguareRunner-help.json: -------------------------------------------------------------------------------- 1 | { 2 | "installdll": "安装指定 dll 在指定容器\n参数数量:1\n参数介绍:dll名称或在从互联网获取DLL工具的编号,如 7012 xolehlp.dll 平台:2003 架构:64 的 7012", 3 | "stopdll": "不允许指定 dll/exe 运行\n参数数量:1\n参数介绍:dll/exe 名称,如 example.exe", 4 | "installfont": "安装指定字体到指定容器\n参数数量:1\n在字体商店的编号,如 5 msyhbd.ttc 的 5", 5 | "installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量:0\n参数介绍:无", 6 | "installmono": "安装最新版本的 mono 到指定容器\n参数数量:0\n参数介绍:无", 7 | "installgecko": "安装最新版本的 gecko 到指定容器\n参数数量:0\n参数介绍:无", 8 | "installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10", 9 | "installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量:1\n参数介绍:在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3", 10 | "installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量:1\n参数介绍:在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1", 11 | "echo": "显示内容\n参数数量:≥1\n参数介绍:接要显示的内容", 12 | "info": "显示提示对话框\n参数数量:2\n参数介绍:标题+显示内容", 13 | "error": "显示错误对话框\n参数数量:2\n参数介绍:标题+显示内容", 14 | "warning": "显示警告对话框\n参数数量:2\n参数介绍:标题+显示内容", 15 | "exit": "退出程序\n参数数量:0\n参数介绍:无", 16 | "bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量:≥1\n参数介绍:接要执行的命令", 17 | "bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量:≥1\n参数介绍:接要执行的命令", 18 | "version": "显示解释器版本(Wine 运行器版本)\n参数数量:0\n参数介绍:无", 19 | "thank": "显示谢明列表\n参数数量:0\n参数介绍:无", 20 | "pause": "按回车键后继续\n参数数量:0\n参数介绍:无", 21 | "download": "使用 aria2 下载文件\n参数数量:≥1 && ≤3\n参数介绍:下载URL+保存在的文件夹+保存的文件名", 22 | "installdxvk": "安装 dxvk 到指定容器\n参数数量:0\n参数介绍:无", 23 | "createbotton": "在指定目录创建容器\n参数数量:0\n参数介绍:无", 24 | "reg": "导入 .reg 文件\n参数数量:0\n参数介绍:reg 文件路径", 25 | "enabledopengl": "开启 OpenGL\n参数数量:0\n参数介绍:无", 26 | "disbledopengl": "关闭 OpenGL\n参数数量:0\n参数介绍:无", 27 | "winecfg": "显示“Wine 设置”\n参数数量:0\n参数介绍:无", 28 | "winver": "显示“关于 Wine”\n参数数量:0\n参数介绍:无", 29 | "changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量:无\n参数介绍:无", 30 | "cat": "显示指定文件(只支持显示编码为UTF-8的文件)\n参数数量:1\n参数介绍:无", 31 | "enabledhttpproxy": "设置指定容器代理\n参数数量:2\n参数介绍:代理服务器地址+端口", 32 | "disbledhttpproxy": "禁用指定容器代理\n参数数量:0\n参数介绍:无", 33 | "enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无", 34 | "disbledwinecrashdialog": "禁用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无", 35 | "disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无", 36 | "enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无", 37 | "killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名", 38 | "control": "打开控制面板\n参数数量:0\n参数介绍:无", 39 | "taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无", 40 | "killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无", 41 | "installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6", 42 | "installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库", 43 | "decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径", 44 | "programforum": "打开程序论坛\n参数数量:0\n参数介绍:无", 45 | "installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径", 46 | "installapk": "安装 APK 文件到 UEngine\n参数数量:1\n参数介绍:apk 文件路径" 47 | } -------------------------------------------------------------------------------- /Download.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import json 5 | import base64 6 | import requests 7 | print("""浣溪沙 8 | 一曲新词酒一杯,去年天气旧亭台。夕阳西下几时回? 9 | 无可奈何花落去,似曾相识燕归来。小园香径独徘徊。""") 10 | print("") 11 | print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。") 12 | print("================================") 13 | # 读取版本号 14 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 15 | with open(f"{programPath}/information.json") as file: 16 | version = json.loads(file.read())["Version"] 17 | print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3dheWRyb2lkLXJ1bm5lci9JbnN0YWxsLnBocD9WZXJzaW9uPQ==").decode("utf-8") + version).text) -------------------------------------------------------------------------------- /Icon/BadStar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /Icon/Star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Icon/UnStar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /Icon/doge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/Icon/doge.png -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | clean: 2 | python3 RemovePycacheFile.py 3 | 4 | build: 5 | echo 别云间 6 | echo 三年羁旅客,今日又南冠。 7 | echo 无限山河泪,谁言天地宽。 8 | echo 已知泉路近,欲别故乡难。 9 | echo 毅魄归来日,灵旗空际看。 10 | echo 11 | echo 译文:三年为抗清兵东走西飘荡,今天兵败被俘作囚入牢房。无限美好河山失陷伤痛泪,谁还敢说天庭宽阔地又广。已经知道黄泉之路相逼近,想到永别故乡实在心犯难。鬼雄魂魄等到归来那一日,灵旗下面要将故乡河山看。 12 | echo "Build DEB..." 13 | cp -rv information.json deb/opt/apps/spark-waydroid-runner/files/ 14 | cp -rv mainwindow.py deb/opt/apps/spark-waydroid-runner/files/waydroid-runner 15 | cp -rv Language.json deb/opt/apps/spark-waydroid-runner/files/ 16 | cp -rv waydroid-runner-update-bug deb/opt/apps/spark-waydroid-runner/files/ 17 | cp -rv launch.sh deb/opt/apps/spark-waydroid-runner/files/ 18 | cp -rv LICENSE deb/opt/apps/spark-waydroid-runner/files/ 19 | cp -rv defult.svg deb/opt/apps/spark-waydroid-runner/files/ 20 | cp -rv defult.png deb/opt/apps/spark-waydroid-runner/files/ 21 | cp -rv runner.svg deb/opt/apps/spark-waydroid-runner/files/ 22 | cp -rv menu.svg deb/opt/apps/spark-waydroid-runner/files/ 23 | cp -rv icon.png deb/opt/apps/spark-waydroid-runner/files/ 24 | cp -rv getxmlimg.py deb/opt/apps/spark-waydroid-runner/files/ 25 | cp -rv defult.svg deb/opt/apps/spark-waydroid-runner/files/ 26 | cp -rv builer.svg deb/opt/apps/spark-waydroid-runner/files/ 27 | cp -rv Download.py deb/opt/apps/spark-waydroid-runner/files/ 28 | cp -rv updatekiller.py deb/opt/apps/spark-waydroid-runner/files/ 29 | #cp -rv pkexec/* deb/usr/share/polkit-1/actions 30 | cp -rv AutoShell deb/opt/apps/spark-waydroid-runner/files/ 31 | cp -rv AutoConfig.py deb/opt/apps/spark-waydroid-runner/files/ 32 | cp -rv Model deb/opt/apps/spark-waydroid-runner/files/ 33 | cp -rv UI deb/opt/apps/spark-waydroid-runner/files/ 34 | cp -rv ConfigLanguareRunner-help.json deb/opt/apps/spark-waydroid-runner/files/ 35 | cp -rv ConfigLanguareRunner.py deb/opt/apps/spark-waydroid-runner/files/ 36 | cp -rv ProgramFen.py deb/opt/apps/spark-waydroid-runner/files/ 37 | cp -rv BuildDesktop.py deb/opt/apps/spark-waydroid-runner/files/ 38 | cp -rv Runner_tools deb/opt/apps/spark-waydroid-runner/files/ 39 | cp -rv Icon deb/opt/apps/spark-waydroid-runner/files/ 40 | #cp -rv pkexec deb/opt/apps/spark-waydroid-runner/files/ 41 | rm -rfv deb/opt/apps/spark-waydroid-runner/files/Help/information 42 | python3 UpdateTime.py 43 | python3 RemovePycacheFile.py #deb/opt/apps/spark-waydroid-runner/files/ 44 | cp -rv deb /tmp/waydroid-runner-builder 45 | sudo chown -R root:root /tmp/waydroid-runner-builder 46 | sudo dpkg-deb -Z xz -b /tmp/waydroid-runner-builder spark-waydroid-runner.deb 47 | sudo rm -rfv /tmp/waydroid-runner-builder 48 | 49 | install: 50 | make build 51 | echo "Install..." 52 | sudo apt update 53 | #sudo dpkg -i spark-waydroid-runner.deb | true 54 | #sudo apt install -f 55 | sudo apt reinstall ./spark-waydroid-runner.deb 56 | sudo rm spark-waydroid-runner.deb 57 | 58 | depend: 59 | sudo apt install python3 python3-tk python3-pip aapt \ 60 | python3-setuptools deepin-terminal curl python3-pil\ 61 | python3-requests adb fonts-noto-cjk python3-numpy\ 62 | python3-matplotlib wget inotify-tools aria2 python3-pyqt5 63 | python3 -m pip install --upgrade pip --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple 64 | python3 -m pip install --upgrade ttkthemes --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple 65 | python3 -m pip install --upgrade pyautogui --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple 66 | python3 -m pip install --upgrade keyboard --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple 67 | 68 | run: 69 | python3 mainwindow.py -------------------------------------------------------------------------------- /Model/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import PyQt5.QtWidgets as QtWidgets 5 | def OpenTerminal(command): 6 | if terminalEnd[terminal][1]: 7 | os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"") 8 | return 9 | os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}") 10 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 11 | # 对终端的获取 12 | # 为什么 openkylin 只有 mate-terminal 13 | # 优先为深度终端 14 | terminal = "" 15 | terminalList = [ 16 | "deepin-terminal", 17 | "mate-terminal", 18 | "gnome-terminal", 19 | "xfce4-terminal" 20 | ] 21 | terminalEnd = { 22 | f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0], 23 | "mate-terminal": ["-e", 1], 24 | "gnome-terminal": ["--", 0], 25 | "xfce4-terminal": ["-e", 1] 26 | } 27 | for i in terminalList: 28 | if not os.system(f"which {i}"): 29 | if i == "deepin-terminal": 30 | i = f"{programPath}/../launch.sh\" \"deepin-terminal" 31 | terminal = i 32 | break 33 | if terminal == "": 34 | print("无法识别到以下的任意一个终端") 35 | print(" ".join(terminalList)) 36 | app = QtWidgets.QApplication(sys.argv) 37 | QtWidgets.QMessageBox.critical(None, "错误", "无法识别到以下的任意一个终端\n" + " ".join(terminalList)) 38 | exit() 39 | -------------------------------------------------------------------------------- /ProgramFen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import base64 5 | import traceback 6 | import requests 7 | import PyQt5.QtGui as QtGui 8 | import PyQt5.QtCore as QtCore 9 | import PyQt5.QtWidgets as QtWidgets 10 | 11 | print("""十五从军征 12 | 十五从军征,八十始得归。道逢乡里人:家中有阿谁? 13 | 遥看是君家,松柏冢累累。兔从狗窦入,雉从梁上飞。 14 | 中庭生旅谷,井上生旅葵。舂谷持作饭,采葵持作羹。 15 | 羹饭一时熟,不知饴阿谁!出门东向看,泪落沾我衣。""") 16 | print("") 17 | print("""译文:刚满十五岁的少年就出去打仗,到了八十岁才回来。路遇一个乡下的邻居,问:“我家里还有什么人?”你家那个地方,现在已是松树柏树林中的一片坟墓。走到家门前看见野兔从狗洞里出进,野鸡在屋脊上飞来飞去。院子里长着野生的谷子,野生的葵菜环绕着井台。用捣掉壳的野谷来做饭,摘下葵叶来煮汤。汤和饭一会儿都做好了,却不知赠送给谁吃。走出大门向着东方张望,老泪纵横,洒落在征衣上。""") 18 | print("================================") 19 | 20 | class ProgramRunStatusShow(): 21 | msgWindow = None 22 | def ShowWindow(): 23 | try: 24 | fenlists = [] 25 | for i in range(6): 26 | fenlists.append(int(requests.get("http://data.download.gfdgdxi.top/Fen-UEngine/Fen" + f"{i}.txt").text)) 27 | tipsInfo = "" 28 | except: 29 | traceback.print_exc() 30 | fenlists = [0, 0, 0, 0, 0] 31 | tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?" 32 | 33 | maxHead = fenlists.index(max(fenlists)) 34 | allNumber = 0 35 | for i in fenlists: 36 | allNumber += i 37 | try: 38 | #tipsInfo = "" 39 | for i in range(len(fenlists)): 40 | # 显示整数 41 | tipsInfo += f"有 {int(fenlists[i] / allNumber * 100)}% 的用户选择了 {i} 分({fenlists[i]}/{allNumber})\n" 42 | maxNumber = int(max(fenlists) / allNumber * 100) 43 | #if tipsInfo == "": 44 | # tipsInfo = f"有{maxNumber}%的用户选择了这个评分" 45 | except: 46 | pass 47 | ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow() 48 | msgWidget = QtWidgets.QWidget() 49 | msgWidgetLayout = QtWidgets.QGridLayout() 50 | starLayout = QtWidgets.QHBoxLayout() 51 | uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况")) 52 | uploadButton.clicked.connect(ProgramRunStatusUpload.ShowWindow) 53 | msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0) 54 | msgWidgetLayout.addLayout(starLayout, 0, 1) 55 | msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2) 56 | msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2) 57 | end = 5 58 | if maxHead > 5: 59 | for i in range(end): 60 | starLayout.addWidget(QtWidgets.QLabel(f"")) 61 | else: 62 | for i in range(maxHead): 63 | starLayout.addWidget(QtWidgets.QLabel(f"")) 64 | head = maxHead 65 | for i in range(head, end): 66 | starLayout.addWidget(QtWidgets.QLabel(f"")) 67 | msgWidget.setLayout(msgWidgetLayout) 68 | ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget) 69 | ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) 70 | ProgramRunStatusShow.msgWindow.setWindowTitle(f"程序运行情况") 71 | ProgramRunStatusShow.msgWindow.show() 72 | 73 | class ProgramRunStatusUpload(): 74 | msgWindow = None 75 | starLayout = None 76 | fen = None 77 | starList = [] 78 | sha1Value = "" 79 | programName = None 80 | def ChangeStar(): 81 | if ProgramRunStatusUpload.fen.currentIndex() > 5: 82 | for i in ProgramRunStatusUpload.starList: 83 | i.setText(f"") 84 | return 85 | for i in range(ProgramRunStatusUpload.fen.currentIndex()): 86 | ProgramRunStatusUpload.starList[i].setText(f"") 87 | head = ProgramRunStatusUpload.fen.currentIndex() 88 | end = len(ProgramRunStatusUpload.starList) 89 | for i in range(head, end): 90 | ProgramRunStatusUpload.starList[i].setText(f"") 91 | 92 | def ShowWindow(): 93 | ProgramRunStatusUpload.starList = [] 94 | ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow) 95 | msgWidget = QtWidgets.QWidget() 96 | msgWidgetLayout = QtWidgets.QGridLayout() 97 | ProgramRunStatusUpload.fen = QtWidgets.QComboBox() 98 | ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout() 99 | upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) 100 | upload.clicked.connect(ProgramRunStatusUpload.Upload) 101 | # 生成星星列表 102 | for i in [1, 1, 1, 1, 1]: 103 | ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"")) 104 | ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) 105 | ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) 106 | ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) 107 | ProgramRunStatusUpload.fen.setCurrentIndex(5) 108 | ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) 109 | msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) 110 | msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) 111 | msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1) 112 | msgWidgetLayout.addWidget(upload, 3, 1) 113 | msgWidget.setLayout(msgWidgetLayout) 114 | ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget) 115 | ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况")) 116 | ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) 117 | ProgramRunStatusUpload.msgWindow.show() 118 | 119 | def Upload(): 120 | try: 121 | QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}-UEngine").json()["Error"]) 122 | except: 123 | traceback.print_exc() 124 | QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) 125 | 126 | if __name__ == "__main__": 127 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 128 | iconPath = "{}/deepin-wine-runner.svg".format(programPath) 129 | app = QtWidgets.QApplication(sys.argv) 130 | ProgramRunStatusShow.ShowWindow() 131 | app.exec_() 132 | -------------------------------------------------------------------------------- /RemovePycacheFile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | def Remove(path): 4 | for i in os.listdir(path): 5 | nowPath = f"{path}/{i}" 6 | if os.path.isdir(nowPath): 7 | if i == "__pycache__": 8 | os.system(f"rm -rfv '{nowPath}'") 9 | else: 10 | Remove(nowPath) 11 | elif os.path.isfile(nowPath): 12 | if i == ".keep": 13 | os.system(f"rm -rfv '{nowPath}'") 14 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 15 | debPath = f"{programPath}/" 16 | Remove(debPath) 17 | -------------------------------------------------------------------------------- /Runner_tools/Android-id-reader/android-id.py: -------------------------------------------------------------------------------- 1 | #A python3 program 2 | #Please DO-NOT-RUNNING by root! 3 | import os 4 | import sys 5 | os.chdir(os.path.split(os.path.realpath(__file__))[0]) # 定位到gms.py所在目录以便脚本能正常调用 6 | 7 | print('-请在下方输入您的sudo密码') #提权,软件后期运行需要sudo,但是又要正确识别当前用户 8 | os.system('sudo echo "-提权成功!"') 9 | os.system('clear') 10 | 11 | a = os.popen('waydroid status').read() #检查Session运行状态,需要使用Waydroid-shell 12 | if a.find('STOPPED')!=-1: 13 | print('-请先启动容器Session!') 14 | print('-程序出现异常,正在退出') 15 | sys.exit(1) 16 | 17 | user=os.getlogin() #获取当前用户名 18 | waydroid_data='/home/'+user+'/.local/share/waydroid/data' 19 | 20 | print('-复制gms.sh脚本到安卓目录:',end='') 21 | if os.system(f'sudo cp gms.sh {waydroid_data}/media/0')!=0: 22 | print('失败!请自行查找问题!');sys.exit(1) #复制gms.sh文件,设定权限,这个gms.sh要在Android-shell跑 23 | else:print('完成!') 24 | print('-设置脚本权限:') 25 | if os.system(f'sudo chmod 777 {waydroid_data}/media/0/gms.sh')!=0: 26 | print('失败!请自行查找问题!');sys.exit(1) #复制gms.sh文件,设定权限,这个gms.sh要在Android-shell跑 27 | else:print('完成!') 28 | 29 | 30 | android_id=os.popen('sudo waydroid shell sh /sdcard/gms.sh').read() #执行脚本,拿到输出的Android-id 31 | #清理残留目录 32 | os.system('sudo waydroid shell rm /sdcard/gms.sh') 33 | if android_id.find('android_id')==-1: 34 | print('\n-未找到Android id!') 35 | print('-请在本帖子查看详细信息:https://bbs.deepin.org/post/261685') 36 | else: 37 | android_id=android_id[android_id.find('android_id'):] #获取安卓id,去掉不必要的信息 38 | print('\n下方为您的Android-id(调用安卓内输出,注册时只需要复制对应数字输入即可)') 39 | print(android_id) 40 | 41 | a=input('-请按回车或者输入任意键退出') 42 | sys.exit(0) 43 | -------------------------------------------------------------------------------- /Runner_tools/Android-id-reader/gms.sh: -------------------------------------------------------------------------------- 1 | #Android-Sh Script 2 | #临时获取GMS的脚本,执行后会删除 3 | #forked from docs.waydro.id 4 | 5 | ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";" 6 | -------------------------------------------------------------------------------- /Runner_tools/Checks/HoudiniCheck.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | if os.path.exists('/var/lib/waydroid/overlay/system/lib/libhoudini.so') == True and os.path.exists('/var/lib/waydroid/overlay/system/lib/arm') == True and os.path.exists('/var/lib/waydroid/overlay/system/lib64/arm64') == True and os.path.exists('/var/lib/waydroid/overlay/system/etc/init/init-houdini.rc') == True: 4 | sys.exit(0) 5 | sys.exit(1) 6 | -------------------------------------------------------------------------------- /Runner_tools/Checks/LSPCheck.py: -------------------------------------------------------------------------------- 1 | #Please running it by root! 2 | import os 3 | import sys 4 | user = os.getlogin() 5 | if os.path.exists(f'/home/{user}/.local/share/waydroid/data/adb/lspd') == True: 6 | sys.exit(0) 7 | sys.exit(1) 8 | -------------------------------------------------------------------------------- /Runner_tools/Checks/Language-Check.py: -------------------------------------------------------------------------------- 1 | #A Python3 Program 2 | #You don't running by sudo 3 | import os 4 | import sys 5 | 6 | f=open('/var/lib/waydroid/waydroid.cfg','r') #读取waydroid.cfg 7 | a=f.read() #读入waydroid.cfg至a变量 8 | f.close() #关闭文件防止bug/内存泄漏 9 | if a.find('persist.sys.timezone') !=-1 or a.find('persist.sys.language')!=-1 or a.find('persist.sys.country')!=-1: 10 | sys.exit(0) 11 | else: 12 | sys.exit(1) -------------------------------------------------------------------------------- /Runner_tools/Checks/MagiskCheck.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | if os.path.exists('/var/lib/waydroid/overlay_rw/system/system/etc/init/magisk') == True: 4 | sys.exit(0) 5 | sys.exit(1) 6 | -------------------------------------------------------------------------------- /Runner_tools/Checks/Widevine-Check.py: -------------------------------------------------------------------------------- 1 | #Python3 Program 2 | #不需要以root执行! 3 | import os 4 | import sys 5 | if os.path.exists('/var/lib/waydroid/overlay/vendor/etc/vintf/manifest') == True and os.path.exists('/var/lib/waydroid/overlay/vendor/lib/mediadrm') == True and os.path.exists('/var/lib/waydroid/overlay/vendor/lib64/mediadrm') == True:sys.exit(0) 6 | else:sys.exit(1) -------------------------------------------------------------------------------- /Runner_tools/Libhoudini_installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/houdini-install.tar.gz -d /tmp 3 | cd /tmp 4 | tar -xvf houdini-install.tar.gz 5 | cd houdini-install 6 | python3 houdini-install.py 7 | sudo python3 houdini-prop.py 8 | sudo rm /var/lib/waydroid/overlay/system/bin/resetprop #屑山,删掉多放的resetprop防止magisk不识别 9 | rm -rf ../houdini-install 10 | rm ../houdini-install.tar.gz 11 | -------------------------------------------------------------------------------- /Runner_tools/Magisk_Installer/Magisk.py: -------------------------------------------------------------------------------- 1 | #Python3-Program 2 | import os 3 | import sys 4 | os.chdir(os.path.split(os.path.realpath(__file__))[0]) # 定位到 data.img 所在目录以便脚本能正常调用 5 | waydroid_path = '/var/lib/waydroid' 6 | waydroid_data_mount = "/tmp/waydroid-runner-datamount" 7 | def Cleaner(): #清理安装目录产生的Cache 8 | print('-正在清理目录:',end='') 9 | os.system(f'sudo umount "{waydroid_data_mount}" && sudo rm -rf "{waydroid_data_mount}"') 10 | print('完成') 11 | 12 | #######--------------主程序部分----------------########### 13 | 14 | print('-请在下方输入您的sudo用户密码:') 15 | os.system('sudo echo -提权成功! && clear') 16 | if os.path.exists(waydroid_data_mount) == False: #在/tmp创建Cache 17 | os.system(f'sudo mkdir "{waydroid_data_mount}"') 18 | print('-开始安装Magisk-delta') 19 | if os.path.exists('data.img') == False: #检查文件完整性 20 | print('-关键文件缺失!请重新安装运行器!') 21 | sys.exit(1) 22 | os.system(f'sudo mount -o ro data.img "{waydroid_data_mount}"') #挂载关键文件镜像(设置挂载只读) 23 | 24 | if os.path.exists(f'{waydroid_path}/overlay_rw/system/system/etc/init/magisk') == True: #检测用户是否自行app里升级了Magisk-Delta 25 | print('-检测到您已经在app内安装过了Magisk-Delta,此脚本不会执行任何升级操作') 26 | if os.path.exists(f'{waydroid_path}/overlay/system/etc/init/magisk') == True: #检测是否有旧版残留,有就删掉 27 | print('-正在删除残留的Magisk-Delta文件:',end='') 28 | os.system(f'sudo rm -rf {waydroid_path}/overlay/system/etc/init/magisk') #清理旧版脚本的残留 29 | os.system(f'sudo rm -rf {waydroid_path}/overlay/system/etc/init/init-delta.rc') #清理旧版脚本的残留 30 | print('完成') 31 | print('-此后只需在Magisk-Delta的app里直接升级Magisk-Delta即可') 32 | Cleaner() 33 | print('\n程序运行结束!') 34 | sys.exit(0) 35 | else: #若没检测到用户自行升级了Magisk-Delta 36 | if os.path.exists(f'{waydroid_path}/overlay/system/etc/init/magisk') == True: #但是发现旧版脚本安装残留,那么删掉残留 37 | print('-检测到旧版Magisk文件残留,正在去除:',end='') 38 | if os.system('sudo rm -rf /var/lib/waydroid/overlay/system/etc/init/magisk.rc') == 0 and os.system('sudo rm -rf /var/lib/waydroid/overlay/system/etc/init/magisk') == 0:print('成功!') 39 | else:print('失败!请自行排查问题!') 40 | os.system(f'sudo mkdir -p /var/lib/waydroid/overlay_rw/system/system/etc/init') #复制data.img中文件到新Overlay_rw 41 | os.system(f'cd "{waydroid_data_mount}/system/etc/init" && sudo cp -rf * "{waydroid_path}/overlay_rw/system/system/etc/init"') 42 | print('-安装完成!') 43 | Cleaner() #清理目录 44 | print('\n程序运行结束!') 45 | sys.exit(0) 46 | -------------------------------------------------------------------------------- /Runner_tools/Magisk_Installer/data.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/Runner_tools/Magisk_Installer/data.img -------------------------------------------------------------------------------- /Runner_tools/Off-function/Allow-rotate.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #Please running by root! 3 | 4 | import os 5 | import sys 6 | 7 | a = os.popen('waydroid status').read() #检查运行状态 8 | if a.find('STOPPED')!=-1: 9 | print('-请先启动容器Session!') 10 | print('-程序出现异常,正在退出') 11 | sys.exit(1) 12 | 13 | print('-正在设置允许应用旋转屏幕') 14 | if os.system('sudo waydroid shell wm set-fix-to-user-rotation disabled') == 0: 15 | print('-完成!') 16 | sys.exit(0) 17 | else: 18 | print('未知异常,程序即将退出!') 19 | -------------------------------------------------------------------------------- /Runner_tools/Off-function/Off-cursor.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import os 5 | 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在关闭Waydroid窗口下多显示鼠标的功能:',end='') #关闭Wayland窗口下显示鼠标功能 13 | if os.system('waydroid prop set persist.waydroid.cursor_on_subsurface false')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) -------------------------------------------------------------------------------- /Runner_tools/Off-function/Off-windows-mode.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import os 5 | 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在关闭多窗口模式:',end='') #关闭功能 13 | if os.system('waydroid prop set persist.waydroid.multi_windows false')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) 18 | -------------------------------------------------------------------------------- /Runner_tools/Sway-X11/Sway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/Runner_tools/Sway-X11/Sway.png -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Clipboard-enable.py: -------------------------------------------------------------------------------- 1 | #A Python3 Program 2 | #DO NOT RUNNING BY SUDO! 3 | import os 4 | import sys 5 | 6 | def Running_err(): #遇到异常通用退出函数 7 | print('-程序运行出现异常,即将退出') 8 | sys.exit(1) 9 | 10 | print('-请在下方输入您当前的sudo用户密码') #拿到sudo权限 11 | os.system('sudo echo 提权完成! && clear') 12 | 13 | print('-正在开启全局剪切板功能') 14 | if os.system('lsb_release -a')!=0: #检查是否能获取系统版本 15 | print('-警告:您的系统没有lsb_release指令,请安装它!') 16 | Running_err() 17 | 18 | sys_name=os.popen('lsb_release -a').read() #获取并判断系统版本,删掉不支持的 19 | if sys_name.find('deepin')!=-1 and sys_name.find('apricot')!=-1: 20 | print('-不支持Deepin-v20!');Running_err() 21 | if sys_name.find('UOS')!=-1: 22 | print('-不支持统信UOS!');Running_err() 23 | 24 | print('\n-正在安装wl-clipboard') #先安装wl-clipboard 25 | if os.system('sudo apt update && sudo apt install wl-clipboard -y')!=0: 26 | print('-您的系统没有wl-clipboard包,无法开启剪切板同步功能!') 27 | Running_err() 28 | 29 | print('\n-正在添加pyclip(pip3包)') 30 | os.system('python3 -m pip install pyclip -i https://pypi.tuna.tsinghua.edu.cn/simple --break-system-packages') 31 | 32 | print('\n-添加成功,程序运行完成!重启电脑后剪切板互通功能生效!') 33 | sys.exit(0) 34 | -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Do-not-rotate.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #Please running by root! 3 | 4 | import os 5 | import sys 6 | 7 | a = os.popen('waydroid status').read() #检查运行状态 8 | if a.find('STOPPED')!=-1: 9 | print('-请先启动容器Session!') 10 | print('-程序出现异常,正在退出') 11 | sys.exit(1) 12 | 13 | print('-正在应用设置') 14 | if os.system('sudo waydroid shell wm set-fix-to-user-rotation enabled') == 0: 15 | print('-完成!') 16 | sys.exit(0) 17 | else: 18 | print('未知异常,程序即将退出!') 19 | sys.exit(1) 20 | -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Language.py: -------------------------------------------------------------------------------- 1 | #此应用请以root身份运行! 2 | #Please running by root! 3 | import os 4 | import sys 5 | os.system('waydroid container stop') 6 | f = open('/var/lib/waydroid/waydroid.cfg','r+') 7 | a=f.read() 8 | f.close() 9 | if a.find('persist.sys.timezone')!=-1: 10 | print('警告:您已修改过语言!程序即将退出!');sys.exit(1) 11 | 12 | #-----------Main----------# 13 | f = open('/var/lib/waydroid/waydroid.cfg','a+') 14 | f.write('\npersist.sys.timezone=Asia/Shanghai\npersist.sys.language=zh\npersist.sys.country=CN') 15 | f.close() 16 | print('修改成功,正在应用更改:',end='') 17 | if os.system('waydroid upgrade -o')!=0:print('失败!请自行排查问题!');sys.exit(1) 18 | else:print('成功!') 19 | print('重启电脑后生效!或者终端输入sudo systemctl restart waydroid-container.service回车后生效!') 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Multi-windows-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/Runner_tools/SystemConfigs/Multi-windows-full.png -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Multi_windows.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import time 5 | import os 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在设置多窗口模式:',end='') 13 | if os.system('waydroid prop set persist.waydroid.multi_windows true')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) 18 | 19 | 20 | -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/Show-cursor.py: -------------------------------------------------------------------------------- 1 | #Python3 Program 2 | #不要使用sudo/root用户执行!DO NOT RUNNING BY ROOT! 3 | #请在Session运行时执行此脚本!Please while session running,then running the Script! 4 | 5 | import os #关键引用 6 | import sys 7 | 8 | print('如果你使用GNOME/KDE的DE,请不要执行这个脚本,否则会多显示一个鼠标!') #温馨提示 9 | a = os.popen('waydroid status').read() #检查运行状态 10 | if a.find('STOPPED')!=-1: 11 | print('-请先启动容器Session!') 12 | print('-程序出现异常,正在退出') 13 | sys.exit(1) 14 | 15 | print('-正在设置启动Waydroid后会多留一个鼠标') #开启功能 16 | if os.system('waydroid prop set persist.waydroid.cursor_on_subsurface true')!=0: 17 | print('失败!\n-未知异常,程序即将退出!') 18 | sys.exit(1) 19 | print('成功!重启Waydroid后生效!') 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /Runner_tools/SystemConfigs/waydroid-choose-gpu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #This Script is forked from github @Quackdoc 3 | #分发代码时请遵守同@Quackdoc使用的GPLv3协议 4 | 5 | lspci="$(lspci -nn | grep '\[03')" # https://pci-ids.ucw.cz/read/PD/03 6 | 7 | echo -e "请选择您需要使Waydroid工作的GPU(输入数字序号即可):\n" 8 | gpus=() 9 | i=0 10 | while IFS= read lspci; do 11 | gpus+=("$lspci") 12 | echo " $((++i)). $lspci" 13 | done < <(echo "$lspci") 14 | echo "" 15 | while [ -z "$gpuchoice" ]; do 16 | read -erp ">> Number of GPU to pass to WayDroid (1-${#gpus[@]}): " ans 17 | if [[ "$ans" =~ [0-9]+ && $ans -ge 1 && $ans -le ${#gpus[@]} ]]; then 18 | gpuchoice="${gpus[$((ans-1))]%% *}" # e.g. "26:00.0" 19 | fi 20 | done 21 | 22 | echo "" 23 | echo "请确认这是你需要使Waydroid工作的GPU" 24 | echo "" 25 | 26 | ls -l /dev/dri/by-path/ | grep -i $gpuchoice 27 | 28 | echo "" 29 | 30 | card=$(ls -l /dev/dri/by-path/ | grep -i $gpuchoice | grep -o "card[0-9]") 31 | rendernode=$(ls -l /dev/dri/by-path/ | grep -i $gpuchoice | grep -o "renderD[1-9][1-9][1-9]") 32 | 33 | echo /dev/dri/$card 34 | echo /dev/dri/$rendernode 35 | 36 | cp /var/lib/waydroid/lxc/waydroid/config_nodes /var/lib/waydroid/lxc/waydroid/config_nodes.bak 37 | #lxc.mount.entry = /dev/dri dev/dri none bind,create=dir,optional 0 0 38 | sed -i '/dri/d' /var/lib/waydroid/lxc/waydroid/config_nodes 39 | echo "lxc.mount.entry = /dev/dri/$rendernode dev/dri/renderD128 none bind,create=file,optional 0 0" >> /var/lib/waydroid/lxc/waydroid/config_nodes 40 | echo "GPU切换完成!" 41 | -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Image_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ -f /usr/share/waydroid-extra/images/system.img ]] && [[ -f /usr/share/waydroid-extra/images/vendor.img ]]; then 3 | echo 已安装镜像,忽略 4 | exit 5 | fi 6 | sudo modprobe binder_linux 7 | lsmod | grep -e binder_linux 8 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 9 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 10 | echo 按回车继续 11 | read 12 | fi 13 | cd /tmp 14 | sudo mkdir -p /usr/share/waydroid-extra/images 15 | if [[ ! -f /usr/share/waydroid-extra/images/system.img ]]; then 16 | echo 拉取 system.img 17 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/system.7z 18 | 7z x system.7z 19 | sudo cp system.img /usr/share/waydroid-extra/images/ -v 20 | fi 21 | if [[ ! -f /usr/share/waydroid-extra/images/vendor.img ]]; then 22 | echo 拉取 vendor.img 23 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/vendor.7z 24 | 7z x vendor.7z 25 | sudo cp vendor.img /usr/share/waydroid-extra/images/ -v 26 | fi 27 | rm -rf vendor.img vendor.7z system.7z system.img 28 | sudo systemctl restart waydroid-container.service 29 | sudo waydroid init -f -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Installer/Install-cn.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "###Waydroid一键配置程序###" 4 | echo "本程序将安装Waydroid本体和GAPPS镜像" 5 | echo "" 6 | which waydroid 7 | # 获取程序路径 8 | programPath=`dirname $0` 9 | if [[ $? == 0 ]]; then 10 | echo Waydroid 已安装,是否重复安装? 11 | echo 是请按回车,否则按右上角 × 12 | read 13 | fi 14 | sudo modprobe binder_linux 15 | lsmod | grep -e binder_linux 16 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 17 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 18 | echo 测试过可以使用的内核:https://gfdgdxi.lanzoue.com/b01r54ple 密码:35j0 19 | echo 按回车继续 20 | read 21 | fi 22 | x11=0 23 | if [[ $XDG_SESSION_TYPE == "x11" ]]; then 24 | echo 警告:你当前使用的是 x11 协议而非 Wayland 协议,Waydroid 只支持 Wayland 协议 25 | echo 输入 Y 安装 Sway 或 Weston 以能在 X11 下运行 Waydroid(体验较差) 26 | x11=1 27 | read choose 28 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 29 | echo Try to install sway 30 | cd `dirname $0` 31 | bash InstallSway.sh 32 | if [[ $? != 0 ]]; then 33 | echo Sway 安装失败,安装 Weston 34 | bash InstallWeston.sh 35 | fi 36 | fi 37 | fi 38 | # 检测 UEngine 是否安装 39 | which uengine 40 | if [[ $? == 0 ]]; then 41 | which uengine-loading-ubuntu 42 | if [[ $? == 0 ]]; then 43 | echo "Waydroid 与 UEngine 冲突,是否要先卸载 UEngine?[Y/N]" 44 | read choose 45 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 46 | sudo apt purge uengine -y 47 | sudo apt purge uengine-modules-dkms uengine-android-image -y 48 | sudo apt-mark unhold hold lxc lxc-templates liblxc1 liblxc-common lxc-utils 49 | sudo apt update 50 | sudo apt install aptitude -y 51 | sudo aptitude install lxc -y 52 | sudo rm -v /usr/share/applications/uengine-loading-ubuntu.desktop 53 | sudo rm -v /etc/xdg/autostart/uengine-loading-ubuntu.desktop 54 | for username in $(ls /home) 55 | do 56 | echo /home/$username 57 | sudo rm /home/$username/uengine-launch/run_daemon.sh 58 | done 59 | sudo rm -v /usr/bin/uengine-loading-binder 60 | sudo rm -v /usr/share/polkit-1/actions/com.deepin.pkexec.binder.loader.policy 61 | fi 62 | else 63 | echo "Waydroid 与 UEngine 冲突,是否要先卸载 UEngine?[Y/N]" 64 | read choose 65 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 66 | sudo apt purge uengine -y 67 | sudo apt purge uengine-modules-dkms uengine-android-image -y 68 | fi 69 | fi 70 | fi 71 | echo 选择源: 72 | echo 1. 国内源(带宽小但是国内容易访问) 73 | echo 2. Sourceforge 源(带宽大但是国内较难访问) 74 | read choose 75 | url="http://gfdgdxi.v5.idcfengye.com/waydroid-runner/waydroid-deb-diy/" 76 | if [[ $choose == "1" ]]; then 77 | url="http://gfdgdxi.v5.idcfengye.com/waydroid-runner/waydroid-deb-diy/" 78 | else 79 | if [[ $choose == "2" ]]; then 80 | url="https://master.dl.sourceforge.net/project/waydroid-runner-apt-mirror/" 81 | else 82 | echo "输入错误,默认使用国内源" 83 | url="http://gfdgdxi.v5.idcfengye.com/waydroid-runner/waydroid-deb-diy/" 84 | fi 85 | fi 86 | rm -rf /tmp/gfdgd-xi-sources 87 | mkdir -p /tmp/gfdgd-xi-sources 88 | wget -P /tmp/gfdgd-xi-sources $url/gpg.asc 89 | #wget -P /tmp/gfdgd-xi-sources $url/github.list 90 | gpg --dearmor /tmp/gfdgd-xi-sources/gpg.asc 91 | #sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FD6EEA1F20CD4B27 92 | if [[ ! -f /etc/deepin_version ]] && [[ -f /etc/deepin-version ]]; then 93 | isDeepin=0 94 | lsb_release -i | grep -i deepin 95 | if [[ $? == 0 ]]; then 96 | isDeepin=1 97 | fi 98 | lsb_release -i | grep -i uos 99 | if [[ $? == 0 ]]; then 100 | isDeepin=1 101 | fi 102 | if [[ $isDeepin == 1 ]]; then 103 | echo 警告! 104 | echo 您当前使用的是 Deepin20.9/UOS,如果继续安装 Waydroid 则需要升级系统的 lxc,很可能出现问题,是否继续? 105 | echo 按回车继续 106 | read 107 | sudo bash -c 'echo "deb http://seafile.jyx2048.com:2345/waydroid-runner/lxc/ ./" > "/etc/apt/sources.list.d/gfdgdxi-list-lxc.list"' 108 | fi 109 | fi 110 | sudo cp -v /tmp/gfdgd-xi-sources/gpg.asc.gpg /etc/apt/trusted.gpg.d/gfdgdxi-list-waydroid.gpg 111 | #sudo cp -v /tmp/gfdgd-xi-sources/github.list /etc/apt/sources.list.d/gfdgdxi-list-waydroid.list 112 | sudo bash -c "echo 'deb $url ./' > /etc/apt/sources.list.d/gfdgdxi-list-waydroid.list" 113 | sudo apt update 114 | sudo apt install waydroid lxc -y 115 | sudo systemctl restart waydroid-container.service 116 | sudo waydroid init -f 117 | if [[ x11 == 1 ]]; then 118 | zenity --info "--text=Waydroid安装完成,在打开 Waydroid 前请先打开 Sway 或者 Weston 以便正常使用 Waydroid(目前支持自动调用)" --no-wrap 119 | else 120 | zenity --info "--text=Waydroid安装完成!" --no-wrap 121 | fi 122 | 123 | echo 您已安装Waydroid,是否对其进行一些默认配置? 124 | echo 按回车键以进行配置,如无需配置可按右上角关闭按钮关闭页面 125 | read 126 | python3 $programPath/Waydroid-AutoConfig.py 127 | -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo modprobe binder_linux 3 | lsmod | grep -e binder_linux 4 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 5 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 6 | echo 按回车继续 7 | read 8 | fi 9 | if [[ $XDG_SESSION_TYPE == "x11" ]]; then 10 | echo 警告:你当前使用的是 x11 协议而非 Wayland 协议,Waydroid 只支持 Wayland 协议 11 | echo 按回车键忽略该警告继续安装Waydroid本体 12 | read 13 | fi 14 | sudo apt install curl ca-certificates -y 15 | curl https://repo.waydro.id | sudo bash 16 | sudo apt install waydroid -y 17 | echo Waydroid本体安装完成!按回车键退出! 18 | read -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Installer/InstallSway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | which sway 3 | if [[ $? == 0 ]]; then 4 | echo Sway have already installed 5 | exit 0 6 | fi 7 | sudo apt update 8 | # 判断 apt 源里是否有 sway 9 | apt list sway | grep sway 10 | if [[ $? == 0 ]]; then 11 | echo 从 apt 源安装 Sway 12 | sudo apt update 13 | sudo apt install sway aria2 -y 14 | # 这个包还未构建 15 | rm -rfv /tmp/sway-desktop-icon.deb 16 | aria2c -x 16 -s 16 http://sway.waydroid-runner.gfdgdxi.top/sway-launcher-icon_1.0.0_all.deb -d /tmp -o sway-desktop-icon.deb 17 | sudo apt install /tmp/sway-desktop-icon.deb 18 | exit 0 19 | fi 20 | if [[ -f /etc/deepin_version ]]; then 21 | cat /etc/deepin_version | grep 23 22 | if [[ $? == 0 ]]; then 23 | rm -rf /tmp/gfdgd-xi-sources 24 | mkdir -p /tmp/gfdgd-xi-sources 25 | wget -P /tmp/gfdgd-xi-sources http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/gpg.asc 26 | #wget -P /tmp/gfdgd-xi-sources http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/sources/github.list 27 | gpg --dearmor /tmp/gfdgd-xi-sources/gpg.asc 28 | sudo bash -c 'echo "deb http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/ ./" > "/etc/apt/sources.list.d/gfdgdxi-list-lxc.list"' 29 | sudo apt update 30 | sudo apt install sway -y 31 | exit 0 32 | fi 33 | fi 34 | echo 该系统暂时无法安装 Sway! 35 | exit 1 36 | -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Installer/InstallWeston.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | which weston 3 | if [[ $? == 0 ]]; then 4 | echo Weston have already installed 5 | exit 0 6 | fi 7 | sudo apt update 8 | sudo apt install weston aria2 -y 9 | rm -rfv /tmp/weston-desktop-icon.deb 10 | aria2c -x 16 -s 16 http://sway.waydroid-runner.gfdgdxi.top/weston-launcher-icon_1.0.0_all.deb -d /tmp -o weston-desktop-icon.deb 11 | sudo apt reinstall /tmp/weston-desktop-icon.deb 12 | -------------------------------------------------------------------------------- /Runner_tools/Waydroid_Installer/Waydroid-AutoConfig.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | #DO NOT RUNNING BY ROOT! 3 | import os 4 | import sys 5 | import time 6 | import subprocess 7 | programPath = os.path.split(os.path.realpath(__file__))[0] # 获取程序路径 8 | 9 | print('-请在下方输入您的sudo用户密码:') 10 | os.system('sudo echo 提权完成! && clear') 11 | print('本程序将默认开启以下功能:') 12 | print('1.开启多窗口模式') 13 | print('2.默认防止屏幕旋转') 14 | #print('3.设置语言为中文/简体') 15 | print('3.Deepin-v23下显示Wayland的安卓窗口光标') 16 | print('4.开启剪切板互通功能') 17 | print('-建议使用Ubuntu等国际化Debian发行版') 18 | print() 19 | 20 | choose = input('-是否需要安装Magisk-Delta?是请输入y回车,不需要请直接回车:') ##Magisk-Delta安装 21 | os.system("sudo waydroid init -f") # 防止因为没有 init 导致无法正常识别 session start 输出 22 | if choose == 'y' or choose == 'Y': 23 | print('-正在安装Magisk-Delta:',end="") 24 | if not subprocess.getstatusoutput(f'python3 "{programPath}/../Magisk_Installer/Magisk.py"')[0]: 25 | print('成功!') 26 | else:print('失败!请自行查找原因!') 27 | else:print('-已跳过Magisk-Delta安装,如果您以后需要可以在Waydroid运行器里安装') 28 | 29 | if subprocess.getstatusoutput('lsb_release -a')[0]: ##检测系统版本,异常给os_release变量返回-1 30 | print('-运行部分异常,程序无法读取操作系统版本,请自行安装lsb_release组件!') 31 | os_release = -1 32 | flag_support = 0 #检测不到默认可以 33 | else: 34 | os_release = subprocess.getstatusoutput('lsb_release -a')[1] 35 | flag_unsupport = 0 #检测系统,deepin 20和UOS要特殊配置 36 | if (os_release.find('deepin')!=-1 and os_release.find('20')!=-1) or os_release.find('UOS') != -1: 37 | flag_unsupport = 1 38 | 39 | # 国内源的 Waydroid 已默认设置中文语言 40 | #以下程序先执行不需要启动session的部分,然后再启动需要启动session的部分 41 | #print('-正在设置语言为中文/简体:',end='') #先设置语言 42 | #if not subprocess.getstatusoutput(f'sudo python3 "{programPath}/../SystemConfigs/Language.py"')[0]: 43 | # print('成功!') 44 | #else:print('失败,请自行排查问题!') 45 | 46 | if flag_unsupport==1: #剪切板先检测系统,再安装,目前不支持deepin 20/UOS 47 | print('-您的系统不支持剪切板互通,已跳过安装剪切板功能') 48 | else: 49 | print('-正在开启剪切板支持:', end='') 50 | if os.system(f'python3 "{programPath}/../SystemConfigs/Clipboard-enable.py"') == 0: #这里要用os.system(),这一步时间会比较长,需要用户能看得到输出内容! 51 | print('成功!\n') 52 | else: 53 | print('失败,请自行排查问题!\n') 54 | 55 | ###接下来启动Waydroid Session进行下一步配置 56 | print('\n-正在重启Waydroid Container:', end='') 57 | if not subprocess.getstatusoutput('sudo systemctl restart waydroid-container.service')[0]: ##先重启容器 58 | print('成功!') 59 | else:print('失败,请自行排查问题!') 60 | 61 | print('-正在启动Waydroid Session,耗时会比较长,请耐心等待(一般不超过6分钟)') 62 | print('正在等待启动Waydroid Session') ###启动Waydroid Session 63 | os.popen('waydroid session start') 64 | time.sleep(5) #等Waydroid完全启动进程后再检测 65 | while True: #循环检测Waydroid session是否已启动 66 | WaydroidStatus = os.popen('sudo waydroid shell getprop init.svc.bootanim').read() #使用Android Shell内部识别启动状态 67 | if WaydroidStatus.find('stopped') != -1: ###检测session已经启动 68 | time.sleep(3) 69 | print('\n已检测Waydroid-session启动!') 70 | break 71 | time.sleep(6) 72 | 73 | if flag_unsupport == 1 or os.getenv("XDG_SESSION_TYPE") == "x11": #多窗口先检测系统,再安装,目前不支持deepin 20/UOS以及使用x11协议的情况 74 | print('-检测到您使用不支持的系统/使用X11协议,已跳过多窗口模式开启功能') 75 | else: 76 | print('-正在开启多窗口模式:',end='') #检测后应用多窗口模式 77 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Multi_windows.py"')[0]==0: 78 | print('成功!') 79 | else:print('失败,请自行排查问题!') 80 | 81 | print('-正在强制防止Waydroid内应用旋转:', end='') #开启防旋转功能 82 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Do-not-rotate.py"')[0]==0: 83 | print('成功!') 84 | else:print('失败,请自行排查问题!') 85 | 86 | if os_release.find('deepin') != -1 and os_release.find('23') != -1 and os.getenv("XDG_SESSION_TYPE") == "x11": ##Deepin v23修复不显示光标的问题 87 | print('-检测到您在使用deepin v23,正在修复Wayland安卓窗口下不显示光标的问题:',end='') 88 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Show-cursor.py"')[0] == 0: 89 | print('成功!') 90 | else:print('失败,请自行排查问题!') 91 | 92 | print() 93 | print('Waydroid已自动配置完成,重启电脑后完全生效!') 94 | print('请按任意键退出') 95 | input() 96 | sys.exit(0) -------------------------------------------------------------------------------- /Runner_tools/Widevine_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd /tmp 3 | rm -rfv widevine-installer 4 | mkdir -p widevine-installer 5 | cd widevine-installer 6 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/Widevine-installer.tar 7 | tar -xvf Widevine-installer.tar 8 | sudo python3 widevine-install.py -------------------------------------------------------------------------------- /UI/AutoConfig.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'AutoConfig.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.11.3 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_MainWindow(object): 12 | def setupUi(self, MainWindow): 13 | MainWindow.setObjectName("MainWindow") 14 | MainWindow.resize(800, 600) 15 | self.centralwidget = QtWidgets.QWidget(MainWindow) 16 | self.centralwidget.setObjectName("centralwidget") 17 | self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) 18 | self.verticalLayout_3.setObjectName("verticalLayout_3") 19 | self.horizontalLayout = QtWidgets.QHBoxLayout() 20 | self.horizontalLayout.setObjectName("horizontalLayout") 21 | self.searchTips = QtWidgets.QLabel(self.centralwidget) 22 | self.searchTips.setObjectName("searchTips") 23 | self.horizontalLayout.addWidget(self.searchTips) 24 | self.searchThings = QtWidgets.QLineEdit(self.centralwidget) 25 | self.searchThings.setObjectName("searchThings") 26 | self.horizontalLayout.addWidget(self.searchThings) 27 | self.saerchBotton = QtWidgets.QPushButton(self.centralwidget) 28 | self.saerchBotton.setObjectName("saerchBotton") 29 | self.horizontalLayout.addWidget(self.saerchBotton) 30 | self.verticalLayout_3.addLayout(self.horizontalLayout) 31 | self.searchList = QtWidgets.QListView(self.centralwidget) 32 | self.searchList.setObjectName("searchList") 33 | self.verticalLayout_3.addWidget(self.searchList) 34 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout() 35 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 36 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 37 | self.horizontalLayout_2.addItem(spacerItem) 38 | self.getInfoButton = QtWidgets.QPushButton(self.centralwidget) 39 | self.getInfoButton.setObjectName("getInfoButton") 40 | self.horizontalLayout_2.addWidget(self.getInfoButton) 41 | self.getFen = QtWidgets.QPushButton(self.centralwidget) 42 | self.getFen.setObjectName("getFen") 43 | self.horizontalLayout_2.addWidget(self.getFen) 44 | self.runBotton = QtWidgets.QPushButton(self.centralwidget) 45 | self.runBotton.setObjectName("runBotton") 46 | self.horizontalLayout_2.addWidget(self.runBotton) 47 | self.verticalLayout_3.addLayout(self.horizontalLayout_2) 48 | MainWindow.setCentralWidget(self.centralwidget) 49 | self.menubar = QtWidgets.QMenuBar(MainWindow) 50 | self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36)) 51 | self.menubar.setObjectName("menubar") 52 | self.menu = QtWidgets.QMenu(self.menubar) 53 | self.menu.setObjectName("menu") 54 | self.menu_2 = QtWidgets.QMenu(self.menubar) 55 | self.menu_2.setObjectName("menu_2") 56 | MainWindow.setMenuBar(self.menubar) 57 | self.about = QtWidgets.QAction(MainWindow) 58 | self.about.setObjectName("about") 59 | self.exitProgram = QtWidgets.QAction(MainWindow) 60 | self.exitProgram.setObjectName("exitProgram") 61 | self.help = QtWidgets.QAction(MainWindow) 62 | self.help.setObjectName("help") 63 | self.openFile = QtWidgets.QAction(MainWindow) 64 | self.openFile.setObjectName("openFile") 65 | self.actionGitlink = QtWidgets.QAction(MainWindow) 66 | self.actionGitlink.setCheckable(True) 67 | self.actionGitlink.setObjectName("actionGitlink") 68 | self.actionGitee = QtWidgets.QAction(MainWindow) 69 | self.actionGitee.setCheckable(True) 70 | self.actionGitee.setObjectName("actionGitee") 71 | self.actionGithub = QtWidgets.QAction(MainWindow) 72 | self.actionGithub.setCheckable(True) 73 | self.actionGithub.setChecked(True) 74 | self.actionGithub.setObjectName("actionGithub") 75 | self.action_IPv6 = QtWidgets.QAction(MainWindow) 76 | self.action_IPv6.setCheckable(True) 77 | self.action_IPv6.setObjectName("action_IPv6") 78 | self.action = QtWidgets.QAction(MainWindow) 79 | self.action.setCheckable(True) 80 | self.action.setObjectName("action") 81 | self.action_2 = QtWidgets.QAction(MainWindow) 82 | self.action_2.setCheckable(True) 83 | self.action_2.setChecked(False) 84 | self.action_2.setObjectName("action_2") 85 | self.action_3 = QtWidgets.QAction(MainWindow) 86 | self.action_3.setCheckable(True) 87 | self.action_3.setObjectName("action_3") 88 | self.menu.addAction(self.openFile) 89 | self.menu.addSeparator() 90 | self.menu.addAction(self.exitProgram) 91 | self.menu_2.addAction(self.actionGithub) 92 | self.menu_2.addAction(self.actionGitee) 93 | self.menu_2.addAction(self.actionGitlink) 94 | self.menu_2.addAction(self.action_IPv6) 95 | self.menu_2.addAction(self.action_2) 96 | self.menu_2.addAction(self.action_3) 97 | self.menu_2.addAction(self.action) 98 | self.menubar.addAction(self.menu.menuAction()) 99 | self.menubar.addAction(self.menu_2.menuAction()) 100 | 101 | self.retranslateUi(MainWindow) 102 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 103 | 104 | def retranslateUi(self, MainWindow): 105 | _translate = QtCore.QCoreApplication.translate 106 | MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本")) 107 | self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):")) 108 | self.saerchBotton.setText(_translate("MainWindow", "搜索")) 109 | self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍")) 110 | self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论")) 111 | self.runBotton.setText(_translate("MainWindow", "安装")) 112 | self.menu.setTitle(_translate("MainWindow", "程序")) 113 | self.menu_2.setTitle(_translate("MainWindow", "切换源")) 114 | self.about.setText(_translate("MainWindow", "关于")) 115 | self.exitProgram.setText(_translate("MainWindow", "退出程序")) 116 | self.help.setText(_translate("MainWindow", "帮助")) 117 | self.openFile.setText(_translate("MainWindow", "打开本地部署脚本")) 118 | self.actionGitlink.setText(_translate("MainWindow", "Gitlink 源(推荐)")) 119 | self.actionGitee.setText(_translate("MainWindow", "Gitee 源")) 120 | self.actionGithub.setText(_translate("MainWindow", "Github 源(国外用户推荐)")) 121 | self.action_IPv6.setText(_translate("MainWindow", "备用源1(只限IPv6用户)")) 122 | self.action.setText(_translate("MainWindow", "本地测试源(127.0.0.1)")) 123 | self.action_2.setText(_translate("MainWindow", "备用源2")) 124 | self.action_3.setText(_translate("MainWindow", "备用源3")) 125 | 126 | -------------------------------------------------------------------------------- /UI/AutoConfig.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | 自动部署脚本 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 搜索内容(为空代表显示所有内容): 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 搜索 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | Qt::Horizontal 48 | 49 | 50 | 51 | 40 52 | 20 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 获取选中项介绍 61 | 62 | 63 | 64 | 65 | 66 | 67 | 获取/提交选中项的评分和评论 68 | 69 | 70 | 71 | 72 | 73 | 74 | 安装 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 0 86 | 0 87 | 800 88 | 36 89 | 90 | 91 | 92 | 93 | 程序 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 切换源 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 关于 117 | 118 | 119 | 120 | 121 | 退出程序 122 | 123 | 124 | 125 | 126 | 帮助 127 | 128 | 129 | 130 | 131 | 打开本地部署脚本 132 | 133 | 134 | 135 | 136 | true 137 | 138 | 139 | true 140 | 141 | 142 | Gitlink 源(推荐) 143 | 144 | 145 | 146 | 147 | true 148 | 149 | 150 | Gitee 源 151 | 152 | 153 | 154 | 155 | true 156 | 157 | 158 | Github 源(国外用户推荐) 159 | 160 | 161 | 162 | 163 | true 164 | 165 | 166 | 备用源1(只限IPv6用户) 167 | 168 | 169 | 170 | 171 | true 172 | 173 | 174 | 本地测试源(127.0.0.1) 175 | 176 | 177 | 178 | 179 | true 180 | 181 | 182 | false 183 | 184 | 185 | 备用源2 186 | 187 | 188 | 189 | 190 | true 191 | 192 | 193 | 备用源3 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /UpdateTime.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 更新构建时间 3 | import os 4 | import json 5 | import platform 6 | import datetime 7 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 8 | with open(f"{programPath}/deb/opt/apps/spark-waydroid-runner/files/information.json", "r") as file: 9 | info = json.loads(file.read()) 10 | info["Time"] = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + " " + platform.platform() 11 | with open(f"{programPath}/deb/opt/apps/spark-waydroid-runner/files/information.json", "w") as file: 12 | file.write(json.dumps(info, ensure_ascii=False, indent=4)) 13 | -------------------------------------------------------------------------------- /aapt/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/aapt/aapt -------------------------------------------------------------------------------- /aapt/aapt2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/aapt/aapt2 -------------------------------------------------------------------------------- /aapt/libaapt.so: -------------------------------------------------------------------------------- 1 | libaapt.so.0 -------------------------------------------------------------------------------- /aapt/libaapt.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/aapt/libaapt.so.0 -------------------------------------------------------------------------------- /aapt/libandroidfw.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/aapt/libandroidfw.so.0 -------------------------------------------------------------------------------- /aapt/run-aapt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 判断是不是 Deepin23 3 | cat /etc/deepin_version | grep 23 4 | if [[ $? != 0 ]]; then 5 | # 如果不是 6 | aapt "$@" 7 | exit $? 8 | fi 9 | # 如果是 10 | programPath=$(cd $(dirname $0); pwd) 11 | echo $programPath 12 | export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$programPath" 13 | $programPath/aapt "$@" 14 | exit $? 15 | -------------------------------------------------------------------------------- /about/index.html: -------------------------------------------------------------------------------- 1 | 2 | 关于 Waydroid 运行器 3 | 4 | 5 | 6 | 7 | 8 | 9 |

10 |
11 |

介绍

12 |

Waydroid运行器是可以通过GUI形式半自动配置Waydroid的工具,使用户使用Waydroid更为方便。Waydroid本身存在很多因AOSP未考虑PC用户而产生的问题(如没有自带Houdini,默认英语,默认非小窗模式)而使用户使用起来非常难受,本运行器支持以GUI形式自动化安装以及配置Waydroid,并会创建快捷控制的快捷方式,可以用于玩游戏/刷视频/Android开发等。

13 |

若您对本项目有疑问/需要一些帮助,可以进Q群:872491938,我们会尽其所能帮助(偶尔吹水也可以)

14 |

starfork

15 |

项目地址

16 |

Gitee:https://gitee.com/gfdgd-xi/waydroid-runner

17 |

Github:https://github.com/gfdgd-xi/waydroid-runner

18 |

Sourceforge:https://sourceforge.net/projects/waydroid-runner

19 |
20 |

使用截图

21 |

22 |

23 |

24 |

25 |

26 |

27 |

28 |

29 |

30 |

31 |

32 |
33 |

©2023~Now gfdgd xi、Bail、LFRon

34 | 35 | 41 | -------------------------------------------------------------------------------- /builer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/builer.png -------------------------------------------------------------------------------- /deb/DEBIAN/control: -------------------------------------------------------------------------------- 1 | Package: spark-waydroid-runner 2 | Version: 1.2.0.1~230930 3 | Architecture: all 4 | Section: utils 5 | Installed-Size: 3644 6 | Maintainer: gfdgd xi <3025613752@qq.com> 7 | Depends: python3,python3-pip, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, curl, python3-requests, adb, fonts-noto-cjk, python3-numpy, wget, aria2, python3-pyqt5, python3-urllib3, zenity, python3-pip 8 | Recommends: aapt, python3-matplotlib, inotify-tools 9 | Priority: optional 10 | Homepage: https://gitee.com/gfdgd-xi/waydroid-runner 11 | Description: Waydroid 运行器 12 | -------------------------------------------------------------------------------- /deb/DEBIAN/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ln -s /opt/apps/spark-waydroid-runner/files/waydroid-runner /usr/bin/waydroid-runner 3 | ln -s /opt/apps/spark-waydroid-runner/files/AutoShell/main.py /usr/bin/waydroid-runner-auto-install-bash 4 | 5 | python3 -m pip install --upgrade pyclip --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true 6 | # 刷新图标缓存 7 | # 因为 Ubuntu 的问题,省略 8 | gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true 9 | # 向服务器返回安装数加1(不显示内容且忽略错误) 10 | python3 /opt/apps/spark-waydroid-runner/files/Download.py 1.1.0 > /dev/null | true -------------------------------------------------------------------------------- /deb/DEBIAN/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -f /usr/bin/waydroid-runner 3 | rm -f /usr/bin/waydroid-runner-auto-install-bash 4 | # 删除软件残留,简单粗暴一点直接全部删掉,防止出现警告 5 | # 加判断是为了怕 reinstall 后程序就再也打不开了(除非卸载后重新安装) 6 | if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then 7 | rm -rf /opt/apps/waydroid-runner 8 | fi 9 | # 删除软件配置文件(只限“purge”) 10 | # 配置目录:~/.config/waydroid-runner 11 | if [ "$1" = "purge" ]; then 12 | 13 | echo "清理程序配置文件" 14 | 15 | for username in $(ls /home); do 16 | echo /home/$username 17 | if [ -d "/home/$username/.config/waydroid-runner/" ]; then 18 | rm -rf "/home/$username/.config/waydroid-runner/" 19 | fi 20 | done 21 | # 清理 root 用户的配置文件 22 | echo /root 23 | if [ -d "/root/.config/waydroid-runner/" ]; then 24 | rm -rf "/root/.config/waydroid-runner/" 25 | rm -rf "/root/.local/share/waydroid-runner" 26 | fi 27 | else 28 | echo "非 purge,跳过清理" 29 | fi 30 | 31 | # 刷新图标缓存 32 | # 因为 Ubuntu 的问题,省略 33 | gtk-update-icon-cache /usr/share/icons/bloom > /dev/null | true -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/entries/applications/spark-waydroid-runner.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Encoding=UTF-8 4 | Categories=System; 5 | Terminal=false 6 | Exec=/usr/bin/waydroid-runner %F 7 | Icon=/opt/apps/spark-waydroid-runner/files/runner.svg 8 | Name=Waydroid Runner 9 | Comment=Waydroid Runner 10 | Comment[zh]=Waydroid 运行器 11 | Name[zh]=Waydroid 运行器 12 | StartupNotify=true 13 | MimeType=application/vnd.android.package-archive -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/download: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/error: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/info: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/installapk: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/pause: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/programforum: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/thank: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/version: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/command/warning: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 加入路径 3 | import os 4 | import sys 5 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 6 | sys.path.append(f"{programPath}/../../") 7 | import ConfigLanguareRunner 8 | # 符号转移 9 | argv = [] 10 | for i in sys.argv[1:]: 11 | argv.append(i.replace(" ", "\\ ")) 12 | com = ConfigLanguareRunner.Command(f"{os.path.basename(sys.argv[0])} {' '.join(argv)}") 13 | com.Run(com.GetCommandList(), os.getenv("WINEPREFIX"), os.getenv("WINE")) 14 | sys.exit(int(ConfigLanguareRunner.programEnv[9][1])) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/AutoShell/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import time 5 | import json 6 | import platform 7 | 8 | # 读取文本文档 9 | def readtxt(path): 10 | f = open(path, "r") # 设置文件对象 11 | str = f.read() # 获取内容 12 | f.close() # 关闭文本对象 13 | return str # 返回结果 14 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 15 | information = json.loads(readtxt(f"{programPath}/../information.json")) 16 | version = information["Version"] 17 | thankText = "" 18 | for i in information["Contribute"]: 19 | thankText += f"{i}\n" 20 | programEnv = [ 21 | ["WINEPREFIX", f"{os.path.expanduser('~')}/.wine"], 22 | ["WINE", "deepin-wine6-stable"], 23 | ["DANGER", "0"], 24 | ["PROGRAMPATH", programPath], 25 | ["VERSION", version], 26 | ["THANK", thankText.replace("\n", "\\n")], 27 | ["MAKER", "gfdgd xi"], 28 | ["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi"], 29 | ["PLATFORM", platform.system()], 30 | ["DEBUG", str(int("--debug" in sys.argv))] 31 | ] 32 | '''programEnv = [ 33 | ["($WINEPREFIX)", f"{os.path.expanduser('~')}/.wine"], 34 | ["($WINE)", "deepin-wine6-stable"], 35 | ["($DANGER)", "0"], 36 | ["($HOME)", os.path.expanduser('~')], 37 | ["($PROGRAMPATH)", programPath], 38 | ["($VERSION)", version], 39 | ["($THANK)", thankText], 40 | ["($MAKER)", "gfdgd xi"], 41 | ["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"], 42 | ["?", "0"], 43 | ["PLATFORM)", platform.system()], 44 | ["DEBUG)", str(int("--debug" in sys.argv))] 45 | ]''' 46 | optionAll = 0 47 | if "--debug" in sys.argv: 48 | optionAll += 1 49 | if "--system" in sys.argv: 50 | programEnv.append(["DANGER", "1"]) 51 | optionAll += 1 52 | if os.getenv("WINE") != None: 53 | programEnv.append(["WINE", os.getenv("WINE")]) 54 | if os.getenv("WINEPREFIX") != None: 55 | programEnv.append(["WINEPREFIX", os.getenv("WINEPREFIX")]) 56 | # 生成可以使用的参数 57 | commandEnv = "" 58 | for i in programEnv: 59 | commandEnv += f"{i[0]}=\"{i[1]}\" " 60 | commandEnv += f"PATH=\"{programPath}/command:$PATH\" " 61 | if len(sys.argv) - optionAll < 2: 62 | print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)") 63 | print(f"版本:{version}") 64 | print(f"©2020~{time.strftime('%Y')} gfdgd xi") 65 | print("--------------------------------------------------------------") 66 | os.system(f"{commandEnv} bash ") 67 | exit() 68 | command = "" 69 | for i in sys.argv[1:]: 70 | command += f"\"{i}\" " 71 | print("UEngine 运行器自动配置文件解析器(基于 Bash)") 72 | print(f"版本:{version}") 73 | print(f"©2020~{time.strftime('%Y')} gfdgd xi") 74 | print("--------------------------------------------------------------") 75 | os.system(f"{commandEnv} bash {command}") -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/BuildDesktop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # 使用系统默认的 python3 运行 3 | ################################################################################################################# 4 | # 作者:gfdgd xi 5 | # 版本:2.5.0 6 | # 更新时间:2022年11月20日 7 | # 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序 8 | # 基于 Python3 的 PyQt5 构建 9 | ################################################################################################################# 10 | ################# 11 | # 引入所需的库 12 | ################# 13 | import os 14 | import sys 15 | import traceback 16 | import updatekiller 17 | import PyQt5.QtGui as QtGui 18 | import PyQt5.QtCore as QtCore 19 | import PyQt5.QtWidgets as QtWidgets 20 | 21 | desktopList = [] 22 | desktopUsrList = [] 23 | 24 | def GetDesktopList(path): 25 | for i in os.listdir(path): 26 | if os.path.isdir(f"{path}/{i}"): 27 | GetDesktopList(f"{path}/{i}") 28 | if os.path.isfile(f"{path}/{i}"): 29 | try: 30 | desktop = {} 31 | with open(f"{path}/{i}") as file: 32 | things = file.read() 33 | for k in things.splitlines(): 34 | if not "=" in k: 35 | continue 36 | desktop[k[:k.index("=")].lower()] = k[k.index("=") + 1:] 37 | desktopList.append([desktop["Name".lower()], desktop["Icon".lower()], desktop["Exec".lower()], f"{path}/{i}"]) 38 | except: 39 | traceback.print_exc() 40 | delButton.setEnabled(len(desktopList)) 41 | 42 | class DesktopList(QtCore.QThread): 43 | show = QtCore.pyqtSignal(int) 44 | def __init__(self) -> None: 45 | super().__init__() 46 | 47 | def run(self): 48 | if os.path.exists(f"{homePath}/.local/share/applications"): 49 | GetDesktopList(f"{homePath}/.local/share/applications") 50 | self.show.emit(0) 51 | 52 | def ShowDesktop(temp): 53 | nmodel = QtGui.QStandardItemModel(window) 54 | if not len(desktopList): 55 | item = QtGui.QStandardItem("无") 56 | nmodel.appendRow(item) 57 | y = 0 58 | for i in desktopList: 59 | #item = QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0]) 60 | #nmodel.appendRow(item) 61 | if os.path.exists(i[1]): 62 | nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon(i[1]), i[0])) 63 | else: 64 | nmodel.setItem(y, 0, QtGui.QStandardItem(QtGui.QIcon.fromTheme(i[1]), i[0])) 65 | nmodel.setItem(y, 1, QtGui.QStandardItem(i[2])) 66 | nmodel.setItem(y, 2, QtGui.QStandardItem(i[3])) 67 | y += 1 68 | nmodel.setHeaderData(0, QtCore.Qt.Horizontal, "程序名") 69 | nmodel.setHeaderData(1, QtCore.Qt.Horizontal, "运行路径") 70 | nmodel.setHeaderData(2, QtCore.Qt.Horizontal, ".desktop 文件所在路径") 71 | nmodel.setColumnCount(3) 72 | desktopListView.setModel(nmodel) 73 | 74 | def GetDesktopThread(): 75 | global desktop 76 | desktop = DesktopList() 77 | desktop.show.connect(ShowDesktop) 78 | desktop.start() 79 | 80 | def DeleteButton(): 81 | index = desktopListView.currentIndex().row() 82 | if index < 0: 83 | QtWidgets.QMessageBox.critical(window, "错误", "未选中任何项") 84 | return 85 | print(index) 86 | print(desktopList[index][3]) 87 | #desktopListView.rowMoved(index) 88 | 89 | #desktopListView.removeRow(index) 90 | try: 91 | os.remove(desktopList[index][3]) 92 | del desktopList[index] 93 | ShowDesktop(0) 94 | except: 95 | traceback.print_exc() 96 | QtWidgets.QMessageBox.critical(window, "错误", traceback.format_exc()) 97 | 98 | 99 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 100 | homePath = os.getenv("HOME") 101 | iconPath = "{}/deepin-wine-runner.svg".format(programPath) 102 | #GetDesktopList(f"{homePath}/.local/share/applications") 103 | #print(desktopList) 104 | app = QtWidgets.QApplication(sys.argv) 105 | window = QtWidgets.QMainWindow() 106 | widget = QtWidgets.QWidget() 107 | layout = QtWidgets.QGridLayout() 108 | delButton = QtWidgets.QPushButton("删除指定图标") 109 | delButton.clicked.connect(DeleteButton) 110 | #desktopListView = QtWidgets.QListView() 111 | desktopListView = QtWidgets.QTableView() 112 | desktopListView.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) 113 | desktopListView.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)#(QAbstractItemView::SelectRows) 114 | layout.addWidget(desktopListView, 0, 0, 1, 4) 115 | layout.addWidget(delButton, 1, 3, 1, 1) 116 | widget.setLayout(layout) 117 | window.setCentralWidget(widget) 118 | window.setWindowTitle("图标管理") 119 | window.resize(int(window.frameGeometry().width() * 1.5), int(window.frameGeometry().height() * 1.2)) 120 | window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg")) 121 | window.show() 122 | GetDesktopThread() 123 | app.exec_() -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/ConfigLanguareRunner-help.json: -------------------------------------------------------------------------------- 1 | { 2 | "installdll": "安装指定 dll 在指定容器\n参数数量:1\n参数介绍:dll名称或在从互联网获取DLL工具的编号,如 7012 xolehlp.dll 平台:2003 架构:64 的 7012", 3 | "stopdll": "不允许指定 dll/exe 运行\n参数数量:1\n参数介绍:dll/exe 名称,如 example.exe", 4 | "installfont": "安装指定字体到指定容器\n参数数量:1\n在字体商店的编号,如 5 msyhbd.ttc 的 5", 5 | "installsparkcorefont": "安装星火应用商店的“微软核心字体”\n参数数量:0\n参数介绍:无", 6 | "installmono": "安装最新版本的 mono 到指定容器\n参数数量:0\n参数介绍:无", 7 | "installgecko": "安装最新版本的 gecko 到指定容器\n参数数量:0\n参数介绍:无", 8 | "installvcpp": "安装指定的 VCPP 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Studio C++ 工具的编号,如 10 Visual Studio C++ 2015、2017、2019 和 2022 X64 的 10", 9 | "installnet": "安装指定的 .net framework 运行库到指定容器\n参数数量:1\n参数介绍:在安装 .net framework 工具的编号,如 3 .net framework 4.5.1 Offline Installer 的 3", 10 | "installmsxml": "安装指定的 MSXML 运行库到指定容器\n参数数量:1\n参数介绍:在安装 MSXML 工具的编号,如 1、MSXML 4.0 SP3 的 1", 11 | "echo": "显示内容\n参数数量:≥1\n参数介绍:接要显示的内容", 12 | "info": "显示提示对话框\n参数数量:2\n参数介绍:标题+显示内容", 13 | "error": "显示错误对话框\n参数数量:2\n参数介绍:标题+显示内容", 14 | "warning": "显示警告对话框\n参数数量:2\n参数介绍:标题+显示内容", 15 | "exit": "退出程序\n参数数量:0\n参数介绍:无", 16 | "bat": "执行 cmd 命令在 Wine 容器内(在 Windows 将在系统执行命令)\n参数数量:≥1\n参数介绍:接要执行的命令", 17 | "bash": "执行 bash 命令(在 Windows 系统将执行 cmd 命令)\n参数数量:≥1\n参数介绍:接要执行的命令", 18 | "version": "显示解释器版本(Wine 运行器版本)\n参数数量:0\n参数介绍:无", 19 | "thank": "显示谢明列表\n参数数量:0\n参数介绍:无", 20 | "pause": "按回车键后继续\n参数数量:0\n参数介绍:无", 21 | "download": "使用 aria2 下载文件\n参数数量:≥1 && ≤3\n参数介绍:下载URL+保存在的文件夹+保存的文件名", 22 | "installdxvk": "安装 dxvk 到指定容器\n参数数量:0\n参数介绍:无", 23 | "createbotton": "在指定目录创建容器\n参数数量:0\n参数介绍:无", 24 | "reg": "导入 .reg 文件\n参数数量:0\n参数介绍:reg 文件路径", 25 | "enabledopengl": "开启 OpenGL\n参数数量:0\n参数介绍:无", 26 | "disbledopengl": "关闭 OpenGL\n参数数量:0\n参数介绍:无", 27 | "winecfg": "显示“Wine 设置”\n参数数量:0\n参数介绍:无", 28 | "winver": "显示“关于 Wine”\n参数数量:0\n参数介绍:无", 29 | "changeversion": "更改 Wine 容器系统版本(未实现)\n参数数量:无\n参数介绍:无", 30 | "cat": "显示指定文件(只支持显示编码为UTF-8的文件)\n参数数量:1\n参数介绍:无", 31 | "enabledhttpproxy": "设置指定容器代理\n参数数量:2\n参数介绍:代理服务器地址+端口", 32 | "disbledhttpproxy": "禁用指定容器代理\n参数数量:0\n参数介绍:无", 33 | "enabledwinecrashdialog": "启用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无", 34 | "disbledwinecrashdialog": "禁用 Wine 容器程序崩溃提示窗口\n参数数量:0\n参数介绍:无", 35 | "disbledWinebottlecreatelink": "禁止 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无", 36 | "enabledWinebottlecreatelink": "允许 Wine 容器生成快捷方式\n参数数量:0\n参数介绍:无", 37 | "killall": "杀死指定进程\n参数数量:1\n参数介绍:进程名", 38 | "control": "打开控制面板\n参数数量:0\n参数介绍:无", 39 | "taskmgr": "打开任务管理器\n参数数量:0\n参数介绍:无", 40 | "killallwineserver": "杀死所有 Wine 程序\n参数数量:0\n参数介绍:无", 41 | "installvb": "安装指定的 VB 运行库到指定容器\n参数数量:1\n参数介绍:在安装 Visual Basic Runtime 工具的编号,如 4 Visual Basic Runtime Visual Basic 6", 42 | "installother": "安装未归类的运行库到指定容器\n参数数量:1\n参数介绍:在安装其它运行库工具的编号,如 2 MFC运行库", 43 | "decompressionbottle": "解压用 wine 打包的 deb 包内的容器到指定路径\n参数数量:2\n参数介绍:deb 包路径+要解压到的路径", 44 | "programforum": "打开程序论坛\n参数数量:0\n参数介绍:无", 45 | "installmsi": "安装 MSI 文件到指定容器\n参数数量:1\n参数介绍:msi 文件路径", 46 | "installapk": "安装 APK 文件到 UEngine\n参数数量:1\n参数介绍:apk 文件路径" 47 | } -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Download.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import base64 4 | import requests 5 | print("""浣溪沙 6 | 一曲新词酒一杯,去年天气旧亭台。夕阳西下几时回? 7 | 无可奈何花落去,似曾相识燕归来。小园香径独徘徊。""") 8 | print("") 9 | print("听一支新曲喝一杯美酒,还是去年的天气旧日的亭台,西落的夕阳何时再回来?那花儿落去我也无可奈何,那归来的燕子似曾相识,在小园的花径上独自徘徊。") 10 | print("================================") 11 | print(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3dheWRyb2lkLXJ1bm5lci9JbnN0YWxsLnBocD9WZXJzaW9uPQ==").decode("utf-8") + sys.argv[1]).text) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Icon/BadStar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Icon/Star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Icon/UnStar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 21 | 40 | 42 | 43 | 45 | image/svg+xml 46 | 48 | 49 | 50 | 51 | 52 | 57 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Icon/doge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/Icon/doge.png -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Model/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import PyQt5.QtWidgets as QtWidgets 5 | def OpenTerminal(command): 6 | if terminalEnd[terminal][1]: 7 | os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" \"{command}\"") 8 | return 9 | os.system(f"\"{terminal}\" \"{terminalEnd[terminal][0]}\" {command}") 10 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 11 | # 对终端的获取 12 | # 为什么 openkylin 只有 mate-terminal 13 | # 优先为深度终端 14 | terminal = "" 15 | terminalList = [ 16 | "deepin-terminal", 17 | "mate-terminal", 18 | "gnome-terminal", 19 | "xfce4-terminal" 20 | ] 21 | terminalEnd = { 22 | f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0], 23 | "mate-terminal": ["-e", 1], 24 | "gnome-terminal": ["--", 0], 25 | "xfce4-terminal": ["-e", 1] 26 | } 27 | for i in terminalList: 28 | if not os.system(f"which {i}"): 29 | if i == "deepin-terminal": 30 | i = f"{programPath}/../launch.sh\" \"deepin-terminal" 31 | terminal = i 32 | break 33 | if terminal == "": 34 | print("无法识别到以下的任意一个终端") 35 | print(" ".join(terminalList)) 36 | app = QtWidgets.QApplication(sys.argv) 37 | QtWidgets.QMessageBox.critical(None, "错误", "无法识别到以下的任意一个终端\n" + " ".join(terminalList)) 38 | exit() 39 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/ProgramFen.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import base64 5 | import traceback 6 | import requests 7 | import PyQt5.QtGui as QtGui 8 | import PyQt5.QtCore as QtCore 9 | import PyQt5.QtWidgets as QtWidgets 10 | 11 | print("""十五从军征 12 | 十五从军征,八十始得归。道逢乡里人:家中有阿谁? 13 | 遥看是君家,松柏冢累累。兔从狗窦入,雉从梁上飞。 14 | 中庭生旅谷,井上生旅葵。舂谷持作饭,采葵持作羹。 15 | 羹饭一时熟,不知饴阿谁!出门东向看,泪落沾我衣。""") 16 | print("") 17 | print("""译文:刚满十五岁的少年就出去打仗,到了八十岁才回来。路遇一个乡下的邻居,问:“我家里还有什么人?”你家那个地方,现在已是松树柏树林中的一片坟墓。走到家门前看见野兔从狗洞里出进,野鸡在屋脊上飞来飞去。院子里长着野生的谷子,野生的葵菜环绕着井台。用捣掉壳的野谷来做饭,摘下葵叶来煮汤。汤和饭一会儿都做好了,却不知赠送给谁吃。走出大门向着东方张望,老泪纵横,洒落在征衣上。""") 18 | print("================================") 19 | 20 | class ProgramRunStatusShow(): 21 | msgWindow = None 22 | def ShowWindow(): 23 | try: 24 | fenlists = [] 25 | for i in range(6): 26 | fenlists.append(int(requests.get("http://data.download.gfdgdxi.top/Fen-UEngine/Fen" + f"{i}.txt").text)) 27 | tipsInfo = "" 28 | except: 29 | traceback.print_exc() 30 | fenlists = [0, 0, 0, 0, 0] 31 | tipsInfo = "暂时无人提交此脚本运行情况,是否立即提交?" 32 | 33 | maxHead = fenlists.index(max(fenlists)) 34 | allNumber = 0 35 | for i in fenlists: 36 | allNumber += i 37 | try: 38 | #tipsInfo = "" 39 | for i in range(len(fenlists)): 40 | # 显示整数 41 | tipsInfo += f"有 {int(fenlists[i] / allNumber * 100)}% 的用户选择了 {i} 分({fenlists[i]}/{allNumber})\n" 42 | maxNumber = int(max(fenlists) / allNumber * 100) 43 | #if tipsInfo == "": 44 | # tipsInfo = f"有{maxNumber}%的用户选择了这个评分" 45 | except: 46 | pass 47 | ProgramRunStatusShow.msgWindow = QtWidgets.QMainWindow() 48 | msgWidget = QtWidgets.QWidget() 49 | msgWidgetLayout = QtWidgets.QGridLayout() 50 | starLayout = QtWidgets.QHBoxLayout() 51 | uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况")) 52 | uploadButton.clicked.connect(ProgramRunStatusUpload.ShowWindow) 53 | msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0) 54 | msgWidgetLayout.addLayout(starLayout, 0, 1) 55 | msgWidgetLayout.addWidget(QtWidgets.QLabel(tipsInfo), 1, 0, 1, 2) 56 | msgWidgetLayout.addWidget(uploadButton, 3, 0, 1, 2) 57 | end = 5 58 | if maxHead > 5: 59 | for i in range(end): 60 | starLayout.addWidget(QtWidgets.QLabel(f"")) 61 | else: 62 | for i in range(maxHead): 63 | starLayout.addWidget(QtWidgets.QLabel(f"")) 64 | head = maxHead 65 | for i in range(head, end): 66 | starLayout.addWidget(QtWidgets.QLabel(f"")) 67 | msgWidget.setLayout(msgWidgetLayout) 68 | ProgramRunStatusShow.msgWindow.setCentralWidget(msgWidget) 69 | ProgramRunStatusShow.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) 70 | ProgramRunStatusShow.msgWindow.setWindowTitle(f"程序运行情况") 71 | ProgramRunStatusShow.msgWindow.show() 72 | 73 | class ProgramRunStatusUpload(): 74 | msgWindow = None 75 | starLayout = None 76 | fen = None 77 | starList = [] 78 | sha1Value = "" 79 | programName = None 80 | def ChangeStar(): 81 | if ProgramRunStatusUpload.fen.currentIndex() > 5: 82 | for i in ProgramRunStatusUpload.starList: 83 | i.setText(f"") 84 | return 85 | for i in range(ProgramRunStatusUpload.fen.currentIndex()): 86 | ProgramRunStatusUpload.starList[i].setText(f"") 87 | head = ProgramRunStatusUpload.fen.currentIndex() 88 | end = len(ProgramRunStatusUpload.starList) 89 | for i in range(head, end): 90 | ProgramRunStatusUpload.starList[i].setText(f"") 91 | 92 | def ShowWindow(): 93 | ProgramRunStatusUpload.starList = [] 94 | ProgramRunStatusUpload.msgWindow = QtWidgets.QMainWindow(ProgramRunStatusShow.msgWindow) 95 | msgWidget = QtWidgets.QWidget() 96 | msgWidgetLayout = QtWidgets.QGridLayout() 97 | ProgramRunStatusUpload.fen = QtWidgets.QComboBox() 98 | ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout() 99 | upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传")) 100 | upload.clicked.connect(ProgramRunStatusUpload.Upload) 101 | # 生成星星列表 102 | for i in [1, 1, 1, 1, 1]: 103 | ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"")) 104 | ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1]) 105 | ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) 106 | ProgramRunStatusUpload.fen.addItems(["0分", "1分", "2分", "3分", "4分", "5分"]) 107 | ProgramRunStatusUpload.fen.setCurrentIndex(5) 108 | ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar) 109 | msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "评分:")), 1, 0) 110 | msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1) 111 | msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1) 112 | msgWidgetLayout.addWidget(upload, 3, 1) 113 | msgWidget.setLayout(msgWidgetLayout) 114 | ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget) 115 | ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况")) 116 | ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath)) 117 | ProgramRunStatusUpload.msgWindow.show() 118 | 119 | def Upload(): 120 | try: 121 | QtWidgets.QMessageBox.information(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "提示"), requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/Install.php?Version=Fen{ProgramRunStatusUpload.fen.currentIndex()}-UEngine").json()["Error"]) 122 | except: 123 | traceback.print_exc() 124 | QtWidgets.QMessageBox.critical(ProgramRunStatusUpload.msgWindow, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!")) 125 | 126 | if __name__ == "__main__": 127 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 128 | iconPath = "{}/deepin-wine-runner.svg".format(programPath) 129 | app = QtWidgets.QApplication(sys.argv) 130 | ProgramRunStatusShow.ShowWindow() 131 | app.exec_() 132 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Android-id-reader/android-id.py: -------------------------------------------------------------------------------- 1 | #A python3 program 2 | #Please DO-NOT-RUNNING by root! 3 | import os 4 | import sys 5 | os.chdir(os.path.split(os.path.realpath(__file__))[0]) # 定位到gms.py所在目录以便脚本能正常调用 6 | 7 | print('-请在下方输入您的sudo密码') #提权,软件后期运行需要sudo,但是又要正确识别当前用户 8 | os.system('sudo echo "-提权成功!"') 9 | os.system('clear') 10 | 11 | a = os.popen('waydroid status').read() #检查Session运行状态,需要使用Waydroid-shell 12 | if a.find('STOPPED')!=-1: 13 | print('-请先启动容器Session!') 14 | print('-程序出现异常,正在退出') 15 | sys.exit(1) 16 | 17 | user=os.getlogin() #获取当前用户名 18 | waydroid_data='/home/'+user+'/.local/share/waydroid/data' 19 | 20 | print('-复制gms.sh脚本到安卓目录:',end='') 21 | if os.system(f'sudo cp gms.sh {waydroid_data}/media/0')!=0: 22 | print('失败!请自行查找问题!');sys.exit(1) #复制gms.sh文件,设定权限,这个gms.sh要在Android-shell跑 23 | else:print('完成!') 24 | print('-设置脚本权限:') 25 | if os.system(f'sudo chmod 777 {waydroid_data}/media/0/gms.sh')!=0: 26 | print('失败!请自行查找问题!');sys.exit(1) #复制gms.sh文件,设定权限,这个gms.sh要在Android-shell跑 27 | else:print('完成!') 28 | 29 | 30 | android_id=os.popen('sudo waydroid shell sh /sdcard/gms.sh').read() #执行脚本,拿到输出的Android-id 31 | #清理残留目录 32 | os.system('sudo waydroid shell rm /sdcard/gms.sh') 33 | if android_id.find('android_id')==-1: 34 | print('\n-未找到Android id!') 35 | print('-请在本帖子查看详细信息:https://bbs.deepin.org/post/261685') 36 | else: 37 | android_id=android_id[android_id.find('android_id'):] #获取安卓id,去掉不必要的信息 38 | print('\n下方为您的Android-id(调用安卓内输出,注册时只需要复制对应数字输入即可)') 39 | print(android_id) 40 | 41 | a=input('-请按回车或者输入任意键退出') 42 | sys.exit(0) 43 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Android-id-reader/gms.sh: -------------------------------------------------------------------------------- 1 | #Android-Sh Script 2 | #临时获取GMS的脚本,执行后会删除 3 | #forked from docs.waydro.id 4 | 5 | ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";" 6 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Checks/HoudiniCheck.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | if os.path.exists('/var/lib/waydroid/overlay/system/lib/libhoudini.so') == True and os.path.exists('/var/lib/waydroid/overlay/system/lib/arm') == True and os.path.exists('/var/lib/waydroid/overlay/system/lib64/arm64') == True and os.path.exists('/var/lib/waydroid/overlay/system/etc/init/init-houdini.rc') == True: 4 | sys.exit(0) 5 | sys.exit(1) 6 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Checks/LSPCheck.py: -------------------------------------------------------------------------------- 1 | #Please running it by root! 2 | import os 3 | import sys 4 | user = os.getlogin() 5 | if os.path.exists(f'/home/{user}/.local/share/waydroid/data/adb/lspd') == True: 6 | sys.exit(0) 7 | sys.exit(1) 8 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Checks/Language-Check.py: -------------------------------------------------------------------------------- 1 | #A Python3 Program 2 | #You don't running by sudo 3 | import os 4 | import sys 5 | 6 | f=open('/var/lib/waydroid/waydroid.cfg','r') #读取waydroid.cfg 7 | a=f.read() #读入waydroid.cfg至a变量 8 | f.close() #关闭文件防止bug/内存泄漏 9 | if a.find('persist.sys.timezone') !=-1 or a.find('persist.sys.language')!=-1 or a.find('persist.sys.country')!=-1: 10 | sys.exit(0) 11 | else: 12 | sys.exit(1) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Checks/MagiskCheck.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | if os.path.exists('/var/lib/waydroid/overlay_rw/system/system/etc/init/magisk') == True: 4 | sys.exit(0) 5 | sys.exit(1) 6 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Checks/Widevine-Check.py: -------------------------------------------------------------------------------- 1 | #Python3 Program 2 | #不需要以root执行! 3 | import os 4 | import sys 5 | if os.path.exists('/var/lib/waydroid/overlay/vendor/etc/vintf/manifest') == True and os.path.exists('/var/lib/waydroid/overlay/vendor/lib/mediadrm') == True and os.path.exists('/var/lib/waydroid/overlay/vendor/lib64/mediadrm') == True:sys.exit(0) 6 | else:sys.exit(1) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Libhoudini_installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/houdini-install.tar.gz -d /tmp 3 | cd /tmp 4 | tar -xvf houdini-install.tar.gz 5 | cd houdini-install 6 | python3 houdini-install.py 7 | sudo python3 houdini-prop.py 8 | sudo rm /var/lib/waydroid/overlay/system/bin/resetprop #屑山,删掉多放的resetprop防止magisk不识别 9 | rm -rf ../houdini-install 10 | rm ../houdini-install.tar.gz 11 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Magisk_Installer/Magisk.py: -------------------------------------------------------------------------------- 1 | #Python3-Program 2 | import os 3 | import sys 4 | os.chdir(os.path.split(os.path.realpath(__file__))[0]) # 定位到 data.img 所在目录以便脚本能正常调用 5 | waydroid_path = '/var/lib/waydroid' 6 | waydroid_data_mount = "/tmp/waydroid-runner-datamount" 7 | def Cleaner(): #清理安装目录产生的Cache 8 | print('-正在清理目录:',end='') 9 | os.system(f'sudo umount "{waydroid_data_mount}" && sudo rm -rf "{waydroid_data_mount}"') 10 | print('-完成') 11 | 12 | #######--------------主程序部分----------------########### 13 | 14 | print('-请在下方输入您的sudo用户密码:') 15 | os.system('sudo echo -提权成功! && clear') 16 | if os.path.exists(waydroid_data_mount) == False: #在/tmp创建Cache 17 | os.system(f'sudo mkdir "{waydroid_data_mount}"') 18 | print('-开始安装Magisk-delta') 19 | if os.path.exists('data.img') == False: #检查文件完整性 20 | print('-关键文件缺失!请重新安装运行器!') 21 | sys.exit(1) 22 | os.system(f'sudo mount -o ro data.img "{waydroid_data_mount}"') #挂载关键文件镜像(设置挂载只读) 23 | 24 | if os.path.exists(f'{waydroid_path}/overlay_rw/system/system/etc/init/magisk') == True: #检测用户是否自行app里升级了Magisk-Delta 25 | print('-检测到您已经在app内安装过了Magisk-Delta,此脚本不会执行任何升级操作') 26 | if os.path.exists(f'{waydroid_path}/overlay/system/etc/init/magisk') == True: #检测是否有旧版残留,有就删掉 27 | print('-正在删除残留的Magisk-Delta文件:',end='') 28 | os.system(f'sudo rm -rf {waydroid_path}/overlay/system/etc/init/magisk') #清理旧版脚本的残留 29 | os.system(f'sudo rm -rf {waydroid_path}/overlay/system/etc/init/init-delta.rc') #清理旧版脚本的残留 30 | print('完成') 31 | print('-此后只需在Magisk-Delta的app里直接升级Magisk-Delta即可') 32 | Cleaner() 33 | print('\n程序运行结束!') 34 | sys.exit(0) 35 | else: #若没检测到用户自行升级了Magisk-Delta 36 | if os.path.exists(f'{waydroid_path}/overlay/system/etc/init/magisk') == True: #但是发现旧版脚本安装残留,那么删掉残留 37 | print('-检测到旧版Magisk文件残留,正在去除:',end='') 38 | if os.system('sudo rm -rf /var/lib/waydroid/overlay/system/etc/init/magisk.rc') == 0 and os.system('sudo rm -rf /var/lib/waydroid/overlay/system/etc/init/magisk') == 0:print('成功!') 39 | else:print('失败!请自行排查问题!') 40 | os.system(f'sudo mkdir -p /var/lib/waydroid/overlay_rw/system/system/etc/init') #复制data.img中文件到新Overlay_rw 41 | os.system(f'cd "{waydroid_data_mount}/system/etc/init" && sudo cp -rf * "{waydroid_path}/overlay_rw/system/system/etc/init"') 42 | print('-安装完成!') 43 | Cleaner() #清理目录 44 | print('\n程序运行结束!') 45 | sys.exit(0) 46 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Magisk_Installer/data.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Magisk_Installer/data.img -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Off-function/Allow-rotate.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #Please running by root! 3 | 4 | import os 5 | import sys 6 | 7 | a = os.popen('waydroid status').read() #检查运行状态 8 | if a.find('STOPPED')!=-1: 9 | print('-请先启动容器Session!') 10 | print('-程序出现异常,正在退出') 11 | sys.exit(1) 12 | 13 | print('-正在设置允许应用旋转屏幕') 14 | os.system('sudo waydroid shell wm set-fix-to-user-rotation disabled') 15 | print('-完成!') 16 | sys.exit(0) 17 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Off-function/Off-cursor.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import os 5 | 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在关闭Waydroid窗口下多显示鼠标的功能:',end='') #关闭Wayland窗口下显示鼠标功能 13 | if os.system('waydroid prop set persist.waydroid.cursor_on_subsurface false')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Off-function/Off-windows-mode.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import os 5 | 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在关闭多窗口模式:',end='') #关闭功能 13 | if os.system('waydroid prop set persist.waydroid.multi_windows false')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) 18 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Sway-X11/Sway.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Sway-X11/Sway.png -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Clipboard-enable.py: -------------------------------------------------------------------------------- 1 | #A Python3 Program 2 | #DO NOT RUNNING BY SUDO! 3 | import os 4 | import sys 5 | 6 | def Running_err(): #遇到异常通用退出函数 7 | print('-程序运行出现异常,即将退出') 8 | sys.exit(1) 9 | 10 | print('-请在下方输入您当前的sudo用户密码') #拿到sudo权限 11 | os.system('sudo echo 提权完成! && clear') 12 | 13 | print('-正在开启全局剪切板功能') 14 | if os.system('lsb_release -a')!=0: #检查是否能获取系统版本 15 | print('-警告:您的系统没有lsb_release指令,请安装它!') 16 | Running_err() 17 | 18 | sys_name=os.popen('lsb_release -a').read() #获取并判断系统版本,删掉不支持的 19 | if sys_name.find('deepin')!=-1 and sys_name.find('apricot')!=-1: 20 | print('-不支持Deepin-v20!');Running_err() 21 | if sys_name.find('UOS')!=-1: 22 | print('-不支持统信UOS!');Running_err() 23 | 24 | print('\n-正在安装wl-clipboard') #先安装wl-clipboard 25 | if os.system('sudo apt update && sudo apt install wl-clipboard -y')!=0: 26 | print('-您的系统没有wl-clipboard包,无法开启剪切板同步功能!') 27 | Running_err() 28 | 29 | print('\n-正在添加pyclip(pip3包)') 30 | os.system('python3 -m pip install pyclip -i https://pypi.tuna.tsinghua.edu.cn/simple --break-system-packages') 31 | 32 | print('\n-添加成功,程序运行完成!重启电脑后剪切板互通功能生效!') 33 | sys.exit(0) 34 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Do-not-rotate.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #Please running by root! 3 | 4 | import os 5 | import sys 6 | 7 | a = os.popen('waydroid status').read() #检查运行状态 8 | if a.find('STOPPED')!=-1: 9 | print('-请先启动容器Session!') 10 | print('-程序出现异常,正在退出') 11 | sys.exit(1) 12 | 13 | print('-正在应用设置') 14 | os.system('sudo waydroid shell wm set-fix-to-user-rotation enabled') 15 | print('-完成!') 16 | sys.exit(0) 17 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Language.py: -------------------------------------------------------------------------------- 1 | #此应用请以root身份运行! 2 | #Please running by root! 3 | import os 4 | import sys 5 | os.system('waydroid container stop') 6 | f = open('/var/lib/waydroid/waydroid.cfg','r+') 7 | a=f.read() 8 | f.close() 9 | if a.find('persist.sys.timezone')!=-1: 10 | print('警告:您已修改过语言!程序即将退出!');sys.exit(1) 11 | 12 | #-----------Main----------# 13 | f = open('/var/lib/waydroid/waydroid.cfg','a+') 14 | f.write('\npersist.sys.timezone=Asia/Shanghai\npersist.sys.language=zh\npersist.sys.country=CN') 15 | f.close() 16 | print('修改成功,正在应用更改:',end='') 17 | if os.system('waydroid upgrade -o')!=0:print('失败!请自行排查问题!');sys.exit(1) 18 | else:print('成功!') 19 | print('重启电脑后生效!或者终端输入sudo systemctl restart waydroid-container.service回车后生效!') 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Multi-windows-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Multi-windows-full.png -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Multi_windows.py: -------------------------------------------------------------------------------- 1 | #Please start waydroid session before running this Script! 2 | #请不要以root身份执行!Do NOT Running by root! 3 | import sys 4 | import time 5 | import os 6 | a = os.popen('waydroid status').read() #检查运行状态 7 | if a.find('STOPPED')!=-1: 8 | print('-请先启动容器Session!') 9 | print('-程序出现异常,正在退出') 10 | sys.exit(1) 11 | 12 | print('-正在设置多窗口模式:',end='') 13 | if os.system('waydroid prop set persist.waydroid.multi_windows true')!=0: 14 | print('失败!\n-未知异常,程序即将退出!') 15 | sys.exit(1) 16 | print('-成功!\n-重启容器生效!') 17 | sys.exit(0) 18 | 19 | 20 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/Show-cursor.py: -------------------------------------------------------------------------------- 1 | #Python3 Program 2 | #不要使用sudo/root用户执行!DO NOT RUNNING BY ROOT! 3 | #请在Session运行时执行此脚本!Please while session running,then running the Script! 4 | 5 | import os #关键引用 6 | import sys 7 | 8 | print('如果你使用GNOME/KDE的DE,请不要执行这个脚本,否则会多显示一个鼠标!') #温馨提示 9 | a = os.popen('waydroid status').read() #检查运行状态 10 | if a.find('STOPPED')!=-1: 11 | print('-请先启动容器Session!') 12 | print('-程序出现异常,正在退出') 13 | sys.exit(1) 14 | 15 | print('-正在设置启动Waydroid后会多留一个鼠标') #开启功能 16 | if os.system('waydroid prop set persist.waydroid.cursor_on_subsurface true')!=0: 17 | print('失败!\n-未知异常,程序即将退出!') 18 | sys.exit(1) 19 | print('成功!重启Waydroid后生效!') 20 | sys.exit(0) 21 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/SystemConfigs/waydroid-choose-gpu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #This Script is forked from github @Quackdoc 3 | #分发代码时请遵守同@Quackdoc使用的GPLv3协议 4 | 5 | lspci="$(lspci -nn | grep '\[03')" # https://pci-ids.ucw.cz/read/PD/03 6 | 7 | echo -e "请选择您需要使Waydroid工作的GPU(输入数字序号即可):\n" 8 | gpus=() 9 | i=0 10 | while IFS= read lspci; do 11 | gpus+=("$lspci") 12 | echo " $((++i)). $lspci" 13 | done < <(echo "$lspci") 14 | echo "" 15 | while [ -z "$gpuchoice" ]; do 16 | read -erp ">> Number of GPU to pass to WayDroid (1-${#gpus[@]}): " ans 17 | if [[ "$ans" =~ [0-9]+ && $ans -ge 1 && $ans -le ${#gpus[@]} ]]; then 18 | gpuchoice="${gpus[$((ans-1))]%% *}" # e.g. "26:00.0" 19 | fi 20 | done 21 | 22 | echo "" 23 | echo "请确认这是你需要使Waydroid工作的GPU" 24 | echo "" 25 | 26 | ls -l /dev/dri/by-path/ | grep -i $gpuchoice 27 | 28 | echo "" 29 | 30 | card=$(ls -l /dev/dri/by-path/ | grep -i $gpuchoice | grep -o "card[0-9]") 31 | rendernode=$(ls -l /dev/dri/by-path/ | grep -i $gpuchoice | grep -o "renderD[1-9][1-9][1-9]") 32 | 33 | echo /dev/dri/$card 34 | echo /dev/dri/$rendernode 35 | 36 | cp /var/lib/waydroid/lxc/waydroid/config_nodes /var/lib/waydroid/lxc/waydroid/config_nodes.bak 37 | #lxc.mount.entry = /dev/dri dev/dri none bind,create=dir,optional 0 0 38 | sed -i '/dri/d' /var/lib/waydroid/lxc/waydroid/config_nodes 39 | echo "lxc.mount.entry = /dev/dri/$rendernode dev/dri/renderD128 none bind,create=file,optional 0 0" >> /var/lib/waydroid/lxc/waydroid/config_nodes 40 | echo "GPU切换完成!" 41 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Image_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ -f /usr/share/waydroid-extra/images/system.img ]] && [[ -f /usr/share/waydroid-extra/images/vendor.img ]]; then 3 | echo 已安装镜像,忽略 4 | exit 5 | fi 6 | sudo modprobe binder_linux 7 | lsmod | grep -e binder_linux 8 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 9 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 10 | echo 按回车继续 11 | read 12 | fi 13 | cd /tmp 14 | sudo mkdir -p /usr/share/waydroid-extra/images 15 | if [[ ! -f /usr/share/waydroid-extra/images/system.img ]]; then 16 | echo 拉取 system.img 17 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/system.7z 18 | 7z x system.7z 19 | sudo cp system.img /usr/share/waydroid-extra/images/ -v 20 | fi 21 | if [[ ! -f /usr/share/waydroid-extra/images/vendor.img ]]; then 22 | echo 拉取 vendor.img 23 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/vendor.7z 24 | 7z x vendor.7z 25 | sudo cp vendor.img /usr/share/waydroid-extra/images/ -v 26 | fi 27 | rm -rf vendor.img vendor.7z system.7z system.img 28 | sudo systemctl restart waydroid-container.service 29 | sudo waydroid init -f -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Installer/Install-cn.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "###Waydroid一键配置程序###" 4 | echo "本程序将安装Waydroid本体和GAPPS镜像" 5 | echo "" 6 | which waydroid 7 | # 获取程序路径 8 | programPath=`dirname $0` 9 | if [[ $? == 0 ]]; then 10 | echo Waydroid 已安装,是否重复安装? 11 | echo 是请按回车,否则按右上角 × 12 | read 13 | fi 14 | sudo modprobe binder_linux 15 | lsmod | grep -e binder_linux 16 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 17 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 18 | echo 测试过可以使用的内核:https://gfdgdxi.lanzoue.com/b01r54ple 密码:35j0 19 | echo 按回车继续 20 | read 21 | fi 22 | x11=0 23 | if [[ $XDG_SESSION_TYPE == "x11" ]]; then 24 | echo 警告:你当前使用的是 x11 协议而非 Wayland 协议,Waydroid 只支持 Wayland 协议 25 | echo 输入 Y 安装 Sway 或 Weston 以能在 X11 下运行 Waydroid(体验较差) 26 | x11=1 27 | read choose 28 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 29 | echo Try to install sway 30 | cd `dirname $0` 31 | bash InstallSway.sh 32 | if [[ $? != 0 ]]; then 33 | echo Sway 安装失败,安装 Weston 34 | bash InstallWeston.sh 35 | fi 36 | fi 37 | fi 38 | # 检测 UEngine 是否安装 39 | which uengine 40 | if [[ $? == 0 ]]; then 41 | which uengine-loading-ubuntu 42 | if [[ $? == 0 ]]; then 43 | echo "Waydroid 与 UEngine 冲突,是否要先卸载 UEngine?[Y/N]" 44 | read choose 45 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 46 | sudo apt purge uengine -y 47 | sudo apt purge uengine-modules-dkms uengine-android-image -y 48 | sudo apt-mark unhold hold lxc lxc-templates liblxc1 liblxc-common lxc-utils 49 | sudo apt update 50 | sudo apt install aptitude -y 51 | sudo aptitude install lxc -y 52 | sudo rm -v /usr/share/applications/uengine-loading-ubuntu.desktop 53 | sudo rm -v /etc/xdg/autostart/uengine-loading-ubuntu.desktop 54 | for username in $(ls /home) 55 | do 56 | echo /home/$username 57 | sudo rm /home/$username/uengine-launch/run_daemon.sh 58 | done 59 | sudo rm -v /usr/bin/uengine-loading-binder 60 | sudo rm -v /usr/share/polkit-1/actions/com.deepin.pkexec.binder.loader.policy 61 | fi 62 | else 63 | echo "Waydroid 与 UEngine 冲突,是否要先卸载 UEngine?[Y/N]" 64 | read choose 65 | if [[ $choose == "Y" ]] || [[ $choose == "y" ]]; then 66 | sudo apt purge uengine -y 67 | sudo apt purge uengine-modules-dkms uengine-android-image -y 68 | fi 69 | fi 70 | fi 71 | rm -rf /tmp/gfdgd-xi-sources 72 | mkdir -p /tmp/gfdgd-xi-sources 73 | wget -P /tmp/gfdgd-xi-sources http://deb.waydroid.waydroid-runner.gfdgdxi.top/gpg.asc 74 | wget -P /tmp/gfdgd-xi-sources http://deb.waydroid.waydroid-runner.gfdgdxi.top/sources/github.list 75 | gpg --dearmor /tmp/gfdgd-xi-sources/gpg.asc 76 | #sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FD6EEA1F20CD4B27 77 | if [[ ! -f /etc/deepin_version ]] && [[ -f /etc/deepin-version ]]; then 78 | isDeepin=0 79 | lsb_release -i | grep -i deepin 80 | if [[ $? == 0 ]]; then 81 | isDeepin=1 82 | fi 83 | lsb_release -i | grep -i uos 84 | if [[ $? == 0 ]]; then 85 | isDeepin=1 86 | fi 87 | if [[ $isDeepin == 1 ]]; then 88 | echo 警告! 89 | echo 您当前使用的是 Deepin20.9/UOS,如果继续安装 Waydroid 则需要升级系统的 lxc,很可能出现问题,是否继续? 90 | echo 按回车继续 91 | read 92 | sudo bash -c 'echo "deb http://seafile.jyx2048.com:2345/waydroid-runner/lxc/ ./" > "/etc/apt/sources.list.d/gfdgdxi-list-lxc.list"' 93 | fi 94 | fi 95 | sudo cp -v /tmp/gfdgd-xi-sources/gpg.asc.gpg /etc/apt/trusted.gpg.d/gfdgdxi-list-waydroid.gpg 96 | sudo cp -v /tmp/gfdgd-xi-sources/github.list /etc/apt/sources.list.d/gfdgdxi-list-waydroid.list 97 | sudo apt update 98 | sudo apt install waydroid lxc -y 99 | sudo systemctl restart waydroid-container.service 100 | sudo waydroid init -f 101 | if [[ x11 == 1 ]]; then 102 | zenity --info "--text=Waydroid安装完成,在打开 Waydroid 前请先打开 Sway 或者 Weston 以便正常使用 Waydroid(目前支持自动调用)" --no-wrap 103 | else 104 | zenity --info "--text=Waydroid安装完成!" --no-wrap 105 | fi 106 | 107 | echo 您已安装Waydroid,是否对其进行一些默认配置? 108 | echo 按回车键以进行配置,如无需配置可按右上角关闭按钮关闭页面 109 | read 110 | python3 $programPath/Waydroid-AutoConfig.py 111 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo modprobe binder_linux 3 | lsmod | grep -e binder_linux 4 | if [[ $? != 0 ]] && [[ -f /dev/binder ]] && [[ -f /dev/binderfs ]]; then 5 | echo 您的内核似乎不支持 binder 模块,是否继续安装?安装完后可能无法使用 6 | echo 按回车继续 7 | read 8 | fi 9 | if [[ $XDG_SESSION_TYPE == "x11" ]]; then 10 | echo 警告:你当前使用的是 x11 协议而非 Wayland 协议,Waydroid 只支持 Wayland 协议 11 | echo 按回车键忽略该警告继续安装Waydroid本体 12 | read 13 | fi 14 | sudo apt install curl ca-certificates -y 15 | curl https://repo.waydro.id | sudo bash 16 | sudo apt install waydroid -y 17 | echo Waydroid本体安装完成!按回车键退出! 18 | read -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Installer/InstallSway.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | which sway 3 | if [[ $? == 0 ]]; then 4 | echo Sway have already installed 5 | exit 0 6 | fi 7 | sudo apt update 8 | # 判断 apt 源里是否有 sway 9 | apt list sway | grep sway 10 | if [[ $? == 0 ]]; then 11 | echo 从 apt 源安装 Sway 12 | sudo apt update 13 | sudo apt install sway aria2 -y 14 | # 这个包还未构建 15 | rm -rfv /tmp/sway-desktop-icon.deb 16 | aria2c -x 16 -s 16 http://sway.waydroid-runner.gfdgdxi.top/sway-launcher-icon_1.0.0_all.deb -d /tmp -o sway-desktop-icon.deb 17 | sudo apt install /tmp/sway-desktop-icon.deb 18 | exit 0 19 | fi 20 | if [[ -f /etc/deepin_version ]]; then 21 | cat /etc/deepin_version | grep 23 22 | if [[ $? == 0 ]]; then 23 | rm -rf /tmp/gfdgd-xi-sources 24 | mkdir -p /tmp/gfdgd-xi-sources 25 | wget -P /tmp/gfdgd-xi-sources http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/gpg.asc 26 | #wget -P /tmp/gfdgd-xi-sources http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/sources/github.list 27 | gpg --dearmor /tmp/gfdgd-xi-sources/gpg.asc 28 | sudo bash -c 'echo "deb http://seafile.jyx2048.com:2345/waydroid-runner/sway-for-deepin23-beta1/ ./" > "/etc/apt/sources.list.d/gfdgdxi-list-lxc.list"' 29 | sudo apt update 30 | sudo apt install sway -y 31 | exit 0 32 | fi 33 | fi 34 | echo 该系统暂时无法安装 Sway! 35 | exit 1 36 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Installer/InstallWeston.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | which weston 3 | if [[ $? == 0 ]]; then 4 | echo Weston have already installed 5 | exit 0 6 | fi 7 | sudo apt update 8 | sudo apt install weston aria2 -y 9 | rm -rfv /tmp/weston-desktop-icon.deb 10 | aria2c -x 16 -s 16 http://sway.waydroid-runner.gfdgdxi.top/weston-launcher-icon_1.0.0_all.deb -d /tmp -o weston-desktop-icon.deb 11 | sudo apt reinstall /tmp/weston-desktop-icon.deb 12 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Waydroid_Installer/Waydroid-AutoConfig.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | #Please DO NOT RUNNING BY sudo! 3 | import os 4 | import sys 5 | import time 6 | import subprocess 7 | programPath = os.path.split(os.path.realpath(__file__))[0] # 获取程序路径 8 | 9 | print('-请在下方输入您的sudo用户密码:') 10 | os.system('sudo echo 提权完成! && clear') 11 | print('本程序将默认开启以下功能:') 12 | print('1.开启多窗口模式') 13 | print('2.默认防止屏幕旋转') 14 | #print('3.设置语言为中文/简体') 15 | print('3.Deepin-v23下显示Wayland的安卓窗口光标') 16 | print('4.开启剪切板互通功能') 17 | print('-建议使用Ubuntu等国际化Debian发行版') 18 | print() 19 | 20 | choose = input('-是否需要安装Magisk-Delta?是请输入y回车,不需要请直接回车:') ##Magisk-Delta安装 21 | os.system("sudo waydroid init -f") # 防止因为没有 init 导致无法正常识别 session start 输出 22 | if choose == 'y' or choose == 'Y': 23 | print('-正在安装Magisk-Delta:',end="") 24 | if not subprocess.getstatusoutput(f'python3 "{programPath}/../Magisk_Installer/Magisk.py"')[0]: 25 | print('成功!') 26 | else:print('失败!请自行查找原因!') 27 | else:print('-已跳过Magisk-Delta安装,如果您以后需要可以在Waydroid运行器里安装') 28 | 29 | if subprocess.getstatusoutput('lsb_release -a')[0]: ##检测系统版本,异常给os_release变量返回-1 30 | print('-运行部分异常,程序无法读取操作系统版本,请自行安装lsb_release组件!') 31 | os_release = -1 32 | flag_support = 0 #检测不到默认可以 33 | else: 34 | os_release = subprocess.getstatusoutput('lsb_release -a')[1] 35 | flag_unsupport = 0 #检测系统,deepin 20和UOS要特殊配置 36 | if (os_release.find('deepin')!=-1 and os_release.find('20')!=-1) or os_release.find('UOS') != -1: 37 | flag_unsupport = 1 38 | 39 | # 国内源的 Waydroid 已默认设置中文语言 40 | #以下程序先执行不需要启动session的部分,然后再启动需要启动session的部分 41 | #print('-正在设置语言为中文/简体:',end='') #先设置语言 42 | #if not subprocess.getstatusoutput(f'sudo python3 "{programPath}/../SystemConfigs/Language.py"')[0]: 43 | # print('成功!') 44 | #else:print('失败,请自行排查问题!') 45 | 46 | if flag_unsupport==1: #剪切板先检测系统,再安装,目前不支持deepin 20/UOS 47 | print('-您的系统不支持剪切板互通,已跳过安装剪切板功能') 48 | else: 49 | print('-正在开启剪切板支持:', end='') 50 | if os.system(f'python3 "{programPath}/../SystemConfigs/Clipboard-enable.py"') == 0: #这里要用os.system(),这一步时间会比较长,需要用户能看得到输出内容! 51 | print('成功!\n') 52 | else: 53 | print('失败,请自行排查问题!\n') 54 | 55 | ###接下来启动Waydroid Session进行下一步配置 56 | print('\n-正在重启Waydroid Container:', end='') 57 | if not subprocess.getstatusoutput('sudo systemctl restart waydroid-container.service')[0]: ##先重启容器 58 | print('成功!') 59 | else:print('失败,请自行排查问题!') 60 | 61 | print('-正在启动Waydroid Session,耗时会比较长,请耐心等待(一般不超过6分钟)') 62 | print('正在等待启动Waydroid Session') ###启动Waydroid Session 63 | os.popen('waydroid session start') 64 | time.sleep(5) #等Waydroid完全启动进程后再检测 65 | while True: #循环检测Waydroid session是否已启动 66 | WaydroidStatus = os.popen('sudo waydroid shell getprop init.svc.bootanim').read() #使用Android Shell内部识别启动状态 67 | if WaydroidStatus.find('stopped') != -1: ###检测session已经启动 68 | time.sleep(3) 69 | print('已检测Waydroid-session启动!\n') 70 | break 71 | time.sleep(6) 72 | 73 | if flag_unsupport == 1 or os.getenv("XDG_SESSION_TYPE") == "x11": #多窗口先检测系统,再安装,目前不支持deepin 20/UOS以及使用x11协议的情况 74 | print('-检测到您使用不支持的系统/使用X11协议,已跳过多窗口模式开启功能') 75 | else: 76 | print('-正在开启多窗口模式',end='') #检测后应用多窗口模式 77 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Multi_windows.py"')[0]==0: 78 | print('成功!') 79 | else:print('失败,请自行排查问题!') 80 | 81 | print('-正在强制防止Waydroid内应用旋转:', end='') #开启防旋转功能 82 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Do-not-rotate.py"')[0]==0: 83 | print('成功!') 84 | else:print('失败,请自行排查问题!') 85 | 86 | if os_release.find('deepin') != -1 and os_release.find('23') != -1 and os.getenv("XDG_SESSION_TYPE") == "x11": ##Deepin v23修复不显示光标的问题 87 | print('-检测到您在使用deepin v23,正在修复Wayland安卓窗口下不显示光标的问题:',end='') 88 | if subprocess.getstatusoutput(f'python3 "{programPath}/../SystemConfigs/Show-cursor.py"')[0] == 0: 89 | print('成功!') 90 | else:print('失败,请自行排查问题!') 91 | 92 | print() 93 | print('Waydroid已自动配置完成,按回车键退出!') 94 | input() 95 | sys.exit(0) -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/Widevine_Installer/Install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd /tmp 3 | rm -rfv widevine-installer 4 | mkdir -p widevine-installer 5 | cd widevine-installer 6 | aria2c -x 16 -s 16 https://jihulab.com/gfdgd-xi/waydroid-image/-/raw/main/Widevine-installer.tar 7 | tar -xvf Widevine-installer.tar 8 | sudo python3 widevine-install.py -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/Runner_tools/auto-setting.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 4 | if os.system("which waydroid") >> 8: 5 | print('-您还没有安装Waydroid主程序,现在为您安装') 6 | print("-安装 Waydroid 主程序") 7 | os.system(f"bash '{programPath}/Waydroid_Installer/Install-cn.sh'") 8 | print('自动设置将设置以下内容:1.语言设置为中文-简体 2.安装Libhoudini 3.开启多窗口模式 4.防止意外旋转') 9 | print('-正在下载Waydroid Images') 10 | os.system(f"bash '{programPath}/Waydroid_Image_Installer/Install.sh'") 11 | print('-正在设置语言') 12 | os.system(f"sudo python3 '{programPath}/SystemConfigs/Language.py'") 13 | a = os.popen('waydroid session start').read() 14 | while a.find('ready')!=-1: 15 | print('-正在开启多窗口') 16 | os.system(f"sudo python3 '{programPath}/SystemConfigs/Multi_windows.py'") 17 | print('-正在防意外旋转') 18 | os.system(f"python3 '{programPath}/SystemConfigs/Do-not-rotate.py'") 19 | print('-正在重启容器') 20 | os.system('sudo systemctl restart waydroid-container.service') 21 | print('-如您有Magisk需要,可在运行器里安装~') -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/UI/AutoConfig.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Form implementation generated from reading ui file 'AutoConfig.ui' 4 | # 5 | # Created by: PyQt5 UI code generator 5.11.3 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore, QtGui, QtWidgets 10 | 11 | class Ui_MainWindow(object): 12 | def setupUi(self, MainWindow): 13 | MainWindow.setObjectName("MainWindow") 14 | MainWindow.resize(800, 600) 15 | self.centralwidget = QtWidgets.QWidget(MainWindow) 16 | self.centralwidget.setObjectName("centralwidget") 17 | self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.centralwidget) 18 | self.verticalLayout_3.setObjectName("verticalLayout_3") 19 | self.horizontalLayout = QtWidgets.QHBoxLayout() 20 | self.horizontalLayout.setObjectName("horizontalLayout") 21 | self.searchTips = QtWidgets.QLabel(self.centralwidget) 22 | self.searchTips.setObjectName("searchTips") 23 | self.horizontalLayout.addWidget(self.searchTips) 24 | self.searchThings = QtWidgets.QLineEdit(self.centralwidget) 25 | self.searchThings.setObjectName("searchThings") 26 | self.horizontalLayout.addWidget(self.searchThings) 27 | self.saerchBotton = QtWidgets.QPushButton(self.centralwidget) 28 | self.saerchBotton.setObjectName("saerchBotton") 29 | self.horizontalLayout.addWidget(self.saerchBotton) 30 | self.verticalLayout_3.addLayout(self.horizontalLayout) 31 | self.searchList = QtWidgets.QListView(self.centralwidget) 32 | self.searchList.setObjectName("searchList") 33 | self.verticalLayout_3.addWidget(self.searchList) 34 | self.horizontalLayout_2 = QtWidgets.QHBoxLayout() 35 | self.horizontalLayout_2.setObjectName("horizontalLayout_2") 36 | spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) 37 | self.horizontalLayout_2.addItem(spacerItem) 38 | self.getInfoButton = QtWidgets.QPushButton(self.centralwidget) 39 | self.getInfoButton.setObjectName("getInfoButton") 40 | self.horizontalLayout_2.addWidget(self.getInfoButton) 41 | self.getFen = QtWidgets.QPushButton(self.centralwidget) 42 | self.getFen.setObjectName("getFen") 43 | self.horizontalLayout_2.addWidget(self.getFen) 44 | self.runBotton = QtWidgets.QPushButton(self.centralwidget) 45 | self.runBotton.setObjectName("runBotton") 46 | self.horizontalLayout_2.addWidget(self.runBotton) 47 | self.verticalLayout_3.addLayout(self.horizontalLayout_2) 48 | MainWindow.setCentralWidget(self.centralwidget) 49 | self.menubar = QtWidgets.QMenuBar(MainWindow) 50 | self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36)) 51 | self.menubar.setObjectName("menubar") 52 | self.menu = QtWidgets.QMenu(self.menubar) 53 | self.menu.setObjectName("menu") 54 | self.menu_2 = QtWidgets.QMenu(self.menubar) 55 | self.menu_2.setObjectName("menu_2") 56 | MainWindow.setMenuBar(self.menubar) 57 | self.about = QtWidgets.QAction(MainWindow) 58 | self.about.setObjectName("about") 59 | self.exitProgram = QtWidgets.QAction(MainWindow) 60 | self.exitProgram.setObjectName("exitProgram") 61 | self.help = QtWidgets.QAction(MainWindow) 62 | self.help.setObjectName("help") 63 | self.openFile = QtWidgets.QAction(MainWindow) 64 | self.openFile.setObjectName("openFile") 65 | self.actionGitlink = QtWidgets.QAction(MainWindow) 66 | self.actionGitlink.setCheckable(True) 67 | self.actionGitlink.setObjectName("actionGitlink") 68 | self.actionGitee = QtWidgets.QAction(MainWindow) 69 | self.actionGitee.setCheckable(True) 70 | self.actionGitee.setObjectName("actionGitee") 71 | self.actionGithub = QtWidgets.QAction(MainWindow) 72 | self.actionGithub.setCheckable(True) 73 | self.actionGithub.setChecked(True) 74 | self.actionGithub.setObjectName("actionGithub") 75 | self.action_IPv6 = QtWidgets.QAction(MainWindow) 76 | self.action_IPv6.setCheckable(True) 77 | self.action_IPv6.setObjectName("action_IPv6") 78 | self.action = QtWidgets.QAction(MainWindow) 79 | self.action.setCheckable(True) 80 | self.action.setObjectName("action") 81 | self.action_2 = QtWidgets.QAction(MainWindow) 82 | self.action_2.setCheckable(True) 83 | self.action_2.setChecked(False) 84 | self.action_2.setObjectName("action_2") 85 | self.action_3 = QtWidgets.QAction(MainWindow) 86 | self.action_3.setCheckable(True) 87 | self.action_3.setObjectName("action_3") 88 | self.menu.addAction(self.openFile) 89 | self.menu.addSeparator() 90 | self.menu.addAction(self.exitProgram) 91 | self.menu_2.addAction(self.actionGithub) 92 | self.menu_2.addAction(self.actionGitee) 93 | self.menu_2.addAction(self.actionGitlink) 94 | self.menu_2.addAction(self.action_IPv6) 95 | self.menu_2.addAction(self.action_2) 96 | self.menu_2.addAction(self.action_3) 97 | self.menu_2.addAction(self.action) 98 | self.menubar.addAction(self.menu.menuAction()) 99 | self.menubar.addAction(self.menu_2.menuAction()) 100 | 101 | self.retranslateUi(MainWindow) 102 | QtCore.QMetaObject.connectSlotsByName(MainWindow) 103 | 104 | def retranslateUi(self, MainWindow): 105 | _translate = QtCore.QCoreApplication.translate 106 | MainWindow.setWindowTitle(_translate("MainWindow", "自动部署脚本")) 107 | self.searchTips.setText(_translate("MainWindow", "搜索内容(为空代表显示所有内容):")) 108 | self.saerchBotton.setText(_translate("MainWindow", "搜索")) 109 | self.getInfoButton.setText(_translate("MainWindow", "获取选中项介绍")) 110 | self.getFen.setText(_translate("MainWindow", "获取/提交选中项的评分和评论")) 111 | self.runBotton.setText(_translate("MainWindow", "安装")) 112 | self.menu.setTitle(_translate("MainWindow", "程序")) 113 | self.menu_2.setTitle(_translate("MainWindow", "切换源")) 114 | self.about.setText(_translate("MainWindow", "关于")) 115 | self.exitProgram.setText(_translate("MainWindow", "退出程序")) 116 | self.help.setText(_translate("MainWindow", "帮助")) 117 | self.openFile.setText(_translate("MainWindow", "打开本地部署脚本")) 118 | self.actionGitlink.setText(_translate("MainWindow", "Gitlink 源(推荐)")) 119 | self.actionGitee.setText(_translate("MainWindow", "Gitee 源")) 120 | self.actionGithub.setText(_translate("MainWindow", "Github 源(国外用户推荐)")) 121 | self.action_IPv6.setText(_translate("MainWindow", "备用源1(只限IPv6用户)")) 122 | self.action.setText(_translate("MainWindow", "本地测试源(127.0.0.1)")) 123 | self.action_2.setText(_translate("MainWindow", "备用源2")) 124 | self.action_3.setText(_translate("MainWindow", "备用源3")) 125 | 126 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/UI/AutoConfig.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | 自动部署脚本 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 搜索内容(为空代表显示所有内容): 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 搜索 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | Qt::Horizontal 48 | 49 | 50 | 51 | 40 52 | 20 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 获取选中项介绍 61 | 62 | 63 | 64 | 65 | 66 | 67 | 获取/提交选中项的评分和评论 68 | 69 | 70 | 71 | 72 | 73 | 74 | 安装 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 0 86 | 0 87 | 800 88 | 36 89 | 90 | 91 | 92 | 93 | 程序 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 切换源 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 关于 117 | 118 | 119 | 120 | 121 | 退出程序 122 | 123 | 124 | 125 | 126 | 帮助 127 | 128 | 129 | 130 | 131 | 打开本地部署脚本 132 | 133 | 134 | 135 | 136 | true 137 | 138 | 139 | true 140 | 141 | 142 | Gitlink 源(推荐) 143 | 144 | 145 | 146 | 147 | true 148 | 149 | 150 | Gitee 源 151 | 152 | 153 | 154 | 155 | true 156 | 157 | 158 | Github 源(国外用户推荐) 159 | 160 | 161 | 162 | 163 | true 164 | 165 | 166 | 备用源1(只限IPv6用户) 167 | 168 | 169 | 170 | 171 | true 172 | 173 | 174 | 本地测试源(127.0.0.1) 175 | 176 | 177 | 178 | 179 | true 180 | 181 | 182 | false 183 | 184 | 185 | 备用源2 186 | 187 | 188 | 189 | 190 | true 191 | 192 | 193 | 备用源3 194 | 195 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/defult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/defult.png -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/getxmlimg.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import PIL.Image as Image 4 | import PIL.ImageDraw as ImageDraw 5 | except: 6 | os.system("python3 -m pip install --upgrade pillow --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple") 7 | import PIL.Image as Image 8 | import PIL.ImageDraw as ImageDraw 9 | import zipfile 10 | import subprocess 11 | import re 12 | 13 | class getsavexml(): 14 | 15 | def savexml(self,apkFilePath,xmlpath,iconSavePath): 16 | cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath 17 | print(cmddumpid) 18 | xmltree = subprocess.getoutput(cmddumpid) 19 | xmls = xmltree.splitlines() 20 | # find strs ,print next line 21 | def FindStrs(lines,strs): 22 | i=0 23 | while i < len(lines): 24 | if re.search(strs,lines[i]): 25 | tmpstr = lines[i+1] 26 | i += 1 27 | Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1] 28 | return Resultstr 29 | else: 30 | i += 1 31 | #从apk的信息中获取前后景图片的ID号 32 | backimgid = FindStrs(xmls,"background") 33 | foreimgid = FindStrs(xmls,"foreground") 34 | print(backimgid) 35 | print(foreimgid) 36 | 37 | # 直接从apk resource文件获取前后两层图片路径及ID字符串 38 | resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"") 39 | resourcelines = resource.splitlines() 40 | print(resourcelines) 41 | 42 | # 从过滤出的字符串中获取所有相同ID的图片路径 43 | def Findpicpath(lines,imgid): 44 | i=0 45 | Resultstr = [] 46 | while i < len(lines): 47 | if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) : 48 | print(lines[i+1]) 49 | tmpstr = lines[i+1].replace("\"","") 50 | i += 1 51 | Resultstr.append(tmpstr.split()[-1]) 52 | else: 53 | i += 1 54 | return Resultstr 55 | 56 | #获取所有带前后图片ID的图片路径(相同背景或者前景的图片ID但分辨率不一样) 57 | backimgs = Findpicpath(resourcelines,backimgid) 58 | foreimgs = Findpicpath(resourcelines,foreimgid) 59 | print(backimgs) 60 | print(foreimgs) 61 | #获取分辨率最高的图片路径 62 | def getmaxsize(imgs): 63 | j = 0 64 | size=(0,0) 65 | zipapk = zipfile.ZipFile(apkFilePath) 66 | imgpath = "" 67 | while j < len(imgs): 68 | print(imgs[j]) 69 | img = Image.open(zipapk.open(imgs[j])) 70 | print(imgs[j]) 71 | print(img.size) 72 | if size < img.size: 73 | size = img.size 74 | imgpath = imgs[j] 75 | j += 1 76 | return imgpath 77 | 78 | # 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片 79 | iconbackpath = getmaxsize(backimgs) 80 | iconforepath = getmaxsize(foreimgs) 81 | print(iconbackpath + " " + iconforepath) 82 | 83 | #从APK文件获取最终图片 84 | zipapk = zipfile.ZipFile(apkFilePath) 85 | iconback = zipapk.open(iconbackpath) 86 | iconfore = zipapk.open(iconforepath) 87 | 88 | 89 | # 叠加图片,mask 设置前景为蒙版 90 | iconbackimg = Image.open(iconback).convert("RGBA") 91 | iconforeimg = Image.open(iconfore).convert("RGBA") 92 | iconbackimg.paste(iconforeimg,mask=iconforeimg) 93 | 94 | 95 | # 圆角图片函数,网上拷贝的 96 | def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266 97 | """ 98 | 圆角处理 99 | :param img: 源图象。 100 | :param radii: 半径,如:30。 101 | :return: 返回一个圆角处理后的图象。 102 | """ 103 | # 画圆(用于分离4个角) 104 | circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布 105 | draw = ImageDraw.Draw(circle) 106 | draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形 107 | # 原图 108 | img = img.convert("RGBA") 109 | w, h = img.size 110 | # 画4个角(将整圆分离为4个部分) 111 | alpha = Image.new('L', img.size, 255) 112 | alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角 113 | alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角 114 | alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角 115 | alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角 116 | # alpha.show() 117 | img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见 118 | return img 119 | 120 | # 圆角半径1/8边长,保存icon图片 121 | w,h = iconbackimg.size 122 | iconimg = circle_corner(iconbackimg,int(w/8)) 123 | iconimg.save(iconSavePath) 124 | 125 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/deb/opt/apps/spark-waydroid-runner/files/icon.png -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/information.json: -------------------------------------------------------------------------------- 1 | { 2 | "Package": "spark-waydroid-runner", 3 | "Url": [ 4 | "https://gitee.com/gfdgd-xi/waydroid-runner", 5 | "https://gitee.com/gfdgd-xi/waydroid-runner" 6 | ], 7 | "Version": "1.2.0.1~230929", 8 | "System": "Linux", 9 | "Tips": [ 10 | "在安装运行器后推荐按住以下顺序操作以更好的使用 Waydroid:", 11 | "1. 安装 Waydroid(本体、国内源)", 12 | "2. 安装 Waydroid 镜像(国内源)", 13 | "3. 安装 Libhoudini(二进制翻译器)", 14 | "4. 开启多窗口(可选)", 15 | "5. 禁用多窗口下全屏窗口屏幕自动旋转(可选)", 16 | "也可以在 菜单栏->Waydroid->一键优化Waydroid 一键处理" 17 | ], 18 | "Update": [ 19 | "V1.1.0:", 20 | "※1、支持在 Deepin20/UOS 安装 Waydroid(效果无法保证且需要升级系统组件,容易导致系统问题,且在 UOS 下要开启开发者模式)", 21 | "※2、修复在 Deepin 23 运行时因为缺少 PIL 库导致无法运行的问题", 22 | "※3、支持在 X11 下运行 Waydroid 时自动启动 Sway/Weston", 23 | "※4、修复 Waydroid 应用商店可能出现 Session Stop 的问题", 24 | "※5、支持切换 Waydroid GPU", 25 | "※6、新增右键打开 APK 功能", 26 | "※7、更换程序图标", 27 | "※8、新增关闭 Waydroid 多窗口功能", 28 | "※9、新增安装 Widevine 功能", 29 | "※10、修复 Waydroid 运行器 1.0.0 在 X11 环境安装 Waydroid 后无法正常在 Weston/Sway 显示主界面", 30 | "11、新增设置屏幕自动旋转的功能", 31 | "12、新增修复 Waydroid 多窗口在部分桌面环境无法显示鼠标问题的功能", 32 | "", 33 | "V1.0.0:", 34 | "※1、新增 Waydroid 主程序安装功能、镜像下载功能及其国内源", 35 | "※2、支持安装 Magisk、Libhoudini(二进制翻译器,可以运行 ARM APK)", 36 | "※3、支持对 Waydroid 的初步控制", 37 | "※4、支持安装/卸载 Android 应用", 38 | "※5、提供应用商店以安装 APK" 39 | ], 40 | "Use": [ 41 | "" 42 | ], 43 | "Time": "2023-09-29 12:02:25 Linux-6.1.32-amd64-desktop-hwe-x86_64-with-glibc2.36", 44 | "Contribute": [ 45 | "排名不分先后", 46 | "gfdgd xi(https://gitee.com/gfdgd-xi)", 47 | "LFRon(https://gitee.com/LFRon)", 48 | "Telegram HuskyDG", 49 | "casualsuek" 50 | ] 51 | } -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | XDG_CURRENT_DESKTOP="Deepin" 3 | $1 -platformtheme deepin "$@" 4 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/updatekiller.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import os 4 | import atexit 5 | 6 | PIDFILE = '/tmp/uengine-runner.pid' 7 | 8 | #程序结束时清理pid 9 | @atexit.register 10 | def remove_pid(): 11 | '''程序结束时清理pid''' 12 | with open(PIDFILE) as pidfile: 13 | pidlst = pidfile.readlines() 14 | pidlst.remove(str(PID)+'\n') #移除记录中的pid 15 | with open(PIDFILE,'w') as pidfile: 16 | pidfile.writelines(pidlst) 17 | 18 | #更新时结束进程 19 | def main(): 20 | for i in open(PIDFILE): 21 | try: 22 | os.kill(int(i),15) 23 | except ProcessLookupError: 24 | pass 25 | ## os.remove(PIDFILE) #因修复#I6ZRZX而注释 26 | 27 | #当该程序被直接执行时,执行结束进程操作。如果是导入的形式,则只是记录pid 28 | if __name__ == '__main__': 29 | sys.exit(main()) 30 | else: 31 | #获取进程pid,用于更新时结束进程 32 | PID = os.getpid() 33 | with open(PIDFILE,'a') as pidfile: 34 | print(PID,file=pidfile) #使用print可以在行末输出换行符,而且可以省去类型转换 35 | -------------------------------------------------------------------------------- /deb/opt/apps/spark-waydroid-runner/files/waydroid-runner-update-bug: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import json 5 | import base64 6 | import requests 7 | import traceback 8 | import webbrowser 9 | import updatekiller 10 | import urllib.parse as parse 11 | import PyQt5.QtGui as QtGui 12 | import PyQt5.QtWidgets as QtWidgets 13 | 14 | # 读取文本文档 15 | def readtxt(path: "路径")->"读取文本文档": 16 | f = open(path, "r") # 设置文件对象 17 | str = f.read() # 获取内容 18 | f.close() # 关闭文本对象 19 | return str # 返回结果 20 | 21 | def Update(name, stars, contact, things, version): 22 | # post 内容 23 | data = { 24 | "Name": name, 25 | "Starts": stars, 26 | "Contact": contact, 27 | "Things": things, 28 | "Version": version 29 | } 30 | try: 31 | QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3dheWRyb2lkLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text) 32 | print(data) 33 | except: 34 | traceback.print_exc() 35 | QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}") 36 | 37 | def UpdateButtonClick(): 38 | #判断是否为空 39 | if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "": 40 | QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!") 41 | return 42 | Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version) 43 | 44 | def OpenGiteeIssues(): 45 | webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/waydroid-runner/issues") 46 | 47 | def OpenGithubIssues(): 48 | webbrowser.open_new_tab("https://github.com/gfdgd-xi/waydroid-runner/issues") 49 | 50 | # 获取用户主目录 51 | def get_home()->"获取用户主目录": 52 | return os.path.expanduser('~') 53 | 54 | ########################### 55 | # 程序信息 56 | ########################### 57 | iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) 58 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 59 | information = json.loads(readtxt(programPath + "/information.json")) 60 | version = information["Version"] 61 | 62 | ########################### 63 | # 窗口创建 64 | ########################### 65 | app = QtWidgets.QApplication(sys.argv) 66 | window = QtWidgets.QMainWindow() 67 | widget = QtWidgets.QWidget() 68 | widgetLayout = QtWidgets.QGridLayout() 69 | nameThings = QtWidgets.QLineEdit() 70 | contactThings = QtWidgets.QLineEdit() 71 | starMenu = QtWidgets.QComboBox() 72 | updateThings = QtWidgets.QTextEdit() 73 | updateButton = QtWidgets.QPushButton("提交") 74 | otherUpload = QtWidgets.QHBoxLayout() 75 | giteeButton = QtWidgets.QPushButton("Gitee Issues") 76 | githubButton = QtWidgets.QPushButton("Github Issues") 77 | otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:")) 78 | otherUpload.addWidget(giteeButton) 79 | otherUpload.addWidget(githubButton) 80 | #otherUpload.addWidget(gitlinkButton) 81 | #otherUpload.addWidget(forumButton) 82 | otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) 83 | starMenu.addItems(["5分", "4分", "3分", "2分", "1分"]) 84 | widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1) 85 | widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1) 86 | widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1) 87 | widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2) 88 | widgetLayout.addWidget(nameThings, 0, 1, 1, 1) 89 | widgetLayout.addWidget(contactThings, 0, 3, 1, 1) 90 | widgetLayout.addWidget(starMenu, 0, 5, 1, 1) 91 | widgetLayout.addWidget(updateThings, 2, 0, 1, 6) 92 | widgetLayout.addLayout(otherUpload, 3, 0, 1, 5) 93 | widgetLayout.addWidget(updateButton, 3, 5, 1, 1) 94 | giteeButton.clicked.connect(OpenGiteeIssues) 95 | githubButton.clicked.connect(OpenGithubIssues) 96 | updateButton.clicked.connect(UpdateButtonClick) 97 | widget.setLayout(widgetLayout) 98 | window.setCentralWidget(widget) 99 | window.setWindowTitle(f"Waydroid 运行器 {version} 问题/建议反馈") 100 | window.setWindowIcon(QtGui.QIcon(iconPath)) 101 | # 禁用 bug 提交 102 | updateThings.setText("该版本暂不支持 Bug 提交,请从下方按钮提交 Bug\nWaydroid 运行器 QQ 交流群:872491938") 103 | #updateThings.setDisabled(True) 104 | updateThings.setReadOnly(True) 105 | nameThings.setDisabled(True) 106 | updateButton.setDisabled(True) 107 | starMenu.setDisabled(True) 108 | contactThings.setDisabled(True) 109 | window.show() 110 | sys.exit(app.exec_()) 111 | -------------------------------------------------------------------------------- /deb/usr/share/applications/spark-waydroid-runner.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Encoding=UTF-8 4 | Categories=System; 5 | Terminal=false 6 | Exec=/usr/bin/waydroid-runner %F 7 | Icon=/opt/apps/spark-waydroid-runner/files/runner.svg 8 | Name=Waydroid Runner 9 | Comment=Waydroid Runner 10 | Comment[zh]=Waydroid 运行器 11 | Name[zh]=Waydroid 运行器 12 | StartupNotify=true 13 | MimeType=application/vnd.android.package-archive -------------------------------------------------------------------------------- /defult-old.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/defult-old.png -------------------------------------------------------------------------------- /defult.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/defult.png -------------------------------------------------------------------------------- /getxmlimg.py: -------------------------------------------------------------------------------- 1 | import os 2 | try: 3 | import PIL.Image as Image 4 | import PIL.ImageDraw as ImageDraw 5 | except: 6 | os.system("python3 -m pip install --upgrade pillow --break-system-packages --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple") 7 | os.system("python3 -m pip install --upgrade pillow --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple") 8 | import PIL.Image as Image 9 | import PIL.ImageDraw as ImageDraw 10 | import zipfile 11 | import subprocess 12 | import re 13 | 14 | class getsavexml(): 15 | 16 | def savexml(self,apkFilePath,xmlpath,iconSavePath): 17 | cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath 18 | print(cmddumpid) 19 | xmltree = subprocess.getoutput(cmddumpid) 20 | xmls = xmltree.splitlines() 21 | # find strs ,print next line 22 | def FindStrs(lines,strs): 23 | i=0 24 | while i < len(lines): 25 | if re.search(strs,lines[i]): 26 | tmpstr = lines[i+1] 27 | i += 1 28 | Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1] 29 | return Resultstr 30 | else: 31 | i += 1 32 | #从apk的信息中获取前后景图片的ID号 33 | backimgid = FindStrs(xmls,"background") 34 | foreimgid = FindStrs(xmls,"foreground") 35 | print(backimgid) 36 | print(foreimgid) 37 | 38 | # 直接从apk resource文件获取前后两层图片路径及ID字符串 39 | resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"") 40 | resourcelines = resource.splitlines() 41 | print(resourcelines) 42 | 43 | # 从过滤出的字符串中获取所有相同ID的图片路径 44 | def Findpicpath(lines,imgid): 45 | i=0 46 | Resultstr = [] 47 | while i < len(lines): 48 | if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) : 49 | print(lines[i+1]) 50 | tmpstr = lines[i+1].replace("\"","") 51 | i += 1 52 | Resultstr.append(tmpstr.split()[-1]) 53 | else: 54 | i += 1 55 | return Resultstr 56 | 57 | #获取所有带前后图片ID的图片路径(相同背景或者前景的图片ID但分辨率不一样) 58 | backimgs = Findpicpath(resourcelines,backimgid) 59 | foreimgs = Findpicpath(resourcelines,foreimgid) 60 | print(backimgs) 61 | print(foreimgs) 62 | #获取分辨率最高的图片路径 63 | def getmaxsize(imgs): 64 | j = 0 65 | size=(0,0) 66 | zipapk = zipfile.ZipFile(apkFilePath) 67 | imgpath = "" 68 | while j < len(imgs): 69 | print(imgs[j]) 70 | img = Image.open(zipapk.open(imgs[j])) 71 | print(imgs[j]) 72 | print(img.size) 73 | if size < img.size: 74 | size = img.size 75 | imgpath = imgs[j] 76 | j += 1 77 | return imgpath 78 | 79 | # 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片 80 | iconbackpath = getmaxsize(backimgs) 81 | iconforepath = getmaxsize(foreimgs) 82 | print(iconbackpath + " " + iconforepath) 83 | 84 | #从APK文件获取最终图片 85 | zipapk = zipfile.ZipFile(apkFilePath) 86 | iconback = zipapk.open(iconbackpath) 87 | iconfore = zipapk.open(iconforepath) 88 | 89 | 90 | # 叠加图片,mask 设置前景为蒙版 91 | iconbackimg = Image.open(iconback).convert("RGBA") 92 | iconforeimg = Image.open(iconfore).convert("RGBA") 93 | iconbackimg.paste(iconforeimg,mask=iconforeimg) 94 | 95 | 96 | # 圆角图片函数,网上拷贝的 97 | def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266 98 | """ 99 | 圆角处理 100 | :param img: 源图象。 101 | :param radii: 半径,如:30。 102 | :return: 返回一个圆角处理后的图象。 103 | """ 104 | # 画圆(用于分离4个角) 105 | circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布 106 | draw = ImageDraw.Draw(circle) 107 | draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形 108 | # 原图 109 | img = img.convert("RGBA") 110 | w, h = img.size 111 | # 画4个角(将整圆分离为4个部分) 112 | alpha = Image.new('L', img.size, 255) 113 | alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角 114 | alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角 115 | alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角 116 | alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角 117 | # alpha.show() 118 | img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见 119 | return img 120 | 121 | # 圆角半径1/8边长,保存icon图片 122 | w,h = iconbackimg.size 123 | iconimg = circle_corner(iconbackimg,int(w/8)) 124 | iconimg.save(iconSavePath) 125 | 126 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/icon.png -------------------------------------------------------------------------------- /information.json: -------------------------------------------------------------------------------- 1 | { 2 | "Package": "spark-waydroid-runner", 3 | "Url": [ 4 | "https://gitee.com/gfdgd-xi/waydroid-runner", 5 | "https://gitee.com/gfdgd-xi/waydroid-runner" 6 | ], 7 | "Version": "1.2.0.1~230930", 8 | "System": "Linux", 9 | "Tips": [ 10 | "如果您是先在安装Waydroid然后安装运行器的,推荐按照以下顺序操作以更好地使用 Waydroid:", 11 | "1. 安装 Libhoudini(二进制翻译器)", 12 | "2. 开启Widevine DRML3支持", 13 | "3. 开启剪切板与Linux主系统互通功能", 14 | "4. 设置语言为中文/简体,然后启动Session,执行后续步骤", 15 | "5. 开启多窗口(可选)", 16 | "6. 禁用多窗口下全屏窗口屏幕自动旋转(如果您是二合一本可以跳过)", 17 | "也可以在 菜单栏->Waydroid->一键优化Waydroid 处理" 18 | ], 19 | "Update": [ 20 | "V1.2.0:", 21 | "※1、修复GPU切换无效问题", 22 | "※2、修复部分脚本识别Session运行状态失败的问题", 23 | "※3、增加剪切板与Linux主系统互通功能(仅限Wayland模式)", 24 | "※4、增加GMS注册需要的Android-id获取功能", 25 | "※5、(重磅更新)一键配置功能全面升级,窗口化/谷歌拼音输入法/防止旋转/剪切板互通等一次到位", 26 | "※6、修复Waydroid运行器全屏显示时主系统死机问题", 27 | "", 28 | "V1.1.0:", 29 | "※1、支持在 Deepin20/UOS 安装 Waydroid(效果无法保证且需要升级系统组件,容易导致系统问题,且在 UOS 下要开启开发者模式)", 30 | "※2、修复在 Deepin 23 运行时因为缺少 PIL 库导致无法运行的问题", 31 | "※3、支持在 X11 下运行 Waydroid 时自动启动 Sway/Weston", 32 | "※4、修复 Waydroid 应用商店可能出现 Session Stop 的问题", 33 | "※5、支持切换 Waydroid GPU", 34 | "※6、新增右键打开 APK 功能", 35 | "※7、更换程序图标", 36 | "※8、新增关闭 Waydroid 多窗口功能", 37 | "※9、新增安装 Widevine 功能", 38 | "※10、修复 Waydroid 运行器 1.0.0 在 X11 环境安装 Waydroid 后无法正常在 Weston/Sway 显示主界面", 39 | "11、新增设置屏幕自动旋转的功能", 40 | "12、新增修复 Waydroid 多窗口在部分桌面环境无法显示鼠标问题的功能", 41 | "", 42 | "V1.0.0:", 43 | "※1、新增 Waydroid 主程序安装功能、镜像下载功能及其国内源", 44 | "※2、支持安装 Magisk、Libhoudini(二进制翻译器,可以运行 ARM APK)", 45 | "※3、支持对 Waydroid 的初步控制", 46 | "※4、支持安装/卸载 Android 应用", 47 | "※5、提供应用商店以安装 APK" 48 | ], 49 | "Use": [ 50 | "" 51 | ], 52 | "Time": "未知", 53 | "Contribute": [ 54 | "排名不分先后", 55 | "gfdgd xi(https://gitee.com/gfdgd-xi)", 56 | "LFRon(https://gitee.com/LFRon)", 57 | "Telegram HuskyDG", 58 | "casualsuek" 59 | ] 60 | } 61 | -------------------------------------------------------------------------------- /launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | XDG_CURRENT_DESKTOP="Deepin" 3 | $1 -platformtheme deepin "$@" 4 | -------------------------------------------------------------------------------- /menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/menu.png -------------------------------------------------------------------------------- /old-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/old-icon.png -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.apt.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Install or Reinstall Program 10 | 安装或卸载软件需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/apt 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.bash.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Run Shell 10 | 运行脚本需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/bash 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.binder.loader.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Loading Binder Module 10 | 加载 binder 模块需要输入密码 11 | preferences-system 12 | 13 | yes 14 | yes 15 | yes 16 | 17 | /usr/bin/uengine-loading-binder 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.env.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Run App 10 | 使用对应的程序需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/env 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.installscrcpy.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Install Scrcpy 10 | 安装 Scrcpy 需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /tmp/uengine-runner/InstallScrcpy.sh 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.rm.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Delete Files 10 | 删除文件需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/rm 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.uengine-bridge.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://github.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Setting UEngine Internet Bridge 10 | 设置 UEngine 桥接需要输入密码 11 | kbox 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/uengine-bridge.sh 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.uengine-session-launch-helper.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Change UEngine 10 | 设置 UEngine 需要输入密码 11 | kbox 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /usr/bin/uengine-session-launch-helper 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /pkexec/com.deepin.pkexec.uengine.window.size.setting.policy: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | gfdgd xi 7 | https://gitee.com/gfdgd-xi/uengine-runner/ 8 | 9 | Authentication is required to Set UEngine Window Size Config 10 | 设置 UEngine 窗口大小配置需要输入密码 11 | preferences-system 12 | 13 | no 14 | no 15 | auth_admin_keep 16 | 17 | /opt/apps/com.gitee.uengine.runner.spark/files/uengine-window-size-setting.py 18 | true 19 | 20 | 21 | -------------------------------------------------------------------------------- /runner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/runner.png -------------------------------------------------------------------------------- /updatekiller.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | import os 4 | import atexit 5 | 6 | PIDFILE = '/tmp/uengine-runner.pid' 7 | 8 | #程序结束时清理pid 9 | @atexit.register 10 | def remove_pid(): 11 | '''程序结束时清理pid''' 12 | with open(PIDFILE) as pidfile: 13 | pidlst = pidfile.readlines() 14 | pidlst.remove(str(PID)+'\n') #移除记录中的pid 15 | with open(PIDFILE,'w') as pidfile: 16 | pidfile.writelines(pidlst) 17 | 18 | #更新时结束进程 19 | def main(): 20 | for i in open(PIDFILE): 21 | try: 22 | os.kill(int(i),15) 23 | except ProcessLookupError: 24 | pass 25 | ## os.remove(PIDFILE) #因修复#I6ZRZX而注释 26 | 27 | #当该程序被直接执行时,执行结束进程操作。如果是导入的形式,则只是记录pid 28 | if __name__ == '__main__': 29 | sys.exit(main()) 30 | else: 31 | #获取进程pid,用于更新时结束进程 32 | PID = os.getpid() 33 | with open(PIDFILE,'a') as pidfile: 34 | print(PID,file=pidfile) #使用print可以在行末输出换行符,而且可以省去类型转换 35 | -------------------------------------------------------------------------------- /waydroid runner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gfdgd-xi/waydroid-runner/04180227c385e1c3bd1e2b6a238f586bf65a2f5b/waydroid runner.png -------------------------------------------------------------------------------- /waydroid-runner-update-bug: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import os 3 | import sys 4 | import json 5 | import base64 6 | import requests 7 | import traceback 8 | import webbrowser 9 | import updatekiller 10 | import urllib.parse as parse 11 | import PyQt5.QtGui as QtGui 12 | import PyQt5.QtWidgets as QtWidgets 13 | 14 | # 读取文本文档 15 | def readtxt(path: "路径")->"读取文本文档": 16 | f = open(path, "r") # 设置文件对象 17 | str = f.read() # 获取内容 18 | f.close() # 关闭文本对象 19 | return str # 返回结果 20 | 21 | def Update(name, stars, contact, things, version): 22 | # post 内容 23 | data = { 24 | "Name": name, 25 | "Starts": stars, 26 | "Contact": contact, 27 | "Things": things, 28 | "Version": version 29 | } 30 | try: 31 | QtWidgets.QMessageBox.information(widget, "提示", requests.post(parse.unquote(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3dheWRyb2lkLXJ1bm5lci9idWcvdXBsb2FkLnBocA==").decode("utf-8")), data=data).text) 32 | print(data) 33 | except: 34 | traceback.print_exc() 35 | QtWidgets.QMessageBox.critical(widget, "错误", f"服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息:{traceback.format_exc()}") 36 | 37 | def UpdateButtonClick(): 38 | #判断是否为空 39 | if nameThings.text() == "" or starMenu.currentText() == "" or contactThings.text() == "" or updateThings.toPlainText().replace(" ", "").replace("\n", "") == "": 40 | QtWidgets.QMessageBox.critical(widget, "错误", "反馈信息未填写完整!") 41 | return 42 | Update(name=nameThings.text(), stars=starMenu.currentText(), contact=contactThings.text(), things=updateThings.toPlainText(), version=version) 43 | 44 | def OpenGiteeIssues(): 45 | webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/waydroid-runner/issues") 46 | 47 | def OpenGithubIssues(): 48 | webbrowser.open_new_tab("https://github.com/gfdgd-xi/waydroid-runner/issues") 49 | 50 | # 获取用户主目录 51 | def get_home()->"获取用户主目录": 52 | return os.path.expanduser('~') 53 | 54 | ########################### 55 | # 程序信息 56 | ########################### 57 | iconPath = "{}/runner.svg".format(os.path.split(os.path.realpath(__file__))[0]) 58 | programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string 59 | information = json.loads(readtxt(programPath + "/information.json")) 60 | version = information["Version"] 61 | 62 | ########################### 63 | # 窗口创建 64 | ########################### 65 | app = QtWidgets.QApplication(sys.argv) 66 | window = QtWidgets.QMainWindow() 67 | widget = QtWidgets.QWidget() 68 | widgetLayout = QtWidgets.QGridLayout() 69 | nameThings = QtWidgets.QLineEdit() 70 | contactThings = QtWidgets.QLineEdit() 71 | starMenu = QtWidgets.QComboBox() 72 | updateThings = QtWidgets.QTextEdit() 73 | updateButton = QtWidgets.QPushButton("提交") 74 | otherUpload = QtWidgets.QHBoxLayout() 75 | giteeButton = QtWidgets.QPushButton("Gitee Issues") 76 | githubButton = QtWidgets.QPushButton("Github Issues") 77 | otherUpload.addWidget(QtWidgets.QLabel("如果无法正常反馈,可以用其他方式反馈:")) 78 | otherUpload.addWidget(giteeButton) 79 | otherUpload.addWidget(githubButton) 80 | #otherUpload.addWidget(gitlinkButton) 81 | #otherUpload.addWidget(forumButton) 82 | otherUpload.addSpacerItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)) 83 | starMenu.addItems(["5分", "4分", "3分", "2分", "1分"]) 84 | widgetLayout.addWidget(QtWidgets.QLabel("你的昵称:"), 0, 0, 1, 1) 85 | widgetLayout.addWidget(QtWidgets.QLabel("联系方式(电子邮箱):"), 0, 2, 1, 1) 86 | widgetLayout.addWidget(QtWidgets.QLabel("评分:"), 0, 4, 1, 1) 87 | widgetLayout.addWidget(QtWidgets.QLabel("反馈内容(支持 Markdown 格式):"), 1, 0, 1, 2) 88 | widgetLayout.addWidget(nameThings, 0, 1, 1, 1) 89 | widgetLayout.addWidget(contactThings, 0, 3, 1, 1) 90 | widgetLayout.addWidget(starMenu, 0, 5, 1, 1) 91 | widgetLayout.addWidget(updateThings, 2, 0, 1, 6) 92 | widgetLayout.addLayout(otherUpload, 3, 0, 1, 5) 93 | widgetLayout.addWidget(updateButton, 3, 5, 1, 1) 94 | giteeButton.clicked.connect(OpenGiteeIssues) 95 | githubButton.clicked.connect(OpenGithubIssues) 96 | updateButton.clicked.connect(UpdateButtonClick) 97 | widget.setLayout(widgetLayout) 98 | window.setCentralWidget(widget) 99 | window.setWindowTitle(f"Waydroid 运行器 {version} 问题/建议反馈") 100 | window.setWindowIcon(QtGui.QIcon(iconPath)) 101 | # 禁用 bug 提交 102 | updateThings.setText("该版本暂不支持 Bug 提交,请从下方按钮提交 Bug\nWaydroid 运行器 QQ 交流群:872491938") 103 | #updateThings.setDisabled(True) 104 | updateThings.setReadOnly(True) 105 | nameThings.setDisabled(True) 106 | updateButton.setDisabled(True) 107 | starMenu.setDisabled(True) 108 | contactThings.setDisabled(True) 109 | window.show() 110 | sys.exit(app.exec_()) 111 | --------------------------------------------------------------------------------