Skip to content

Commit

Permalink
💚 Update to distribution build (#483)
Browse files Browse the repository at this point in the history
* Moved the distribution build files and code to constellation-app/constellation-applications
* Fixed the java version of some modules that was still java 8
* Removed some old comments
* The constellation version will be updated via a script including updating the window title - WIP
  • Loading branch information
arcturus2 committed May 4, 2020
1 parent bcc9388 commit 69d27e0
Show file tree
Hide file tree
Showing 24 changed files with 19 additions and 414 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -14,7 +14,7 @@ git:
jobs:
include:

- stage: Run Tests
- stage: Run Build and Testing
dist: trusty
language: java
services:
Expand Down
36 changes: 0 additions & 36 deletions .travis/build-zip.sh

This file was deleted.

1 change: 0 additions & 1 deletion CoreArrangementPlugins/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreAttributeEditorView/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreConversationView/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreDataAccessView/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreDependencies/nbproject/project.properties
Expand Up @@ -173,6 +173,5 @@ file.reference.worldwind-2.0.0.jar=release/modules/ext/worldwind-2.0.0.jar
file.reference.xml-commons-resolver-1.2.jar=release/modules/ext/xml-commons-resolver-1.2.jar
file.reference.xmlbeans-3.1.0.jar=release/modules/ext/xmlbeans-3.1.0.jar
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
3 changes: 2 additions & 1 deletion CoreDependencies/src/ivy.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="au.gov.asd.tac" module="third-party-dependencies" revision="working"/>
<info organisation="au.gov.asd.tac" module="third-party-dependencies"/>

<configurations defaultconfmapping="*->default,master">
<conf name="compile" description="Compile-time dependencies" visibility="public"/>
Expand Down Expand Up @@ -86,6 +86,7 @@
<exclude org="javax.media" module="jai_core"/>
<exclude org="javax.media" module="jai_codec"/>
<exclude org="javax.media" module="jai_imageio"/>
<exclude org="javax.media" module="jai_widget"/>
<exclude type="source" ext="jar" conf="*"/>
<exclude type="javadoc" ext="jar" conf="*"/>
<exclude type="license" ext="txt" conf="*"/>
Expand Down
1 change: 0 additions & 1 deletion CoreFunctionality/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
Expand Up @@ -32,7 +32,10 @@
public class Startup implements Runnable {

private static final String SYSTEM_ENVIRONMENT = "constellation.environment";
private static final String UNDER_DEVELOPMENT = "(under development)";

// DO NOT CHANGE THIS VALUE
// continous integration scripts use this to update the version dynamically
private static final String VERSION = "(under development)";

@Override
public void run() {
Expand All @@ -44,16 +47,10 @@ public void run() {
? String.format("%s %s", BrandingUtilities.APPLICATION_NAME, environment)
: BrandingUtilities.APPLICATION_NAME;

// Change the main window title to reflect the most recent module version as the application version.
// update the main window title with the version number
WindowManager.getDefault().invokeWhenUIReady(() -> {
/*String mostRecentVersion = MostRecentModules.getMostRecentVersion();
if (mostRecentVersion == null) {
// once issue #86 is fixed this should go back to UNDER_DEVELOPMENT"
mostRecentVersion = "1.20200225.104006";
}*/

final JFrame frame = (JFrame) WindowManager.getDefault().getMainWindow();
final String title = String.format("%s - %s", name, "2.0.0-beta");
final String title = String.format("%s - %s", name, VERSION);
frame.setTitle(title);
});

Expand Down
1 change: 0 additions & 1 deletion CoreGraphFile/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
8 changes: 2 additions & 6 deletions CoreGraphFramework/nbproject/project.properties
@@ -1,7 +1,3 @@



javac.source=1.8
javac.target=1.8
javac.compilerargs=-Xlint -Xlint:-serial -Xlint -Xlint:-serial
javac.source=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreGraphNode/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
1 change: 0 additions & 1 deletion CoreHistogramView/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=11
javac.target=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
3 changes: 1 addition & 2 deletions CoreImportExportPlugins/nbproject/project.properties
@@ -1,4 +1,3 @@
javac.source=1.8
javac.target=1.8
javac.source=11
javac.compilerargs=-Xlint -Xlint:-serial
nbm.needs.restart=true
Expand Up @@ -2,7 +2,7 @@ currentVersion=Constellation Core {0}
LBL_splash_window_title=Starting Constellation Core
SPLASH_HEIGHT=406
SPLASH_WIDTH=650
SplashProgressBarBounds=284,399,403,6
SplashProgressBarColor=0x404040
SplashRunningTextBounds=284,381,403,13
SplashProgressBarBounds=245,395,403,6
SplashProgressBarColor=0xFFFFFF
SplashRunningTextBounds=245,381,403,13
SplashRunningTextFontSize=10
190 changes: 3 additions & 187 deletions build.xml
@@ -1,30 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
<!-- for some information on what you could do (e.g. targets to override). -->
<!-- If you delete this file and reopen the project it will be recreated. -->
<project name="CONSTELLATION" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
<description>Builds the module suite CONSTELLATION.</description>
<project name="Constellation" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:if="ant:if" xmlns:unless="ant:unless">
<description>Builds the Constellation module suite</description>

<import file="nbproject/build-impl.xml"/>

<!-- ivy -->
<property name="ivy.install.version" value="2.5.0"/>
<property name="ivy.jar.dir" value="${user.home}/.ivy2"/>
<property name="ivy.cache.dir" value="${ivy.jar.dir}/cache"/>
<property name="ivy.jar.file" value="${ivy.jar.dir}/${ivy.install.version}.jar"/>
<property name="ivy.dep.file" value="${basedir}/CoreDependencies/src/ivy.xml"/>
<property name="ivy.settings.file" value="${basedir}/CoreDependencies/src/ivysettings.xml"/>
<property name="ivy.lib.dir" value="${basedir}/CoreDependencies/release/modules/ext"/>
<property name="jre.filename.windows" value="zulu11.39.15-ca-fx-jre11.0.7-win_x64.zip"/>
<property name="jre.url.windows" value="https://cdn.azul.com/zulu/bin/${jre.filename.windows}.zip"/>
<property name="jre.filename.macosx" value="zulu11.39.15-ca-fx-jre11.0.7-macosx_x64.tar.gz"/>
<property name="jre.url.macosx" value="https://cdn.azul.com/zulu/bin/${jre.filename.macosx}.zip"/>
<property name="jre.filename.linux" value="zulu11.39.15-ca-fx-jre11.0.7-linux_x64.tar.gz"/>
<property name="jre.url.linux" value="https://cdn.azul.com/zulu/bin/${jre.filename.linux}.tar.gz"/>
<property name="dist.version" value="v2.0.0-beta"/>
<property name="dist.filename.linux" value="constellation-linux-${dist.version}"/>
<property name="dist.filename.windows" value="constellation-win-${dist.version}"/>
<property name="dist.filename.macosx" value="constellation-macosx-${dist.version}"/>
<property name="nobody" value="65534"/>

<target name="update-dependencies-clean-build" description="Download dependencies and build all modules in the suite.">
<ant target="clean"/>
Expand Down Expand Up @@ -206,177 +193,6 @@
</propertyfile>
</target>

<!-- Windows Section -->

<target name="-download-windows-jre" >
<echo message="downloading JRE..."/>
<get src="${jre.url.windows}"
dest="${basedir}" usetimestamp="true"/>
<unzip src="${basedir}/${jre.filename.windows}.zip" dest="${basedir}"/>
<delete file="${basedir}/${jre.filename.windows}.zip"/>
</target>

<target name="build-zip-with-windows-jre" depends="build,build-launchers,-download-windows-jre"
description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform. This includes the JRE for Windows.">
<mkdir dir="${dist.dir}"/>
<!-- pathfileset does not support 'prefix' and 'filemode' parameters, we have to copy them to temp location -->
<tempfile property="temp.dir.nbexec" destdir="${suite.build.dir}" deleteonexit="true" prefix="nbexec"/>
<tempfile property="temp.dir.rest" destdir="${suite.build.dir}" deleteonexit="delete" prefix="rest"/>
<subant genericantfile="${harness.dir}/suite.xml" target="copy-cluster" inheritrefs="true">
<property name="dest.dir" value="${temp.dir.rest}"/>
<property name="nbexec.dir" value="${temp.dir.nbexec}"/>
<property name="build.dir" value="${suite.build.dir}"/>
<resources refid="zip.platform.clusters"/>
</subant>
<fixcrlf srcdir="${build.launcher.dir}/etc/"
destdir="${build.launcher.dir}/etc/"
preservelastmodified="true"
eol="crlf" />

<!-- work around to get the modified help jars to the build -->
<copy file="${nbplatform.default.netbeans.dest.dir}/platform/modules/ext/jhall-2.0_05.jar" todir="${temp.dir.rest}/platform/modules/ext" verbose="true"/>

<!-- delete the harness folder which is only required for testing -->
<delete dir="${temp.dir.rest}/harness"/>

<zip destfile="${dist.dir}/${dist.filename.windows}.zip">
<!-- Using pre-built executable files that come with the Constellation icon -->
<!--<zipfileset dir="${build.launcher.dir}/bin/" filemode="755" prefix="${app.name}/bin"/>-->
<zipfileset dir="${basedir}/distribution/" filemode="755" prefix="${app.name}"/>
<zipfileset dir="${build.launcher.dir}/etc/" prefix="${app.name}/etc"/>
<zipfileset dir="${temp.dir.nbexec}" filemode="755" prefix="${app.name}"/>
<zipfileset dir="${temp.dir.rest}" prefix="${app.name}"/>
<zipfileset dir="${basedir}/${jre.filename.windows}/" prefix="${app.name}/jre"/>
<!-- Yes, the doubled app.name is a bit ugly, but better than the alternative; cf. #66441: -->
<zipfileset dir="${cluster}" prefix="${app.name}/${app.name}">
<exclude name="config/Modules/*.xml_hidden"/>
</zipfileset>
</zip>
<delete dir="${basedir}/${jre.filename.windows}/"/>
</target>

<!-- MacOSX Section -->

<!-- This is a copy of -download-windows-jre, if there is a better way to do this then let me know -->
<target name="-download-macosx-jre" >
<echo message="downloading JRE..."/>
<get src="${jre.url.macosx}"
dest="${basedir}" usetimestamp="true"/>
<untar src="${basedir}/${jre.filename.macosx}.tar.gz" dest="${basedir}" compression="gzip"/>
<delete file="${basedir}/${jre.filename.macosx}.zip"/>
</target>

<!-- This is a copy of build-zip-with-windows-jre", if there is a better way to do this then let me know -->
<target name="build-zip-with-macosx-jre" depends="build,build-launchers,-download-macosx-jre"
description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform. This includes the JRE for MacOSX.">
<mkdir dir="${dist.dir}"/>
<!-- pathfileset does not support 'prefix' and 'filemode' parameters, we have to copy them to temp location -->
<tempfile property="temp.dir.nbexec" destdir="${suite.build.dir}" deleteonexit="true" prefix="nbexec"/>
<tempfile property="temp.dir.rest" destdir="${suite.build.dir}" deleteonexit="delete" prefix="rest"/>
<subant genericantfile="${harness.dir}/suite.xml" target="copy-cluster" inheritrefs="true">
<property name="dest.dir" value="${temp.dir.rest}"/>
<property name="nbexec.dir" value="${temp.dir.nbexec}"/>
<property name="build.dir" value="${suite.build.dir}"/>
<resources refid="zip.platform.clusters"/>
</subant>
<fixcrlf srcdir="${build.launcher.dir}/etc/"
destdir="${build.launcher.dir}/etc/"
preservelastmodified="true"
eol="lf" />

<!-- work around to get the modified help jars to the build -->
<copy file="${nbplatform.default.netbeans.dest.dir}/platform/modules/ext/jhall-2.0_05.jar" todir="${temp.dir.rest}/platform/modules/ext" verbose="true"/>

<!-- delete the harness folder which is only required for testing -->
<delete dir="${temp.dir.rest}/harness"/>

<tar destfile="${dist.dir}/${dist.filename.macosx}.tar">
<!-- Using pre-built executable files that come with the Constellation icon -->
<!--<tarfileset dir="${build.launcher.dir}/bin/" filemode="755" prefix="${app.name}/bin"/>-->
<tarfileset dir="${basedir}/distribution/" filemode="755" prefix="${app.name}" uid="${nobody}" gid="${nobody}">
<exclude name="*.bat"/>
</tarfileset>
<tarfileset dir="${build.launcher.dir}/etc/" prefix="${app.name}/etc" uid="${nobody}" gid="${nobody}"/>
<tarfileset dir="${temp.dir.nbexec}" filemode="755" prefix="${app.name}" uid="${nobody}" gid="${nobody}"/>
<tarfileset dir="${temp.dir.rest}" prefix="${app.name}" uid="${nobody}" gid="${nobody}"/>

<!-- Make sure the files in jre/bin are executable -->
<tarfileset dir="${basedir}/${jre.filename.macosx}/" prefix="${app.name}/jre" uid="${nobody}" gid="${nobody}">
<exclude name="bin/*"/>
</tarfileset>
<tarfileset dir="${basedir}/${jre.filename.macosx}/bin/" filemode="755" prefix="${app.name}/jre/bin" uid="${nobody}" gid="${nobody}"/>

<!-- Yes, the doubled app.name is a bit ugly, but better than the alternative; cf. #66441: -->
<tarfileset dir="${cluster}" prefix="${app.name}/${app.name}" uid="${nobody}" gid="${nobody}">
<exclude name="config/Modules/*.xml_hidden"/>
</tarfileset>
</tar>
<gzip src="${dist.dir}/${dist.filename.macosx}.tar" destfile="${dist.dir}/${dist.filename.macosx}.tar.gz"/>
<delete file="${dist.dir}/${dist.filename.macosx}.tar"/>
<delete dir="${basedir}/${jre.filename.macosx}/"/>
</target>

<!-- Linux Section -->

<!-- This is a copy of -download-windows-jre, if there is a better way to do this then let me know -->
<target name="-download-linux-jre" >
<echo message="downloading JRE..."/>
<get src="${jre.url.linux}"
dest="${basedir}" usetimestamp="true"/>
<untar src="${basedir}/${jre.filename.linux}.tar.gz" dest="${basedir}" compression="gzip"/>
<delete file="${basedir}/${jre.filename.linux}.tar.gz"/>
</target>

<!-- This is a copy of build-zip-with-windows-jre", if there is a better way to do this then let me know -->
<target name="build-zip-with-linux-jre" depends="build,build-launchers,-download-linux-jre"
description="Builds a ZIP distribution of the suite, launchers, and selected modules from the platform. This includes the JRE for Linux.">
<mkdir dir="${dist.dir}"/>
<!-- pathfileset does not support 'prefix' and 'filemode' parameters, we have to copy them to temp location -->
<tempfile property="temp.dir.nbexec" destdir="${suite.build.dir}" deleteonexit="true" prefix="nbexec"/>
<tempfile property="temp.dir.rest" destdir="${suite.build.dir}" deleteonexit="delete" prefix="rest"/>
<subant genericantfile="${harness.dir}/suite.xml" target="copy-cluster" inheritrefs="true">
<property name="dest.dir" value="${temp.dir.rest}"/>
<property name="nbexec.dir" value="${temp.dir.nbexec}"/>
<property name="build.dir" value="${suite.build.dir}"/>
<resources refid="zip.platform.clusters"/>
</subant>
<fixcrlf srcdir="${build.launcher.dir}/etc/"
destdir="${build.launcher.dir}/etc/"
preservelastmodified="true"
eol="lf" />

<!-- work around to get the modified help jars to the build -->
<copy file="${nbplatform.default.netbeans.dest.dir}/platform/modules/ext/jhall-2.0_05.jar" todir="${temp.dir.rest}/platform/modules/ext" verbose="true"/>

<!-- delete the harness folder which is only required for testing -->
<delete dir="${temp.dir.rest}/harness"/>

<tar destfile="${dist.dir}/${dist.filename.linux}.tar">
<!-- Using pre-built executable files that come with the Constellation icon -->
<!--<tarfileset dir="${build.launcher.dir}/bin/" filemode="755" prefix="${app.name}/bin"/>-->
<tarfileset dir="${basedir}/distribution/" filemode="755" prefix="${app.name}" uid="${nobody}" gid="${nobody}">
<exclude name="*.bat"/>
</tarfileset>
<tarfileset dir="${build.launcher.dir}/etc/" prefix="${app.name}/etc" uid="${nobody}" gid="${nobody}"/>
<tarfileset dir="${temp.dir.nbexec}" filemode="755" prefix="${app.name}" uid="${nobody}" gid="${nobody}"/>
<tarfileset dir="${temp.dir.rest}" prefix="${app.name}" uid="${nobody}" gid="${nobody}"/>

<!-- Make sure the files in jre/bin are executable -->
<tarfileset dir="${basedir}/${jre.filename.linux}/" prefix="${app.name}/jre" uid="${nobody}" gid="${nobody}">
<exclude name="bin/*"/>
</tarfileset>
<tarfileset dir="${basedir}/${jre.filename.linux}/bin/" filemode="755" prefix="${app.name}/jre/bin" uid="${nobody}" gid="${nobody}"/>

<!-- Yes, the doubled app.name is a bit ugly, but better than the alternative; cf. #66441: -->
<tarfileset dir="${cluster}" prefix="${app.name}/${app.name}" uid="${nobody}" gid="${nobody}">
<exclude name="config/Modules/*.xml_hidden"/>
</tarfileset>
</tar>
<gzip src="${dist.dir}/${dist.filename.linux}.tar" destfile="${dist.dir}/${dist.filename.linux}.tar.gz"/>
<delete file="${dist.dir}/${dist.filename.linux}.tar"/>
<delete dir="${basedir}/${jre.filename.linux}/"/>
</target>

<!-- Useful Dependency Utilities -->

<target name="dependency-report-html" depends="-load-ivy-tasks,-init-build-dir"
Expand Down

0 comments on commit 69d27e0

Please sign in to comment.