Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpackage Customized Info.plist and background.tiff for mac not copied over #132

Closed
Siedlerchr opened this issue Apr 18, 2020 · 3 comments
Closed

Comments

@Siedlerchr
Copy link

Hi,
we are currently having problems with specifying replacement files. They are ignored, e.g. always the defaults are used.

I followed the description here: https://docs.oracle.com/en/java/javase/14/jpackage/override-jpackage-resources.html#GUID-1B718F8B-B68D-4D46-B1DB-003D7729AAB6
and we created a custom background.tiff file in the resources folder, but it's not copied over. The default is used in the final installer. We tried naming it both background.tiff and background-jabref.tiff
Similar with specifying an Info.plist

And somehow the --verbose switch is also ignored.

Do we need to pass the options somehow in another way?
https://github.com/JabRef/jabref/blob/master/build.gradle#L680


  if (OperatingSystem.current().isMacOsX()) {
            imageOptions = [
                    '--icon', "${projectDir}/src/main/resources/icons/jabref.icns",
                    '--resource-dir', "${projectDir}/buildres/mac"
            ]
            installerOptions = [
                    '--verbose',
                    '--vendor', 'JabRef',
                    '--app-version', "${project.version}",
                    '--file-associations', "${projectDir}/buildres/mac/bibtexAssociations.properties",
                    '--resource-dir', "${projectDir}/buildres/mac"
            ]
        }
@siordache
Copy link
Member

siordache commented Apr 18, 2020

@Siedlerchr To see the jpackage verbose output you also need to add the Gradle -i flag to this line:

run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }} ..."

After that, you will see the following message:

Using default package resource background_dmg.tiff [dmg background] (add JabRef-background.tiff to the resource-dir to customize).

So, jpackage expects to find a file named JabRef-background.tiff in the resource-dir.

Renaming your JabRef-background_dmg.tiff to JabRef-background.tiff should solve this issue:

Using custom package resource [dmg background] (loaded from JabRef-background.tiff).

@Siedlerchr
Copy link
Author

@siordache Thanks for the quick feedback. That works now. I will test now with the plist files as well and report back.

@Siedlerchr
Copy link
Author

Just for reference, got it to work: Info.plist and Info.list.template seemed to be necessary
https://github.com/JabRef/jabref/tree/master/buildres/mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants