The forum

how can I properly assign Icons in POL scripts?

Author Replies
chain2k Wednesday 30 January 2008 at 6:47
chain2kAnonymous

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 Wednesday 30 January 2008 at 11:59
BeberKing

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 Wednesday 30 January 2008 at 12:29
goku

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 .
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 Wednesday 30 January 2008 at 12:57
Quentin PÂRISAnonymous

You can also post it on the forum using [ img ] [ / img ] (without spaces)

Quote from goku


The balise [img] does not support xpm files.
BeberKing Wednesday 30 January 2008 at 16:30
BeberKing

Not exactly Beberking, the script look for the icon in our website.

Quote from goku

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?

Edited by BeberKing

chain2k Wednesday 30 January 2008 at 18:38
chain2kAnonymous

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?

Edited by chain2k

BeberKing Wednesday 30 January 2008 at 21:13
BeberKing

I found this, I don't really know what it worth :

http://wineicons.sourceforge.net/

Edited by BeberKing

chain2k Friday 1 February 2008 at 17:56
chain2kAnonymous

nice gui tool, but for scritpting icoutils are more comfortable

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmcayonlinux.com