提交 61f27be5 编写于 作者: M Mathieu Bastian

Update build scripts to build dmg on Travis’ osx environment

上级 7ce4a855
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 "<settings><servers><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASS}</password></server><server><id>netbeans</id></server></servers></settings>" > ~/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
......@@ -460,6 +460,29 @@
</executions>
</plugin>
<!-- Avoid jar goal -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>none</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not generate a source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
<!-- Copy ressources gephi.conf and Info.plist with filtering (replacing 'project.version' by the actual version -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
......@@ -507,22 +530,12 @@
<build>
<plugins>
<!-- NBM Plugin settings. Enable the zip and autoupdate generation -->
<!-- Enable the standard deploy phase -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>autoupdate</id>
<goals>
<goal>autoupdate</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/site</outputDirectory>
</configuration>
</execution>
</executions>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<!-- Permits NbModuleSuite to be run in integration-test phase: -->
......@@ -536,29 +549,6 @@
</systemPropertyVariables>
</configuration>
</plugin>
<!-- Avoid jar goal -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>none</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Do not generate a source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<skipSource>true</skipSource>
</configuration>
</plugin>
<!-- Unpack the localization dependency -->
<plugin>
......@@ -581,27 +571,72 @@
</execution>
</executions>
</plugin>
<!-- Copy parent's site into target/site -->
</plugins>
</build>
</profile>
<!-- Profile used along with deployment to create the autoupdate site -->
<profile>
<id>create-autoupdate</id>
<build>
<plugins>
<!-- NBM Plugin settings. Enable the autoupdate generation -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<phase>site</phase>
<id>autoupdate</id>
<goals>
<goal>autoupdate</goal>
</goals>
<configuration>
<target>
<copy todir="${project.build.directory}/site">
<fileset dir="${basedir}/../../target/site"/>
</copy>
</target>
<outputDirectory>${project.build.directory}/site</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile used along with deployment to create the sources artifact -->
<profile>
<id>create-sources</id>
<build>
<plugins>
<!-- Attach parent's sources artifact -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${basedir}/../../target/${brandingToken}-${project.version}-sources.tar.gz</file>
<type>tar.gz</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile used along with deployment to create the tar.gz artifact -->
<profile>
<id>create-targz</id>
<build>
<plugins>
<!-- Assembler to produce linux's tar.gz -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
......@@ -624,27 +659,11 @@
</executions>
</plugin>
<!-- Attach parent's sources artifact -->
<!-- Attach tar.gz artifact -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<phase>pre-integration-test</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${basedir}/../../target/${brandingToken}-${project.version}-sources.tar.gz</file>
<type>tar.gz</type>
<classifier>sources</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
<execution>
<id>attach-linux</id>
<phase>package</phase>
......@@ -922,6 +941,26 @@
<id>push-site</id>
<build>
<plugins>
<!-- Copy parent's site into target/site -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>site</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/site">
<fileset dir="${basedir}/../../target/site"/>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Publish site folder to GitHub's gh-pages branch -->
<plugin>
<groupId>com.github.github</groupId>
......
......@@ -983,6 +983,14 @@
</execution>
</executions>
</plugin>
<!-- Skip the standard deploy phase -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
......@@ -999,7 +1007,11 @@
<gephi.javac.showWarnings>false</gephi.javac.showWarnings>
<gephi.javac.xlint>-Xlint:none</gephi.javac.xlint>
</properties>
</profile>
<!-- Profile to create Javadoc -->
<profile>
<id>create-javadoc</id>
<build>
<plugins>
<!-- Javadoc settings -->
......@@ -1039,7 +1051,40 @@
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile activated to create modules' artifacts (jar, nbm) -->
<profile>
<id>create-modules</id>
<build>
<plugins>
<!-- Enable the standard deploy phase -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<!-- Enable the standard install phase -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Profile activated to create sources artifact -->
<profile>
<id>create-sources</id>
<build>
<plugins>
<!-- Sources plugin -->
<plugin>
<artifactId>maven-source-plugin</artifactId>
......@@ -1091,25 +1136,7 @@
<id>release-extra</id>
<build>
<plugins>
<!-- Skip the standard deploy phase -->
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<!-- Skip the standard install phase -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<!-- Skip Javadoc creation -->
<plugin>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册