MIDI2.0Workbench icon indicating copy to clipboard operation
MIDI2.0Workbench copied to clipboard

How do I build it for I64?

Open nonchai opened this issue 1 year ago • 7 comments

I ran and installed everything on my Intel Mac - only to discover it was for ( or defaulted to ) ARM64 not Intel Macs

how do I get it running on my Intel mac? ( Sonoma 14.5 )

nonchai avatar Aug 09 '24 00:08 nonchai

Sorry for the delay in replying. Unfortunately I don't have an x64 Mac. However there is no default for ARM64 - it is supposed to build both. If you edit the package.json the line with "arm64" does it build correctly?

starfishmod avatar Sep 04 '24 04:09 starfishmod

Yes, it seems despite being an array it can only accept a single string, so "arm64", "x64" doesn't work. Instead, "universal" is needed.

The full set of architecture options is:

"arm64" | "armv7l" | "ia32" | "universal" | "x64"

I made a PR after confirming the build still works for arm64 macOS when using universal:

https://github.com/midi2-dev/MIDI2.0Workbench/pull/15

Unfortunately the build still doesn't work on Intel macOS, although it gets further. I'll share what I've observed below.

kcoul avatar Nov 30 '24 20:11 kcoul

Here's what I see when running after building using x64 only (which I don't think is the right way forward):

(The ProtoZOA is detected but the main window is not populated as it is on arm64 macOS: New USB:51966_16385_64)

yarn run v1.22.22
$ electron .
TypeError: Cannot read properties of undefined (reading 'interfaces')
    at getRawUSBMIDI2 (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/usbMIDI2Devices.js:89:30)
    at Array.map (<anonymous>)
    at Object.startUSB (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/usbMIDI2Devices.js:24:15)
    at Object.<anonymous> (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/index.js:226:20)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
TypeError: Cannot read properties of undefined (reading 'interfaces')
    at getRawUSBMIDI2 (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/usbMIDI2Devices.js:89:30)
    at Array.map (<anonymous>)
    at Object.startUSB (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/usbMIDI2Devices.js:24:15)
    at Object.<anonymous> (/Users/zendev/repos/MIDI2.0Workbench/node_modules/usb_midi_2/index.js:226:20)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)```

kcoul avatar Nov 30 '24 22:11 kcoul

When building using universal, I see this popup dialog window when starting the app:

Screenshot 2024-11-30 at 2 30 46 PM

The app GUI never loads in this case.

kcoul avatar Nov 30 '24 22:11 kcoul

That is an issue with the node midi library. I might investigate if other forks of the node-midi library have improved on this issue.

starfishmod avatar Dec 23 '24 22:12 starfishmod

@nonchai @kcoul

I managed to run it on Intel Mac. x86_64 architecture. Sequoia 15.2. The error is due to having MIDI library compiled for Apple Silicon.

rm -rf node_modules/midi

yarn add midi

yarn start

unobatbayar avatar Jul 23 '25 00:07 unobatbayar

@unobatbayar if you end up finding this as a solution I'll add it to the docs as a solution thanks for doing this work!

starfishmod avatar Jul 23 '25 01:07 starfishmod