Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 30 additions & 85 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,110 +12,55 @@ jobs:
build:
strategy:
matrix:
java: [11]
java: [21]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
gradle_version: 6.8.3 # use ``current`` to install the current stable release
gradle_commands: build # default is build
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'gradle'
java-package: 'jdk+fx'
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ env.gradle_version }}
- name: Run commands
run: gradle ${{ env.gradle_commands }}
- name: Prepare PATH
if: startsWith(matrix.os, 'windows')
shell: bash
run: echo "C:\Program Files (x86)\WiX Toolset v3.11\bin" >> $GITHUB_PATH
- name: Re-install innosetup
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
shell: cmd
run: |
choco uninstall innosetup
choco install innosetup --version=5.6.1
- name: Build insight exe
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
shell: cmd
run: |
gradle packageApplicationExe
- name: Build importer exe
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
shell: cmd
run: |
gradle packageImporterApplicationExe
- name: Build insight msi
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
shell: cmd
run: |
gradle packageApplicationMsi
- name: Build importer msi
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
shell: cmd
run: |
gradle packageImporterApplicationMsi
- name: Check MSI
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
run: |
msi=(`find build/packaged/installImporterDist/bundles -maxdepth 1 -name "*.msi"`)
if [ ${#msi[@]} == 0 ]; then
exit 1
fi
msi=(`find build/packaged/main/bundles -maxdepth 1 -name "*.msi"`)
if [ ${#msi[@]} == 0 ]; then
exit 1
fi
shell: bash
- name: Upload zip and jar
if: startsWith(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}-OMERO
path: build/distributions/OMERO*
if-no-files-found: error
- name: Upload jar
if: startsWith(matrix.os, 'ubuntu') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
uses: actions/upload-artifact@v4
run: ./gradlew build
- if: ${{ matrix.os != 'ubuntu-latest' }}
name: Run jpackage
run: ./gradlew jpackage
- name: Upload JAR and distribution
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v6
with:
name: artifacts-${{ matrix.os }}-omero_
path: build/libs/omero_*
name: artifacts-${{ matrix.os }}
path: build/distributions/*.zip
if-no-files-found: error
- name: Upload insight artifacts
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
uses: actions/upload-artifact@v4
- name: Upload Windows package
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v6
with:
name: artifacts-${{ matrix.os }}-insight
path: build/packaged/main/bundles/*
name: artifacts-${{ matrix.os }}
path: build/jpackage/*.msi
if-no-files-found: error
- name: Upload importer artifacts
if: startsWith(matrix.os, 'windows') && startsWith(github.ref, 'refs/tags') && startsWith(matrix.java, '11')
uses: actions/upload-artifact@v4
- name: Upload OS X package
if: startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v6
with:
name: artifacts-${{ matrix.os }}-importer
path: build/packaged/installImporterDist/bundles/*
name: artifacts-${{ matrix.os }}
path: build/jpackage/*.dmg
if-no-files-found: error

release:
if: startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download artifacts from build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
- name: List artifacts
run: ls -R
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts*/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
run: ls -R artifacts*
- name: Create a GitHub release
run: gh release create --generate-notes "${GITHUB_REF#refs/tags/}" artifacts*/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
190 changes: 58 additions & 132 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,166 +1,92 @@
OMERO.insight Project
---------------------
# OMERO.insight

[![Actions Status](https://github.com/ome/omero-insight/workflows/Build/badge.svg)](https://github.com/ome/omero-insight/actions)
[![Documentation Status](https://readthedocs.org/projects/omero-insight/badge/?version=latest)](https://omero-insight.readthedocs.io/en/latest/)

The OMERO.insight Project is a sub-project of the Open Microscopy Environment
Project, [OME](https://www.openmicroscopy.org/) that focuses on delivering a
client for the visualization and manipulation of both image data and metadata
maintained at an OMERO server site.
OMERO.insight is completely written in Java.
Technical documentation can be found [here](https://omero-insight.readthedocs.io/en/latest/).
The OMERO.insight Project is a sub-project of the Open Microscopy Environment
Project, [OME](https://www.openmicroscopy.org/) that focuses on delivering a
client for the visualization and manipulation of both image data and metadata
maintained at an OMERO server site.
OMERO.insight is completely written in Java.
Technical documentation can be found [here](https://omero-insight.readthedocs.io/en/latest/).

## Directory Contents

Directory Contents
------------------
This directory is the repository of the software artifacts of the
OMERO.insight Project. Its contents are as follows:

This directory is the repository of the software artifacts of the
OMERO.insight Project. Its contents are as follows:
+ build.gradle, settings.gradle: build for build system
+ src: Contains the application source files, various configuration
files required by the application to run and the test code.
+ README.md: This file.
+ LICENSE.txt: The license covering this software.
+ CHANGELOG.md: The release history
+ FAQ.md: Commons questions

+ build.gradle, settings.gradle: build for build system
+ src: Contains the application source files, various configuration
files required by the application to run and the test code.
+ buildSrc: source files to package the applications
+ README: This file.
+ LICENSE.txt: The license covering this software.
+ CHANGELOG.md: The release history
+ FAQ.md: Commons questions
## Building OMERO.insight

Building OMERO.insight
----------------------
The compilation, testing, launch, and delivery of the application are
automated by means of a [Gradle](https://gradle.org/) build file.
In order to perform a build, all you need is
a JDK -- version 17 or later. From the command line, enter:

The compilation, testing, launch, and delivery of the application are
automated by means of a [Gradle](https://gradle.org/) build file.
In order to perform a build, all you need is
a JDK -- version 1.8 or later. From the command line, enter:
./gradlew build

gradle build
This will compile, build, test and create a distribution bundle.
To run OMERO.insight from the distribution bundle unzip
the zip under `build/distributions` then go to the unzipped
directory and from the command line enter, for example:

This will compile, build, test and create a distribution bundle.
To run OMERO.insight from the distribution bundle unzip
`omero-insight.zip` then go to the `omero-insight` directory and from
the command line enter, for example:
bin/OMERO.insight

bin/omero-insight
To run the OMERO.importer, enter:

To run the OMERO.importer, enter:
bin/OMERO.insight containerImporter.xml

bin/omero-insight containerImporter.xml
To run OMERO.insight, from the command line, enter:

To run OMERO.insight, from the command line, enter:
./gradlew run

gradle run
To run OMERO.importer, from the command line, enter:

To run OMERO.importer, from the command line, enter:
./gradlew runImporter

gradle runImporter
## Packaging OMERO.insight

Packaging OMERO.insight
-----------------------
Packaging OMERO.insight requires version 21 or later of the JDK version. The
build system uses the [jpackage](https://docs.oracle.com/en/java/javase/21/docs/specs/man/jpackage.html)
command via the Gradle [org.beryx.runtime](https://plugins.gradle.org/plugin/org.beryx.runtime) plugin
to create an installer for the platform the deployment task is run on.

OMERO.insight uses the Gradle [java-packager-plugin](https://github.com/ome/omero-javapackager-plugin)
and is capable of creating an installer for the platform the deployment task is run on.
To run the application packager, from the command line enter:

__Note, a Java runtime is included with the bundled installer. It is recommended to use
[OpenJDK](https://openjdk.java.net) as the system's JRE to avoid potential licensing issues.__
./gradlew jpackage

In order to be able to successfully create an installer, a JDK with
[`javapackager`](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/javapackager.html) or
an [OpenJFX SDK](https://gluonhq.com/products/javafx/) matching the version of the system JDK
is required (particularly if you intend to build with JDK 11 or higher).
## Developing OMERO.insight

### OSX
See https://omero.readthedocs.io/en/stable/developers/index.html#insight

If you are using [Homebrew](https://brew.sh/), you can install, for example, [OpenJDK 8](https://bell-sw.com/pages/downloads/)
which comes bundled with JavaFX.
To install run:
## OMERO.insight extension

brew tap bell-sw/liberica
brew install --cask liberica-jdk8-full
To use the metadata extension [OMERO.mde](mde-extension.md),
set the following entry in [container.xml](src/dist/config/container.xml) or in
[containerImporter.xml](src/dist/config/containerImporter.xml) to `true`:

### Windows

<entry name="omero.client.import.mde.enabled" type="boolean">true</entry>

#### Scoop:
## FAQ

scoop bucket add java
See [FAQ.md](FAQ.md)

scoop install zulufx8
## Licensing

#### Manually:
This software is licensed under the terms of the GNU General Public
License (GPL), the full text of which can be found in
the top level LICENSE.txt. See https://www.openmicroscopy.org/licensing/
for further details.

To set up a build environment with Windows without using a package manager such as [Scoop](https://scoop.sh) or
[Chocolatey](https://chocolatey.org) perform the following:

**JDK:**
## Copyright

1. Download [ojdkbuild](https://github.com/ojdkbuild/ojdkbuild/releases/download/1.8.0.191-1/java-1.8.0-openjdk-1.8.0.191-1.b12.ojdkbuild.windows.x86_64.msi).
2. Run the installer.
3. Once at the _custom setup_ page of the setup select the _OpenJDK Runtime_ drop-down and install the _JAVA_HOME_
feature.
4. Whilst on the _custom setup_ page, select to include the _OpenJFX Runtime_.

**Inno Setup (required to create .exe installer):**

1. Download and install [Inno Setup](http://www.jrsoftware.org/isdl.php).
2. Add the Inno Setup install directory (e.g. `C:\Program Files (x86)\Inno Setup 5`) to the PATH.

You can install Inno Setup using Chocolatey:

choco install innosetup

Depending on the Windows version you are using, you might not be able to use the latest version of Inno Setup.



**WiX (required to build .msi installer):**

1. Download and install [WiX 3.0 or greater](http://wixtoolset.org/).
2. Add WiX to the PATH.

### Packaging

To run the application packager, from the command line enter:

**Windows**

gradle packageApplicationExe

**OSX**

gradle packageApplicationDmg

Developing OMERO.insight
------------------------

See https://docs.openmicroscopy.org/latest/omero/developers/index.html#insight.

OMERO.insight extension
-----------------------

1. To use the metadata extension [OMERO.mde](mde-extension.md),
set the following entry in [container.xml](src/config/container.xml) or in
[containerImporter.xml](src/config/containerImporter.xml) to `true`:
```
<entry name="omero.client.import.mde.enabled" type="boolean">false</entry>
```


FAQ
---

See [FAQ.md](FAQ.md)

Licensing
---------

This software is licensed under the terms of the GNU General Public
License (GPL), the full text of which can be found in
the top level LICENSE.txt. See https://www.openmicroscopy.org/licensing/
for further details.


Copyright
---------

Copyright (C) 2006-2024 University of Dundee. All rights reserved.
Copyright (C) 2006-2024 University of Dundee. All rights reserved.
Loading
Loading