summaryrefslogtreecommitdiffstats
path: root/src/os-plugins/plugins/emufe/files/run-virt.include
diff options
context:
space:
mode:
Diffstat (limited to 'src/os-plugins/plugins/emufe/files/run-virt.include')
-rw-r--r--src/os-plugins/plugins/emufe/files/run-virt.include42
1 files changed, 33 insertions, 9 deletions
diff --git a/src/os-plugins/plugins/emufe/files/run-virt.include b/src/os-plugins/plugins/emufe/files/run-virt.include
index 913b0380..e3fbfb7f 100644
--- a/src/os-plugins/plugins/emufe/files/run-virt.include
+++ b/src/os-plugins/plugins/emufe/files/run-virt.include
@@ -36,21 +36,49 @@ PLUGINDIRQK=${OPENSLX_DEFAULT_DIR}/plugin-repo/${self}
# create TMPDIR for all users
mkdir -m 1777 /tmp/${self} 2>/dev/null
# TMPDIR
-QKTMPDIR="/tmp/${self}/${USER}/${VM_ID}"
+TMPDIR="/tmp/${self}/${USER}/${VM_ID}"
# define dirs and files which can be removed after exit, be carefull!
-RMDIRS="${QKTMPDIR}"
+RMDIRS="${TMPDIR}"
rm -rf ${RMDIRS} 2>/dev/null
mkdir -m 1777 -p ${QKTMPDIR} 2>/dev/null
# vmpath is the path to the emulator/original system image
diskfile=${vmpath}
+# emulator is the information provided via xml file
+emulator=$(grep -o 'virtualmachine param=.*"' ${xmlfile} \
+ | sed -e "s/&.*;/; /g" | awk -F '"' '{print $2}')
+
+rombios=$(grep -o 'rombios param=.*"' ${xmlfile} \
+ | sed -e "s/&.*;/; /g" | awk -F '"' '{print $2}')
-# display name, remove blanks because of cmdline problems
displayname=$(echo ${displayname} | sed -e "s, ,-,g")
-VIRTCMDOPTS="${VIRTCMDOPTS} -name ${displayname}"
+
+VIRTCMD="${emulator}"
+
+case "${emulator}" in
+ dosbox*|Dosbox*)
+ tar -xpzf ${diskfile} -C "${TMPDIR}"
+ VIRTCMDOPTS="${VIRTCMDOPTS} ${TMPDIR}"
+ ;;
+ SheepShaver*|sheepshaver*)
+ [ "x${rombios}" != "x" ] && rom="-rom ${xmlpath}${rombios}"
+ VIRTCMDOPTS="${VIRTCMDOPTS} -name ${displayname} ${rom}"
+ ;;
+ hatari*|Hatari*)
+
+ ;;
+ *mess*)
+ [ "x${rombios}" != "x" ] && rom="${xmlpath}${rombios}"
+ VIRTCMDOPTS="${VIRTCMDOPTS} ${rom}"
+ ;;
+ *uae*)
+ [ "x${rombios}" != "x" ] && rom="-s kickstart_rom_file=${xmlpath}${rombios}"
+ VIRTCMDOPTS="${VIRTCMDOPTS} ${rom}"
+ ;;
+esac
writelog "Directories:"
-writelog "\tTMPDIR:\t\t\t$QKTMPDIR"
+writelog "\tTMPDIR:\t\t\t$TMPDIR"
writelog "Diskimage:"
writelog "\tDisk type:\t\t$imgtype"
writelog "\tDisk file:\t\t$diskfile"
@@ -78,8 +106,4 @@ writelog "\tNetwork kind:\t\t${network_kind}"
################################################################################
-# define first, you do not want VIRTCMDOPTS from graphical start
-VIRTCMDHL=${VIRTCMD}
-VIRTCMDOPTSHL="${VIRTCMDOPTS} -nographic ${diskfile}"
-