Simple question
I have a massive program (19,000+ files) that I am writing an installer for. There are obviously many sub directories and so on. Is there a simple script or function that I can use intead of listing each file individually?
9 posts
Section -post
SetOutPath "$INSTDIR"
;Store installation folder
WriteRegStr HKCU "Software\Timber Ticket Pro" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
;Create Xampp folder
CreateDirectory "$INSTDIR\zertis_xamp"
SetOutPath "$INSTDIR\zertis_xamp\"
; !include "ttp.nsh"
StrCpy $R0 "zertis_xampp\" ;Directory copy from
StrCpy $R1 "$INSTDIR\zertis_xamp" ;Directory copy into
StrLen $R2 $R1
GetTempFileName $0
FileOpen $R3 $0 w
!insertmacro Locate "$R0" "/L=F" "CallBack"
FileClose $R3
IfErrors 0 +2
MessageBox MB_OK 'error'
Exec '"notepad.exe" "$0"' ;view log
SectionEnd
Function CallBack
StrCpy $1 $R8 '' $R2
StrCmp $1 '' +2
StrCpy $1 '\$1'
IfFileExists '$R1\$1\*.*' +2
CreateDirectory '$R1$1'
CopyFiles /SILENT $R9 '$R1$1'
;Your code ...
;$R9 "path\name" (source)
;$R8 "path" (source)
;$R1$1 "path" (destination)
;$R7 "name"
IfFileExists '$R1$1\$R7' 0 +3
FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -success$\r$\n"
goto +2
FileWrite $R3 "-old:$R9 -new:$R1$1\$R7 -failed$\r$\n"
Push $0
FunctionEnd