UK
Joined: May 14, 2020
Post Count: 8
Status:
Offline
Trying to understand how to run a locally modified/built SH3D
Hi folk,
I'm not a Java person, much more C/C++, but I've made a tweak to SH3D that might solve a problem I have. I ran the ant build, which appeared to complete without complaint, just by running ant in the directory containing the build.xml file. So I built the default target.
I'm using Linux ( Ubuntu 20.04 ), and I can run the 'normal' distribution of SH3D just fine, so long as I use the SweetHome3D-Java3D-1_5_2 variant. But if I just run that script after doing the default build, it complains quite reasonably that there is no 'runtime' directory. It's true, there isn't. But it's there in the normal distribution.
So I tried running the linux64Installer target. This complained about not having SweetHome3D-6.6-src/jre1.8.0_202 .
So what should I do to properly set up a build environment that will generate a runnable thing ? Is this documented somewhere ? The README notes a requirement for OpenJDK >= 5. I get this for my java version :
mark@z800:~/Projects/SH3D/SweetHome3D-6.6-src$ java --version openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Trying to understand how to run a locally modified/built SH3D
The SweetHome3D-version.jar file generated by the default Ant target is a JAR Executable file that can be run with a command like:
java -jar /path/to/SweetHome3D-version.jar
If you want to run it with the same options as SweetHome3D-Java3D-1_5_2, you should add the option -Dcom.eteks.sweethome3d.j3d.version=1.5.2 after java command, i.e.
UK
Joined: May 14, 2020
Post Count: 8
Status:
Offline
Re: Trying to understand how to run a locally modified/built SH3D
Great, that does work. I was able to use a workaround also - just copying the SweetHome3D-6.6-src/install/linux/x64/SweetHome3D-6.6/lib/ directory to the lib directory in a 'normal' install allows me to test changes.
My changes, though probably very ugly code from a Java perspective, do seem to have the intended effect. I'll play with the change for a few weeks, do some tweaking, and see if I think it's worth anything from a user perspective ( this is the 'make search return whole word matches' thing that I talked about in another thread ). If it might be, I'll propose it ( as a feature ).