Archive: $PLUGINSDIR safe?


$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%?

Seems so, however, unless give it a try, you'll never know ;)


Good news. Thanks! I couldn't find anything else on the forum.


you dont have to rename, you can specify the extracted name with File

File"/oname=$PLUGINSDIR\\modern-wizard.bmp""tigwg.bmp"


  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?