For example I have a config file in D:\\Project\\InstallerPro\\Platform\\Windows8\\Web.config I need to move that file to D:\\Project\\InstallerPro\\Web\\Configuration\\Web.config if the windows version is windows 8
After that, the installer will be generated from a nsi script in D:\\Project\\InstallerPro\\PROinst.nsi
Is it possible to copy the files (not manually) before compiling it into an installer using NSIS?
I want to do something like this:
CopyFiles ".\Source\Platform\Windows8\Web.config" ".\Source\WEB\Configuration\Web.config"
CopyFiles
is a runtime command, ie a command that will run during the installer execution and not during the installer creation.
You could use the !system
command that is executed during the compilation of the installer, eg:
!system `copy "c:\Source\Platform\Windows8\Web.config" "c:\Source\WEB\Configuration\Web.config"`
You will need to use absolute paths as the current working dir is from makensis.exe
and not from the script being compiled.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.