1) The beginning of every new script differs from that
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]; then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
For more info look here
Fixed!
2) Why do you cd to home?
cd $HOME
Must be leftover from earlier - didn't notice that there. Also fixed!
3) I would quote $FILE so it'll look like this
wine "$FILE"
Now it'll work if user has installation file in /home/user name/StartcraftSetup.exe
Fixed!
4) I would quote this too
$REPERTOIRE/wineprefix/$GAME_PREFIX/drive_c/Program\\ Files/StarCraft/StarCraft.exe
Removed it altogether!
5) Use
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
to guess the name of Program Files in different languages.
Fixed! (Is it obvious yet, that this is my first script? :D)
6) Why do you use icoutils? Isn't there an icon for Starcraft in ~/.local/share/icons
Actually I didn't know that the icons are stored there :P
But how do I access them?
Do I copy it over to "$REPERTOIRE/icones" or use it where it is?
Maybe I did something wrong, but
POL_SetupWindow_make_shortcut "$GAME_PREFIX" "$PROGRAMFILES/StarCraft" "StarCraft.exe" "$HOME/.local/share/6568_starcraft.0.xpm" "StarCraft - Brood War"
didn't work!? Does it have the same name on all computers (I mean the 6568 part).
Thanks for all you help! Let's see if I can get this script fixed.
Offtopic: How do you write \\ n in the forums? When I write \\ n (without the space), it just puts a newline, also with \\\\ n.
Edytowane przez sn4re