Skip to content

Commit 7484a20

Browse files
committed
Updated documentation.
1 parent 72b0526 commit 7484a20

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ java -jar packr.jar \
1616
-classpath myapp.jar \
1717
-mainclass "com.my.app.MainClass" \
1818
-vmargs "-Xmx1G" \
19-
-resources pom.xml;src/main/resources \
19+
-resources src/main/resources;path/to/other/assets \
2020
-minimizejre "soft" \
2121
-outdir out
2222
```
@@ -37,7 +37,6 @@ java -jar packr.jar \
3737

3838
Alternatively, you can put all the command line arguments into a JSON file which might look like this:
3939

40-
> my-packaging-config.json
4140
```json
4241
{
4342
"platform": "mac",
@@ -62,7 +61,7 @@ Alternatively, you can put all the command line arguments into a JSON file which
6261
You can then invoke the tool like this:
6362

6463
```bash
65-
java -jar packr.jar my-packaging-config.json
64+
java -jar packr.jar my-packr-config.json
6665
```
6766

6867
Finally, you can use packr from within your code. Just add the JAR file to your project, either manually, or via the following Maven dependency:
@@ -145,17 +144,17 @@ outdir/
145144
icons.icns [if config.icon is set]
146145
```
147146

148-
You can futher modify the Info.plist to your liking, e.g. add icons, a bundle identifier etc. If your `outdir` has the `.app` extension it will be treated as an application bundle by Mac OS X.
147+
You can further modify the Info.plist to your liking, e.g. add icons, a bundle identifier etc. If your `outdir` has the `.app` extension it will be treated as an application bundle by Mac OS X.
149148

150149
## Executable command line interface
151150

152151
By default, the native executables forward any command line parameters to your Java application's main() function. So, with the configurations above, `./myapp -x y.z` is passed as `com.my.app.MainClass.main(new String[] {"-x", "y.z" })`.
153152

154-
The executables themselves expose an own interface, which has to be explicitely enabled by passing `-c` or `--cli` as the **very first** parameter. In this case, a special delimiter paramter `--` is used to separate the native CLI from parameters to be passed to Java. In this case, the example above would be equal to `./myapp -c [arguments] -- -x y.z`.
153+
The executables themselves expose an own interface, which has to be explicitly enabled by passing `-c` or `--cli` as the **very first** parameter. In this case, a special delimiter parameter `--` is used to separate the native CLI from parameters to be passed to Java. In this case, the example above would be equal to `./myapp -c [arguments] -- -x y.z`.
155154

156-
Try `./myapp -c --help` for a list of available options.
155+
Try `./myapp -c --help` for a list of available options. They are also listed [here](https://github.com/libgdx/packr/blob/master/src/main/native/README.md#command-line-interface).
157156

158-
The Windows executables do not show any output by default. Here you can use `myapp.exe -c --console --help` to spawn a console window, making terminal output visible.
157+
> Note: On Windows, the executable does not show any output by default. Here you can use `myapp.exe -c --console --help` to spawn a console window, making terminal output visible.
159158
160159
## Building
161160

@@ -167,13 +166,14 @@ mvn clean package
167166

168167
This will create a `packr-VERSION.jar` file in `target` which you can invoke as described in the Usage section above.
169168

170-
If you want to compile the native executables used by packr, please follow [these instructions](https://github.com/libgdx/packr/blob/master/src/main/native/README.md). Each of the build scripts will create executable files for the specific platform and copy them to src/main/resources.
169+
If you want to compile the native executables, please follow [these instructions](https://github.com/libgdx/packr/blob/master/src/main/native/README.md). Each of the build scripts will create executable files for the specific platform and copy them to src/main/resources.
171170

172171
## Limitations
173172

174173
* Icons aren't set yet on Windows and Linux, you need to do that manually.
175174
* Minimum platform requirement on MacOS is OS X 10.7.
176-
* JRE minimization is very conservative. Depending on your app, you can carve out stuff from a JRE yourself, disable minimization and pass your custom JRE to packr
175+
* JRE minimization is very conservative. Depending on your app, you can carve out stuff from a JRE yourself, disable minimization and pass your custom JRE to packr.
176+
* On MacOS, the JVM is spawned in its own thread by default, which is a requirement of AWT. This does not work with code based on LWJGL3/GLFW, which needs the JVM be spawned on the main thread. You can enforce the latter with the `-XstartOnFirstThread` VM argument in your packr config.
177177

178178
## License & Contributions
179179

0 commit comments

Comments
 (0)