Question: How do we set sketchPath and dataPath in processing-java?
Project context: We are creating a game using processing-java where most of our code is java, with some of those files being essentially processing code (i.e. pde files written in java with PApplet etc). We also want to call G4P to build a GUI.
Processing library Because we want to be able to import libraries easily, using github, we cheat by just have the G4P.jar file in our github library (not processing libraries).
Where it works We have the full setup (with G4P) working completley with Linux. We also have the game working (without G4P) in Mac and Linux
Where it doesn’t work It is only when we try to integrate G4P and Mac that we have problems. We did find this forum discussion https://forum.processing.org/two/discussion/19372/how-can-one-access-the-combined-java-file-created-by-the-ide-from-multiple-pde-s-in-a-sketch but we are using Mac OSMojave and we are unclear what to do.
What we have tried We have managed (see screenshot) to identify that the issue is the filepath being overridden (despite the processing-java --sketch-path=). What we find is that without G4P this goes to the correct $PWD for both Macs and Linux, but we don’t understand why G4P is doing this.
- Change working directory with either processing function (undocumented sketchPath and dataPath seem to be getters not setters - although not sure) or java function
- Import G4P using the recommended but a library in processing/libraries (or for linux sketchbook/libraries) folder, and import that way - doesnt seem to work however.