Skip to content

Commit

Permalink
Merge pull request #13 from umjammer/0.8.6
Browse files Browse the repository at this point in the history
0.8.6
  • Loading branch information
umjammer authored Feb 5, 2024
2 parents cd3b605 + 435d3cd commit 93bfd4e
Show file tree
Hide file tree
Showing 135 changed files with 3,446 additions and 830 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: macos-latest
runs-on: macos-14

strategy:
fail-fast: false
Expand All @@ -41,10 +41,10 @@ jobs:
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ on:
jobs:
build:

runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven
name: Java CI

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
jobs:
build:

runs-on: macos-latest
runs-on: macos-14

steps:
- name: Checkout repository
Expand All @@ -22,10 +22,10 @@ jobs:
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '17'
distribution: 'temurin'
cache: maven

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/
53 changes: 40 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
[![GitHub Packages](https://github.com/umjammer/rococoa/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer?tab=packages&repo_name=rococoa)
[![Java CI](https://github.com/umjammer/rococoa/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-8-b07219)
![Java](https://img.shields.io/badge/Java-17-b07219)

#  Welcome to Rococoa

Rococoa is a generic Java binding to the Mac Objective-C object system. It
allows the creation and use of Objective-C objects in Java, and the
implementation of Objective-C interfaces in Java.

## ⚠ Caution

* this project will **quit** supporting **intel** chips
* supported macos will be **after Ventura** also

## Limitation

* ~~obj-c class's method call with float argument doesn't work~~ works → new limitation: arguments should be less equal 8
* ~~[the reason](https://github.com/java-native-access/jna/issues/463#issuecomment-1286015013)~~ -> actually https://github.com/java-native-access/jna/issues/1476#issuecomment-1292804072
* https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html
* obj-c block
* methods has **varargs don't** work (works less equal 8?)

## Installation

* https://github.com/umjammer/rococoa/packages/
Expand All @@ -29,32 +42,46 @@ implementation of Objective-C interfaces in Java.
* [KeyChain Java crypto Keystore SPI](https://github.com/umjammer/vavi-crypto-sandbox/tree/1.0.2/src/main/java/vavix/rococoa/keychain)
* [Vision Detecting Human Body Poses in Images](rococoa-contrib/src/test/java/org/rococoa/cocoa/vision/VisionTest.java)

## Limitation

* obj-c class's method call with float argument doesn't work
* [the reason](https://github.com/java-native-access/jna/issues/463#issuecomment-1286015013)
* https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html
* block

## TODO

* NSUrl tags (wip)
* block (wip)
* obj-block (wip)
* https://github.com/nativelibs4java/BridJ/
* http://cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
* http://www.opensource.apple.com/source/libclosure/libclosure-38/BlockImplementation.txt
* https://clang.llvm.org/docs/Block-ABI-Apple.html
* https://github.com/ronaldoussoren/pyobjc/blob/77b98382e52818690449111cd2e23cd469b53cf5/pyobjc-core/Modules/objc/block_support.m
* https://docs.rs/block/latest/block/
* ~~CIFilter~~ (done)
* `cglib` is mostly [suspended](https://github.com/cglib/cglib#readme)
* `cglib` recommends [ByteBuddy](https://bytebuddy.net/) that is based on `asm` same as the `cglib`
* CGImage fails around density related
* ~~`cglib` is mostly [suspended](https://github.com/cglib/cglib#readme)~~
* ~~`cglib` recommends [ByteBuddy](https://bytebuddy.net/) that is based on `asm` same as the `cglib`~~ (done)
* cache classes (ByteBuddy)
* ~~clean up logging~~
* native library loading
* https://github.com/scijava/native-lib-loader
* dynamic method creation
* invokedinamic?
* ByteBuddy's method interception???
* CGController
* https://stackoverflow.com/a/65999820
* activate application
* https://developer.apple.com/documentation/appkit/nsrunningapplication?language=objc
* separate same parts of jna-platform (like jna-platform-extended)
* deprecate rococoa-contrib

## References

* https://github.com/ibinti/bugvm
* https://gitlab.com/axet/apple
* https://github.com/cbyrneee/JNApple
* https://github.com/multi-os-engine/moe-mac-core
* https://github.com/dthommes/jcocoa
* https://github.com/allertonm/Couverjure
* https://github.com/shannah/Java-Objective-C-Bridge
* https://github.com/shannah/Java-Objective-C-Bridge (minecraft uses)
* gamepad
* http://eleccelerator.com/wiki/index.php?title=DualShock_4
* https://github.com/born2snipe/gamepad4j/blob/master/gamepad4j-desktop/src/main/c/macos/Gamepad_macosx.c
* port [hidapi](https://github.com/libusb/hidapi) mac part

----

Expand Down
39 changes: 24 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@

<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.5</version>
<version>0.8.6</version>
<packaging>pom</packaging>

<modules>
<module>rococoa-auto</module>
<!-- module>rococoa-auto</module -->
<module>rococoa-core</module>
<module>rococoa-cocoa</module>
<module>rococoa-contrib</module>
<!-- module>rococoa-functionaltest</module -->
</modules>

<name>Rococoa Parent Project</name>
<url>http://www.rococoa.org</url>
<url>https://github.com/umjammer/rococoa</url>
<scm>
<url>https://github.com/umjammer/rococoa</url>
<connection>scm:git:git@github.com:umjammer/rococoa.git</connection>
<developerConnection>scm:git:git@github.com:umjammer/rococoa.git</developerConnection>
</scm>

<developers>
<developer>
<id>oneeyedmen</id>
Expand Down Expand Up @@ -68,7 +67,6 @@
</roles>
</developer>
</developers>

<licenses>
<license>
<name>LGPL 3</name>
Expand All @@ -78,9 +76,7 @@
</licenses>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jna.version>5.12.1</jna.version>
<jna.version>5.14.0</jna.version>
</properties>

<distributionManagement>
Expand All @@ -93,6 +89,19 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>17</release>
<compilerArgs>
<arg>-XDignore.symbol.file</arg> <!-- for com.apple.eawt -->
</compilerArgs>
<!-- https://stackoverflow.com/a/30472473 -->
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down Expand Up @@ -127,7 +136,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -140,7 +149,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -168,7 +177,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
<inherited>true</inherited>
<configuration>
<encoding>UTF-8</encoding>
Expand Down Expand Up @@ -211,15 +220,15 @@
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.3.0</version>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<version>1.14.8</version>
</dependency>

<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.9.1</version>
<version>5.10.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
17 changes: 14 additions & 3 deletions rococoa-auto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<parent>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.5</version>
<version>0.8.6</version>
</parent>

<name>Rococoa Autogenerated Cocoa Package</name>
<url>http://www.rococoa.org</url>
<url>https://github.com/umjammer/rococoa</url>

<properties>
<jnaerator.version>0.12</jnaerator.version>
Expand Down Expand Up @@ -66,6 +66,17 @@
<artifactId>jnaerator-runtime</artifactId>
<version>${jnaerator.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>com.nativelibs4java</groupId>
<artifactId>bridj</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.nativelibs4java</groupId>
<artifactId>bridj</artifactId>
<version>0.8.0</version>
</dependency>

<dependency>
Expand All @@ -79,7 +90,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<configuration>
<!--
<aggregate>true</aggregate>
Expand Down
5 changes: 5 additions & 0 deletions rococoa-auto/readne.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# rococa-auto

## References

* https://jnaerator.sourceforge.net/sites/rococoa-auto/apidocs/
12 changes: 6 additions & 6 deletions rococoa-cocoa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
<parent>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.5</version>
<version>0.8.6</version>
</parent>

<name>Rococoa Cocoa Mappings</name>
<url>http://www.rococoa.org</url>
<url>https://github.com/umjammer/rococoa</url>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<version>3.6.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.2</version>
<configuration>
<forkMode>once</forkMode>
<reuseForks>false</reuseForks>
<argLine>
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
</argLine>
Expand Down Expand Up @@ -61,7 +61,7 @@
<dependency>
<groupId>com.github.umjammer</groupId>
<artifactId>vavi-commons</artifactId>
<version>1.1.8</version>
<version>1.1.9</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Loading

0 comments on commit 93bfd4e

Please sign in to comment.