#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
presentation "Cuneiform" "Cognitive Technologies" "http://www.cuneiform.ru" "Konstantin 'CHAIN' Vasilchenko" "Cuneiform"
# select language ru or en
LNG_CU_MKCH="Do you want to download CuneiForm automaticaly or choose installer from your harddrive?"
LNG_CU_DOWN="Download"
LNG_CU_CHOOSE="Choose_installer"
LNG_ICO_INST="Do you want to install package 'icoutils' to create menu with icons? (if you are not sure whether 'icoutils', answer YES)"
LNG_ICO_YES="Yes"
LNG_ICO_NO="No"
LNG_CU_ATT="1. Please don't use the wizard, try to work with documents step by step from the menu.
2. There is a data error when working with scanners HP, Epson, BENQ, Canon, Xerox, Mustek etc.
Remedy: You have to edit the file 'face.ini', which is located in the directory windows. Then find TWAIN_TransferMode key in the file and make it equal to 'memory-native'. It's have to be 'TWAIN_TransferMode = memory-native' . Answers to other questions on CuneiForm program can be found at the forum www.cuneiform.ru/forum/."
# create temp, prepare prefix
rm $REPERTOIRE/tmp/Cuneiform/ -R
mkdir -p $REPERTOIRE/tmp/Cuneiform
cd $REPERTOIRE/tmp/Cuneiform
mkdir -p $REPERTOIRE/wineprefix/Cuneiform/
# choose download or use ready installer and prepare installation
down=$(menu "$LNG_CU_MKCH" "$LNG_CU_DOWN $LNG_CU_CHOOSE")
if [ "$down" == "$LNG_CU_CHOOSE" ]
then
cd $HOME
INSTALLDIR=$(selectionner_fichier "$LNG_LI_INSTALLFILE")
if [ "$INSTALLDIR" = "" ]
then
erreur "$LNG_LI_CHOOSEFILE"
else
WORKINGINSTALLDIR=$(dirname "$INSTALLDIR")
cd $WORKINGINSTALLDIR
fi
else
telecharger "$LNG_DOWNLOAD" "http://www.cuneiform.ru/downloads/cuneiform.zip" ""
attendre "$LNG_SCRIPT_WAIT" "unzip cuneiform.zip" ""
INSTALLDIR="setup.exe"
fi
# create prefix and run installer
select_prefixe "$HOME/.PlayOnLinux/wineprefix/Cuneiform/"
creer_prefixe
wine "$INSTALLDIR" /V/qn
# create launcher
creer_lanceur "Cuneiform" "Program Files/Cognitive/CuneiForm/" "sface.exe" "Cuneiform" "Cuneiform"
Set_WineVersion_Assign "0.9.54" "Cuneiform"
# Apply Fix with msvcrt.dll
echo "[HKEY_CURRENT_USERSoftwareWineDllOverrides]" > $REPERTOIRE/tmp/msvcrt.reg
echo ""msvcrt"="native,builtin"" >> $REPERTOIRE/tmp/msvcrt.reg
regedit $REPERTOIRE/tmp/msvcrt.reg
rm -f $REPERTOIRE/tmp/msvcrt.reg
rm $REPERTOIRE/tmp/Cuneiform/ -R
simuler_reboot
# additional info
attention "$LNG_CU_ATT"
end_install
exit