Hello,
I want to create the outfile in a directory that contains the version, e.g. "c:\output\${version}\setup.exe"
I guess I can create that directory with a !system call. The main problem is that I cannot use StrCpy to set the value:
strcpy $var1 "c:\output\${version}"
#enter system call to create the directory here =)
outfile "$var1\setup.exe"
This is not possible as strcpy is not allowed outside a section.
Is there anyone who would like to create a patch that the outfile directory is created if non-existent?
How can I solve this problem?
Lars
Concatenation for OutFile
10 posts
I'm a little confused. Couldn't you do:
CreateDirectory "${version}"
SetOutPath "${version}"
CreateDirectory "${version}"
SetOutPath "${version}"
Hello dienjd,
it´s not about the system, where the program is to be installed, but about the system, where I create the setup.
I want to keep a history of recent setups and don´t want to have them all in just one directory.
it´s not about the system, where the program is to be installed, but about the system, where I create the setup.
I want to keep a history of recent setups and don´t want to have them all in just one directory.
Ah, sorry about that. I completely misunderstood your original post 🙂
A quick suggestion would be to make a batch file that creates your ${version} directory and then compiles your NSI script to output your EXE into your newly created directory.
Another option would be to just append your ${version} value to your EXE's filename--that would leave all your builds in 1 directory though.
A quick suggestion would be to make a batch file that creates your ${version} directory and then compiles your NSI script to output your EXE into your newly created directory.
Another option would be to just append your ${version} value to your EXE's filename--that would leave all your builds in 1 directory though.
Originally posted by dienjdNevermind, it seems like I´m not good in explaining things 🙂
Ah, sorry about that. I completely misunderstood your original post 🙂
A quick suggestion would be to make a batch file that creates your ${version} directory and then compiles your NSI script to output your EXE into your newly created directory.So, I have to create a batch file that accepts the version number as a parameter, creates the directory and starts the compile script. The compile script also accepts the version number as a parameter.
Is this what you thought of?
Another option would be to just append your ${version} value to your EXE's filename--that would leave all your builds in 1 directory though.That´s the way I already have it 🙂
So, I have to create a batch file that accepts the version number as a parameter, creates the directory and starts the compile script. The compile script also accepts the version number as a parameter.Exactly. That should work. You can also look into automated building tools that are a little more user-friendly than batch files (e.g., http://finalbuilder.com, http://ant.apache.org/), but that may be overkill if all you want to automate is creating a new directory and having your EXE go there.
Is this what you thought of?
Thanks for your help!
I´ll have a look into those building tools.
Lars
I´ll have a look into those building tools.
Lars
You can create the directory from within the script using:
!system "mkdir ${version}"Originally posted by kichikNice, I didn't know about that command. Using it with 'subst' lets you create directories even on unmapped network shares. Very handy.
You can create the directory from within the script using:!system "mkdir ${version}"
Originally posted by kichikYeah, great! Exactly what I was looking for.
You can create the directory from within the script using:!system "mkdir ${version}"
Thank you very much!
Lars