Giter Site home page Giter Site logo

Comments (8)

ianfixes avatar ianfixes commented on July 22, 2024

Interesting! It might have something to do with a hack that I put in that avoids showing the splash screen, although I'm running the same Arduino IDE version and I don't get that particular error. What version of Java are you using?

My thinking is that I can test whether my hack works, and if it doesn't then I'll fall back on using the "official" Arduino CLI directly

from arduino_ci.

ianfixes avatar ianfixes commented on July 22, 2024

Also, you can see from the output the last command I was attempting:

java -cp /Applications/Arduino.app/Contents/Java/* -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --install-boards arduino:sam

Without my hack, the correct way to run that from the command line would be

/Applications/Arduino.app/Contents/MacOS/Arduino --install-boards arduino:sam

I'd be curious whether that command works for you. If so, I can try to put some code in that would try to run

java -cp /Applications/Arduino.app/Contents/Java/* -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --bogus-option

And if I get a java exception instead of Error: unknown option: --bogus-option in the output, I can fall back on the "normal" launch method. Let me know if any of these commands work on your machine, and I can push up a development branch for you to try.

from arduino_ci.

mdlima avatar mdlima commented on July 22, 2024

I like the idea for the hack, let's see if we can figure it out. I use VSCode and I get the splash screen every time I compile or run the Arduino code, and it gets in the way if I'm using VSCode on full screen as it will switch to the other "Desktop". It also seems a little slow, so maybe the hack can speed things up.

I'm using Java version 9.0.4:

$ java -version
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

The install boards option with Java gets the same exception:

$ java -cp "/Applications/Arduino.app/Contents/Java/*" -DAPP_DIR=/Applications/Arduino.app/Contents/Java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -Xms128M -Xmx512M processing.app.Base --install-boards arduino:sam
Exception in thread "main" java.lang.NoSuchMethodError: com.apple.eawt.Application.isAboutMenuItemPresent()Z
	at processing.app.Base.main(Base.java:138)

The Arduino command line works fine:

$ /Applications/Arduino.app/Contents/MacOS/Arduino --install-boards arduino:sam
Loading configuration...
Initializing packages...
Preparing boards...
Downloading platforms index...

from arduino_ci.

mdlima avatar mdlima commented on July 22, 2024

And using the old way (uncommented from arduino_installation_rb:37) it works:

$ bundle exec arduino_ci_remote.rb                                  ✘ 1 master ✱ ◼
Installing library under test...                                               ✓
Library installed at /Users/mdlima/Documents/Arduino/libraries/TestSomething... ✓
The set of compilers (1) isn't empty...                                        ✓
Checking g++ version...
    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 9.1.0 (clang-902.0.39.1)
    Target: x86_64-apple-darwin17.5.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
...Checking g++ version                                                        ✓
Installing board package arduino:sam...                                        ✓

from arduino_ci.

ianfixes avatar ianfixes commented on July 22, 2024

That's my thinking here. I'd like to preserve the hack (for both speed and usability). I'm writing some code now to try the hack, and (if I don't get the output I expect) fall back on the "official" method.

from arduino_ci.

mdlima avatar mdlima commented on July 22, 2024

Cool, we can get the fallback working then, but I'm also interested in why your hack won't work here. Are you using Java 9 too?

from arduino_ci.

ianfixes avatar ianfixes commented on July 22, 2024
java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

from arduino_ci.

ianfixes avatar ianfixes commented on July 22, 2024

This is fixed in the branch but not in released gem yet

from arduino_ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.