编译后执行一些脚本

时间:2018-10-03 02:14:47

标签: lazarus

我想在lazarus编译我的项目后复制一些文件,例如Visual Studio中的Build event,我在Lazarus中找到了类似的选择:

enter image description here

但是当我按ctrl + f9组合键时,会抛出错误:

Executing command after missing executable ""

enter image description here

2 个答案:

答案 0 :(得分:0)

当我阅读documentation时,应该提供一个可执行命令。 .bat文件不可执行,这将解释您的命令失败的原因。

在命令前加上cmd.exe /c,以提供处理.bat文件的可执行文件。

cmd.exe /c "G:\Lazarus project\dll test\copy.bat"

答案 1 :(得分:-1)

将命令更改为cmd.exe /c "G:\Lazarus project\dll test\copy.bat"将起作用:

enter image description here enter image description here