Old 3rd March 2007, 08:10   #1
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
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?

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 3rd March 2007, 09:58   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd March 2007, 15:04   #3
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
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...

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 12th March 2007, 19:05   #4
Brummelchen
Major Dude
 
Join Date: May 2003
Posts: 681
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"

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump