Archive: Limitations at filenames with multiple points?


Limitations at filenames with multiple points?
NSIS 2.21

I cant get managed filenames with several points in it.

example: Firefox Setup 2.0.0.2 Final.ext

writeini and fileopen creates Firefox Setup 2.0.0.ext and IfFileExists cannot handle that
(the variable contains the correct name but i cant write it down)

is that fixed in newer versions?


The following works perfectly fine for me.

FileOpen $0 "$TEMP\Firefox Setup 2.0.0.2 Final.ext" w
Include an example of non-functional code.

thx i have the old code...

Function nisp_save
;save config file
StrCpy $R9 "Firefox Setup 2.0.0.2 Final" ;input from dialog plugin
StrCpy $PROJECT $R9
messagebox mb_ok "'$PROJECT'"
IfFileExists $PROJECT nisp_save01
${GetBaseName} $R9 $PROJECT
Push $R9
Call GetParent
Pop $R9
StrCpy $PROJECT "$R9\$PROJECT.nsp"
nisp_save01:
Delete $PROJECT
;write content
WriteINIStr $PROJECT nisp dummy "sometext
FunctionEnd

i think it was my bad with the combination of GetBaseName.
the new code work a bit different and proper well.

ok, after sitting 6 hours on 1500 lines code with squared eyes...
i should split with include...

warming up that question...
i tried again for simplifyiing my code again, still no go with writeini instead fileopen/firewrite

does not work

StrCpy $PROJECT "$PROJECT.nsp"
Delete $PROJECT

;write content
WriteINIStr $PROJECT section entry $VARIABLE
works:
StrCpy $PROJECT "$PROJECT.nsp"
Delete $PROJECT
;write content
Call settings_save2
Return
FunctionEnd


Function settings_save2
;write content
FileOpen $4 $PROJECT w
FileWrite $4 "[section]"
FileWriteByte $4 "13"
FileWriteByte $4 "10"
FileWrite $4 "entry=$VARIABLE"
FileWriteByte $4 "13"
FileWriteByte $4 "10"
FileClose $4
FunctionEnd
project name: firefox-2.0.0.3.de.win32.installer_rc1.brummel

the code that not works even rejects a name like "firefox-2.0.0.3.de"