BrettMayson / HEMTT

Build System for Arma 3
http://hemtt.dev/
GNU General Public License v2.0
115 stars 40 forks source link

Feature Request - HEMTT launch local mods support #512

Open veteran29 opened 1 year ago

veteran29 commented 1 year ago

As an user I would like to have an option to launch the game with local mods:

# hemtt launch
[hemtt.launch]
workshop = [
    "450814997", # CBA_A3's Workshop ID
]
local = [
    "VN", # SOG Prairie Fire
    "OtherCDLC",
]

The "local" mods would be put inside -mod argument as is, "-mod=<cba workshop path>;VN;OtherCDLC;".

BrettMayson commented 1 year ago

I'm still not a fan of local mods being handled this way, as it is user specific. But I think a section for cdlc would be good

cdlc = [
  "vn",
  "ws",
]
BrettMayson commented 1 year ago

I still like the idea of adding a git submodule personally.

I think it'd even be nice if HEMTT would build dependencies too.

So in ACE, we could have a PR that depends on a CBA PR too, and the CBA submodule of the ACE PR is set to the CBA PR. Running hemtt launch builds the correct version of CBA, the ACE and launches them together. Would make testing said PRs a breeze

jonpas commented 1 year ago

That's going to be a disaster. Git submodules are far from easy to use, and asking people to use them is just going to introduce more work fixing the submodule.

BrettMayson commented 1 year ago

How about something like this

[project.dependencies.cba]
workshop = 450814997
git = "https://github.com/CBATeam/CBA_A3"
branch = "master" # used by default after cloning

[hemtt.launch]
dependencies = [
  "cba"
]

pseudo commands

> hemtt dev
*just builds as normal, no cba needed*

> hemtt launch
INFO dependency `cba` loading from Steam Workshop
*launches as it does now*

> hemtt dependencies init cba
INFO https://github.com/CBATeam/CBA_A3 cloned to dependencies/cba

now you have a copy of CBA to work on, or, someone could symlink it rather than have HEMTT clone it

> hemtt dependencies update [cba]
INFO `cba` was pulled, 4 new commits

> hemtt launch
INFO dependency `cba` loading from local folder

> cd dependencies/cba && git checkout -b my_feature

> hemtt dependencies update
WARN `cba` skipped, not on a clean `master` branch
veteran29 commented 1 year ago

Looks reasonable for me, covers most use cases. Would need a support for manually symlinking the directory into dependencies to support my use case and the dependency should be supported even if it's not a git repository. (eg internal build of a CDLC)

BrettMayson commented 2 weeks ago

So looking at this again, I think while that solution would be nice, I don't feel like implementing all that for something that hasn't been in huge demand

What would be more reasonable, is have a folder .hemttlocal that HEMTT will scream at you if it is checked into git. Inside of there you could clone a repo into it's steam workshop ID, then you use hemtt launch --local to have HEMTT check each workshop item in there, and use it if exists.

Thoughts on that as a solution that'd be simple enough I would implement it?