From 61f27be5bb8e2cbb16fc3085c64fc4aaf4922acf Mon Sep 17 00:00:00 2001 From: Mathieu Bastian Date: Thu, 29 Oct 2015 14:04:23 +0100 Subject: [PATCH] =?UTF-8?q?Update=20build=20scripts=20to=20build=20dmg=20o?= =?UTF-8?q?n=20Travis=E2=80=99=20osx=20environment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 36 +++----- modules/application/pom.xml | 169 ++++++++++++++++++++++-------------- pom.xml | 67 +++++++++----- 3 files changed, 164 insertions(+), 108 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3cbfb92d..e0c070b52 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,8 @@ sudo: false language: java -jdk: - - oraclejdk8 +os: + - linux + - osx branches: only: @@ -15,7 +16,6 @@ addons: - cmake - libboost-all-dev - liblzma-dev - - genisoimage cache: directories: @@ -23,31 +23,21 @@ cache: before_install: # Build & install innoextract - - git clone --branch 1.5 https://github.com/dscharrer/innoextract.git - - cd innoextract && mkdir -p build && cd build && cmake .. - - make && export PATH=$PATH:$PWD - - cd ../.. - - # Prepare environemnt for Inno Setup - - wine --version - - innoextract --version + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then git clone --branch 1.5 https://github.com/dscharrer/innoextract.git;fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd innoextract && mkdir -p build && cd build && cmake .. && make && export PATH=$PATH:$PWD && cd ../..;fi install: # Install InnoSetup - - printf '#!/bin/bash\nrm -rf /tmp/inno\nmkdir /tmp/inno\ncd /tmp/inno\nwget -O is.exe http://files.jrsoftware.org/is/5/isetup-5.5.5.exe\ninnoextract is.exe\nmkdir -p ~/\".wine/drive_c/inno\"\ncp -a app/* ~/\".wine/drive_c/inno\"' > innoinstall.sh - - chmod +x ./innoinstall.sh - - ./innoinstall.sh - - printf '#!/bin/sh\nunset DISPLAY\nscriptname=$1\n[ -f \"$scriptname\" ] && scriptname=$(winepath -w \"$scriptname\")\nwine \"C:\inno\ISCC.exe\" \"$scriptname\" \"/q\"' > iscc - - chmod +x ./iscc - - export PATH=$PATH:$PWD - - # Install replacevistaicon - - cp modules/application/src/main/app-resources/ReplaceVistaIcon.exe ~/".wine/drive_c/ReplaceVistaIcon.exe" - - printf '#!/bin/sh\nunset DISPLAY\nexecutable=$1\niconfile=$2\niconid=$3\nwine "C:\ReplaceVistaIcon.exe" "$executable" "$iconfile" "$iconid"' > replacevistaicon - - chmod +x ./replacevistaicon + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then printf '#!/bin/bash\nrm -rf /tmp/inno\nmkdir /tmp/inno\ncd /tmp/inno\nwget -O is.exe http://files.jrsoftware.org/is/5/isetup-5.5.5.exe\ninnoextract is.exe\nmkdir -p ~/\".wine/drive_c/inno\"\ncp -a app/* ~/\".wine/drive_c/inno\"' > innoinstall.sh && chmod +x ./innoinstall.sh && ./innoinstall.sh;fi + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then printf '#!/bin/sh\nexport DISPLAY=\":0.0\"\nscriptname=$1\n[ -f \"$scriptname\" ] && scriptname=$(winepath -w \"$scriptname\")\nwine \"C:\inno\ISCC.exe\" \"$scriptname\" \"/q\"' > iscc && chmod +x ./iscc && export PATH=$PATH:$PWD;fi + + # Replace icon + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then cp modules/application/src/main/app-resources/ReplaceVistaIcon.exe ~/".wine/drive_c/ReplaceVistaIcon.exe" && printf '#!/bin/sh\nunset DISPLAY\nexecutable=$1\niconfile=$2\niconid=$3\nwine "C:\ReplaceVistaIcon.exe" "$executable" "$iconfile" "$iconid"' > replacevistaicon && chmod +x ./replacevistaicon;fi +after_install: # Setup Maven's settings.xml - echo "ossrh\${env.OSSRH_USER}\${env.OSSRH_PASS}netbeans" > ~/settings.xml script: - - travis_retry mvn --settings ~/settings.xml -Djava.awt.headless=true -Dgpg.skip=true clean deploy -P deployment,create-dmg,create-exe + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then travis_retry mvn --settings ~/settings.xml -Djava.awt.headless=true -Dgpg.skip=true clean deploy -P deployment,create-modules,create-sources,create-javadoc,create-autoupdate,create-exe,create-targz;fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then travis_retry mvn --settings ~/settings.xml -Djava.awt.headless=true -Dgpg.skip=true clean deploy -P deployment,create-dmg;fi diff --git a/modules/application/pom.xml b/modules/application/pom.xml index fdd3599ef..9249127f6 100644 --- a/modules/application/pom.xml +++ b/modules/application/pom.xml @@ -460,6 +460,29 @@ + + + org.apache.maven.plugins + maven-jar-plugin + + + none + + jar + + + + + + + + org.apache.maven.plugins + maven-source-plugin + + true + + + maven-resources-plugin @@ -507,22 +530,12 @@ - - + - org.codehaus.mojo - nbm-maven-plugin - - - autoupdate - - autoupdate - - - ${project.build.directory}/site - - - + maven-deploy-plugin + + false + @@ -536,29 +549,6 @@ - - - - org.apache.maven.plugins - maven-jar-plugin - - - none - - jar - - - - - - - - org.apache.maven.plugins - maven-source-plugin - - true - - @@ -581,27 +571,72 @@ - - + + + + + + + create-autoupdate + + + - maven-antrun-plugin + org.codehaus.mojo + nbm-maven-plugin - site + autoupdate + + autoupdate + - - - - - + ${project.build.directory}/site + + + + + + + + + + create-sources + + + + + org.codehaus.mojo + build-helper-maven-plugin + + + attach-sources + pre-integration-test - run + attach-artifact + + + + ${basedir}/../../target/${brandingToken}-${project.version}-sources.tar.gz + tar.gz + sources + + + + + + + + + create-targz + + maven-assembly-plugin @@ -624,27 +659,11 @@ - + org.codehaus.mojo build-helper-maven-plugin - - attach-sources - pre-integration-test - - attach-artifact - - - - - ${basedir}/../../target/${brandingToken}-${project.version}-sources.tar.gz - tar.gz - sources - - - - attach-linux package @@ -922,6 +941,26 @@ push-site + + + maven-antrun-plugin + + + site + + + + + + + + + run + + + + + com.github.github diff --git a/pom.xml b/pom.xml index f74fbdcac..32cb7695f 100644 --- a/pom.xml +++ b/pom.xml @@ -983,6 +983,14 @@ + + + + maven-deploy-plugin + + true + + @@ -999,7 +1007,11 @@ false -Xlint:none - + + + + + create-javadoc @@ -1039,7 +1051,40 @@ - + + + + + + + create-modules + + + + + maven-deploy-plugin + + false + + + + + + org.apache.maven.plugins + maven-install-plugin + + false + + + + + + + + + create-sources + + maven-source-plugin @@ -1091,25 +1136,7 @@ release-extra - - - maven-deploy-plugin - - true - - - - - org.apache.maven.plugins - maven-install-plugin - - - default-install - none - - - -- GitLab