#! /bin/sh # # (C) Copyright 1992, ..., 2007 the "DOSEMU-Development-Team". # # for details see file COPYING.DOSEMU in the DOSEMU distribution # SYSTEM_CONF_PATH="" install_dos () { if [ -n "$INSTALL" -o \ ! -e $HOME/.dosemu/drives/c -o \ ! -f $HOME/.dosemu/disclaimer ]; then # This either is the first time this user calls 'dosemu' # or the user cd'ed here and we forced a 'take over' # we assume this is a fresh unpacked dosemu-freedos distribution # In this case this script has to be called _from_ this directory. if [ ! -x $BOOT_DIR_PATH/bin/dosemu.bin ]; then echo " You are starting this script from the wrong directory. e.g. if you unpacked dosemu-freedos-bin.tgz within $HOME/mydos, you have to 'cd' into $HOME/mydos/dosemu before running this script. Once you have successfully booted, this directory will be remembered via the symbolic link ~/.dosemu/drives/c and you can call dosemu from everywhere. " exit 1 fi mkdir -p $HOME/.dosemu/drive_c $HOME/.dosemu/drives rm -f $HOME/.dosemu/drives/c $HOME/.dosemu/drives/d ln -sf $HOME/.dosemu/drive_c $HOME/.dosemu/drives/c ln -sf $BOOT_DIR_PATH/drive_z $HOME/.dosemu/drives/d cp -fp $BOOT_DIR_PATH/conf/autoexec.bat $BOOT_DIR_PATH/freedos/autoexec.bat cp -fp $BOOT_DIR_PATH/conf/config.sys $BOOT_DIR_PATH/freedos/config.sys fi unset INSTALL } get_binary() { install_dos BOOT_DIR_PATH=`cd $HOME/.dosemu/drives && ls -l d | sed 's/.* -> //'`/.. if [ ! -x $BOOT_DIR_PATH/bin/dosemu.bin ]; then #older situation BOOT_DIR_PATH=`cd $HOME/.dosemu/drives && ls -l c | sed 's/.* -> //'`/.. fi BINARY=$BOOT_DIR_PATH/bin/dosemu.bin if [ -n "$DISPLAY" -a -z "$DUMBTERM" ]; then if [ ! -f $BOOT_DIR_PATH/Xfonts/fonts.dir ]; then (cd $BOOT_DIR_PATH/Xfonts; mkfontdir) fi SYSTEM_XFONTS_PATH=$BOOT_DIR_PATH/Xfonts fi SUFFIX="$SUFFIX --Flibdir $BOOT_DIR_PATH" } # ignore dosemu.conf by default for non-systemwide installations IGNORE_DOSEMU_CONF="-n"