Skip to content

Commit

Permalink
QtJambi 6.5.3
Browse files Browse the repository at this point in the history
Issue #166
  • Loading branch information
omix committed Sep 28, 2023
1 parent b33113c commit 00dbddf
Show file tree
Hide file tree
Showing 171 changed files with 9,226 additions and 6,895 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This saves compilation time. Although QtJambi build process requires the availab

`> set PATH=...\apache-ant-1.10.3\bin;%PATH%`

`> set QTDIR=C:\Qt\6.5.1\msvc2019_64`
`> set QTDIR=C:\Qt\6.5.3\msvc2019_64`

#### Pre-Build Steps On Linux and macOS

Expand All @@ -67,9 +67,9 @@ This saves compilation time. Although QtJambi build process requires the availab

`> export JAVA_HOME_TARGET=path to your java jdk`

`> export QTDIR=/opt/Qt/6.5.1/gcc_64` on Linux
`> export QTDIR=/opt/Qt/6.5.3/gcc_64` on Linux

`> export QTDIR=/opt/Qt/6.5.1/macos` on macOS
`> export QTDIR=/opt/Qt/6.5.3/macos` on macOS

#### Building Bindings

Expand All @@ -92,11 +92,11 @@ This saves compilation time. Although QtJambi build process requires the availab
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 Android use the following command (on Windows):

`> ant -Dqmake=C:\Qt\6.5.1\android_x86_64\bin\qmake.bat library.native`
`> ant -Dqmake=C:\Qt\6.5.3\android_x86_64\bin\qmake.bat library.native`

or if you want to build for Linux arm:

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

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

Expand All @@ -115,7 +115,7 @@ to your project:
<version>$VERSION</version>
</dependency>
```
(exchange `$VERSION` either by `5.15.16` or by `6.5.2`).
(exchange `$VERSION` either by `5.15.17` or by `6.5.3`).

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

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

``` powershell
javac -cp qtjambi-6.5.2.jar Test.java
javac -cp qtjambi-6.5.3.jar Test.java
```

### Execute Example
Expand All @@ -153,15 +153,15 @@ In case your Linux distribution provides Qt (of correct version) as system libra

The example program can be executed this way on Windows:
``` powershell
java -cp qtjambi-6.5.2.jar;. -Djava.library.path=C:\Qt\6.5.1\msvc2019_64\bin Test
java -cp qtjambi-6.5.3.jar;. -Djava.library.path=C:\Qt\6.5.3\msvc2019_64\bin Test
```
On Linux it looks this way:
``` bash
java -cp qtjambi-6.5.2.jar:. -Djava.library.path=<path to>/Qt/6.5.1/gcc_64/lib Test
java -cp qtjambi-6.5.3.jar:. -Djava.library.path=<path to>/Qt/6.5.3/gcc_64/lib Test
```
On macOS you additionally need to use the start parameter -XstartOnFirstThread:
``` bash
java -cp qtjambi-6.5.2.jar:. -Djava.library.path=<path to>/Qt/6.5.1/macos/lib -XstartOnFirstThread Test
java -cp qtjambi-6.5.3.jar:. -Djava.library.path=<path to>/Qt/6.5.3/macos/lib -XstartOnFirstThread Test
```
In general, you can start learning how to use Qt in Java [as it is introduced for C++](https://doc.qt.io/qt-6/gettingstarted.html#create-your-first-applications).
There are a couple of specifics for QtJambi that are [introduced here](/www/Characteristics-of-QtJambi.md).
Expand Down
46 changes: 28 additions & 18 deletions antfiles/autotests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,8 @@
</then>
<else>
<qtjambi-resolve-path var="absOutputDir" path="${outputDir}" />
<property name="jambiLib" location="${deploymentdir}/native/${qtjambi.osname}/${kind}/lib"/>
<property name="jambiBin" location="${deploymentdir}/native/${qtjambi.osname}/${kind}/bin"/>
<property name="jambiLib" location="${deploymentdir}/platforms/${qtjambi.osname}/${kind}/lib"/>
<property name="jambiBin" location="${deploymentdir}/platforms/${qtjambi.osname}/${kind}/bin"/>
<if>
<equals arg1="${jdk-exec-version}" arg2="8"/>
<then>
Expand Down Expand Up @@ -599,16 +599,16 @@
<os family="windows"/>
<then>
<property name="qtPath" location="${qtjambi.qt.bindir}" />
<property name="qtJambiPath" location="${deploymentdir}/native/${qtjambi.osname}/${kind}/bin" />
<property name="qtJambiPath" location="${deploymentdir}/platforms/${qtjambi.osname}/${kind}/bin" />
<property name="testLibPath" location="${outputDir}/${qtjambi.osname}/tests/bin" />
</then>
<else>
<property name="qtPath" location="${qtjambi.qt.libdir}" />
<property name="qtJambiPath" location="${deploymentdir}/native/${qtjambi.osname}/${kind}/lib" />
<property name="qtJambiPath" location="${deploymentdir}/platforms/${qtjambi.osname}/${kind}/lib" />
<property name="testLibPath" location="${outputDir}/${qtjambi.osname}/tests/lib" />
</else>
</if>
<property name="qtjambiPluginPath" location="${deploymentdir}/native/${qtjambi.osname}/${kind}/plugins" />
<property name="qtjambiPluginPath" location="${deploymentdir}/platforms/${qtjambi.osname}/${kind}/plugins" />
<property name="testPluginPath" location="${outputDir}/${qtjambi.osname}/tests/${kind}/plugins" />
<property name="testQmlPath" location="${outputDir}/${qtjambi.osname}/tests/${kind}/qml" />
<condition property="qtjambi.enable-method-logs" value="true" else="false">
Expand Down Expand Up @@ -739,17 +739,17 @@
<env key="${env.qtjambi.debug.trace}" value="1"/>
<env key="QT_MULTIMEDIA_PREFERRED_PLUGINS" value="Test"/>
<!--env key="QML_IMPORT_PATH" value="${absQtPath}/../qml"/-->
<env key="DYLD_FRAMEWORK_PATH" value="${qtPath}"/>
<env key="DYLD_LIBRARY_PATH" value="${qtJambiPath}"/>
<!-- <jvmarg value="-verbose"/> -->
<formatter type="xml" usefile="yes" />
<batchtest fork="yes" todir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}">
<fileset refid="qtjambi.autotest.classes"/>
</batchtest>
</junit>
<modify-test-results dir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}" version="${qtjambi.jar.version}" mode="${kind}" jdk="${jdk-exec-version}"/>
</try>
<catch throwable="java.lang.Throwable" print="true">
</catch>
<finally>
<modify-test-results dir="${outputDir}/${qtjambi.osname}/tests/junitxml-${kind}${jdk-exec-version}" version="${qtjambi.jar.version}" mode="${kind}" jdk="${jdk-exec-version}"/>
</finally>
</trycatch>
</then>
Expand All @@ -760,13 +760,13 @@

<target name="run">
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/debug" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/debug" type="dir"/>
<then>
<antcall target="debug.run"/>
</then>
<else>
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/release" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/release" type="dir"/>
<then>
<antcall target="release.run"/>
</then>
Expand All @@ -780,7 +780,7 @@

<target name="release.run">
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/release" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/release" type="dir"/>
<then>
<if>
<os family="mac"/>
Expand Down Expand Up @@ -823,7 +823,7 @@

<target name="debug.run">
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/debug" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/debug" type="dir"/>
<then>
<if>
<os family="mac"/>
Expand Down Expand Up @@ -866,7 +866,7 @@

<target name="release.run8">
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/release" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/release" type="dir"/>
<then>
<antcall target="run.test">
<param name="jdk-exec-version" value="8"/>
Expand All @@ -882,7 +882,7 @@

<target name="debug.run8">
<if>
<available file="${deploymentdir}/native/${qtjambi.osname}/debug" type="dir"/>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/debug" type="dir"/>
<then>
<antcall target="run.test">
<param name="jdk-exec-version" value="8"/>
Expand Down Expand Up @@ -949,10 +949,20 @@
<target name="tests.run.all-impl" depends="init.build">
<trycatch>
<try>
<antcall target="release.run"/>
<antcall target="debug.run"/>
<antcall target="release.run8"/>
<antcall target="debug.run8"/>
<if>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/release" type="dir"/>
<then>
<antcall target="release.run"/>
<antcall target="release.run8"/>
</then>
</if>
<if>
<available file="${deploymentdir}/platforms/${qtjambi.osname}/debug" type="dir"/>
<then>
<antcall target="debug.run"/>
<antcall target="debug.run8"/>
</then>
</if>
</try>
<finally>
<if>
Expand Down
Loading

0 comments on commit 00dbddf

Please sign in to comment.