FileCopy: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
(SF: diferent -> different.) |
||
Line 2: | Line 2: | ||
<highlight-nsis> | <highlight-nsis> | ||
;This macro will help you copy a file to | ;This macro will help you copy a file to | ||
; | ;different directory (or directories) without compile it twice. | ||
;Enjoy. | ;Enjoy. | ||
;Sorry for my really bad english. :D | ;Sorry for my really bad english. :D |
Revision as of 13:00, 17 April 2005
The Script
;This macro will help you copy a file to ;different directory (or directories) without compile it twice. ;Enjoy. ;Sorry for my really bad english. :D ;Script based in ${NSISDIR}\Examples\Example1.nsi ;you can use this macro as many times you want in your script !macro FileCopy FilePath TargetDir ;Now the macro create the dir first :) ;If the dir doesn't exists, It'll be created. CreateDirectory ${TargetDir} CopyFiles ${FilePath} ${TargetDir} !macroend Name "CopyME" OutFile "copyme.exe" InstallDir $PROGRAMFILES\CopyMe DirText "Select a dir, Dude" Section "ThisNameIsIgnoredSoWhyBother?" SetOutPath $INSTDIR File "${NSISDIR}\makensisw.exe" File "me.txt" !insertmacro FileCopy "$INSTDIR\makensisw.exe" "$INSTDIR\copy" !insertmacro FileCopy "$INSTDIR\me.txt" "$INSTDIR\backup" !insertmacro FileCopy "$INSTDIR\me.txt" "$SYSDIR" SectionEnd
Page author: Joelito