我想制作一个AMX mod X脚本,此模块与我制作的游戏有关,因此我将工作区用作配置。使编译器,库和输出路径依赖于每个游戏。我的源代码与编译器具有相同的文件夹
[我尝试写./
和.\\
,但是它不起作用,vscode仍然找不到amxxpc.exe
,这是我的配置工作区:
{
"folders": [
{
"path": "."
}
],
"settings": {
"amxxpawn.compiler.executablePath": "./amxxpc.exe",
"amxxpawn.compiler.includePaths": [
"./include"
],
"amxxpawn.compiler.outputPath": "../plugins",
"amxxpawn.compiler.outputType": "path"
}
}
在我编写完整路径之前,amxxpawn.compiler.executablePath
仍然无法计算amxxpc.exe。由于此文件与源代码位于同一文件夹中,因此我也尝试删除./
,但仍然找不到它。
这是我使用的扩展名:https://marketplace.visualstudio.com/items?itemName=KliPPy.amxxpawn-language
这并不总是在每个扩展中都起作用,但我将工作空间设置中的每个配置移至user.json
,然后将${workspaceFolder}
用作相对变量,例如:
"amxxpawn.compiler.includePaths": [
"${workspaceFolder}/include"
]
工作区仍在使用,但我单独留了folder
和path
,也将path
值设为.
表示workspace
文件的位置