Ghidra: Generalize $USER_HOME in preferences file

Created on 26 Oct 2020  路  1Comment  路  Source: NationalSecurityAgency/ghidra

Is your feature request related to a problem? Please describe.
I use a homemade portable environment not only for Ghidra but for many programs (VSCode, Git, Python...) which is sync between 2 computers (or more) but they do not have the same root path (D:\Users\username1\workspace\Portable\ and C:\Users\username2\workspace\Portable). I can not change these root paths.
So I have to load the Ghidra project again and again when I move to the other computer.

I have made a script to change the path in the "preferences" file on _LastSelectedProjectDirectory_, _LastOpenedArchiveDirectory_, _RecentProjects_, _ProjectDirectory_, _LastOpenedProject_, _RECENT_x_ variables but that is not really portable.

Describe the solution you'd like
I would like to use a environment variable to set the root path and use it in the "preferences" file instead of the absolut path.
BTW, I have find that a variable is used for _DATATYPE_ARCHIVE_PATHS_ and _FID.USER.ADDED_ which is _$USER_HOME_.
I have tried to use it for my case but it is reset on each close.

So if it can be added the _$USER_HOME_ variable for all settings in the "preferences" file.

Most helpful comment

This is a good suggestion

>All comments

This is a good suggestion

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mumbel picture mumbel  路  29Comments

ghost picture ghost  路  29Comments

lab313ru picture lab313ru  路  16Comments

astrelsky picture astrelsky  路  16Comments

rszibele picture rszibele  路  35Comments