Packr not working

1.6k Views Asked by At

I want to export my LibGDX game, but when I try to run packr with this config:

{
"platform": "windows",
"jdk": "openjdk-1.7.0-u45-unofficial-icedtea-2.4.3-windows-i586-image.zip",
"executable": "LibGDX",
"appjar": "LibGDX5.jar",
"mainclass": "cz/vilix/main/Desktop",
"vmargs": [
   "-Xmx1G"
],
"resources": [

],
"minimizejre": "soft",
"outdir": "out"
}

I get this output in the console:

Console output

But everything seems to be in place:

Required files

And I get the following output in the 'out' directory (obviously, running the 42KB exe file doesn't work):

Out folder

This is the content of the .jar file:

Content of jar

I think it might not be working due to not specifying res folder, but I don't know to fix it.

UPDATE:

I've tried creating a new xml file pom.xml, which contains this:

<dependency>
    <groupId>com.badlogicgames.packr</groupId>
    <artifactlId>packr</artifactlId>
    <version>1.1</version>
</dependency>

changed the config.json to contain this:

"resources": [
    "pom.xml"
],

The output folder looks the same, except there is the pom.xml file included. And also now I get this error:

New error

1

There are 1 best solutions below

9
On

There are many issues..

The slf4j library would come from the Maven dependecy from the pom.xml

The pom.xml would look like

<dependency>
  <groupId>com.badlogicgames.packr</groupId>
  <artifactlId>packr</artifactlId>
  <version>1.1</version>
</dependency>

If you look at the Packr Readme you notice that you specificy the pom.xml either when calling the JAR or set as a config

java -jar packr.jar .... -resources pom.xml ...

or in config.json

{

  ...
  ...

  "resources": ["pom.xml"],

  ...
}

Read the readme and follow it to fix the issues https://github.com/libgdx/packr