Skip to content

Adding some comments to the example configuration #5

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
This example project shows you how you can customize the look and feel of the
FXLauncher user interface.

Here's a [video with a fuller explanation](https://www.youtube.com/watch?v=-6PlFVUgntU).

It is recommended that you create a separate project for the custom UI to make it
easier to embed it into the `fxlauncher.jar`. Basically you implement [UIProvider](https://github.com/edvin/fxlauncher/blob/master/src/main/java/fxlauncher/UIProvider.java)
and add the `META-INF/services/fxlauncher.UIProvider` file, pointing to your implementation. See the
documentation of `UIProvider` on the previous link.

To embed custom UI, include a step in your app project where you basically
To embed the custom UI, include a step in your app project where you basically
embed all the class files from the ui project into the `fxlauncher.jar`:

```xml
Expand All @@ -28,13 +30,20 @@ embed all the class files from the ui project into the `fxlauncher.jar`:
<goal>exec</goal>
</goals>
<configuration>
<executable>jar</executable>
<!-- Here, `jar` refers to an executable that you can run on
the command line to create a jar file. -->
<executable>jar</executable>
<workingDirectory>${app.dir}</workingDirectory>
<arguments>
<!-- The `u` argument means "update existing archive". Run `jar -h`for more info. -->
<!-- The `f` argument means "specify archive file name". Run `jar -h`for more info. -->
<argument>uf</argument>
<argument>fxlauncher.jar</argument>
<!-- The `-C` argument means "change to the specified directory and include
the following files". Run `jar -h`for more info. -->
<argument>-C</argument>
<argument>${project.basedir}/../fxlauncher-custom-ui/target/classes</argument>
<!-- `.` means all the files in the directory. -->
<argument>.</argument>
</arguments>
</configuration>
Expand All @@ -43,4 +52,4 @@ embed all the class files from the ui project into the `fxlauncher.jar`:
</plugin>
</plugins>
</build>
```
```