Skip to content

Commit

Permalink
QtJambi 6.8.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
omix committed Oct 8, 2024
1 parent e96281d commit d14c76e
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 82 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ Finally, find all Java libraries in directory `<qtjambiversion>/deployment` and

You can call ant with additional properties as listed below. Therefore use the `-D` command line argument: `ant -Dkey=value all`.

* `qt` - specify comma-separated Qt versions to be used, e.g. `-Dqt="6.5,6.7"`.
* `qt` - specify comma-separated Qt versions to be used, e.g. `-Dqt="6.5,6.7,6.8"`.
* `qtbase` - specify Qt installer's base directory, e.g. `-Dqtbase=/var/Qt`. Can be combined with `qt`.
* `qtdir` - specify Qt version and platform directory, e.g. `-Dqtdir=/var/Qt/6.5.3/macos`. This option allows multiple directories separated by path separator. (If this option is specified `qt` and `qtbase` have no effect.)
* `qtdir` - specify Qt version and platform directory, e.g. `-Dqtdir=/var/Qt/6.8.0/macos`. This option allows multiple directories separated by path separator. (If this option is specified `qt` and `qtbase` have no effect.)
* `qmake` - specify a path to a `qmake` program to be used for building QtJambi. (If this option is specified `qt`, `qtbase` and `qtdir` have no effect.)
* `android` - specify `true` to build QtJambi for Android. Therefore, Qt for Android has to be installed. By specify `-Dandroid=only` ant skips building QtJambi for the build platform. When compiling for Android all required NDK and SDK components are downloaded automatically. Alternatively, specify the Android NDK install path with `-Dndk=...`.

Expand All @@ -120,7 +120,7 @@ Find unit test results in directory `TestResults`.
After building QtJambi for the running operation system you can additionally cross-compile QtJambi for other platforms.
For instance if you want to build for Linux arm:

`> ant -Dqmake=/opt/Qt/6.5.3/arm-gnueabi/bin/qmake library.native`
`> ant -Dqmake=/opt/Qt/6.8.0/arm-gnueabi/bin/qmake library.native`

Just specify the third-platform cross-compiled qmake with `-Dqmake=path`.

Expand All @@ -145,7 +145,7 @@ to your project:
<version>$VERSION</version>
</dependency>
```
(exchange `$VERSION` either by `6.5.9` or by `6.7.3`).
(exchange `$VERSION` either by `6.5.9`, `6.7.3` or by `6.8.0`).

Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/).

Expand All @@ -165,7 +165,7 @@ public class Test {
Compile the file:

``` powershell
javac -cp qtjambi-6.5.9.jar Test.java
javac -cp qtjambi-6.8.0.jar Test.java
```

### Execute Example
Expand All @@ -175,7 +175,7 @@ For instance, if you are working on Windows download **qtjambi-native-windows-x6
from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi-native-windows-x64/) and add it to java class path.

Additionally, you need *Qt*. Use the [Qt installer](https://www.qt.io/download-qt-installer) to install Qt on your system. Make sure you are using the same Qt version and QtJambi version (the first and second version digit needs to be the same).
When using Maven artifacts for Windows you need to select MSVC 2019 64-Bit (msvc2019_64), as they are not compatible with Mingw Qt.
When using Maven artifacts for Windows you need to select MSVC 2022 64-Bit (msvc2022_64), as they are not compatible with Mingw Qt.

When running a QtJambi application you have to make the locations of Qt libraries known to Java.
Therefore, use the `PATH` environment (`LD_LIBRARY_PATH` on Linux, `DYLD_FRAMEWORK_PATH` on macOS)
Expand All @@ -184,15 +184,15 @@ By default, on Windows Qt libraries are located in `bin` directory and on Linux

The example program can be executed this way on Windows:
``` powershell
java -cp qtjambi-6.5.9.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test
java -cp qtjambi-6.8.0.jar;. -Djava.library.path=C:\Qt\6.8.0\msvc2022_64\bin Test
```
On Linux it looks this way:
``` bash
java -cp qtjambi-6.5.9.jar:. -Djava.library.path=<path to>/Qt/6.5.3/gcc_64/lib Test
java -cp qtjambi-6.8.0.jar:. -Djava.library.path=<path to>/Qt/6.8.0/gcc_64/lib Test
```
On macOS you additionally need to use the start parameter `-XstartOnFirstThread`:
``` bash
java -cp qtjambi-6.5.9.jar:. -Djava.library.path=<path to>/Qt/6.5.3/macos/lib -XstartOnFirstThread Test
java -cp qtjambi-6.8.0.jar:. -Djava.library.path=<path to>/Qt/6.8.0/macos/lib -XstartOnFirstThread Test
```

On Linux of your distribution provides Qt (of correct version) as system library you don't need to specify library path at all.
Expand Down
20 changes: 10 additions & 10 deletions www/Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ Android projects need Qt to be available as jar bundles.
Therefore, follow the instructions [here](How-to-bundle-Qt-libraries.md) to create Qt bundles.
Copy the required bundles to the app folder of your software project, e.g. for ABI arm64-v8a:

- `qt-lib-core-native-android-arm64-6.5.9.jar`
- `qt-lib-core-native-android-common-6.5.9.jar`
- `qt-lib-gui-native-android-arm64-6.5.9.jar`
- `qt-lib-widgets-native-android-arm64-6.5.9.jar`
- `qt-lib-core-native-android-arm64-6.8.0.jar`
- `qt-lib-core-native-android-common-6.8.0.jar`
- `qt-lib-gui-native-android-arm64-6.8.0.jar`
- `qt-lib-widgets-native-android-arm64-6.8.0.jar`

Several libraries have a `native-android-common` component.

Expand All @@ -68,12 +68,12 @@ Therefore, open the file `app/build.gradle`.
Add the following lines to the `dependencies` section (for ABI arm64-v8a):

```gradle
implementation 'io.qtjambi:qtjambi:6.5.9'
implementation 'io.qtjambi:qtjambi-native-android-arm64:6.5.9'
implementation files('qt-lib-core-native-android-arm64-6.5.3.jar',
'qt-lib-core-native-android-common-6.5.3.jar',
'qt-lib-gui-native-android-arm64-6.5.3.jar',
'qt-lib-widgets-native-android-arm64-6.5.3.jar')
implementation 'io.qtjambi:qtjambi:6.8.0'
implementation 'io.qtjambi:qtjambi-native-android-arm64:6.8.0'
implementation files('qt-lib-core-native-android-arm64-6.8.0.jar',
'qt-lib-core-native-android-common-6.8.0.jar',
'qt-lib-gui-native-android-arm64-6.8.0.jar',
'qt-lib-widgets-native-android-arm64-6.8.0.jar')
```

Exchange `android-arm64` by `android-arm` (armeabi-v7a), `android-x86` (x86) or `android-x64` (x86_64).
Expand Down
10 changes: 5 additions & 5 deletions www/Characteristics-of-QtJambi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1166,15 +1166,15 @@ device.close();

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-uic-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-uic-6.8.0.jar
-m qtjambi.uic --output=src --package=com.myapplication.widgets com/myapplication/widgets/mainwindow.ui
```

Alternative way to call it:

``` shell
java -Djava.library.path=<path to Qt libraries>
-cp qtjambi-6.5.9.jar:qtjambi-uic-6.5.9.jar
-cp qtjambi-6.8.0.jar:qtjambi-uic-6.8.0.jar
io.qt.uic.Main --output=src --package=com.myapplication.widgets com/myapplication/widgets/mainwindow.ui
```

Expand Down Expand Up @@ -1495,7 +1495,7 @@ and *QtJambi* libraries:
``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer plugin
--class-name=my.company.CustomImageIOPlugin
--class-path=my-company-library.jar
Expand All @@ -1507,7 +1507,7 @@ Alternative way to call it:
``` shell
java -Djava.library.path=<path to Qt libraries>
-cp qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-cp qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
io.qt.qtjambi.deployer.Main plugin
--class-name=my.company.CustomImageIOPlugin
--class-path=my-company-library.jar
Expand All @@ -1534,7 +1534,7 @@ This is especially necessary on macOS (arm64).
``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer plugin
--class-name=my.company.CustomImageIOPlugin
--class-path=my-company-library.jar
Expand Down
12 changes: 6 additions & 6 deletions www/How-to-bundle-Qt-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ on *Linux* and *macOS*.

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer qt
```

Alternative way to call it:

``` shell
java -Djava.library.path=<path to Qt libraries>
-cp qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-cp qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
io.qt.qtjambi.deployer.Main qt
```

*QtJambi deployer* autodetects Qt installation on your computer and creates jar bundles for each of the Qt libraries along with their specific plugins.
E.g. the output files for Windows look this way:

- `qt-lib-core-native-windows-x64-6.5.3.jar`
- `qt-lib-gui-native-windows-x64-6.5.3.jar`
- `qt-lib-qml-native-windows-x64-6.5.3.jar`
- `qt-lib-core-native-windows-x64-6.8.0.jar`
- `qt-lib-gui-native-windows-x64-6.8.0.jar`
- `qt-lib-qml-native-windows-x64-6.8.0.jar`
- ...

Place these libraries next to the **qtjambi-native-X.jar** files.
Expand All @@ -39,7 +39,7 @@ Possible arguments are:
- `--platform=...` Target platform, e.g. `android-arm64`, `windows-x64`, `linux-x64`, `macos`.
- `-d`, `--target-directory=...` Directory where to place the generated bundle files
- `--condifuration=...` Either `debug` or `release` (default), wether to bundle release libraries or debug libraries.
- `--qtdir=...` path to *Qt* version, e.g. `C:\Qt\6.5.3\msvc2019_64`
- `--qtdir=...` path to *Qt* version, e.g. `C:\Qt\6.8.0\msvc2022_64`
- `--qtbase=...` alternatively path to *Qt* installation, e.g. `C:\Qt`.
- `--target-version=` version to be bundles
- `--utilities=...` path to Android utilities (only for android bundles). E.g. `--utilities=utilities/QtAndroidBindings.jar`.
Expand Down
2 changes: 1 addition & 1 deletion www/How-to-debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Now, follow the instructions for [QML debugging](https://doc.qt.io/qt/qtquick-de
## Native Debugger

For native debugging you need the debuginfo bundle for every native bundle your application is using.
For instance, on Windows you need **qtjambi-debuginfo-windows-x64-6.5.9.jar** placed next to **qtjambi-native-windows-x64-6.5.9.jar**.
For instance, on Windows you need **qtjambi-debuginfo-windows-x64-6.8.0.jar** placed next to **qtjambi-native-windows-x64-6.8.0.jar**.
The debuginfo bundle contains platform-dependent debug symbol files for the native debugger and corresponding source code.
It is necessary to enable the extraction of these files during program start by using the system property `io.qt.provide-debuginfo=true` (`io.qt.no-native-deployment` must not be `true`).
By default, QtJambi does not extract source files unless you specify a target directory for those files with property `io.qt.sourcesdir`.
Expand Down
36 changes: 18 additions & 18 deletions www/How-to-deploy-QtJambi-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ along with platform-dependent **qtjambi-deployer-native-X.jar** for all platform

In the examples below, we assume you created an application in a jar
file `my-company-app.jar` with main class `my.company.app.Main`
depending on `qtjambi-6.5.9.jar`.
depending on `qtjambi-6.8.0.jar`.

Call the app deployer as shown below. Make sure the library path points
to the *Qt* libraries being `bin` on *Windows* and `lib`
on *Linux* and *macOS*.

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer app
```

Alternative way to call it:

``` shell
java -Djava.library.path=<path to Qt libraries>
-cp qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-cp qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
io.qt.qtjambi.deployer.Main app
```

Expand Down Expand Up @@ -73,8 +73,8 @@ installation directory
| plugins
| ... (platforms, styles and others)
| lib
| qtjambi-6.5.9.jar
| qtjambi-native-windows-x64-6.5.9.jar
| qtjambi-6.8.0.jar
| qtjambi-native-windows-x64-6.8.0.jar
| my-company-app.jar
| jre
| ... (Java Runtime Environment)
Expand All @@ -85,11 +85,11 @@ append the following commands to the above listed *QtJambi deployer* command:

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar;qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar;qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer app
--application=MyCompanyApp
--executable=utilities/QtJambiLauncher.exe
--class-path=../lib/my-company-app.jar;../lib/qtjambi-6.5.9.jar;../lib/qtjambi-native-windows-x64-6.5.9.jar
--class-path=../lib/my-company-app.jar;../lib/qtjambi-6.8.0.jar;../lib/qtjambi-native-windows-x64-6.8.0.jar
--library-path=.
--jvm-path=../jre
--main-class=my.company.app.Main
Expand All @@ -110,11 +110,11 @@ installation directory
| plugins
| ... (platforms, styles and others)
| lib
| libQt6Core.so[.6.5.3]
| libQt6Gui.so[.6.5.3]
| libQt6Widgets.so[.6.5.3]
| qtjambi-6.5.9.jar
| qtjambi-native-linux-x64-6.5.9.jar
| libQt6Core.so[.6.8.0]
| libQt6Gui.so[.6.8.0]
| libQt6Widgets.so[.6.8.0]
| qtjambi-6.8.0.jar
| qtjambi-native-linux-x64-6.8.0.jar
| my-company-app.jar
| jre
| ... (Java Runtime Environment)
Expand All @@ -125,11 +125,11 @@ the following commands to the above listed *QtJambi deployer* command:

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer app
--application=MyCompanyApp
--executable=utilities/QtJambiLauncher
--class-path=lib/my-company-app.jar:lib/qtjambi-6.5.9.jar:lib/qtjambi-native-linux-x64-6.5.9.jar
--class-path=lib/my-company-app.jar:lib/qtjambi-6.8.0.jar:lib/qtjambi-native-linux-x64-6.8.0.jar
--library-path=lib
--jvm-path=jre
--main-class=my.company.app.Main
Expand Down Expand Up @@ -157,8 +157,8 @@ installation directory
| QtGui.framework
| QtWidgets.framework
| lib
| qtjambi-6.5.9.jar
| qtjambi-native-macos-6.5.9.jar
| qtjambi-6.8.0.jar
| qtjambi-native-macos-6.8.0.jar
| my-company-app.jar
| jre
| ... (Java Runtime Environment)
Expand All @@ -172,11 +172,11 @@ append the following commands to the above listed *QtJambi deployer* command:

``` shell
java -Djava.library.path=<path to Qt libraries>
-p qtjambi-6.5.9.jar:qtjambi-deployer-6.5.9.jar
-p qtjambi-6.8.0.jar:qtjambi-deployer-6.8.0.jar
-m qtjambi.deployer app
--application=MyCompanyApp
--executable=utilities/QtJambiLauncher.app
--class-path=../lib/my-company-app.jar:../lib/qtjambi-6.5.9.jar:../lib/qtjambi-native-macos-6.5.9.jar
--class-path=../lib/my-company-app.jar:../lib/qtjambi-6.8.0.jar:../lib/qtjambi-native-macos-6.8.0.jar
--library-path=../Frameworks
--jvm-path=../jre
--main-class=my.company.app.Main
Expand Down
15 changes: 9 additions & 6 deletions www/How-to-develop-Qt-in-Java.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ to your project:
<version>$VERSION</version>
</dependency>
```
(exchange `$VERSION` either by `6.5.9` or by `6.7.3`).
(exchange `$VERSION` either by `6.5.9`, `6.7.3` or by `6.8.0`).

Otherwise, download QtJambi JAR file from [Maven Central Repository](https://search.maven.org/artifact/io.qtjambi/qtjambi/).
Find the [list of all available QtJambi modules](www/Modules.md).
Expand All @@ -36,7 +36,7 @@ public class Test {
Compile the file:

``` powershell
javac -cp qtjambi-6.5.9.jar Test.java
javac -cp qtjambi-6.8.0.jar Test.java
```

## Executing Example
Expand All @@ -57,19 +57,19 @@ macOS) or the Java runtime property **java.library.path**.
The example program can be executed this way on Windows:

``` powershell
java -cp qtjambi-6.5.9.jar;qtjambi-native-windows-x64-6.5.9.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test
java -cp qtjambi-6.8.0.jar;qtjambi-native-windows-x64-6.8.0.jar;. -Djava.library.path=C:\Qt\6.8.0\msvc2022_64\bin Test
```

On Linux it looks this way:

``` bash
java -cp qtjambi-6.5.9.jar:qtjambi-native-linux-x64-6.5.9.jar:. -Djava.library.path=<path to>/Qt/6.5.3/gcc_64/lib Test
java -cp qtjambi-6.8.0.jar:qtjambi-native-linux-x64-6.8.0.jar:. -Djava.library.path=<path to>/Qt/6.8.0/gcc_64/lib Test
```

On macOS you additionally need to use the start parameter -XstartOnFirstThread:

``` bash
java -cp qtjambi-6.5.9.jar:qtjambi-native-macos-6.5.9.jar:. -Djava.library.path=<path to>/Qt/6.5.3/macos/lib -XstartOnFirstThread Test
java -cp qtjambi-6.8.0.jar:qtjambi-native-macos-6.8.0.jar:. -Djava.library.path=<path to>/Qt/6.8.0/macos/lib -XstartOnFirstThread Test
```

If the example fails with a `UnsatisfiedLinkError` QtJambi libraries and Qt libraries seem to be incompatible.
Expand All @@ -80,7 +80,7 @@ If the example fails with a `UnsatisfiedLinkError` QtJambi libraries and Qt libr
QtJambi automatically detects the required native component jars if they are located next to their Java counterparts or in a subfolder `native`.
You can simply skip `qtjambi-native-OS-VERSION.jar` in your classpath (`-cp`).

If you intend to use automatic module loading (`java -p <dir>`) you strictly need to place native components in `native` subfolder next to `qtjambi-6.5.9.jar`.
If you intend to use automatic module loading (`java -p <dir>`) you strictly need to place native components in `native` subfolder next to `qtjambi-6.8.0.jar`.

Native bundles are extracted every time at program startup. By default, this is a process specific temporal directory purged after program shutdown.
Alternatively, you can use Java system property `io.qt.deploymentdir` to let libraries to be exctacted and persist in user
Expand All @@ -106,6 +106,9 @@ Documentation](https://doc.qtjambi.io/6.5.9/)
and [QtJambi 6.7 API Reference
Documentation](https://doc.qtjambi.io/6.7.3/)

and [QtJambi 6.8 API Reference
Documentation](https://doc.qtjambi.io/6.8.0/)

## Useful Java System Properties for QtJambi

Following system properties are accepted by QtJambi.
Expand Down
Loading

0 comments on commit d14c76e

Please sign in to comment.