Skip to content

Commit

Permalink
Enhance native build documentation and CONTRIBUTING section
Browse files Browse the repository at this point in the history
Add Oomph setup buttons to the bottom of the README and in the
CONTRIBUTING.md
  • Loading branch information
HannesWell committed Jun 28, 2024
1 parent adc0702 commit 05b2835
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 19 deletions.
20 changes: 13 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,39 @@ and other infrastructure for running OSGi-based systems.

## Developer resources

Information regarding source code management, builds, coding standards, and
more.

* https://projects.eclipse.org/projects/eclipse.equinox/developer
Information regarding source code management, builds, coding standards, and more.

The project maintains the following source code repositories

* https://github.com/eclipse-equinox/equinox.binaries
* https://github.com/eclipse-equinox/equinox
* https://github.com/eclipse-equinox/equinox.binaries
* https://github.com/eclipse-equinox/p2

This project uses GitHub to track ongoing development and issues.

* Search for issues: https://github.com/eclipse-equinox/equinox.binaries/issues
* Search for issues: https://github.com/eclipse-equinox/equinox/issues
* Search for historical issues: https://eclipse.org/bugs/buglist.cgi?product=Equinox
* Create a new report: https://github.com/eclipse-equinox/equinox.binaries/issues/new
* Create a new report: https://github.com/eclipse-equinox/equinox/issues/new

Be sure to search for existing bugs before you create another one. Remember that
contributions are always welcome!

### Setting up the Development Environment automatically, using the Eclipse Installer (Oomph)

[![Create Eclipse Development Environment for Equinox](https://download.eclipse.org/oomph/www/setups/svg/Equinox.svg)](https://www.eclipse.org/setups/installer/?url=https://raw.githubusercontent.com/eclipse-equinox/equinox/master/releng/org.eclipse.equinox.releng/EquinoxConfiguration.setup&show=true "Click to open Eclipse-Installer Auto Launch or drag into your running installer")

### Running the Technology Compatibility Kit (TCK)

To run a TCK on a bundle you just need to go to the directory (e.g. `bundles/org.eclipse.equinox.cm`)
and run:

`mvn clean verify -Pbuild-individual-bundles -Pbree-libs -Ptck`

### Building the native executable and launcher library binaries

The source code of the platform specific executables and launcher libraries for Equinox is located in the [org.eclipse.equinox.executable.feature](features/org.eclipse.equinox.executable.feature).
For details and instructions how to build it see its [README.md](features/org.eclipse.equinox.executable.feature/README.md).

## Eclipse Contributor Agreement

Before your contribution can be accepted by the project team contributors must
Expand Down
7 changes: 3 additions & 4 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ SPDX-License-Identifier: EPL-2.0

The project maintains the following source code repositories:

* http://git.eclipse.org/c/equinox/rt.equinox.binaries.git
* http://git.eclipse.org/c/equinox/rt.equinox.bundles.git
* http://git.eclipse.org/c/equinox/rt.equinox.framework.git
* http://git.eclipse.org/c/equinox/rt.equinox.p2.git
* https://github.com/eclipse-equinox/equinox.git
* https://github.com/eclipse-equinox/equinox.binaries.git
* https://github.com/eclipse-equinox/p2.git
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ Equinox implements the follwoing specification with the given level of complianc
- Homepage: https://www.eclipse.org/equinox/
- Bug tracker: https://github.com/eclipse-equinox/equinox/issues
- Asking questions and share ideas: https://github.com/eclipse-equinox/equinox/discussions

# Contributing
[![Create Eclipse Development Environment for Equinox](https://download.eclipse.org/oomph/www/setups/svg/Equinox.svg)](https://www.eclipse.org/setups/installer/?url=https://raw.githubusercontent.com/eclipse-equinox/equinox/master/releng/org.eclipse.equinox.releng/EquinoxConfiguration.setup&show=true "Click to open Eclipse-Installer Auto Launch or drag into your running installer")

For detailed information about development, testing and builds, see [CONTRIBUTING.md](CONTRIBUTING.md).
44 changes: 36 additions & 8 deletions features/org.eclipse.equinox.executable.feature/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
This feature contains the eclipse executables and includes the equinox launcher bundle and its fragments.
It also host the native C source files to build the executable and launcher binaries for all supported platforms.
This feature contains the executables and launcher bundle along with its fragments used to launch Equinox respectivly Eclipse based standalone applications.
It also hosts the native C source files and scripts to build these executable and launcher library binaries for all supported platforms.

## Building the native executable and launcher binaries
The _Equinox launcher executable_ is the executable binary file that can be used to launch an Equinox based applications like Eclipse. It is for example named `eclipse.exe` (on Windows) or `eclipse` (on Linux and Mac).
The _launcher library_ is the native dynamic/shared library (eclipse.dll, eclipse.so, ...) that contains the compiled native code called from the [`org.eclipse.equinox.launcher.JNIBridge`](../../bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/JNIBridge.java).

To just build the native binaries navigate to the `library/<window-system>` sub-directory of interest and run
# Building the native executable and launcher binaries

## Required software

The software listed below is required to build the Equinox native binaries on the current platform targeting the same OS and processor arch.

- common
- a JDK 1.8 or later. More recent versions can be used too. Equinox itself uses a.t.m a JDK 17 to built the official binaries.
- Windows:
- Microsoft `Visual C Compiler 2022` or later (earlier version usually work as well), the `Visual Studio Community Edition` is sufficient.
- Linux:
- GTK development files. The Package `libgtk-3-dev` is sufficient.
- MacOS:
- XCode Command Line Tools (already installed with Apple `XCode`)

## Running the build

The simplest way to build and install the native binaries for the running platform is to launch the Maven launch-configuration
named `Build-Equinox-native-binaries-for-running-platform` from this project (requires `Eclipse M2E`).
It assumes the [`equinox.binaries`](https://github.com/eclipse-equinox/equinox.binaries.git) repository is checked out located next to this repository and is named `equinox.binaries`.

To just build the native binaries for a specific platform navigate to the `library/<window-system>` sub-directory of interest and run
- `./build.sh` for Linux or MacOS
- `.\build.bat` for Windows.
- `.\build.bat` for Windows

For the full setup, which is required to run the Maven build or the equinox.launcher.tests
For the complete development setup, which is required to run the Maven build or the `equinox.launcher.tests`
1. Clone the [`equinox.binaries`](https://github.com/eclipse-equinox/equinox.binaries.git) repository co-located to this repository.
2. Run from the `library/<window-system>` sub-directory matching the platform of interest
- `./build.sh install` for Linux or MacOS
- `.\build.bat install` for Windows

The `install` target additionally moves the just built binaries into the `equinox.binaries` repository clone.

The environment variable `BINARIES_DIR` can be set to specify an alternative path of the `equinox.binaries` repository to which the built binaries are moved.
To specify the exact directory where the native executable or launcher library is moved, set the variable `EXE_OUTPUT_DIR` respectively `LIB_OUTPUT_DIR`.
The environment variable `BINARIES_DIR` can be set to specify an alternative path to the `equinox.binaries` repository to which the built binaries are moved.
To independently specify the exact directory where the native executable or launcher library is moved, set the variable `EXE_OUTPUT_DIR` respectively `LIB_OUTPUT_DIR`.
For more options and details see the `build.sh/bat` files and corresponding make-files.

### Cross compilation

On some platforms cross-compilation for other CPU architecutres is possible by invoking the `build.sh/bat` scripts with an explicit `-arch <target-arch>` argument.
Of course the required tools for the targeted architecture have to be available.
For example on a Windows computer with `x86_64` CPU, to build the binaries for Windows on ARM one can call `build.bat -arch aarch64 -java <path-to-arm-jdk>`.

0 comments on commit 05b2835

Please sign in to comment.