Skip to content

Add file associations when installing #5520

@tobiasdiez

Description

@tobiasdiez

Latest development version does not associate bib files with JabRef (using Windows installer, but probably applies to Linux and Mac as well).

jpackage has the following option:

--file-associations — Path to a Properties file that contains list of key, value pairs (absolute path or relative to the current directory). The keys "extension", "mime-type", "icon", and "description" can be used to describe the association. This option can be used multiple times.

The documentation is a bit sparse at this point. Probably needs a bit of experimentation using different formats. Relevant part of the build script:

jabref/build.gradle

Lines 565 to 607 in 9fd49bc

if (OperatingSystem.current().isWindows()) {
// This requires WiX to be installed: https://github.com/wixtoolset/wix3/releases
installerType = "msi"
imageOptions = [
'--win-console',
'--icon', "${projectDir}/src/main/resources/icons/jabref.ico",
]
installerOptions = [
'--vendor', 'JabRef',
'--app-version', "${project.version}",
'--win-upgrade-uuid', 'd636b4ee-6f10-451e-bf57-c89656780e36',
'--win-dir-chooser',
'--win-shortcut',
'--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/windows"
]
}
if (OperatingSystem.current().isLinux()) {
imageOptions = [
'--icon', "${projectDir}/src/main/resources/icons/JabRef-icon-64.png",
]
installerOptions = [
'--vendor', 'JabRef',
'--app-version', "${project.version}",
// '--temp', "$buildDir/installer",
'--resource-dir', "${projectDir}/buildres/linux",
'--linux-menu-group', 'Office;',
'--linux-rpm-license-type', 'MIT',
// '--license-file', "${projectDir}/LICENSE.md",
'--description', 'JabRef is an open source bibliography reference manager. The native file format used by JabRef is BibTeX, the standard LaTeX bibliography format.',
'--linux-shortcut'
]
}
if (OperatingSystem.current().isMacOsX()) {
imageOptions = [
'--icon', "${projectDir}/src/main/resources/icons/jabref.icns",
]
installerOptions = [
'--vendor', 'JabRef',
'--app-version', "${project.version}"
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    [outdated] type: bugConfirmed bugs or reports that are very likely to be bugscomponent: installationgood first issueAn issue intended for project-newcomers. Varies in difficulty.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions