bnicer
29th March 2007 20:21 UTC
$PLUGINSDIR safe?
Hi,
Just wondering, is this code safe to change images?
StrCmp $Language 1031 0 +5
Delete "$PLUGINSDIR\modern-wizard.bmp"
SetOutPath "$PLUGINSDIR"
File "tigwg.bmp"
Rename "$PLUGINSDIR\tigwg.bmp" "$PLUGINSDIR\modern-wizard.bmp"
100%?
Red Wine
29th March 2007 20:32 UTC
Seems so, however, unless give it a try, you'll never know ;)
bnicer
29th March 2007 20:46 UTC
Good news. Thanks! I couldn't find anything else on the forum.
Anders
29th March 2007 22:25 UTC
you dont have to rename, you can specify the extracted name with File
File
"/oname=$PLUGINSDIR\\modern-wizard.bmp""tigwg.bmp"
bnicer
31st March 2007 16:51 UTC
StrCmp $Language 1031 0 +4
SetOverwrite on
SetOutPath "$PLUGINSDIR"
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "tigwg.bmp"
(thanks :))
Is it also possible to set the image to avoid having to change it? A !define works only once, eg:
!define MUI_WELCOMEFINISHPAGE_BITMAP "tigw.bmp"
or
!define MUI_WELCOMEFINISHPAGE_BITMAP "tigwg.bmp"
The image is the last !define in the script. Is there another way of doing this conditionally so one image is copied to $PLUGINSDIR with no need to replace it?