Skip to content

Commit

Permalink
Merge pull request #24 from umjammer/0.8.8
Browse files Browse the repository at this point in the history
0.8.8
  • Loading branch information
umjammer authored Mar 21, 2024
2 parents cfc7c4e + 8227b2d commit 61f6fc1
Show file tree
Hide file tree
Showing 146 changed files with 1,380 additions and 988 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: GitHub Release Assets

on:
release:
types: [created]

jobs:
build:

runs-on: macos-14

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

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: |
mvn -B install --file pom.xml -Dmaven.test.skip=true
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
files: target/classes/librococoa.dylib
68 changes: 43 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,32 @@

#  Welcome to Rococoa

<img alt="rococoa" src="https://github.com/umjammer/rococoa/assets/493908/416ded41-08d0-4360-9163-0c594b1f554a" width="200" />

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
### ⚠ Caution

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

## Limitation
### 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 have **varargs don't** work (works less equal 8?)

## Installation
## Install

* https://jitpack.io/#umjammer/rococoa

## How To
## Usage

### How To

* [Basics](rococoa-core/readme.md#How-To)
* [CIFilter Java2D BufferedImageOp](rococoa-contrib/src/test/java/org/rococoa/cocoa/coreimage/CoreImageTest.java)
Expand All @@ -40,24 +44,48 @@ 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)

## References

* https://github.com/ibinti/bugvm
* https://gitlab.com/axet/apple
* 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 (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
* obj-block
* 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
* `PyObjCFFI_MakeBlockFunction`
* https://docs.rs/block/latest/block/
* https://github.com/mikeash/MABlockClosure
* https://github.com/PsychoH13/C-ObjC-Blocks
* alternative
* https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/CustomizingExistingClasses/CustomizingExistingClasses.html

## TODO

* NSUrl tags (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)
* 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
* ~~native library loading~~
* ~~https://github.com/scijava/native-lib-loader~~
* ~~i don't like to locate `librococoa.dylib` at `src/main/resources` for jitpack~~
* ~~copy to like `src/main/native-resource` (on only local not ci)~~
* ~~include it in jar-plugin (on jitpack)~~
* ~~OR set it as asset on github actions~~ 🎯
* ~~retrieve the asset by ant task?~~
* dynamic method creation
* invokedinamic?
* ByteBuddy's method interception???
Expand All @@ -68,19 +96,6 @@ implementation of Objective-C interfaces in Java.
* 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/multi-os-engine/moe-mac-core
* https://github.com/dthommes/jcocoa
* https://github.com/allertonm/Couverjure
* 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

----

# Original
Expand All @@ -105,3 +120,6 @@ any other problems.
* [Quicktime](https://github.com/iterate-ch/rococoa/blob/wiki/Quicktime.md)
* [Limitations](https://github.com/iterate-ch/rococoa/blob/wiki/Limitations.md)
* [Help Wanted](https://github.com/iterate-ch/rococoa/blob/wiki/HelpWanted.md)

---
<sub>image by <a href="https://www.bing.com/">copilot</a></sub>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.7</version>
<version>0.8.8</version>
<packaging>pom</packaging>

<modules>
Expand Down Expand Up @@ -197,7 +197,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.10.1</version>
<version>5.10.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
2 changes: 0 additions & 2 deletions rococoa-auto/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion rococoa-cocoa/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion rococoa-cocoa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.7</version>
<version>0.8.8</version>
</parent>

<name>Rococoa Cocoa Mappings</name>
Expand Down
Loading

0 comments on commit 61f6fc1

Please sign in to comment.