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

WorkingDir options in Generic #987

Closed
1 task done
Greelan opened this issue Feb 22, 2024 · 2 comments
Closed
1 task done

WorkingDir options in Generic #987

Greelan opened this issue Feb 22, 2024 · 2 comments

Comments

@Greelan
Copy link
Contributor

Greelan commented Feb 22, 2024

This is not for requesting support for new games/applications

To do this you should go to https://github.com/CubeCoders/AMPTemplates and first attempt to build a configuration yourself - otherwise you can request a template from this repo.

Feature Request

Feature Information:

It would helpful for the App.WorkingDir setting in the Generic module if:

  • variables could be included in the path. This would be particularly useful for templates like Node and Python App Runner where it cannot be predicted in advance what is the needed working dir for the particular app (some won't run unless the working dir is properly set to a subdir, as their code uses relative paths)
  • there were separate settings for Windows and Linux. Some servers, particularly UE servers, have different binary paths and as a consequence also need different working dirs

I confirm:

  • that I have searched for an existing feature request matching the description.
@PhonicUK
Copy link
Contributor

Variables are now included but splitting it out into separate settings is a mild pain.

What I could though is significantly expand the templates system to allow a little more complexity. For example instead of just being {{$SettingName}} it could be something richer like {{Linux:Value}}{{Windows:$SettingName}} and it'd skip any that didn't apply to the current platform, subbing in either the value verbatim or the setting name as appropirate.

@PhonicUK
Copy link
Contributor

I've implemented this as above. You can use either values (without the $) or setting references (with the $) and it'll honour the platform prefix, omitting it entirely if it's the wrong platform. There's also {{All:$Whatever}} for completeness sake because of how the platform enum works but it's not needed - it's fully backwards compatible.

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

2 participants