summaryrefslogtreecommitdiff
path: root/helpcontent2
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-08-26 16:20:01 +0200
committerJan Holesovsky <kendy@suse.cz>2011-08-26 16:20:01 +0200
commit6cc4494b9815e93fa3d6c7dceb0f1c64dd21497a (patch)
treef13e8ac03b94b3bd9aec5aa3e3488d272dad2baa /helpcontent2
parent3de9c387a039670adfa3e6cfa851ea1dfcbc6117 (diff)
Add checks to the hhc.exe installation, to make it more covenient.
Diffstat (limited to 'helpcontent2')
-rwxr-xr-xhelpcontent2/wiki-to-help/HHC/install_hhc.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/helpcontent2/wiki-to-help/HHC/install_hhc.sh b/helpcontent2/wiki-to-help/HHC/install_hhc.sh
index 8f13788827..344ccbd5b0 100755
--- a/helpcontent2/wiki-to-help/HHC/install_hhc.sh
+++ b/helpcontent2/wiki-to-help/HHC/install_hhc.sh
@@ -14,15 +14,18 @@
# Abortion of install if anything fails, e.g. the download of HHC.
#
-echo "Please wait"
+which wine > /dev/null 2>&1 || { echo "Please install 'wine'." ; exit 1 ; }
+which cabextract > /dev/null 2>&1 || { echo "Please install 'cabextract'." ; exit 1 ; }
+which wget > /dev/null 2>&1 || { echo "Please install 'wget'." ; exit 1 ; }
-cd "$(dirname "$0")" # cd to path of this script
+echo "Going to install hhc.exe to your wine installation..."
+cd "$(dirname $0)" # cd to path of this script
WINEPREFIX=${WINEPREFIX:=$HOME/.wine}
-test -d "$WINEPREFIX" || wineprefixcreate 2>> /dev/null
+test -d "$WINEPREFIX" || winecfg
HHDIR="${WINEPREFIX}/dosdevices/c:/htmlhelp"
-mkdir "$HHDIR"
+mkdir -p "$HHDIR"
# Setup the registry
# Set Wine's Windows version to Windows 2000 (or above), and add an override to use the native itss.dll, both via winecfg.
@@ -61,7 +64,6 @@ cabextract -F mfc40.dll mfc40.exe
cp -a mfc40.dll "$WINEPREFIX/drive_c/windows/system32/"
echo
-echo Done.
+echo Done, hhc.exe installed.
exit 0
-