forked from j62/ctbrec
Add splash screen to linux and mac
This commit is contained in:
parent
6d17b0413c
commit
9ee9bed8bf
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
mvn clean
|
||||
mvn -Djavafx.platform=win package verify
|
||||
mvn -Djavafx.platform=linux package verify
|
||||
mvn -Djavafx.platform=mac package verify
|
||||
mvn -Djavafx.platform=win verify
|
||||
mvn -Djavafx.platform=linux verify
|
||||
mvn -Djavafx.platform=mac verify
|
||||
|
|
103
client/pom.xml
103
client/pom.xml
|
@ -16,7 +16,7 @@
|
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>15</maven.compiler.source>
|
||||
<maven.compiler.target>15</maven.compiler.target>
|
||||
<name.final>${project.groupId}-${project.version}-final</name.final>
|
||||
<name.final>${project.groupId}-${project.version}</name.final>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
@ -42,23 +42,17 @@
|
|||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>assembly</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>${name.final}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
@ -127,7 +121,8 @@
|
|||
<errTitle>ctbrec</errTitle>
|
||||
<classPath>
|
||||
<mainClass>ctbrec.ui.Launcher</mainClass>
|
||||
<addDependencies>false</addDependencies>
|
||||
<addDependencies>true</addDependencies>
|
||||
<jarLocation>lib/</jarLocation>
|
||||
<preCp>.</preCp>
|
||||
</classPath>
|
||||
<downloadUrl>https://jdk.java.net/</downloadUrl>
|
||||
|
@ -225,62 +220,22 @@
|
|||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<!--
|
||||
<!-- <plugin> <groupId>de.perdian.maven.plugins</groupId> <artifactId>macosappbundler-maven-plugin</artifactId>
|
||||
<version>1.10.1</version> <configuration> <plist> <CFBundleIconFile>src/main/resources/icon.icns</CFBundleIconFile>
|
||||
<CFBundleDisplayName>CTB Recorder</CFBundleDisplayName> <CFBundleDevelopmentRegion>English</CFBundleDevelopmentRegion>
|
||||
<CFBundleName>ctbrec</CFBundleName> <CFBundleURLTypes> <string>msa</string>
|
||||
</CFBundleURLTypes> <JVMMainClassName>ctbrec.ui.Launcher</JVMMainClassName>
|
||||
<JVMVersion>11+</JVMVersion> <JVMOptions> <string>-Dfile.encoding=utf-8</string>
|
||||
</JVMOptions> <JVMRuntimePath>Contents/Java/jdk/Contents/Home</JVMRuntimePath>
|
||||
</plist> <jdk> <include>true</include> <location>jre/jdk_macos</location>
|
||||
</jdk> </configuration> <executions> <execution> <phase>package</phase> <goals>
|
||||
<goal>bundle</goal> </goals> </execution> </executions> </plugin> <plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId> <version>3.1.0</version> <executions>
|
||||
<execution> <id>zip</id> <phase>verify</phase> <goals> <goal>single</goal>
|
||||
</goals> <configuration> <finalName>ctbrec-${project.version}</finalName>
|
||||
<descriptors> <descriptor>src/assembly/macos-bundle.xml</descriptor> </descriptors>
|
||||
</configuration> </execution> </executions> </plugin> -->
|
||||
<plugin>
|
||||
<groupId>de.perdian.maven.plugins</groupId>
|
||||
<artifactId>macosappbundler-maven-plugin</artifactId>
|
||||
<version>1.10.1</version>
|
||||
<configuration>
|
||||
<plist>
|
||||
<CFBundleIconFile>src/main/resources/icon.icns</CFBundleIconFile>
|
||||
<CFBundleDisplayName>CTB Recorder</CFBundleDisplayName>
|
||||
<CFBundleDevelopmentRegion>English</CFBundleDevelopmentRegion>
|
||||
<CFBundleName>ctbrec</CFBundleName>
|
||||
<CFBundleURLTypes>
|
||||
<string>msa</string>
|
||||
</CFBundleURLTypes>
|
||||
<JVMMainClassName>ctbrec.ui.Launcher</JVMMainClassName>
|
||||
<JVMVersion>11+</JVMVersion>
|
||||
<JVMOptions>
|
||||
<string>-Dfile.encoding=utf-8</string>
|
||||
</JVMOptions>
|
||||
<JVMRuntimePath>Contents/Java/jdk/Contents/Home</JVMRuntimePath>
|
||||
</plist>
|
||||
<jdk>
|
||||
<include>true</include>
|
||||
<location>jre/jdk_macos</location>
|
||||
</jdk>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>bundle</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>zip</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<finalName>ctbrec-${project.version}</finalName>
|
||||
<descriptors>
|
||||
<descriptor>src/assembly/macos-bundle.xml</descriptor>
|
||||
</descriptors>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
-->
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
|
|
|
@ -4,5 +4,5 @@ DIR="$(dirname "$0")"
|
|||
pushd "${DIR}"
|
||||
JAVA=./jre/bin/java
|
||||
$JAVA -version
|
||||
$JAVA -Xmx512m -Djdk.gtk.version=3 -cp "${DIR}:${name.final}.jar" -Dfile.encoding=utf-8 ctbrec.ui.Launcher
|
||||
$JAVA -Xmx512m -Djdk.gtk.version=3 -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||
popd
|
||||
|
|
|
@ -5,5 +5,5 @@ pushd "$DIR"
|
|||
JAVA_HOME="$DIR/jre/Contents/Home"
|
||||
JAVA="$JAVA_HOME/bin/java"
|
||||
$JAVA -version
|
||||
$JAVA -Xmx512m -cp "${DIR}:${name.final}.jar" -Dfile.encoding=utf-8 ctbrec.ui.Launcher
|
||||
$JAVA -Xmx512m -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||
popd
|
|
@ -1 +1 @@
|
|||
jre\bin\java -Xmx512m -cp ".;${name.final}.jar" -Dfile.encoding=utf-8 ctbrec.ui.Launcher
|
||||
jre\bin\java -Xmx512m -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
|
@ -5,6 +5,14 @@
|
|||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<unpack>false</unpack>
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.basedir}/src/assembly/ctbrec-linux-jre.sh</source>
|
||||
|
@ -13,8 +21,9 @@
|
|||
<destName>ctbrec.sh</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${name.final}.jar</source>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
<destName>${name.final}.jar</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/LICENSE.txt</source>
|
||||
|
@ -24,10 +33,6 @@
|
|||
<source>${project.basedir}/README.md</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/src/main/resources/logback.xml</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/ffmpeg/ffmpeg-linux64</source>
|
||||
<outputDirectory>ctbrec/ffmpeg</outputDirectory>
|
||||
|
|
|
@ -5,6 +5,14 @@
|
|||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<unpack>false</unpack>
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.basedir}/src/assembly/ctbrec-macos-jre.sh</source>
|
||||
|
@ -13,8 +21,10 @@
|
|||
<destName>ctbrec.sh</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${name.final}.jar</source>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar
|
||||
</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
<destName>${name.final}.jar</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/LICENSE.txt</source>
|
||||
|
@ -24,10 +34,6 @@
|
|||
<source>${project.basedir}/README.md</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/src/main/resources/logback.xml</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/ffmpeg/ffmpeg-macos64</source>
|
||||
<outputDirectory>ctbrec/ffmpeg</outputDirectory>
|
||||
|
|
|
@ -5,14 +5,23 @@
|
|||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
<dependencySets>
|
||||
<dependencySet>
|
||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||
<useProjectArtifact>false</useProjectArtifact>
|
||||
<unpack>false</unpack>
|
||||
<scope>runtime</scope>
|
||||
</dependencySet>
|
||||
</dependencySets>
|
||||
<files>
|
||||
<file>
|
||||
<source>${project.build.directory}/ctbrec.exe</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.build.directory}/${name.final}.jar</source>
|
||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
<destName>${name.final}.jar</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/LICENSE.txt</source>
|
||||
|
@ -22,10 +31,6 @@
|
|||
<source>${project.basedir}/README.md</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/src/main/resources/logback.xml</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
</file>
|
||||
<file>
|
||||
<source>${project.basedir}/src/assembly/ctbrec.bat</source>
|
||||
<outputDirectory>ctbrec</outputDirectory>
|
||||
|
|
|
@ -2,6 +2,7 @@ package ctbrec.ui;
|
|||
|
||||
import static ctbrec.event.Event.Type.*;
|
||||
|
||||
import java.awt.SplashScreen;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -16,6 +17,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
@ -293,6 +295,8 @@ public class CamrecApplication extends Application {
|
|||
|
||||
statusBar.getChildren().add(statusLabel);
|
||||
HBox.setMargin(statusLabel, new Insets(10, 10, 10, 10));
|
||||
|
||||
Optional.ofNullable(SplashScreen.getSplashScreen()).ifPresent(SplashScreen::close);
|
||||
}
|
||||
|
||||
private void setWindowMinimizeListener(Stage primaryStage) {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Manifest-Version: 1.0
|
||||
Main-Class: ctbrec.ui.Launcher
|
||||
SplashScreen-Image: splash.png
|
||||
Built-By: 0xb00bface
|
|
@ -23,6 +23,10 @@
|
|||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
|
|
Loading…
Reference in New Issue