You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
Apparently, for the IDE to compile plugins that have stuff that are in custom defined scripting directories, they must be pointing directly to the folder that has all (or the) .inc files, BUT this renders Go To Definition (CTRL+CLICK) unusable.
Furthermore, if you don't specify an include folder, and just point to the folder that HAS the include (just like the stock folder), Go To Definition WILL work, but plugin will not compile at all - it will spit that the custom include used there is missing (cannot read from file "include")
One COULD delete the part in the PathBuilder where the word "include" is added:
// First search across all scripting directoriesvarsm=MatchDefinition(Program.Configs[Program.SelectedConfig].GetSMDef(),word,e);if(sm!=null){varconfig=Program.Configs[Program.SelectedConfig].SMDirectories;foreach(varcfginconfig){varfile=Path.GetFullPath(Path.Combine(cfg,/*"include",*/sm.File))+".inc";// <------- hereawaitTask.Delay(100);varresult=Program.MainWindow.TryLoadSourceFile(file,true,false,true);if(!result){Debug.Print($"File {file} not found!");continue;}varnewEditor=Program.MainWindow.GetCurrentEditorElement();Debug.Assert(newEditor!=null);newEditor.editor.TextArea.Caret.Offset=sm.Index;newEditor.editor.TextArea.Caret.BringCaretToView();newEditor.editor.TextArea.Selection=Selection.Create(newEditor.editor.TextArea,sm.Index,sm.Index+sm.Length);return;}}
BUT, although this enables custom directories to both be valid for compiling and apprearing in autocompletion, breaks the stock SM includes folder. This is because now, you must specify \include in all SM directores you set in the config - if you do that in the stock config, the program loses track of spcompiler.exe, effectively breaking compilation.
One of the possible outcomes would be rethinking of where the program stores and utilizes the SP compiler, but I hope to be wrong, luckily someone else than me might give it a look and come up with a less invasive solution, who knows.
The text was updated successfully, but these errors were encountered:
Apparently, for the IDE to compile plugins that have stuff that are in custom defined scripting directories, they must be pointing directly to the folder that has all (or the)
.inc
files, BUT this renders Go To Definition (CTRL+CLICK) unusable..\sourcepawn\configs\sm_1_10_0_6478;C:\spcodecomp\customconfigs\include
Furthermore, if you don't specify an include folder, and just point to the folder that HAS the include (just like the stock folder), Go To Definition WILL work, but plugin will not compile at all - it will spit that the custom include used there is missing (
cannot read from file "include"
).\sourcepawn\configs\sm_1_10_0_6478;C:\spcodecomp\customconfigs
One COULD delete the part in the PathBuilder where the word "include" is added:
BUT, although this enables custom directories to both be valid for compiling and apprearing in autocompletion, breaks the stock SM includes folder. This is because now, you must specify
\include
in all SM directores you set in the config - if you do that in the stock config, the program loses track ofspcompiler.exe
, effectively breaking compilation..\sourcepawn\configs\sm_1_10_0_6478\include;C:\spcodecomp\customconfigs\include
One of the possible outcomes would be rethinking of where the program stores and utilizes the SP compiler, but I hope to be wrong, luckily someone else than me might give it a look and come up with a less invasive solution, who knows.
The text was updated successfully, but these errors were encountered: