Archive: BckSlash $INST to Frwd Slash


BckSlash $INST to Frwd Slash
Does anyone know a way
to tell the installer to take the
$INSTDIR witch produces / Forward Slashes
and tell it to Create Back slashes instead ?
like have it with a switch or somthing ?
$INSTDIRL or $INSTDIR</ or somthing like that ?
rename it or somthing ?

<Directory "C:\Program Files\Example1/www/phpwebsite_en/">

It's pretty hard to look at this and try 7 other examples from the archive and not have them go through a file and be able to replace text within it on a certin line :(

I'm pretty sure someone has come across this right ?:(


StrSlash from this archive page works fine for me.

Push "C:/bla/bla/bla"
Push "/"
Call StrSlash
Pop $0
DetailPrint $0


what version of Nsis are you running?


Latest from CVS.


You can use StrReplace, and replace / with \ or vice-versa, too. I think that one converts / to \ and \ to /, so it isn't useful when have / and \ in a string.


Do you have a handy small example of how this should work ?
I have seen that instring thing in code that i have been trying to use
but have not seen a simple example of it being used anywhere ?
If you could provide a small blah blah working example
that would be nice :):igor:
or mabey a current working script that's very simple using this ?

What I do notice is that they are never doing it on the
line like i need it :( and many of the scripts never
have the ability to combine the lines as in multiple replace
from line to line or within 25 lines ect.

now that's somthing we could use :)

If i could just tag the instreplace on certin lines throught
the file on those specific lines that would be real nice.

Actually it would be Ten Million times easier to
have a switch or renamed thing to do the / instead of \

Is there a way i can just add my own funtions and such
and make my own stuff and recompile and release my own version of the installer ?


I gave you an example in my first post. Have you tried it?


I looked at the
StrReplace Exapmple
and saw the C:\ C:\ and thought you were tryig to show me a version of um
replacing the name of the file command i'm dense
but i did try those examples that were on the link

in this Example i noticed
Push "C:/bla/bla/bla" ;what i notice is a directory change
Push "/" ;Push ? with no other code ?
Call StrSlash ;call the function ? where is the code
Pop $0 ;Pop ?
DetailPrint $0 ; Detail of ?

I can tell you the scripts i have tried and didn't work :0
if that would help ?

this is the part that's killing me
Push "<Directory $\"$INSTDIR/www/phpwebsite_en/$\">" ;replace with
Push 1118 ;line to replace on
Push "$INSTDIR\Apache\conf\httpd.conf" ;file to replace in
Call WriteToFileLine

If I had a um
Example to fix this and make the \ go / i would be home free I think ?
<Directory "C:\Program Files/PrositeXL/www/phpwebsite_en/">

Have tried
# Author Title
sunjammer StrReplace
Afrow UK Replace 1st piece in string, then delete other parts
Afrow UK Replace 1st piece in string, then delete other parts
Datenbert ReplaceInFile
redgoblin Replace Sub String (macro)
KiCHiK Replacing Lines in a Text File
dirtydingus Another String Replace (and Slash/BackSlash Converter)
Afrow UK More advanced replace text in file
----------------------------------
Afrow UK Replace text on a file line number
------- This works for the needs but has to be done 3 times
:hang:
In Advance thank you for your help :)


ok the Problem is solved and I wrote
um actually modified some code to make it work
from somthing that did work a long time ago
on the scripts Archive
and resubmitted it

It's uploaded and works with Nsis r3 and r4 :)