Trying to understand how to run a locally modified/built SH3D

This topic has been viewed 7665 times and has 2 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
mderouss
Posts: 8
Joined: Thu May 14, 2020 12:53 am
Country: UK

Trying to understand how to run a locally modified/built SH3D

Post by mderouss »

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 :

Code: Select all

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)

Thanks,
Mark
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Trying to understand how to run a locally modified/built SH3D

Post by Puybaret »

The [font=courier new]SweetHome3D-version.jar[/font] file generated by the default Ant target is a JAR Executable file that can be run with a command like:

Code: Select all

java -jar [i]/path/to/[/i]SweetHome3D-version.jar
If you want to run it with the same options as SweetHome3D-Java3D-1_5_2, you should add the option [font=courier new]-Dcom.eteks.sweethome3d.j3d.version=1.5.2[/font] after [font=courier new]java[/font] command, i.e.

Code: Select all

java -Dcom.eteks.sweethome3d.j3d.version=1.5.2 -jar [i]/path/to/[/i]SweetHome3D-version.jar
Emmanuel Puybaret, Sweet Home 3D creator
mderouss
Posts: 8
Joined: Thu May 14, 2020 12:53 am
Country: UK

Re: Trying to understand how to run a locally modified/built SH3D

Post by mderouss »

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 ).

Thanks,
Mark
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest