セクション内で何度もマクロを呼び出しています。マクロは、ディレクトリが存在するかどうかを確認します。セクション内でマクロを複数回使用する
私の問題:セクション内からこのマクロを複数回呼び出すため、エラーが発生します。コンパイルエラーを修正するにはどうすればよいですか?
エラー:「エラー:ラベル 『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