AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   vscode workspace can use relative path (https://forums.alliedmods.net/showthread.php?t=338599)

MurbiesWalto 07-15-2022 07:15

vscode workspace can use relative path
 
I want to make a AMX mod X script, this modules are related which game I make, so I am using workspace as configuration. Making compiler, library and output path dependent of each game. my source code has same folder as compiler

I've tried to write ./ and .\\ but it's won't work, vscode still can't find amxxpc.exe, here's my configuration workspace:

{
"folders": [
{
"path": "."
}
],
"settings": {
"amxxpawn.compiler.executablePath": "./amxxpc.exe",
"amxxpawn.compiler.includePaths": [
"./include"
],
"amxxpawn.compiler.outputPath": "../plugins",
"amxxpawn.compiler.outputType": "path"
}
}

amxxpawn.compiler.executablePath still can't figure omegle.2yu.co amxxpc.exe until I wrote full path. since this placed in same folder as source code, I also tried to remove ./ but still omeglz can't find it.

JusTGo 07-15-2022 09:37

Re: vscode workspace can use relative path
 
Try:

"${workspaceRoot}\\amxxpc.exe"

fysiks 07-15-2022 23:12

Re: vscode workspace can use relative path
 
Ever since I started putting my plugins on GitHub, I've actually preferred that my plugin files not be with the normal installation of AMX Mod X. At first I thought this wouldn't work when I have custom includes but I was able to resolve that because it allows you to have multiple include directories. This way, I don't have to worry about accidentally changing the default files and I can simply use a static path to my compiler. This is my config on Linux:

Code:

    "amxxpawn.compiler.executablePath": "/home/fysiks/games/amxx190/addons/amxmodx/scripting/amxxpc",
    "amxxpawn.compiler.includePaths": [
        "${fileDirname}/include",
        "/home/fysiks/games/amxx190/addons/amxmodx/scripting/include"
    ],
    "amxxpawn.compiler.reformatOutput": false,
    "amxxpawn.compiler.outputType": "path",
    "amxxpawn.compiler.outputPath": "${fileDirname}/../plugins",
    "amxxpawn.compiler.showInfoMessages": true,

As you can see, I use ${fileDirname} so that might be something you could try. I've not actually looked at the source code of the extension to see if it properly expands the compiler path but it does for includePaths and outputPath.


All times are GMT -4. The time now is 06:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.