chain2k |
Mercredi 30 Janvier 2008 à 6:47
|
chain2k![Anonymous](https://www.playonmac.com/images/anonymous.png)
|
That's my script to install free OCR software CuneiForm:
#!/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" 1 5
# create temp, prefix, download installer, install software
mkdir -p $REPERTOIRE/wineprefix/Cuneiform/
rm $REPERTOIRE/tmp/Cuneiform/ -R
mkdir -p $REPERTOIRE/tmp/Cuneiform
cd $REPERTOIRE/tmp/Cuneiform
telecharger "$LNG_DOWNLOAD" "http://www.cuneiform.ru/downloads/cuneiform.zip" "" 2 5
select_prefixe "$HOME/.PlayOnLinux/wineprefix/Cuneiform/"
creer_prefixe 3 5
attendre "$LNG_SCRIPT_WAIT" "unzip cuneiform.zip" "" 4 5
wine setup.exe /V/qn
# extract icons with icoutils package
cd $REPERTOIRE/wineprefix/Cuneiform/drive_c/Program\ Files/Cognitive/CuneiForm
wrestool -x --output=sface.ico -t14 sface.exe
convert sface.ico sface.xpm
cp sface-0.xpm $REPERTOIRE/icones/32/Cuneiform
# create launcher
creer_lanceur "Cuneiform" "Program Files/Cognitive/CuneiForm/" "sface.exe" "" "Cuneiform"
Set_WineVersion_Assign "0.9.54" "Cuneiform"
# Apply Fix
echo "REGEDIT4" > $REPERTOIRE/tmp/msvcrt.reg
echo "[HKEY_CURRENT_USER\Software\Wine\DllOverrides]" >> $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 5 5
# additional info
if [ "$POL_LANG" == "ru_RU.UTF-8" ]
then
attention "bla-bla-bla russian www.cuneiform.ru/forum/."
else
attention "Error in data sending when working with scanners HP, Epson, BENQ, Canon, Xerox, Mustek etc. Remedy: You have to edit 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' . You can find the answers to other questions about CuneiForm program at the forum www.cuneiform.ru/forum/."
fi
exit
When I try to pass icon argument in 'creer_lanceur' function like
creer_lanceur "Cuneiform" "Program Files/Cognitive/CuneiForm/" "sface.exe" "Cuneiform" "Cuneiform"
or
creer_lanceur "Cuneiform" "Program Files/Cognitive/CuneiForm/" "sface.exe" "sface" "Cuneiform"
nothing happens with icon in POL, but WINE successfully add icons in its own menu.
So I need to use 'icoutils' package to create icons.
What am I doing wrong?
thank you
|
BeberKing |
Mercredi 30 Janvier 2008 à 11:59
|
BeberKing![](http://perso.ens-lyon.fr/bertrand.marc/images/chamrousse.jpg)
|
Hi
I think POL accept only .xpm or .png icons. To use these you have to add the following in your script :
convert xxx.ico $REPERTOIRE/icones/xxx.xpm
and then when you create the launcher, just use xxx.xpm as an icon
BBK
|
goku |
Mercredi 30 Janvier 2008 à 12:29
|
goku![](https://www.playonmac.com/images/avatars/gotux.jpg)
|
Not exactly Beberking, the script look for the icon in our website. So you have to give to Tinou or I the icon for us to upload it ![](http://www.playonmac.com/images/smiles/sdz/clin.png) .
You can send it at this email : admin <at> playonlinux . com .
You can also post it on the forum using [ img ] [ / img ] (without spaces)
Windows de Microsoft.
Mac de Apple.
Linux du monde entier.
|
Quentin PÂRIS |
Mercredi 30 Janvier 2008 à 12:57
|
Quentin PÂRIS![Anonymous](https://www.playonmac.com/images/anonymous.png)
|
You can also post it on the forum using [ img ] [ / img ] (without spaces)
The balise [img] does not support xpm files.
|
BeberKing |
Mercredi 30 Janvier 2008 à 16:30
|
BeberKing![](http://perso.ens-lyon.fr/bertrand.marc/images/chamrousse.jpg)
|
Not exactly Beberking, the script look for the icon in our website.
You're right, I didn't read the sources before posting this... there is a :
wget $SITE/icones/$ICONE_ but I can assure you this works anyway (look at my script for Jazz Jackrabbit, the first one, the script is not yet accepted).
I guess it's not a problem if wget gives an error... and the rest of the "creer_lanceur" function creates the icon from the one you copy in $REPERTOIRE/icones
EDIT: maybe you'll say it's a bug in POL? Edité par BeberKing
|
chain2k |
Mercredi 30 Janvier 2008 à 18:38
|
chain2k![Anonymous](https://www.playonmac.com/images/anonymous.png)
|
great thanx for answer
so I have an idea:
if wine can extract and convert icons from exe, may be it will be more convenient to use its possibility in POL? in standard script function?
i'll try to google for "howto extract icons using wine"
or may be use 'icoutils' package in POL dependencies? Edité par chain2k
|
BeberKing |
Mercredi 30 Janvier 2008 à 21:13
|
BeberKing![](http://perso.ens-lyon.fr/bertrand.marc/images/chamrousse.jpg)
|
|
chain2k |
Vendredi 1 Février 2008 à 17:56
|
chain2k![Anonymous](https://www.playonmac.com/images/anonymous.png)
|
nice gui tool, but for scritpting icoutils are more comfortable
|