Add `RUSTIC_HOME` and update precedence for platform specific app directories
it gives the possibility to set a location of their own to the users.
yeah, users can set a custom location with the environment variable, but "RUSTIC_HOME": "$dir" is defined in manifest, $env:RUSTIC_HOME will be reset to $dir every update.
If you want to make the program more portable. rustic_home should be set in order and fallback to the first existing path:
-
$env:RUSTIC_HOME -
<program_root>\home -
$env:USERPROFILE\.config\rusticor$env:USERPROFILE\.rustic -
$env:APPDATA\rustic -
$env:ProgramData\rustic...
note, this just a example or suggestion, or a feature request for your project.
Originally posted by @HUMORCE in https://github.com/ScoopInstaller/Main/pull/5042#discussion_r1310120538
Furthermore, we need to make sure, that the next release:
- [x] actually contains the hashes
- [x] has the platform specific binary extension (for Windows) added (should be fixed in #843)
Hi, just to let you know, the latest release (0.6.1) doesn't contain any binaries for Windows so the Scoop package is out of date currently.
Yes, the last release didn't contain a windows binary (@aawsome), we need to investigate that, fortunately we will have another release soon. Thank you a lot for the heads-up, though!
Hi, just to let you know, the latest release (0.6.1) doesn't contain any binaries for Windows so the Scoop package is out of date currently.
With the new release, packages should be updated, hashes are attached and packages are signed. So we should be able to update our scoop package at this point.
Hash for rustic has been updated: https://github.com/ScoopInstaller/Main/pull/5494
~~I'm not sure, why it didn't get automatically updated, though. Might need further investigation.~~
Update: The hash has been updated, but because I needed to rebuild the artifacts once again when I discovered the internal hierarchy was breaking self-update, the CD updated the attached artifacts on the release, which didn't get to the scoop CI (hook runs only first time when a release is published).
yeah, users can set a custom location with the environment variable, but "RUSTIC_HOME": "$dir" is defined in manifest, $env:RUSTIC_HOME will be reset to $dir every update.
We need to think that through, as that could become a problem. We may only set RUSTIC_HOME in scoop if it's unset. On the other hand, it could also lead to issues, to not reset it on an update, as people could copy their executable from their scoop directory to use it from another folder. After updating, they would think, they are using the updated version — but they aren't because RUSTIC_HOME still points to their rustic custom folder using their configs. Which could lead to weird bug reports down the line.
@tech189 Is there a usual way to handle that for scoop manifests?
Installations of apps with Scoop are not meant to be portable as far as I know. Users should know that if they move executables away from their Scoop directory, they will no longer be managed by Scoop and updates/environment variables will no longer work properly.