Skip to content

Commit

Permalink
build for Linux amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
grillbaer committed Jun 3, 2021
1 parent 39fa625 commit 841217a
Show file tree
Hide file tree
Showing 8 changed files with 193 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
os: [windows-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions opencv-linux-amd64/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?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>
<artifactId>spectracle-parent</artifactId>
<groupId>io.github.grillbaer</groupId>
<version>0.1-SNAPSHOT</version>
</parent>

<artifactId>opencv-linux-x64</artifactId>

<!-- The goal of this module is to create a size-reduced version of the
opencv jar with all shared libraries for other OS platforms removed.
Filtering is done by the shade plugin. -->
<profiles>
<profile>
<id>linux</id>
<activation>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
</activation>
<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>org.openpnp:opencv</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>nu/pattern/opencv/linux/x86_32/**</exclude>
<exclude>nu/pattern/opencv/linux/ARM*/**</exclude>
<exclude>nu/pattern/opencv/osx/**</exclude>
<exclude>nu/pattern/opencv/windows/**</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.5.1-2</version>
</dependency>
</dependencies>

</project>
60 changes: 0 additions & 60 deletions opencv-linux-x64/pom.xml

This file was deleted.

70 changes: 70 additions & 0 deletions opencv-windows-amd64/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?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>
<artifactId>spectracle-parent</artifactId>
<groupId>io.github.grillbaer</groupId>
<version>0.1-SNAPSHOT</version>
</parent>

<artifactId>opencv-windows-x64</artifactId>

<!-- The goal of this module is to create a size-reduced version of the
opencv jar with all shared libraries for other OS platforms removed.
Filtering is done by the shade plugin. -->
<profiles>
<profile>
<id>windows</id>
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>org.openpnp:opencv</artifact>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>nu/pattern/opencv/linux/**</exclude>
<exclude>nu/pattern/opencv/osx/**</exclude>
<exclude>nu/pattern/opencv/windows/x86_32</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<dependencies>
<dependency>
<groupId>org.openpnp</groupId>
<artifactId>opencv</artifactId>
<version>4.5.1-2</version>
</dependency>
</dependencies>

</project>
59 changes: 0 additions & 59 deletions opencv-windows-x64/pom.xml

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<version>0.1-SNAPSHOT</version>

<modules>
<module>opencv-windows-x64</module>
<module>opencv-linux-x64</module>
<module>opencv-windows-amd64</module>
<module>opencv-linux-amd64</module>
<module>spectracle-app</module>
</modules>

Expand Down
46 changes: 46 additions & 0 deletions spectracle-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
<activation>
<os>
<family>windows</family>
<arch>amd64</arch>
</os>
</activation>
<build>
Expand Down Expand Up @@ -131,6 +132,51 @@
</dependency>
</dependencies>
</profile>

<profile>
<id>linux</id>
<activation>
<os>
<family>linux</family>
<arch>amd64</arch>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jpackage</goal>
</goals>
<configuration>
<!-- TODO: <icon>icons/icons.???</icon> -->
<type>DEB</type>
<linuxAppCategory>Science</linuxAppCategory>
<linuxMenuGroup>Science</linuxMenuGroup>
<!--TODO: /opt is default <installDir></installDir>-->
<!--TODO: <linuxDebMaintainer></linuxDebMaintainer>-->
<linuxShortcut>true</linuxShortcut>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>opencv-linux-x64</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</profile>

</profiles>

<dependencies>
Expand Down

0 comments on commit 841217a

Please sign in to comment.