Skip to content

Consistency across ghidra application settings paths (portability) #7505

Open
@bukowa

Description

@bukowa

Is your feature request related to a problem? Please describe.

Ghidra is not consistent when it comes to application settings path. Lets take a look at application.settingsdir that you can declare in launch.properties file and application.version that you declare in application.properties.

# Settings directory used by the application to store application settings and data that persist
# between application sessions, system reboots, and periodic system cleanup. Overridden values
# are required to be absolute paths. The current user name may be incorporated into the settings
# directory's name if the settings directory lives outside of the user's home directory. The
# settings directory will be selected based on the following rules, in order of precedence:
# 1. System.getProperty("application.settingsdir")/[user-]<application>/<application>_<version>
# 2. System.getenv("XDG_CONFIG_HOME")/[user-]<application>/<application>_<version>
# 3. A platform specific default location:
# - Windows: %APPDATA%\<application>\<application>_<version>
# - Linux: $HOME/.config/<application>/<application>_<version>
# - macOS: $HOME/Library/<application>/<application>_<version>
#VMARGS=-Dapplication.settingsdir=

application.version=11.4

Given my username buk:

Example 1:

#VMARGS=-Dapplication.settingsdir=
C:\Users\buk\AppData\Roaming\AppData\ghidra_11.3_PUBLIC

Example 2:

VMARGS=-Dapplication.settingsdir=C:\ghidra\ghidra_11.3\Contrib\APPDATA
C:\ghidra\ghidra_11.3\Contrib\APPDATA\buk-ghidra\ghidra_11.3_PUBLIC

Result:

  • ghidra creates subdirectories inside settingsdir path (hard to know what will be final path)
  • ghidra creates directory based on application.version (setting that comes from totally different file which also requires changing when your trying to make the installation portable)
  • ghidra doesn't allow relative paths in these settings (harder to make it portable)

Extra:

Describe the solution you'd like
Consistent way that allows for portability.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions