BrettMayson / HEMTT

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

Allow global installation and usage of HEMTT #26

Closed ptMuta closed 5 years ago

ptMuta commented 5 years ago

Modern tooling are generally handed to developers as a user space or globally installed applications (eg. yarn, rustc, dotnet etc.) it would be a nice feature to consider to have HEMTT have this option too. The way I see it, there are two ways to approach this:

  1. Create an installer that installs HEMTT binary and related dependencies if there ever will be some. The classic way.
  2. Integrate an installer within HEMTT that will install the binary and related dependencies to the platform specific locations.

The implementation of both approaches have their own ups and downs.

Separate installer

Integrated installer

The reason why I'm not including scripts as an installer option is because they are basically the same as installer binaries / packages, but they're not very user friendly for the end user.

This, coupled with #25 would bring HEMTT up to par with most modern cli-based utilities.

BrettMayson commented 5 years ago

There is nothing preventing this on Linux, putting the hemtt binary in /usr/bin/ is all you need to do.

Windows will be a different story and is something I don't have experience with. I am marking this as wont fix since it isn't something I think is high enough priority for me to work on. I will of course accept a PR if someone else wants to tackle this.

ptMuta commented 5 years ago

The windows installation isn't that hard. I'm more than willing to implement this at somepoint. The issue with linux installation is to provide a usermode installation, which prevents us from deploying to /usr/bin and /usr/local/bin. Usermode installation is trivial for windows (and macOS), but not linux :/

If we target a system-wide installation then it's trivial on all platforms.

BrettMayson commented 5 years ago

Usermode installation is trivial for windows (and macOS), but not linux :/

$HOME/.local/bin is how you install applications on linux without root.

There is no reason HEMTT can't be installed in %appdata% on windows and $HOME/.local/bin on Linux.

ptMuta commented 5 years ago

This doesn't apply to some distributions, but it does cover most mainstream ones so I suppose that should suffice. Those doing their own SEs should know how to cover this use case on their own any how now that I think about it...

BrettMayson commented 5 years ago

I'm going to implement this for Linux, I'm unfamiliar with Windows however if someone would like to help out with that.

ptMuta commented 5 years ago

Yeah, no problem. Will do when I have more spare time, I'm currently super busy :/