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

Mappings are not contained in JDKPackager bundles #782

Closed
smoes opened this issue Apr 19, 2016 · 3 comments
Closed

Mappings are not contained in JDKPackager bundles #782

smoes opened this issue Apr 19, 2016 · 3 comments

Comments

@smoes
Copy link

smoes commented Apr 19, 2016

When creating bundles with JDKPackager (tried for .app, .dmg and .pkg on OSX), resources defined in mappings, defined as follows, are not included in the final bundle:

// Tried also 'in JDKPackager'
mappings in Universal ++= {
      val configDir = sourceDirectory.value/"main"/"resources"
      for {
        file <- (configDir ** AllPassFilter).get
        relative <- file.relativeTo(configDir.getParentFile)
        mapping = file -> relative.getPath
      } yield mapping
    }

Since there is no key in com.typesafe.sbt.packager.jdkpackager.JDKPackagerKeys for fx:resource I assumed resource mapping should be inherited from Universal plugin. However, created bundles do not contain the specified resources directory. Is there another way to achieve that?

@muuki88
Copy link
Contributor

muuki88 commented Apr 19, 2016

Hi @smoes , thanks for your report.

I assumed resource mapping should be inherited from Universal plugin

This should indeed be the case. Can you tell us which native-packager version you are using?

Another thing you could try (and can use for convenience) are the mappings helper.

import NativePackagerHelper._
mappings in Universal ++= contentOf(resourceDirectory.value)

@smoes
Copy link
Author

smoes commented Apr 20, 2016

I am using native-packager version 1.1.0-RC1.
The proposed snippets does not solve the problem.

To be clear: The defined files/folders are just not present in the resulting bundle itself but appear in target/jdkpackager

@metasim
Copy link
Member

metasim commented Apr 20, 2016

Take this with a grain of salt, as it's been a while since I've looked into it, but the javapackager API itself does not provide a clear way of delivering additional files with your .dmg or .pkg image. It's possible to get things located inside the .app bundle, but that's usually not what you want. On Windows javapackager has more flexibility, but I can't remember if it requires an override of the WiX/Inno files, or if it just "does the right thing".

One thing that would help get us toward a solution would be a scripted test to build a solution against.

@muuki88 muuki88 closed this as completed Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants