forked from lucasmz1/Qemu_Appimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppRun
14 lines (14 loc) · 3.73 KB
/
AppRun
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
HERE="$(dirname "$(readlink -f "${0}")")"
export UNION_PRELOAD="${HERE}"
export LD_PRELOAD="${HERE}/libunionpreload.so"
export PATH="${HERE}"/usr:"${HERE}"/usr/libexec:"${HERE}"/usr/bin:"${HERE}"/usr/lib:"${HERE}"/usr/include:"${HERE}"/usr/var:"${HERE}"/usr/var/run:"${HERE}"/usr/share:"${HERE}"/usr/share/doc:"${HERE}"/usr/share/qemu:"${HERE}"/usr/share/qemu/keymaps:"${HERE}"/usr/share/qemu/firmware:"${HERE}"/usr/share/applications:"${HERE}"/usr/share/mime:"${HERE}"/usr/share/mime/x-epoc:"${HERE}"/usr/share/mime/inode:"${HERE}"/usr/share/mime/video:"${HERE}"/usr/share/mime/text:"${HERE}"/usr/share/mime/application:"${HERE}"/usr/share/mime/audio:"${HERE}"/usr/share/mime/model:"${HERE}"/usr/share/mime/image:"${HERE}"/usr/share/mime/font:"${HERE}"/usr/share/mime/x-content:"${HERE}"/usr/share/mime/packages:"${HERE}"/usr/share/mime/multipart:"${HERE}"/usr/share/mime/message:"${PATH}"
export LD_LIBRARY_PATH="${HERE}"/usr:"${HERE}"/usr/libexec:"${HERE}"/usr/bin:"${HERE}"/usr/lib:"${HERE}"/usr/include:"${HERE}"/usr/var:"${HERE}"/usr/var/run:"${HERE}"/usr/share:"${HERE}"/usr/share/doc:"${HERE}"/usr/share/qemu:"${HERE}"/usr/share/qemu/keymaps:"${HERE}"/usr/share/qemu/firmware:"${HERE}"/usr/share/applications:"${HERE}"/usr/share/mime:"${HERE}"/usr/share/mime/x-epoc:"${HERE}"/usr/share/mime/inode:"${HERE}"/usr/share/mime/video:"${HERE}"/usr/share/mime/text:"${HERE}"/usr/share/mime/application:"${HERE}"/usr/share/mime/audio:"${HERE}"/usr/share/mime/model:"${HERE}"/usr/share/mime/image:"${HERE}"/usr/share/mime/font:"${HERE}"/usr/share/mime/x-content:"${HERE}"/usr/share/mime/packages:"${HERE}"/usr/share/mime/multipart:"${HERE}"/usr/share/mime/message:"${LD_LIBRARY_PATH}"
export XDG_DATA_DIRS="${HERE}"/usr:"${HERE}"/usr/libexec:"${HERE}"/usr/bin:"${HERE}"/usr/lib:"${HERE}"/usr/include:"${HERE}"/usr/var:"${HERE}"/usr/var/run:"${HERE}"/usr/share:"${HERE}"/usr/share/doc:"${HERE}"/usr/share/qemu:"${HERE}"/usr/share/qemu/keymaps:"${HERE}"/usr/share/qemu/firmware:"${HERE}"/usr/share/applications:"${HERE}"/usr/share/mime:"${HERE}"/usr/share/mime/x-epoc:"${HERE}"/usr/share/mime/inode:"${HERE}"/usr/share/mime/video:"${HERE}"/usr/share/mime/text:"${HERE}"/usr/share/mime/application:"${HERE}"/usr/share/mime/audio:"${HERE}"/usr/share/mime/model:"${HERE}"/usr/share/mime/image:"${HERE}"/usr/share/mime/font:"${HERE}"/usr/share/mime/x-content:"${HERE}"/usr/share/mime/packages:"${HERE}"/usr/share/mime/multipart:"${HERE}"/usr/share/mime/message:"${XDG_DATA_DIRS}"
export GSETTINGS_SCHEMA_DIR="${HERE}"/usr/share/glib-2.0/schemas/:"${GSETTINGS_SCHEMA_DIR}"
if [[ "${1}" =~ ^(qemu-edid|qemu-system-tricore|qemu-s390x|qemu-system-ppc64|qemu-sparc|qemu-riscv64|qemu-system-aarch64|qemu-io|qemu-keymap|qemu-system-sh4|qemu-xtensa|qemu-ga|qemu-system-alpha|qemu-microblaze|qemu-system-s390x|qemu-microblazeel|qemu-nbd|qemu-system-avr|qemu-system-xtensaeb|qemu-m68k|qemu-storage-daemon|qemu-riscv32|qemu-ppc64le|qemu-system-nios2|qemu-sh4|qemu-aarch64_be|qemu-system-mips64el|qemu-sparc32plus|qemu-sparc64|qemu-system-riscv32|qemu-img|qemu-system-i386|qemu-system-cris|qemu-armeb|qemu-system-arm|qemu-mipsn32el|qemu-x86_64|qemu-system-or1k|qemu-system-mips|qemu-ppc64|qemu-system-microblazeel|qemu-system-mipsel|qemu-mipsel|qemu-system-mips64|qemu-or1k|qemu-alpha|qemu-loongarch64|qemu-system-microblaze|qemu-system-hppa|qemu-nios2|qemu-hexagon|qemu-ppc|qemu-system-m68k|qemu-mipsn32|qemu-mips|qemu-i386|qemu-aarch64|qemu-system-rx|qemu-system-ppc|qemu-cris|qemu-mips64el|qemu-system-sparc|qemu-arm|qemu-system-loongarch64|qemu-xtensaeb|qemu-system-riscv64|qemu-system-sh4eb|qemu-hppa|qemu-system-xtensa|qemu-mips64|elf2dmp|qemu-sh4eb|qemu-pr-helper|qemu-system-x86_64|qemu-system-sparc64|qemu-bridge-helper|virtfs-proxy-helper)$ ]]; then
args=( "${@}" )
args[0]="${1}"
set "${args[@]}"
fi
exec "${@}"