We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm developing some visuals for a project that will eventually be brought into a larger ecosystem and also be running on a Raspberry Pi. I am currently doing the development on my Mac.
So, is there a way to get what hardware the Processing sketch is running on so I can wrap certain Pi specific libraries such as "import processing.io.*;" conditionals so they only run when the sketch is running on the PI and not my Mac?
The reason is that I'd prefer not to have to comment out blocks of code before I can work on my machine and then uncomment these blocks before I commit to the project repo. Seems like a bit of a risk having to do this.
If there are other ways of accomplishing this workflow dev. on mac and production on pi with io requirements I'd love to know about them!
Cheers,
Answers
Ah, awesome. Thanks!
This is only part of what I am looking to do. I know that you can't have if statement outside of functions in processing...but, is there another way, or is it even possible to use the OS for a conditional? So something like i have below as workflow.
Thanks!
import
everything which is possibly needed, regardless the platform? :|If you don't mind the bad performance, try Python Mode out: :>
How about you create a launcher? So when you run the sketch you have to select the OS you are on and and then you open the PDF that corresponds with the selected OS?
That means you would have two almost identical files though..
Or if the problem is that one library is not available on a certain OS, you could maybe check for null pointer exception?