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

Feature request: Add a custom command option #35

Open
magnusjjj opened this Issue Oct 13, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@magnusjjj

magnusjjj commented Oct 13, 2017

Hi!

I wrote an external dependency resolver, and wanted my friend to test it. He, however, uses compilepal. It doesn't allow custom commands directly. I figured out how to make a command directory, which works, but it seems like a bit of a hassle.
I could potentially create 10 commands that is just 'launch command' with different priorities, but that also seems.. uh. Unintentionally crap.

Which would be the best way to go about it? I could potentially code a fix for it myself, but before that I would like to have some input as to the best way to do it :).

@maxdup

This comment has been minimized.

Collaborator

maxdup commented Oct 13, 2017

While there is no documentation or ui to support that, compilepal commands are meant to be fully customizable. The way this is done is via json files in CompilePalX/Parameters/ you'll want to copy the structure in there to add your own command.
The way this works is the meta.json file will accept any exe in it's path parameter. You'll also find many other options. For example, the "order" parameter determines when your command should be ran, relative to other commands.
To distribute your dependency solver as a compilepal plugin, you should consider bundling a meta.json and a parameters.json with your executable for easy installation.

side note, have you had a look at compilepal's dependency solver? (the pack option). It's already very advanced. The codebase is not exactly clean but you're welcome to contribute to it if you're interested.

@magnusjjj

This comment has been minimized.

magnusjjj commented Oct 19, 2017

Yes, that was I was doing. It was a bit of a mess though.
What I am considering doing now though is:

  1. Add -embed to vbsp parameters (WITH a warning to
  2. Make the tool list sortable via simple drag and drop, adding a 'secret parameter' with some crazy prefix like $__COMPILEPAL_SORT to put in the csv to store the sort order (plus add the appropritate filters to ignore it in the right places)
  3. Add a 'custom command' tool that allows you to run any command, along with a new variable that just points to the source directory
  4. Possibly take a look at merging my tool and yours.

Would that be a good thing to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment