Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advice #5

Open
damienbutt opened this issue Mar 2, 2020 · 4 comments
Open

Advice #5

damienbutt opened this issue Mar 2, 2020 · 4 comments

Comments

@damienbutt
Copy link

Hey,

I'm trying to figure if I can make better use of this extension in my projects.

I have a folder structure in my projects similar to the structure Netlinx Studio. Source, Module, Include etc, so the project folder is a bit more organised and not so chaotic. This obviously causes problems when I come to compile my code as the includes and module files are not in the "local" directory where the main.axs file is.

I haven't tried using the global compile but I don't think this will work for me either. I do have a global folder where I keep all my modules but each module is in a separate sub-directory as they each have a Git repo. If I specify the root global directory will recursively look through all the sub-directories too?

Ultimately I'm just looking to find a way to use this extension without having to keep every file in the same directory, whether that be a local or global directory.

Thanks in advance.

Damien

@sentry07
Copy link
Owner

sentry07 commented Mar 2, 2020

I've tried a few things to see if I could get the Global variables to work with relative paths but the Netlinx compiler doesn't seem to like relative paths when compiling direct from the command line. The global compile does not do recursive searches so having modules in their own folders wouldn't work with the global folder directive.

There are a couple ways of handling this, one being to use a compile config file, which I don't have support for in the plugin. The second being to just do your editing in VSCode, but keep your Netlinx workspace open for compiling. Other than that, I'm not able to do much for you.

@damienbutt
Copy link
Author

OK. Thanks for getting back to me.

What exactly is involved in using a compile config? It may be something I can look into myself. Is there any documentation?

@sentry07
Copy link
Owner

sentry07 commented Mar 9, 2020

Look in C:\Program Files (x86)\Common Files\AMXShare\RunNetLinxCompiler. There are some documents in there that relate to using the NLRC.exe compiler with config files. I might be able to generate a build task based on if VSCode finds a .CFG file in the local directory. I think that would work?

@ShinigamiBoss
Copy link

ShinigamiBoss commented Jul 22, 2020

Hi I'm trying to expand the project with support for .CFG files (I created a fork for do this) .
I successfully managed to create cfg file with all the required links that search in folder and subfolder like in netlinx studio and compile successfully.
My branch is WIP right now..
@sentry07 if you like we can merge everyting once I finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants