섹션 내에서 매크로를 여러 번 호출합니다. 매크로는 디렉토리가 존재하는지 여부를 검사합니다.섹션에서 매크로를 두 번 이상 사용하십시오.
내 문제점 : 섹션 내부에서이 매크로를 두 번 이상 호출하기 때문에 오류가 발생합니다. 컴파일 오류를 어떻게 해결할 수 있습니까?
오류 : "오류 : 라벨"CreateDirThenInstall : "이미 섹션에서 선언"
당신은 내가 섹션에 한 번이 매크로보다 더 사용할 수있는 방법을 말해 줄래?
Section "Install Plugin Files" MainSetup
!insertmacro ValidateDir "c:/blah"
setOutPath "c:/blah"
file "C:/blah/a.txt"
file "C:/blah/b.txt"
!insertmacro ValidateDir "c:/other"
setOutPath "c:/other"
file "c:/other/a.txt"
file "c:/other/b.txt"
sectionend
!macro ValidateDir dir
IfFileExists "$dir" ExitMacro CreateDirThenInstall
CreateDirThenInstall: # Error here: Error: label "CreateDirThenInstall:" already declared in section
createDirectory "${dir}"
ExitMacro:
!macroend