Skip to content

Sophena is a quick planning tool for local heating networks

License

Notifications You must be signed in to change notification settings

GreenDelta/Sophena

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sophena

Sophena is a quick planning tool for local heating networks. See the C.A.R.M.E.N. e.V. website for further information.

screenshot of Sophena

Building from source

Sophena is an Eclipse RCP application using the Eclipse 3.x API. In order to build it from source you need to have the following tools installed:

Then, checkout the source code:

cd <your project folder>
git clone https://github.com/GreenDelta/Sophena.git

The Sophena folder contains two project:

  • sophena which is the Eclipse RCP application,

  • sophdat which is a command line tool written in Go for building the data packages for Sophena

Prepare the Eclipse workspace

Start Eclipse, create a workspace, and import the sophena project into it by using the Import > General > Existing Projects into Workspace command. In the project, open the platform.target file, load the platform and set it as the target platform of your workspace using the Set as Target Platform command.

We manage our library dependencies with Maven. In Eclipse, you can right click on the sophena/pom.xml file and run it as Maven build with package as goal in the upcoming dialog. But you can also do this from the command line of course:

cd sophena
mvn package

This will copy the libraries into the sophena/libs folder. You may have to refresh the project in Eclipse to update it.

Building the database template

The application contains a database template that contains the base data of Sophena. This template is extracted into the workspace if the database folder <WORKSPACE>/database does not exist. The template is located in sophena/resources/database.zip and is currently generated via the BuildDb script which simply imports the ./sophdat/gen/base_data.sophena package into an empty database. Thus, you first have to run the sophdat tool in order to create the database template (see the README file in the sophdat folder).

Creating the distribution package

Currently we just build Windows versions but the target platform already supports multi-platform builds. To create the distribution package, first export the sophena project as Eclipse product within Eclipse: Export > Plugin Development > Eclipse product. Choose the following settings:

  • Configuration: /sophena/sophena.product
  • Root directory: Sophena
  • Destination directory: .sophena/build/builds (the builds folder in the sub-project build)
  • Uncheck Generate p2 repository
  • Check Export for multiple platforms

On the next page select the win32/x86_64 platform and run the export. If everything went well, the export should create a build/builds/win32.win32.x86_64 folder that contains the compiled product.

Finally, the script make.bat in the build folder copies a Java runtime into the product folder and creates the distribution package. Therefore, an extracted Java runtime needs to be located in the build/jre/win64 folder and the 7zip executable in the tools folder.

License

Unless stated otherwise, all source code of the Sophena project is licensed under the Mozilla Public License, v. 2.0. Please see the LICENSE.txt file in the root directory of the source code.