Sarrus1 / sourcepawn-studio

VSCode extension for SourcePawn scripting
https://sarrus1.github.io/sourcepawn-studio/
MIT License
147 stars 23 forks source link

CI, add dependencies ( includes ) for plugin compilation #268

Open tsuza opened 1 year ago

tsuza commented 1 year ago

What do you want to see added to the extension?

An additional file where you can list all of the includes that your file needs to be compiled.

As of right now, I'm manually adding a small script between "Setup SourcePawn Compiler" and "Compile Plugins" where it wgets the needed files. But you could easily just make a separate file ( dependencies.sh for example? ) and call it via bash scripts/dependencies.sh so the end-user only needs to mess with that file.

- name: Download dependencies
  run: |
    mkdir scripting/include
    cd scripting/include

    wget "https://raw.githubusercontent.com/nosoop/SM-TFCustAttr/master/scripting/include/tf_custom_attributes.inc"

    mkdir stocksoup
    cd stocksoup

    wget "https://raw.githubusercontent.com/nosoop/stocksoup/master/var_strings.inc"
    wget "https://raw.githubusercontent.com/nosoop/stocksoup/master/string.inc"

    cd ../../..

How would it help you?

It'd let you properly compile plugins so you can have releases.

How often would you use this feature?

Basically every time.

Sarrus1 commented 1 year ago

Hi, thank you for this suggestion, have you looked at this it looks like a more complete solution than just pulling the includes manually.

tsuza commented 1 year ago

Git has a submodules command that lets you "sym link" other repositories to yours, which would definitely come in handy for includes. This would require you to have git installed and use the CLI. Something could be made so that there is a command provided by the extension that lets you easily add them