Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lauri Ahonen committed Apr 5, 2024
2 parents 4aab7f7 + 0a33062 commit 3ebd2a0
Show file tree
Hide file tree
Showing 197 changed files with 2,718 additions and 2,512 deletions.
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
43 changes: 40 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ on:
branches:
- master

permissions:
contents: read

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11, 17, 19, 20-ea]
java: [8, 11, 17, 21]
os: [ubuntu-latest, macos-latest]
# Run all tests even if one fails
fail-fast: false
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
Expand All @@ -44,3 +47,37 @@ jobs:
run: |
ant test
ant test-platform
test-m1:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [21]
# macos-14 is documented to run on m1
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os: [macos-14]
# Run all tests even if one fails
fail-fast: true
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: Linux requirements
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get -y install texinfo
- name: macOS requirements
if: contains(matrix.os, 'macos')
run: |
brew update
brew install automake --force
brew install libtool --force
brew install texinfo --force
- name: Run test
run: |
ant test
ant test-platform
42 changes: 42 additions & 0 deletions .github/workflows/native-libraries-macOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Build native library for mac OS
name: mac OS native libraries

on:
workflow_dispatch:

permissions:
contents: read

jobs:
build-native-darwin:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [21]
os: [macos-latest]
name: Build native libraries for mac OS / darwin

steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
- name: macOS requirements
if: contains(matrix.os, 'macos')
run: |
brew update
brew install automake --force
brew install libtool --force
- name: Build native code
run: |
ant -Dos.prefix=darwin-aarch64
ant -Dos.prefix=darwin-x86-64
- name: Upload mac OS binaries
uses: actions/upload-artifact@v4
with:
name: darwin-native
path: |
lib/native/darwin-aarch64.jar
lib/native/darwin-x86-64.jar
32 changes: 29 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,50 @@ NOTE: as of JNA 4.0, JNA is now dual-licensed under LGPL and AL 2.0 (see LICENSE

NOTE: JNI native support is typically incompatible between minor versions, and almost always incompatible between major versions.

Next Release (5.14.0)
Next Release (5.15.0)
=====================

Features
--------
* [#1578](https://github.com/java-native-access/jna/pull/1578): Add support for FreeBSD aarch64 - [@alexdupre](https://github.com/alexdupre).
* [#1593](https://github.com/java-native-access/jna/pull/1593): Add support for DragonFly BSD x86-64 - [@liweitianux](https://github.com/liweitianux).
* [#1595](https://github.com/java-native-access/jna/pull/1595): Add `IsProcessorFeaturePresent` to `c.s.j.p.win32.Kernel32` - [@dbwiddis](https://github.com/dbwiddis).

Bug Fixes
---------
* [#1579](https://github.com/java-native-access/jna/issues/1579): Fix analysis of ELF binary on arm systems running with a java ELF binary without section table headers (java8 on armv7 NAS) - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#1586](https://github.com/java-native-access/jna/issues/1586): Fix free_callback JNI weak reference leak - [@xiezhaokun](https://github.com/xiezhaokun).
* [6486c90d913a413f247eef84742ce3c474738933](https://github.com/java-native-access/jna/commit/6486c90d913a413f247eef84742ce3c474738933): Check CallbackReference#cbstruct for null when checking existing Reference - [@matthiasblaesing](https://github.com/matthiasblaesing).

Release 5.14.0
==============

Features
--------
* [#1556](https://github.com/java-native-access/jna/pull/1556): Add `SetJob`, `SetPrinter` to `c.s.j.p.w.Winspool` - [@tresf](https://github.com/tresf).
* [#1534](https://github.com/java-native-access/jna/pull/1534): Add `GetMethod`, `Put`, `SpawnInstance` to `c.s.j.p.win32.COM.WbemCli#IWbemClassObject` and `ExecMethod` to `c.s.j.p.win32.COM.WbemCli#IWbemServices` - [@faddom](https://github.com/faddom).
* [#1544](https://github.com/java-native-access/jna/pull/1544): Add `GetPriorityClass`, `SetPriorityClass`, `GetThreadPriority`, `SetThreadPriority` and associated constants to `c.s.j.p.win32.Kernel32` - [@dEajL3kA](https://github.com/dEajL3kA).
* [#1548](https://github.com/java-native-access/jna/pull/1548): Make interface `c.s.j.p.mac.XAttr public` - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#1551](https://github.com/java-native-access/jna/pull/1551): Add `c.s.j.p.bsd.ExtAttr` and `c.s.j.p.bsd.ExtAttrUtil` to wrap BSD [<sys/extattr.h>](https://man.freebsd.org/cgi/man.cgi?query=extattr&sektion=2) system calls. [@rednoah](https://github.com/rednoah).
* [#1517](https://github.com/java-native-access/jna/pull/1517): Add missing `O_*` (e.g. `O_APPEND`, `O_SYNC`, `O_DIRECT`, ...) to `c.s.j.p.linux.Fcntl` - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#1521](https://github.com/java-native-access/jna/issues/1521): Shutdown CleanerThread once the last cleanable is removed - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#1557](https://github.com/java-native-access/jna/issues/1557): Build linux-riscv64 on Ubuntu focal to improve compatibility with older glibc versions - [@matthiasblaesing](https://github.com/matthiasblaesing).

Bug Fixes
---------
* [#1501](https://github.com/java-native-access/jna/pull/1501): `Library.OPTION_STRING_ENCODING` is ignore for string arguments function calls - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#1504](https://github.com/java-native-access/jna/pull/1504): Increase maximum supported fixed args on varargs calls from 3 to 255 - [@andrew-nowak](https://github.com/andrew-nowak).
* [#1545](https://github.com/java-native-access/jna/pull/1545): Fix Java 6 incompatibility in `c.s.j.p.win32.Kerne32Util` and `c.s.j.p.win32.DBT` - [@matthiasblaesing](https://github.com/matthiasblaesing).

Important Changes
-----------------
* The interfaces between Java and native code have changed, so `libjnidispatch`
must be rebuilt to be compatible with this release.
* Release drops support for JDKs 6 + 7, so you'll need at least JDK 8 to
update to use this version.

Release (5.13.0)
================
Release 5.13.0
==============

Features
--------
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Java Native Access (JNA)
========================

The definitive JNA reference (including an overview and usage details) is in the [JavaDoc](http://java-native-access.github.io/jna/5.13.0/javadoc/). Please read the [overview](http://java-native-access.github.io/jna/5.13.0/javadoc/overview-summary.html#overview_description). Questions, comments, or exploratory conversations should begin on the [mailing list](http://groups.google.com/group/jna-users), although you may find it easier to find answers to already-solved problems on [StackOverflow](http://stackoverflow.com/questions/tagged/jna).
The definitive JNA reference (including an overview and usage details) is in the [JavaDoc](http://java-native-access.github.io/jna/5.14.0/javadoc/). Please read the [overview](http://java-native-access.github.io/jna/5.14.0/javadoc/overview-summary.html#overview_description). Questions, comments, or exploratory conversations should begin on the [mailing list](http://groups.google.com/group/jna-users), although you may find it easier to find answers to already-solved problems on [StackOverflow](http://stackoverflow.com/questions/tagged/jna).

JNA provides Java programs easy access to native shared libraries without writing anything but Java code - no JNI or native code is required. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes.

Expand All @@ -32,7 +32,8 @@ JNA is a mature library with dozens of contributors and hundreds of commercial a
- [VLCJ](https://github.com/caprica/vlcj): Java bindings for libVLC.
- [SVNKit](http://svnkit.com): Pure Java Subversion client library.
- [OmegaT Computer-Aided Translation](https://omegat.org/).
- [IntelliJ IDEA](https://www.jetbrains.com/) by JetBrains.
- [IntelliJ IDEA](https://www.jetbrains.com/idea) by JetBrains.
- [Jetbrains Toolbox](https://www.jetbrains.com/toolbox-app/) by JetBrains.
- [Apache NetBeans IDE](https://netbeans.apache.org/) by Apache Software Foundation.
- [FileBot Media Renamer](http://www.filebot.net) by Reinhard Pointner.
- [USB for Java](https://launchpad.net/libusb4j) by Mario Boikov.
Expand Down Expand Up @@ -65,20 +66,20 @@ Pre-built platform support may be found [here](https://github.com/java-native-ac
Download
========

Version 5.13.0
Version 5.14.0

JNA
---

[![Maven Central](https://img.shields.io/maven-central/v/net.java.dev.jna/jna.svg?label=Maven%20Central)](https://search.maven.org/artifact/net.java.dev.jna/jna/5.13.0/jar)&nbsp;[jna-5.13.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.13.0/jna-5.13.0.jar)&nbsp;[jna-jpms-5.13.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-jpms/5.13.0/jna-jpms-5.13.0.jar)
[![Maven Central](https://img.shields.io/maven-central/v/net.java.dev.jna/jna.svg?label=Maven%20Central)](https://search.maven.org/artifact/net.java.dev.jna/jna/5.14.0/jar)&nbsp;[jna-5.14.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna/5.14.0/jna-5.14.0.jar)&nbsp;[jna-jpms-5.14.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-jpms/5.14.0/jna-jpms-5.14.0.jar)

This is the core artifact of JNA and contains only the binding library and the
core helper classes.

JNA Platform
------------

[![Maven Central](https://img.shields.io/maven-central/v/net.java.dev.jna/jna-platform.svg?label=Maven%20Central)](https://search.maven.org/artifact/net.java.dev.jna/jna-platform/5.13.0/jar)&nbsp;[jna-platform-5.13.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.13.0/jna-platform-5.13.0.jar)&nbsp;[jna-platform-jpms-5.13.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform-jpms/5.13.0/jna-platform-jpms-5.13.0.jar)
[![Maven Central](https://img.shields.io/maven-central/v/net.java.dev.jna/jna-platform.svg?label=Maven%20Central)](https://search.maven.org/artifact/net.java.dev.jna/jna-platform/5.14.0/jar)&nbsp;[jna-platform-5.14.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform/5.14.0/jna-platform-5.14.0.jar)&nbsp;[jna-platform-jpms-5.14.0.jar](https://repo1.maven.org/maven2/net/java/dev/jna/jna-platform-jpms/5.14.0/jna-platform-jpms-5.14.0.jar)

This artifact holds cross-platform mappings and mappings for a number of commonly used platform
functions, including a large number of Win32 mappings as well as a set of utility classes
Expand Down Expand Up @@ -146,12 +147,12 @@ Using the Library
* [Platform Library](https://github.com/java-native-access/jna/blob/master/www/PlatformLibrary.md)
* [Direct Method Mapping](https://github.com/java-native-access/jna/blob/master/www/DirectMapping.md) (Optimization)
* [Frequently Asked Questions (FAQ)](https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md)
* [Avoiding Crashes](http://java-native-access.github.io/jna/5.13.0/javadoc/overview-summary.html#crash-protection)
* [Avoiding Crashes](http://java-native-access.github.io/jna/5.14.0/javadoc/overview-summary.html#crash-protection)

Primary Documentation (JavaDoc)
===============================

The definitive JNA reference is in the [JavaDoc](http://java-native-access.github.io/jna/5.13.0/javadoc/).
The definitive JNA reference is in the [JavaDoc](http://java-native-access.github.io/jna/5.14.0/javadoc/).

Developers
==========
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ for:
only:
- TARGET_ARCH: x86_64
before_build:
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
- cmd: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64'
before_test:
- cmd: net start spooler
Expand All @@ -52,6 +53,7 @@ for:
only:
- TARGET_ARCH: x86
before_build:
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
- cmd: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86'
before_test:
- cmd: net start spooler
Expand All @@ -64,6 +66,7 @@ for:
only:
- TARGET_ARCH: aarch64
before_build:
- cmd: set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
- cmd: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64'
test_script:
- cmd: echo Skipping tests
Expand Down
2 changes: 2 additions & 0 deletions build-ant-tools.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="JNA" default="default" basedir=".">
<import file="common.xml" />
<description>Builds and tests JNA</description>
<property name="build" value="build" />
<target name="default">
Expand All @@ -8,6 +9,7 @@
destdir="${build}/ant-tools"
includeantruntime="false"
encoding="UTF-8"
release="${javac.release}"
>
<src path="src" />
<src path="ant-tools-src" />
Expand Down
Loading

0 comments on commit 3ebd2a0

Please sign in to comment.