EmotiBit / ofxEmotiBit

OpenFrameworks library and examples for the EmotiBit
MIT License
33 stars 7 forks source link

added changes for OFv0.11.2 compatibility #217

Closed nitin710 closed 1 month ago

nitin710 commented 11 months ago

Description

Requirements

See standard dependencies: https://github.com/EmotiBit/ofxEmotiBit/blob/master/README.md#the-following-script-may-be-run-from-a-bash-shell-within-your-openframeworksaddons-directory-to-install-ofxemotibit-and-all-dependencies

Issues Referenced

Documentation update

none

Notes for Reviewer

Testing

Feature Tests

Non

Steps to test

Build & run

Shared files

None

Checklist to allow merge

Screenshots:

nitin710 commented 7 months ago

Compatibility matrix

OF version EmotiBit codebase ofxLSL xcode proj file Windows linux macos intel macos-apple-silicon
v0.11.0 master master - ✔️ ✔️ ✔️
v0.11.2 master master -
v0.11.2 fix-OFv0.11.2_2 master updated link to fmod.lib ✔️ ✔️ ✔️
v0.11.2 fix-OFv0.11.2_2 +new dylib for Apple silicon mac updated link to fmod.lib ✔️ ✔️ ✔️ ✔️

Key changes

Changes to codebase

Proposed plan

After reviewing the comments in #216, the following plan can be used to merge this PR

  1. Use an apple silicon based mac to create a new dylib package (binary) for apple silicon architecture based macs
  2. we can add this new binary to ofxLSL according to the structure shown below
    ofxLSL
    ├── libs
    │   └── labstreaminglayer
    │       └── lib
    │           └── osx
    │               └── intel-macs
    │               │       └── liblsl.1.14.0.dylib (compiled using intel mac)
    │               └── apple-silicon-macs
    │                        └── liblsl.1.14.0.dylib (compiled using M1 mac)
  3. We update the readme, that cleary states which file path to select in the project file(xcode), to build from source for intel vs apple silicon
nitin710 commented 7 months ago

discussion notes

nitin710 commented 7 months ago

not compiling on intel macs. Looks like the project file lists ofxLSL/**/osx/** as a path for dylib files and according to file structure, it encounters arm/lsl.dylib first, which gives compile errors saying "lib for wrong platform".

nitin710 commented 7 months ago

Build status matrix

mac type xcode run debug application release application Notes
x86_64 ✔️ ✔️ ✔️ Change dylib search path to x86_64
arm64 ✔️ ✔️ ✔️ (Had to change project file: build settings > build for active architecture only > Release > Yes ) See individual notes
nitin710 commented 7 months ago

Changes that need addressing

change arm64 x86_64
dylib search path OFlsl/**/lib/osx/** ✔️ ❌ needs to be OFlsl/**/lib/osx/x86_64
build settings > build for active architecture only Release > Yes currently: Release > No. I don't suspect anything breaks if we change it to Yes. We can confirm this in deploy system tests. It should work on all x86 systems, and all arm systems will use rosetta 2 to translate
nitin710 commented 7 months ago

How is libfmod.dylib handled in the Openframeworks?

nitin710 commented 1 month ago

The dev branch has been merged into master that resolves OF 0.11.2

This PR has inter-mixed OF-11.2 and building on apple silicon macs. It is therefore being closed since some changes already exist in the master. A new PR will be created that focuses solely on the apple silicon compatibility.