webinstall / webi-roadmap

A space where we can ideate without cluttering the main repo with stale issues
Mozilla Public License 2.0
2 stars 0 forks source link

Improvement: Use Windows Junctions #18

Open coolaj86 opened 3 years ago

coolaj86 commented 3 years ago

When I first wrote this I was aware that Windows had symlinks, but that they required administrator privileges.

However, Windows also has "junctions" which, for all intents and purposes, appear to be symlinks... but technically are not... somehow. Anyway, they do NOT require admin privs.

It would speed up Windows installs significantly to use junctions.

Example:

https://github.com/webinstall/webi-installers/blob/84722bd1409d7774f5032e04d4f1aca00ebe2fa3/atomicparsley/install.ps1#L60C1-L60C60

Instead of

Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse

we could do a junction (if it's a directory and not just a file).

Future Updates

This may mean that we'd want to install all packages into \ .local/opt/<package-name>-<version>/bin/<bin-name> \ so that we could junction to \ .local/opt/<package-name>/bin/<bin-name>