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

Added functionability for custom compile steps #97

Closed
nthSonata opened this issue Jan 17, 2020 · 1 comment
Closed

Added functionability for custom compile steps #97

nthSonata opened this issue Jan 17, 2020 · 1 comment

Comments

@nthSonata
Copy link

nthSonata commented Jan 17, 2020

I'd like to be able to use CompilePal to compile with more complicated programs as intermediaries by launching them through CompilePal, and using CompilePal's functions to run said programs, as opposed to running the programs myself through a command line prompt. Currently, though custom compile steps are supported, there isn't much you can do with them, particularly with having them work on specific files, and have CompilePal work on an intermediary file outputted by the custom compile step.

An easy way for CompilePal to tell custom compile steps which files to use would be to allow the COMMAND LINE ARGUMENTS input to accept variables that CompilePal already uses for compiling, such as $vmfFile$ and $bsp$ and $mapFolder$ and the like. If you wanted to pass the program the an argument like $bsp$ without interpreting it as one of CompilePal's internal variables, it'd be easy enough to escape it with a backslash (\) character (and to escape a backslash with another backslash).

For CompilePal to read an outputted file as an intermediary, you could do something similar, with having an option to set or overwrite an internal variable with an outputted file, or define what an outputted file should be on a per-program basis, i.e. file type, location, and name (based on the input file). This way, it would be easy to run a custom compile step that can modify the .vmf or .bsp in many different ways, while still being fairly simple for the user to do.

The specific reason why I have this request is because of VMMC, a tool FubarFX/maxdup created to collapse a .vmm into a .vmf so it can properly be compiled by VBSP. With how CompilePal currently works, it is impossible to pass it a specific file, and there's no way for CompilePal to use the collapsed .vmf as an intermediary. If I could pass VMMC a .vmm I've selected to compile through CompilePal, then tell CompilePal to look for a .vmf with the same filename as the .vmm in the same folder and set that as the new $vmfFile$, that would allow me to compile manifests a lot quicker.

It would also be nice to be able to add test conditions for custom compile steps, such as checking if a file is a .vmf or a .vmm, and only running VMMC if it's a .vmm, so I can batch compile multiple different kinds of maps at once, rather than having to change the compile processes and compile them separately, though this is something which can be accounted for by the custom program, so is less important. You could also look into perhaps including VMMC with CompilePal, as Fubar is a contributor to CompilePal.

Thank you!

  • Narpas
@Exactol
Copy link
Collaborator

Exactol commented Jan 26, 2020

@Exactol Exactol closed this as completed Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants