Commit 7c733897 authored by Radek Ošlejšek's avatar Radek Ošlejšek
Browse files

Merge branch '263-create-installers-with-included-jre' into 'master'

Resolve "Create installers with included JRE"

Closes #263

See merge request grp-fidentis/analyst2!278
parents 84a107ce 74b7b871
Loading
Loading
Loading
Loading
+53 −11
Original line number Diff line number Diff line
@@ -30,9 +30,36 @@ build-and-test-job:
    - shared-fi
  rules:
    - if: '$CI_COMMIT_BRANCH'
#  artifacts:
#    paths:
#    - application/target/$PROJECT_ARTIFACT_ID-*.zip
#    - MeshModel/target/site/apidocs/
#    - SpacePartitioning/target/site/apidocs/
#    - MeshAlgorithms/target/site/apidocs/
#    - HumanFace/target/site/apidocs/
#    - Rendering/target/site/apidocs/
#    - GUI/target/site/apidocs/
#    - target/site/apidocs/
#    expire_in: 1 hour
#    when: on_success

#
# Build the application for different OSs (only if committing to the master branch and the VERSION.txt file has changed)
#
build-bundles-job:
  stage: release
  script:
      mvn clean install javadoc:javadoc javadoc:aggregate $MAVEN_JAVADOC_OPTS $MAVEN_CLI_OPTS -DskipTests -Pcreate-linux-package -Pcreate-win32-package -Pcreate-win64-package -Pcreate-macosx-package
  tags:
    - shared-fi
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
      changes:
        - VERSION.txt
    - if: '$CI_COMMIT_BRANCH'
      when: never
  artifacts:
    paths:
    - application/target/$PROJECT_ARTIFACT_ID-*.zip
      - MeshModel/target/site/apidocs/
      - SpacePartitioning/target/site/apidocs/
      - MeshAlgorithms/target/site/apidocs/
@@ -40,21 +67,36 @@ build-and-test-job:
      - Rendering/target/site/apidocs/
      - GUI/target/site/apidocs/
      - target/site/apidocs/
    expire_in: 1 hour
      - application/target/$PROJECT_ARTIFACT_ID-*.zip
      - application/target/linux-$PROJECT_ARTIFACT_ID-*.tar.gz
      - application/target/win*-$PROJECT_ARTIFACT_ID-*.zip
      - application/target/ios-$PROJECT_ARTIFACT_ID-*.dmg
    expire_in: 20 mins
    when: on_success

#
# Upload the code of a new release of the project onto the project's web server
# (only if commiting to the master branch and the VERSION.txt file has changed)
# (only if committing to the master branch and the VERSION.txt file has changed)
#
release-job:
  stage: release
  needs: [build-bundles-job]
  image: ubuntu:latest
  script:
    - export VERSION=$(grep -oP '^([^\s]*)' $DEPLOYMENT_INFO_VERSION_FILE)
    - apt-get update -qq && apt-get install -y -qq lftp
    #- lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rnev $CI_PROJECT_DIR/application/target ./$FTP_TARGET_DIR --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/"
    - lftp -c "set ftp:ssl-allow yes; set ssl:verify-certificate false; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; cd $FTP_TARGET_DIR; mput -c $CI_PROJECT_DIR/application/target/$PROJECT_ARTIFACT_ID-$VERSION.zip; put -c $CI_PROJECT_DIR/application/target/$PROJECT_ARTIFACT_ID-$VERSION.zip -o $PROJECT_ARTIFACT_ID-LATEST.zip"
    - >
      lftp -c "set ftp:ssl-allow yes; 
      set ssl:verify-certificate false; 
      open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; 
      cd $FTP_TARGET_DIR; 
      mput -c $CI_PROJECT_DIR/application/target/$PROJECT_ARTIFACT_ID-$VERSION.zip; 
      mput -c $CI_PROJECT_DIR/application/target/linux-$PROJECT_ARTIFACT_ID-$VERSION.tar.gz;
      mput -c $CI_PROJECT_DIR/application/target/win-$PROJECT_ARTIFACT_ID-$VERSION.zip;
      mput -c $CI_PROJECT_DIR/application/target/win64-$PROJECT_ARTIFACT_ID-$VERSION.zip;
      mput -c $CI_PROJECT_DIR/application/target/ios-$PROJECT_ARTIFACT_ID-$VERSION.dmg;
      put -c $CI_PROJECT_DIR/application/target/$PROJECT_ARTIFACT_ID-$VERSION.zip -o $PROJECT_ARTIFACT_ID-LATEST.zip"
    - lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rev $CI_PROJECT_DIR/target/site/apidocs ./$FTP_TARGET_DIR/apidocs --ignore-time --parallel=10"
    - lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rev $CI_PROJECT_DIR/MeshModel/target/site/apidocs ./$FTP_TARGET_DIR/apidocs-MeshModel --ignore-time --parallel=10"
    - lftp -c "set ftp:ssl-allow no; open -u $FTP_USERNAME,$FTP_PASSWORD $FTP_HOST; mirror -Rev $CI_PROJECT_DIR/SpacePartitioning/target/site/apidocs ./$FTP_TARGET_DIR/apidocs-SpacePartitioning --ignore-time --parallel=10"
+21 −13
Original line number Diff line number Diff line
@@ -4,30 +4,38 @@ Software for processing and analysis of human faces. Re-implementation of [FIDEN

This project is being developed at Masaryk University, Brno, as collaborative project between the Human Computer Interaction Laboratory at Faculty of Informatics and the Department of Anthropology at Faculty of Science.

## Requirements
## Requirements (for development)

*  [Oracle JDK 17](https://www.oracle.com/java/technologies/downloads/#java17) or [Oracle JDK 11](https://www.oracle.com/java/technologies/downloads/#java11)
*  [Oracle JDK 17](https://www.oracle.com/java/technologies/downloads/#java17) or [OpenJDK 17](https://www.openlogic.com/openjdk-downloads)
*  [Maven](https://www.mkyong.com/maven/how-to-install-maven-in-windows/) for compilation
*  IDE for development, e.g. NetBeans or IntelliJ IDEA

## Installation and running

* To build the application from scratch, run `mvn clean install`.
* To run the application
  * run a binary file located in the `target/fidentisanalyst/bin/` 
  * or go to the `application` directory and run `mvn nbm:run-platform`
## Compilation
* Run `mvn clean install` or `mvn clean install -DskipTests` to build the Linux/Win application. The result is stored in 
  the `application/target/fidentisanalyst` folder and also in the distributable 
  `application/target/fidentisanalyst/FIDENTIS-Analyst-app-VERSION.zip` file.   
* Add the following Maven profile parameters to generate application bundles with JRE included in the application.   
  - `-Pcreate-linux-package`: Creates the `application/target/fidentisanalyst-linux` packed into the `application/target/linux-FIDENTIS-Analyst-app-VERSION.tar.gz` file. 
  - `-Pcreate-win32-package`: Creates the `application/target/fidentisanalyst-win` packed into the `application/target/win-FIDENTIS-Analyst-app-VERSION.zip` file.
  - `-Pcreate-win64-package`: Creates the `application/target/fidentisanalyst-win64` packed into the `application/target/win64-FIDENTIS-Analyst-app-VERSION.zip` file.
  - `-Pcreate-macosx-package`: Creates the `application/target/ios-FIDENTIS-Analyst-app-VERSION.dmg` file for Mac OS X.
  
## Running
* Either run a binary file located in the `application/target/fidentisanalyst/bin/` (JRE/JDK has to be installed in the system), or
* go to the `application` directory and run `mvn nbm:run-platform` (JRE/JDK has to be installed in the system), or
* run the `application/target/fidentisanalyst-[linux|win|win32]/bin/` application (bundled JRE is used).

## Developer's guide

* The source code has to be maintainable via Maven. If you use IDEA for development, be carefull that this IDE transforms the original Maven project into its own obscure format. You can use it, but at the end, your code has to be installable and runnable via maven (see Installation and running). When pushing your code into gitlab, the maven installation is tested.
* Document public interafaces rigorously.
* The source code has to be maintainable via Maven. If you use IDEA for development, be careful that this IDE transforms the original Maven project into its own obscure format. You can use it, but at the end, your code has to be installable and runnable via maven (see Installation and running). When pushing your code into gitlab, the maven installation is tested.
* Document public interfaces rigorously.
* Commit and push regularly. Keep branches (iterations) as short as possible.
* Write junit test whenever possible. For the `MesmModel` module, unit tests are mandatory for every new functionality! 
* Write junit test whenever possible. For the `MeshModel` module, unit tests are mandatory for every new functionality! 
* The client part (GUI) of the project is developed in [NetBeans Platform](https://netbeans.apache.org/kb/docs/platform/index.html) framework.
  Some Swing components are generated by the NetBeans IDE GUI Designer. In this case, use NetBeans instead of IDEA to modify them.
* For further info, see the [project web page](https://www.radek-oslejsek.cz/it/fidentis-analyst-2/).

## Structure (modules):

*  **application:** From [NetBeans tutorial](https://platform.netbeans.org/tutorials/71/nbm-maven-quickstart.html): Enumerates included modules; permits interactive runs; produces various kinds of packaging, such as ZIP by default, but optionally JNLP, NBMs, and in the future perhaps OSGi; holds functional tests. Each module project specifies its own compile dependencies, while the appplication project's dependencies are anything additional that should be present at runtime. For example, that includes, by default, the whole platform cluster, that is, the set of modules constituting the "platform" cluster. The appplication project could include other clusters, or subsets of clusters, or whatever plugins you want included in your app which are not used as compilation dependencies. At a minimum, core.startup and its transitive dependencies are included.
*  **branding:** From [NetBeans tutorial](https://platform.netbeans.org/tutorials/71/nbm-maven-quickstart.html): This module project contains the global resources used for branding the application, such as the splash screen.
*  **Application modules (MeshModel, etc.):**  See the [project web page](https://www.radek-oslejsek.cz/it/fidentis-analyst-2/).
*  **Application modules (MeshModel, etc.):**  See the [project web page](https://www.radek-oslejsek.cz/it/fidentis-analyst-2/) for the architecture preview.
+395 −0

File changed.

Preview size limit exceeded, changes collapsed.

+96.3 KiB

File added.

No diff preview for this file type.

+36 −0
Original line number Diff line number Diff line
<!-- This file is used for MaxOSX version of the application with bundled JRE -->
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<plist version="1.0">
    <dict>

        <key>CFBundleName</key>
        <string>FIDENTIS Analyst II</string>
    
        <key>CFBundleVersion</key>
        <string>${project.version}</string>
    
        <key>CFBundleExecutable</key>
        <string>${brandingToken}</string>
    
        <key>CFBundlePackageType</key>
        <string>APPL</string>
    
        <key>CFBundleShortVersionString</key>
        <string>${project.version}</string>
    
        <key>CFBundleSignature</key>
        <string>????</string>
    
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
    
        <key>CFBundleIdentifier</key>
        <string>${project.groupId}</string>
    
        <key>CFBundleIconFile</key>
        <string>${brandingToken}.icns</string>
    
        <key>NSHighResolutionCapable</key> 
        <true/>
    </dict>
</plist>
Loading