Skip to content

Commit

Permalink
straight build
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Rode committed Apr 5, 2018
1 parent 7e69f99 commit a08858c
Show file tree
Hide file tree
Showing 11 changed files with 204 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void loadOpenCV() {
(Object[]) null);
// nu.pattern.OpenCV.loadShared();
// nu.pattern.OpenCV.loadLocal();
System.out.println("Loading from " + System.getProperty("java.library.path"));
// System.out.println("Loading from " + System.getProperty("java.library.path"));
System.loadLibrary(org.opencv.core.Core.NATIVE_LIBRARY_NAME);
} catch (ClassNotFoundException e) {
System.out.println("WARNING: nu.pattern.OpenCV not found.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@
package de.serviceflow.frankenstein.fxml;

import java.io.IOException;
import java.util.List;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

import de.serviceflow.frankenstein.Configuration;
import de.serviceflow.frankenstein.ExecutorThread;
import de.serviceflow.frankenstein.MovieProcessor;
import de.serviceflow.frankenstein.plugin.api.SegmentVideoFilter;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public void bind(SegmentFilterConfigListener l, SegmentVideoFilter filter) {
}

public void fireChange() {
listener.configChanged(this, filter);
if (listener!=null)
listener.configChanged(this, filter);
}
}
84 changes: 84 additions & 0 deletions plugin-jogamp/distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>de.serviceflow.frankenstein.plugin.jogamp</groupId>
<artifactId>plugin-parent</artifactId>
<version>0.3.4-SNAPSHOT</version>
</parent>

<artifactId>distribution</artifactId>

<packaging>pom</packaging>

<name>JogAmp Filters - Distribution</name>

<!-- NOTE: These dependency declarations are only required to sort this project to the
end of the line in the multimodule build.
Since we only include the child1 module in our assembly, we only need to ensure this
distribution project builds AFTER that one...
-->
<dependencies>
<dependency>
<groupId>de.serviceflow.frankenstein.plugin.jogamp</groupId>
<artifactId>plugin-jogamp</artifactId>
<version>0.3.4-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>de.serviceflow.frankenstein.plugin.jogamp</groupId>
<artifactId>plugin-jogamp-64</artifactId>
<version>0.3.4-SNAPSHOT</version>
<type>dll</type>
</dependency>
</dependencies>

<build>
<plugins>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>prepare-package</phase>
<configuration>
<tasks>
<unzip src="${project.basedir}/../java/target/plugin-jogamp-${project.version}.jar" dest="${project.build.directory}/assembly"/>
<copy file="${project.basedir}/../native/win64/target/plugin-jogamp-64.dll" tofile="${project.build.directory}/assembly/plugin-jogamp-64.dll"/>
<jar destfile="${project.build.directory}/plugin-jogamp-${project.version}.jar" basedir="${project.build.directory}/assembly" manifest="${project.build.directory}/assembly/META-INF/MANIFEST.MF"/>
<copy file="${project.basedir}/../java/target/plugin-jogamp-${project.version}-sources.jar" tofile="${project.build.directory}/plugin-jogamp-${project.version}-sources.jar"/>
<copy file="${project.basedir}/../java/target/plugin-jogamp-${project.version}-javadoc.jar" tofile="${project.build.directory}/plugin-jogamp-${project.version}-javadoc.jar"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
137 changes: 60 additions & 77 deletions plugin-jogamp/native/win64/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,88 +34,71 @@
<version>1.0-alpha-8</version>
<extensions>true</extensions>
<configuration>
<!-- trigger javah with win32 architecture -->
<javahOS>win32</javahOS>
<compilerProvider>generic-classic</compilerProvider>
<compilerExecutable>g++</compilerExecutable>
<linkerExecutable>g++</linkerExecutable>
<sources>
<source>
<directory>../src/main/native</directory>
<includes>
<include>**/*.cpp</include>
</includes>
</source>
</sources>
<!-- used -m64 for mingw64 compiler/linker. may not work with 32-bit mingw -->
<compilerStartOptions>
<compilerStartOption>-m64 -I..\include</compilerStartOption>
</compilerStartOptions>
<linkerStartOptions>
<linkerStartOption>-shared -m64 -Wl,--kill-at,--add-stdcall-alias -static</linkerStartOption><!-- -static-libgcc -static-libstdc++ -lwinpthread -->
</linkerStartOptions>
<!-- trigger javah with win32 architecture -->
<javahOS>win32</javahOS>
<compilerProvider>generic-classic</compilerProvider>
<compilerExecutable>g++</compilerExecutable>
<linkerExecutable>g++</linkerExecutable>
<sources>
<source>
<directory>../src/main/native</directory>
<includes>
<include>**/*.cpp</include>
</includes>
</source>
</sources>
<!-- used -m64 for mingw64 compiler/linker. may not work with 32-bit mingw -->
<compilerStartOptions>
<compilerStartOption>-m64 -I..\include</compilerStartOption>
</compilerStartOptions>
<linkerStartOptions>
<linkerStartOption>-shared -m64 -Wl,--kill-at,--add-stdcall-alias -static</linkerStartOption><!-- -static-libgcc -static-libstdc++ -lwinpthread -->
</linkerStartOptions>

</configuration>

<executions>
<execution>
<id>javah</id>
<phase>generate-sources</phase>
<configuration>
<javahOS>win32</javahOS>
<javahProvider>default</javahProvider>
<javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
<workingDirectory>${basedir}</workingDirectory>
<javahOutputFileName>nativeCode.h</javahOutputFileName>
<javahClassNames>
<javahClassName>de.serviceflow.frankenstein.plugin.jogamp.jni.MatBlender</javahClassName>
</javahClassNames>
</configuration>
<goals>
<goal>javah</goal>
</goals>
</execution>
</executions>
</plugin>
<executions>
<execution>
<id>javah</id>
<phase>generate-sources</phase>
<configuration>
<javahOS>win32</javahOS>
<javahProvider>default</javahProvider>
<javahOutputDirectory>${project.build.directory}/custom-javah</javahOutputDirectory>
<workingDirectory>${basedir}</workingDirectory>
<javahOutputFileName>nativeCode.h</javahOutputFileName>
<javahClassNames>
<javahClassName>de.serviceflow.frankenstein.plugin.jogamp.jni.MatBlender</javahClassName>
</javahClassNames>
</configuration>
<goals>
<goal>javah</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>initialize</phase>
<configuration>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<phase>initialize</phase>
<configuration>

<tasks>
<mkdir dir="./target/objs"/>
</tasks>

<tasks>
<mkdir dir="./target/objs"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>

</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>copy</id>
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<copy todir="../../java/src/main/resources" flatten="true">
<fileset dir="./target">
<include name="*.dll"/>
</fileset>
</copy>
</tasks>
</configuration>
</execution>
</executions>
</plugin>


</executions>
</plugin>

</plugins>
</build>
</project>
Expand Down
10 changes: 2 additions & 8 deletions plugin-jogamp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@
<modules>
<module>java</module>
<module>native</module>
</modules>

<build>
<plugins>
</plugins>

</build>

<module>distribution</module>
</modules>

</project>
47 changes: 35 additions & 12 deletions plugin-opencv/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<packaging>pom</packaging>

<name>Distribution</name>
<name>OpenCV Filters - Distribution</name>

<!-- NOTE: These dependency declarations are only required to sort this project to the
end of the line in the multimodule build.
Expand All @@ -38,24 +38,47 @@

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>distro-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
<tasks>
<unzip src="${project.basedir}/../java/target/plugin-opencv-${project.version}.jar" dest="${project.build.directory}/assembly"/>
<copy file="${project.basedir}/../native/win64/target/plugin-opencv-64.dll" tofile="${project.build.directory}/assembly/plugin-opencv-64.dll"/>
<jar destfile="${project.build.directory}/plugin-opencv-${project.version}.jar" basedir="${project.build.directory}/assembly" manifest="${project.build.directory}/assembly/META-INF/MANIFEST.MF"/>
<copy file="${project.basedir}/../java/target/plugin-opencv-${project.version}-sources.jar" tofile="${project.build.directory}/plugin-opencv-${project.version}-sources.jar"/>
<copy file="${project.basedir}/../java/target/plugin-opencv-${project.version}-javadoc.jar" tofile="${project.build.directory}/plugin-opencv-${project.version}-javadoc.jar"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<configuration>
<skip>false</skip>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>

</plugins>
</build>
</project>
26 changes: 0 additions & 26 deletions plugin-opencv/distribution/src/assembly/bin.xml

This file was deleted.

0 comments on commit a08858c

Please sign in to comment.