Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Limitations at filenames with multiple points? (http://forums.winamp.com/showthread.php?t=267010)

Brummelchen 3rd March 2007 08:10

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?

kichik 3rd March 2007 09:58

The following works perfectly fine for me.
code:
FileOpen $0 "$TEMP\Firefox Setup 2.0.0.2 Final.ext" w
Include an example of non-functional code.

Brummelchen 3rd March 2007 15:04

thx i have the old code...

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...

Brummelchen 12th March 2007 19:05

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

does not work
Quote:

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

;write content
WriteINIStr $PROJECT section entry $VARIABLE
works:
Quote:

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"


All times are GMT. The time now is 18:07.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.