Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   NSIS and & symbol in File "/oname=..." (http://forums.winamp.com/showthread.php?t=451928)

sfx09 23rd October 2017 13:52

NSIS and & symbol in File "/oname=..."
 
Hello!
Sorry for my English.
I need add some files, which named as "$profile.bat", "&settings.ini", etc. They all include in filename a character $.

I try double-$:

PHP Code:

File "/oname=$$profile.bat" "C:\!NEW_INSTALLER\!!cache\$$profile.bat" 

But it don't works (compiler error). Please, help me with solution. Thanks.

sfx09 23rd October 2017 15:33

I try this:
PHP Code:

IntFmt $"%c" 0x24
File 
"/oname=$0UPDATE.INI" "C:\!NEW_INSTALLER\!DEVELOP\!!cache1\$0UPDATE.INI" 

But it also don't work.

Anders 23rd October 2017 15:42

The /oname parameter needs $ as $$ but the source file path does not, just use $.

sfx09 23rd October 2017 16:15

Quote:

Originally Posted by Anders (Post 3143617)
The /oname parameter needs $ as $$ but the source file path does not, just use $.

Thank you!! Now try this.

PHP Code:

File "/oname=$$UPDATE.INI" "C:\!NEW_INSTALLER\!DEVELOP\!!cache1\$UPDATE.INI" 


sfx09 23rd October 2017 16:24

All works fine!!! :) Thank you, very much!

Anders 23rd October 2017 20:18

Remember to use the full path with /oname.

sfx09 24th October 2017 14:49

Quote:

Originally Posted by Anders (Post 3143638)
Remember to use the full path with /oname.

what's mean?
for example, i need to use something like that:

PHP Code:

File "/oname=$INSTDIR\$$UPDATE.INI" "C:\!NEW_INSTALLER\!DEVELOP\!!cache1\$UPDATE.INI" 

?

P.S. I found a new problem. Why not worked this? File contain two ore more dots in filename? :( Thanks for answer.

PHP Code:

File "/oname=data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" "C:\!NEW_INSTALLER\!DEVELOP\!!cache1\data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" 


Anders 24th October 2017 16:26

"/oname=data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" is not a full path, it should start with $instdir or something like that.

sfx09 24th October 2017 16:38

Quote:

Originally Posted by Anders (Post 3143715)
"/oname=data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" is not a full path, it should start with $instdir or something like that.

Unfortunately this:

PHP Code:

File "/oname=$INSTDIR\data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" "C:\!NEW_INSTALLER\!DEVELOP\!!cache1\data\ed\5_10_0\ACTCOMMONFORM.XSD.Dcf" 

leads to syntax error too. :(

And what's mean this:

PHP Code:

Use /oname=switch to change the output nameX may contain variables and can be a fully qualified path or a relative path in which case it will be appended to $OUTDIR set by SetOutPathWhen using this switch, only one file can be specified. If the output name contains spacesquote the entire parameterincluding /oname, as shown in the examples below

from here:

http://nsis.sourceforge.net/Reference/File

It's old article? Full path absolutely need?

Big thanks for your fast answers! :up:

sfx09 24th October 2017 21:07

Thanks for all! All worked, it's my error - file in ..\!!cache1\data\ed\5_10_0\ was deleted.


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

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.