Closed tuna-f1sh closed 3 years ago
Thanks for reporting. I'll fix that asap
@tuna-f1sh can you test https://github.com/osx-cross/homebrew-stm32/pull/4 and let me know if it works for you?
it seems to be working on mine with OpenJDK 16 but I'd love to have confirmation :)
Trying to test it but keep getting error on uninstall:
Error: osx-cross/stm32/stm32cubemx: Failure while executing; `java -jar \#\{Utils.cubemx_final_app_path\}/Contents/Resources/Uninstaller/uninstaller.jar` exited with 1. Here's the output:
Error: Unable to access jarfile #{Utils.cubemx_final_app_path}/Contents/Resources/Uninstaller/uninstaller.jar
Running that script (with '/Applications/STMicroelectronics/STM32CubeMX.app') works but I can't get brew
to ignore it? Even editing the 6.2.0 cask doesn't work, it seems to call that line from a cached cask? Sorry, I'm not that familiar with the inner workings of Homebrew.
I've updated the cask with cubemx 6.2.0. I've also added caveats information about the need to have openjdk15 and not 16.
The cask depends on openjdk15 but if people have both installed, it will use 16 and won't work.
Also, the STM32CubeMX.app doesn't want to open on my mac, but using stm32cubemx
from the command line works, I don't know why 🙄
Thanks. Just a further note on this. I don't think OpenJDK 16 has to uninstalled. I have both installed and the updated version works. Launching from Finder doesn't work for me either now though...
If you look at the shell script in the App package contents, this is because it is now calling OpenJDK 15 not the system installed one.
stm32cubemx.sh
#!/usr/bin/env bash
/Library/Java/JavaVirtualMachines/adoptopenjdk-15.jdk/Contents/Home/bin/java -jar /Applications/STMicroelectronics/STM32CubeMX.app/Contents/MacOS/STM32CubeMX $@
ah yes you're right, I changed that script! I'll change the caveat to reflect that.
Will you're at it, I fixed launching in finder. The jre symbolic link in the App package points to the wrong place. If I do this:
ln -s /usr/local/Caskroom/stm32cubemx/6.2.0/jre /Applications/STMicroelectronics/STM32CubeMX.app/Contents/MacOs/jre
It now launches
I've added the fix to the formula, see 92fb1aa
Thanks again for your help and for testing! :)
Homebrew updated
adoptopenjdk
to version 16 recently and STM32CubeMX failed to launch for me after this:Rolling back to OpenJDK 15 fixed this for me:
Not sure if the STM32CubeMX cask is out of date or if OpenJDK15 needs to be specified moving forwards.