Skip to content

Commit

Permalink
QtJambi 6.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
omix committed Dec 19, 2023
1 parent 3790c48 commit 6e9efc4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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="5.15,6.2"`.
* `qt` - specify comma-separated Qt versions to be used, e.g. `-Dqt="5.15,6.3"`.
* `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.)
* `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.)
Expand Down Expand Up @@ -122,6 +122,12 @@ For instance if you want to build for Linux arm:

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

If you are using Qt from Qt installer located at default installation path (e.g. `C:\Qt`)
and Android binaries are installed you can simply use the `-Dandroid=true` argument to
build Qtjambi for Android along with the platform-soecific binaries:

`> ant -Dandroid=true all`

## How To Use QtJambi

### Example
Expand Down Expand Up @@ -169,10 +175,9 @@ Additionally, you need *Qt*. Use the [Qt installer](https://www.qt.io/download-q
**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 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_LIBRARY_PATH on macOS)
or the Java runtime property java.library.path.
Therefore, use the `PATH` environment (`LD_LIBRARY_PATH` on Linux, `DYLD_FRAMEWORK_PATH` on macOS)
or the Java runtime property `java.library.path`.
By default, on Windows Qt libraries are located in `bin` directory and on Linux and macOS in `lib` directory.
In case your Linux distribution provides Qt (of correct version) as system library you don't need to specify library path.

The example program can be executed this way on Windows:
``` powershell
Expand All @@ -187,6 +192,10 @@ On macOS you additionally need to use the start parameter `-XstartOnFirstThread`
java -cp qtjambi-6.5.4.jar:. -Djava.library.path=<path to>/Qt/6.5.3/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.
However, since Maven-published binaries for Linux have been built with Qt from installer they might be incompatible to your system-specific Qt.
In this case it is recommended to build QtJambi on your Linux system by using the installed `qmake`.

If the example fails with a `UnsatisfiedLinkError` QtJambi libraries and Qt libraries seem to be incompatible.
[Read here about library requirements and compatibility.](www/Modules.md)

Expand Down
8 changes: 4 additions & 4 deletions www/Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ Add the following lines to the `dependencies` section (for ABI arm64-v8a):
```gradle
implementation 'io.qtjambi:qtjambi:6.5.4'
implementation 'io.qtjambi:qtjambi-native-android-arm64:6.5.4'
implementation files('qt-lib-core-native-android-arm64-6.5.4.jar',
'qt-lib-core-native-android-common-6.5.4.jar',
'qt-lib-gui-native-android-arm64-6.5.4.jar',
'qt-lib-widgets-native-android-arm64-6.5.4.jar')
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')
```

Exchange `android-arm64` by `android-arm` (armeabi-v7a), `android-x86` (x86) or `android-x64` (x86_64).
Expand Down
2 changes: 1 addition & 1 deletion www/Characteristics-of-QtJambi.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The Java classes provide all methods of the native Qt classes with similar metho

### Primitive Types

C++ and Qt-specific primitive types are mapped to the corresponding Java primitive types:
C++ and Qt-specific primitive types are mapped to the corresponding Java primitive types.
All unsigned types are used as signed Java types, as Java does not support unsigned integers.

| native | java |
Expand Down
6 changes: 3 additions & 3 deletions www/How-to-bundle-Qt-libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ java -Djava.library.path=<path to Qt libraries>
*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.4.jar`
- `qt-lib-gui-native-windows-x64-6.5.4.jar`
- `qt-lib-qml-native-windows-x64-6.5.4.jar`
- `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`
- ...

Place these libraries next to the **qtjambi-native-X.jar** files.
Expand Down

0 comments on commit 6e9efc4

Please sign in to comment.