|
|
#1 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
Invalid filehandle 123
whenever i'm running my script, i'm getting the error-message "Invalid file handle 123".
i've modified the line 65 of FontReg.nsh to CopyFiles '${FontFile}' '$FONT_DIR\${FontFileName}'. i checked the input-file for the macro and don't see why this shall not work. any clues? |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
|
Is ${FontFileName} an actual file name?
The reason I ask is that I thought CopyFiles needed a file name and a folder name as parameters. The way I'm reading your example, it looks as if you supplied 2 file names. |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
The destination parameter for CopyFiles requires the full path to the file name to be copied as.
Having a folder name works, but if that folder doesn't exist it will create the file of that folder name instead. -Stu |
|
|
|
|
|
#4 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
thanks for the response, seems like it was a tiny " that caused the mistake
|
|
|
|
|
|
#5 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
unfortunately, the errors still occurs. the reason why i replaced that line from FontReg.nsh is, that the font i want to install is stored in a variable.
in order to find the mistake, i replaced the variable with "path/to/font.ttf" and the error-message changes to "MappedFile error: 1006". i've added a messagebox displaying.. ${FontFile}: "C:\MyDir\myfont.ttf" $FONT_DIR: C:\MyDir\myfont.ttf ${FontFileName}: myfont.ttf" ..please mind the quotes! i don't understand why they get messed up like this and why i still get this error replacing the variable with a path to my font. any clues? |
|
|
|
|
|
#6 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
it's all working now, problem was in the a later fontname macro
Last edited by Yathosho; 29th June 2006 at 17:05. |
|
|
|
|
|
#7 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
once again i'm getting MappedFile error: 1006 when using the following script
code: what i don't understand about it, IfFileExists is always reporting "Yay!", but only one font from the $TempFile is being installed. once it's reading line 2 i get that error. what am i doing wrong?! |
|
|
|
|
|
#8 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Why are you using the dir command to list the font files? Why not use FindFirst, FindNext etc. It would be much easier.
-Stu |
|
|
|
|
|
#9 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
good point. i actually used this from another script of mine where i needed a sorted list (a-z)
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
It may be safer to use an array (NSISArray) to sort it, but dir exists on all systems to my knowledge. It's still a bit unprofessional though I'd say, as you're relying on another executable for the installer to function correctly.
Here's another thing: You're using GetName and Popping $File from it, yet you're using $Line afterwards. Surely you should be using $File? Congrats if this is fixed. I'm drunk ![]() -Stu |
|
|
|
|
|
#11 |
|
Forum King
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
|
it's working, had to change the FontName function
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|