Add option to start ctbrec minimized
- add option to start ctbrec minimized - add launcher files to start without splash screen
This commit is contained in:
parent
9df466f0ea
commit
8dc389c73c
|
@ -102,6 +102,40 @@
|
||||||
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
<groupId>com.akathist.maven.plugins.launch4j</groupId>
|
||||||
<artifactId>launch4j-maven-plugin</artifactId>
|
<artifactId>launch4j-maven-plugin</artifactId>
|
||||||
<version>2.1.1</version>
|
<version>2.1.1</version>
|
||||||
|
<configuration>
|
||||||
|
<headerType>gui</headerType>
|
||||||
|
<jar>${name.final}.jar</jar>
|
||||||
|
<dontWrapJar>true</dontWrapJar>
|
||||||
|
<icon>src/main/resources/icon.ico</icon>
|
||||||
|
<errTitle>ctbrec</errTitle>
|
||||||
|
<classPath>
|
||||||
|
<mainClass>ctbrec.ui.Launcher</mainClass>
|
||||||
|
<addDependencies>true</addDependencies>
|
||||||
|
<jarLocation>lib/</jarLocation>
|
||||||
|
<preCp>.</preCp>
|
||||||
|
</classPath>
|
||||||
|
<downloadUrl>https://jdk.java.net/</downloadUrl>
|
||||||
|
<jre>
|
||||||
|
<path>jre</path>
|
||||||
|
<bundledJre64Bit>true</bundledJre64Bit>
|
||||||
|
<minVersion>15</minVersion>
|
||||||
|
<maxHeapSize>1024</maxHeapSize>
|
||||||
|
<opts>
|
||||||
|
<opt>-Dfile.encoding=utf-8</opt>
|
||||||
|
</opts>
|
||||||
|
</jre>
|
||||||
|
<versionInfo>
|
||||||
|
<fileVersion>4.0.0.0</fileVersion>
|
||||||
|
<txtFileVersion>4.0.0.0</txtFileVersion>
|
||||||
|
<fileDescription>Software to record live streams</fileDescription>
|
||||||
|
<copyright>2021 0xb00bface</copyright>
|
||||||
|
<productVersion>4.0.0.0</productVersion>
|
||||||
|
<txtProductVersion>4.0.0.0</txtProductVersion>
|
||||||
|
<productName>CTB Recorder</productName>
|
||||||
|
<internalName>ctbrec</internalName>
|
||||||
|
<originalFilename>ctbrec.exe</originalFilename>
|
||||||
|
</versionInfo>
|
||||||
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>l4j-win</id>
|
<id>l4j-win</id>
|
||||||
|
@ -110,39 +144,7 @@
|
||||||
<goal>launch4j</goal>
|
<goal>launch4j</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<headerType>gui</headerType>
|
|
||||||
<outfile>target/ctbrec.exe</outfile>
|
<outfile>target/ctbrec.exe</outfile>
|
||||||
<jar>${name.final}.jar</jar>
|
|
||||||
<dontWrapJar>true</dontWrapJar>
|
|
||||||
<icon>src/main/resources/icon.ico</icon>
|
|
||||||
<errTitle>ctbrec</errTitle>
|
|
||||||
<classPath>
|
|
||||||
<mainClass>ctbrec.ui.Launcher</mainClass>
|
|
||||||
<addDependencies>true</addDependencies>
|
|
||||||
<jarLocation>lib/</jarLocation>
|
|
||||||
<preCp>.</preCp>
|
|
||||||
</classPath>
|
|
||||||
<downloadUrl>https://jdk.java.net/</downloadUrl>
|
|
||||||
<jre>
|
|
||||||
<path>jre</path>
|
|
||||||
<bundledJre64Bit>true</bundledJre64Bit>
|
|
||||||
<minVersion>15</minVersion>
|
|
||||||
<maxHeapSize>1024</maxHeapSize>
|
|
||||||
<opts>
|
|
||||||
<opt>-Dfile.encoding=utf-8</opt>
|
|
||||||
</opts>
|
|
||||||
</jre>
|
|
||||||
<versionInfo>
|
|
||||||
<fileVersion>4.0.0.0</fileVersion>
|
|
||||||
<txtFileVersion>4.0.0.0</txtFileVersion>
|
|
||||||
<fileDescription>Software to record live streams</fileDescription>
|
|
||||||
<copyright>2021 0xb00bface</copyright>
|
|
||||||
<productVersion>4.0.0.0</productVersion>
|
|
||||||
<txtProductVersion>4.0.0.0</txtProductVersion>
|
|
||||||
<productName>CTB Recorder</productName>
|
|
||||||
<internalName>ctbrec</internalName>
|
|
||||||
<originalFilename>ctbrec.exe</originalFilename>
|
|
||||||
</versionInfo>
|
|
||||||
<splash>
|
<splash>
|
||||||
<file>src/main/resources/splash.bmp</file>
|
<file>src/main/resources/splash.bmp</file>
|
||||||
<waitForWindow>true</waitForWindow>
|
<waitForWindow>true</waitForWindow>
|
||||||
|
@ -151,6 +153,16 @@
|
||||||
</splash>
|
</splash>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>l4j-win-no-splash</id>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>launch4j</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outfile>target/ctbrec-no-splash.exe</outfile>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$(dirname "$0")"
|
||||||
|
pushd "${DIR}"
|
||||||
|
JAVA=./jre/bin/java
|
||||||
|
$JAVA -version
|
||||||
|
$JAVA -Xmx1g -Djdk.gtk.version=3 -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||||
|
popd
|
|
@ -4,5 +4,5 @@ DIR="$(dirname "$0")"
|
||||||
pushd "${DIR}"
|
pushd "${DIR}"
|
||||||
JAVA=./jre/bin/java
|
JAVA=./jre/bin/java
|
||||||
$JAVA -version
|
$JAVA -version
|
||||||
$JAVA -Xmx1g -Djdk.gtk.version=3 -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
$JAVA -splash:splash.png -Xmx1g -Djdk.gtk.version=3 -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR=$(dirname $0)
|
||||||
|
pushd "$DIR"
|
||||||
|
JAVA_HOME="$DIR/jre/Contents/Home"
|
||||||
|
JAVA="$JAVA_HOME/bin/java"
|
||||||
|
$JAVA -version
|
||||||
|
$JAVA -Xmx1g -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||||
|
popd
|
|
@ -5,5 +5,5 @@ pushd "$DIR"
|
||||||
JAVA_HOME="$DIR/jre/Contents/Home"
|
JAVA_HOME="$DIR/jre/Contents/Home"
|
||||||
JAVA="$JAVA_HOME/bin/java"
|
JAVA="$JAVA_HOME/bin/java"
|
||||||
$JAVA -version
|
$JAVA -version
|
||||||
$JAVA -Xmx1g -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
$JAVA -splash:splash.png -Xmx1g -Dfile.encoding=utf-8 -jar ${name.final}.jar
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -1,60 +1,70 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>linux-jre</id>
|
<id>linux-jre</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||||
<useProjectArtifact>false</useProjectArtifact>
|
<useProjectArtifact>false</useProjectArtifact>
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.basedir}/src/assembly/ctbrec-linux-jre.sh</source>
|
<source>${project.basedir}/src/assembly/ctbrec-linux-jre.sh</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
<destName>ctbrec.sh</destName>
|
<destName>ctbrec.sh</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
<source>${project.basedir}/src/assembly/ctbrec-linux-jre-no-splash.sh</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<destName>${name.final}.jar</destName>
|
<filtered>true</filtered>
|
||||||
</file>
|
<destName>ctbrec-no-splash.sh</destName>
|
||||||
<file>
|
</file>
|
||||||
<source>${project.basedir}/LICENSE.txt</source>
|
<file>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
||||||
</file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<file>
|
<destName>${name.final}.jar</destName>
|
||||||
<source>${project.basedir}/README.md</source>
|
</file>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<file>
|
||||||
</file>
|
<source>${project.basedir}/LICENSE.txt</source>
|
||||||
<file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<source>${project.basedir}/ffmpeg/ffmpeg-linux64</source>
|
</file>
|
||||||
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
<file>
|
||||||
<destName>ffmpeg</destName>
|
<source>${project.basedir}/README.md</source>
|
||||||
</file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
</files>
|
</file>
|
||||||
<fileSets>
|
<file>
|
||||||
<fileSet>
|
<source>${project.basedir}/src/main/resources/splash.png</source>
|
||||||
<directory>jre/jdk_linux</directory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<includes>
|
</file>
|
||||||
<include>**/*</include>
|
<file>
|
||||||
</includes>
|
<source>${project.basedir}/ffmpeg/ffmpeg-linux64</source>
|
||||||
<outputDirectory>ctbrec/jre</outputDirectory>
|
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
||||||
<filtered>false</filtered>
|
<destName>ffmpeg</destName>
|
||||||
</fileSet>
|
</file>
|
||||||
<fileSet>
|
</files>
|
||||||
<directory>browser/ctbrec-minimal-browser-linux-x64</directory>
|
<fileSets>
|
||||||
<includes>
|
<fileSet>
|
||||||
<include>**/*</include>
|
<directory>jre/jdk_linux</directory>
|
||||||
</includes>
|
<includes>
|
||||||
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
<include>**/*</include>
|
||||||
<filtered>false</filtered>
|
</includes>
|
||||||
</fileSet>
|
<outputDirectory>ctbrec/jre</outputDirectory>
|
||||||
</fileSets>
|
<filtered>false</filtered>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>browser/ctbrec-minimal-browser-linux-x64</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
||||||
|
<filtered>false</filtered>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -1,61 +1,71 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>macos-jre</id>
|
<id>macos-jre</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||||
<useProjectArtifact>false</useProjectArtifact>
|
<useProjectArtifact>false</useProjectArtifact>
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.basedir}/src/assembly/ctbrec-macos-jre.sh</source>
|
<source>${project.basedir}/src/assembly/ctbrec-macos-jre.sh</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<filtered>true</filtered>
|
<filtered>true</filtered>
|
||||||
<destName>ctbrec.sh</destName>
|
<destName>ctbrec.sh</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar
|
<source>${project.basedir}/src/assembly/ctbrec-macos-jre-no-splash.sh</source>
|
||||||
</source>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<filtered>true</filtered>
|
||||||
<destName>${name.final}.jar</destName>
|
<destName>ctbrec-no-splash.sh</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.basedir}/LICENSE.txt</source>
|
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
</source>
|
||||||
</file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<file>
|
<destName>${name.final}.jar</destName>
|
||||||
<source>${project.basedir}/README.md</source>
|
</file>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<file>
|
||||||
</file>
|
<source>${project.basedir}/LICENSE.txt</source>
|
||||||
<file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<source>${project.basedir}/ffmpeg/ffmpeg-macos64</source>
|
</file>
|
||||||
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
<file>
|
||||||
<destName>ffmpeg</destName>
|
<source>${project.basedir}/README.md</source>
|
||||||
</file>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
</files>
|
</file>
|
||||||
<fileSets>
|
<file>
|
||||||
<fileSet>
|
<source>${project.basedir}/src/main/resources/splash.png</source>
|
||||||
<directory>jre/jdk_macos</directory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<includes>
|
</file>
|
||||||
<include>**/*</include>
|
<file>
|
||||||
</includes>
|
<source>${project.basedir}/ffmpeg/ffmpeg-macos64</source>
|
||||||
<outputDirectory>ctbrec/jre</outputDirectory>
|
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
||||||
<filtered>false</filtered>
|
<destName>ffmpeg</destName>
|
||||||
</fileSet>
|
</file>
|
||||||
<fileSet>
|
</files>
|
||||||
<directory>browser/ctbrec-minimal-browser-darwin-x64</directory>
|
<fileSets>
|
||||||
<includes>
|
<fileSet>
|
||||||
<include>**/*</include>
|
<directory>jre/jdk_macos</directory>
|
||||||
</includes>
|
<includes>
|
||||||
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
<include>**/*</include>
|
||||||
<filtered>false</filtered>
|
</includes>
|
||||||
</fileSet>
|
<outputDirectory>ctbrec/jre</outputDirectory>
|
||||||
</fileSets>
|
<filtered>false</filtered>
|
||||||
|
</fileSet>
|
||||||
|
<fileSet>
|
||||||
|
<directory>browser/ctbrec-minimal-browser-darwin-x64</directory>
|
||||||
|
<includes>
|
||||||
|
<include>**/*</include>
|
||||||
|
</includes>
|
||||||
|
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
||||||
|
<filtered>false</filtered>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -1,63 +1,67 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<assembly>
|
<assembly>
|
||||||
<id>win64-jre</id>
|
<id>win64-jre</id>
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
</formats>
|
</formats>
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
<dependencySets>
|
<dependencySets>
|
||||||
<dependencySet>
|
<dependencySet>
|
||||||
<outputDirectory>ctbrec/lib</outputDirectory>
|
<outputDirectory>ctbrec/lib</outputDirectory>
|
||||||
<useProjectArtifact>false</useProjectArtifact>
|
<useProjectArtifact>false</useProjectArtifact>
|
||||||
<unpack>false</unpack>
|
<unpack>false</unpack>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependencySet>
|
</dependencySet>
|
||||||
</dependencySets>
|
</dependencySets>
|
||||||
<files>
|
<files>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/ctbrec.exe</source>
|
<source>${project.build.directory}/ctbrec.exe</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
<source>${project.build.directory}/ctbrec-no-splash.exe</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<destName>${name.final}.jar</destName>
|
</file>
|
||||||
</file>
|
<file>
|
||||||
<file>
|
<source>${project.build.directory}/${project.artifactId}-${project.version}.jar</source>
|
||||||
<source>${project.basedir}/LICENSE.txt</source>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<destName>${name.final}.jar</destName>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.basedir}/README.md</source>
|
<source>${project.basedir}/LICENSE.txt</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
</file>
|
</file>
|
||||||
<file>
|
<file>
|
||||||
<source>${project.basedir}/src/assembly/ctbrec.bat</source>
|
<source>${project.basedir}/README.md</source>
|
||||||
<outputDirectory>ctbrec</outputDirectory>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<filtered>true</filtered>
|
</file>
|
||||||
</file>
|
<file>
|
||||||
<file>
|
<source>${project.basedir}/src/assembly/ctbrec.bat</source>
|
||||||
<source>${project.basedir}/ffmpeg/ffmpeg-win64.exe</source>
|
<outputDirectory>ctbrec</outputDirectory>
|
||||||
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
<filtered>true</filtered>
|
||||||
<destName>ffmpeg.exe</destName>
|
</file>
|
||||||
</file>
|
<file>
|
||||||
</files>
|
<source>${project.basedir}/ffmpeg/ffmpeg-win64.exe</source>
|
||||||
<fileSets>
|
<outputDirectory>ctbrec/lib/ffmpeg</outputDirectory>
|
||||||
<fileSet>
|
<destName>ffmpeg.exe</destName>
|
||||||
<directory>jre/jdk_windows</directory>
|
</file>
|
||||||
<includes>
|
</files>
|
||||||
<include>**/*</include>
|
<fileSets>
|
||||||
</includes>
|
<fileSet>
|
||||||
<outputDirectory>ctbrec/jre</outputDirectory>
|
<directory>jre/jdk_windows</directory>
|
||||||
<filtered>false</filtered>
|
<includes>
|
||||||
</fileSet>
|
<include>**/*</include>
|
||||||
<fileSet>
|
</includes>
|
||||||
<directory>browser/ctbrec-minimal-browser-win32-x64</directory>
|
<outputDirectory>ctbrec/jre</outputDirectory>
|
||||||
<includes>
|
<filtered>false</filtered>
|
||||||
<include>**/*</include>
|
</fileSet>
|
||||||
</includes>
|
<fileSet>
|
||||||
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
<directory>browser/ctbrec-minimal-browser-win32-x64</directory>
|
||||||
<filtered>false</filtered>
|
<includes>
|
||||||
</fileSet>
|
<include>**/*</include>
|
||||||
</fileSets>
|
</includes>
|
||||||
|
<outputDirectory>ctbrec/lib/browser</outputDirectory>
|
||||||
|
<filtered>false</filtered>
|
||||||
|
</fileSet>
|
||||||
|
</fileSets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -275,7 +275,14 @@ public class CamrecApplication extends Application {
|
||||||
Config.getInstance().getSettings().windowY = newVal.intValue();
|
Config.getInstance().getSettings().windowY = newVal.intValue();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
primaryStage.show();
|
|
||||||
|
if (config.getSettings().startMinimized) {
|
||||||
|
LOG.info("Minimize to tray on start");
|
||||||
|
DesktopIntegration.minimizeToTray(primaryStage);
|
||||||
|
} else {
|
||||||
|
LOG.info("Showing primary stage");
|
||||||
|
primaryStage.show();
|
||||||
|
}
|
||||||
primaryStage.setOnCloseRequest(createShutdownHandler());
|
primaryStage.setOnCloseRequest(createShutdownHandler());
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> Platform.runLater(this::shutdown)));
|
Runtime.getRuntime().addShutdownHook(new Thread(() -> Platform.runLater(this::shutdown)));
|
||||||
setWindowMinimizeListener(primaryStage);
|
setWindowMinimizeListener(primaryStage);
|
||||||
|
|
|
@ -40,6 +40,7 @@ import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import static ctbrec.Settings.DirectoryStructure.*;
|
import static ctbrec.Settings.DirectoryStructure.*;
|
||||||
import static ctbrec.Settings.ProxyType.*;
|
import static ctbrec.Settings.ProxyType.*;
|
||||||
|
@ -115,6 +116,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
private Label restartNotification;
|
private Label restartNotification;
|
||||||
private SimpleIntegerProperty playlistRequestTimeout;
|
private SimpleIntegerProperty playlistRequestTimeout;
|
||||||
private SimpleBooleanProperty minimizeToTray;
|
private SimpleBooleanProperty minimizeToTray;
|
||||||
|
private SimpleBooleanProperty startMinimized;
|
||||||
private SimpleBooleanProperty showGridLinesInTables;
|
private SimpleBooleanProperty showGridLinesInTables;
|
||||||
private SimpleBooleanProperty tabsSortable;
|
private SimpleBooleanProperty tabsSortable;
|
||||||
private SimpleIntegerProperty defaultPriority;
|
private SimpleIntegerProperty defaultPriority;
|
||||||
|
@ -188,6 +190,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
recentlyWatched = new SimpleBooleanProperty(null, "recentlyWatched", settings.recentlyWatched);
|
recentlyWatched = new SimpleBooleanProperty(null, "recentlyWatched", settings.recentlyWatched);
|
||||||
playlistRequestTimeout = new SimpleIntegerProperty(null, "playlistRequestTimeout", settings.playlistRequestTimeout);
|
playlistRequestTimeout = new SimpleIntegerProperty(null, "playlistRequestTimeout", settings.playlistRequestTimeout);
|
||||||
minimizeToTray = new SimpleBooleanProperty(null, "minimizeToTray", settings.minimizeToTray);
|
minimizeToTray = new SimpleBooleanProperty(null, "minimizeToTray", settings.minimizeToTray);
|
||||||
|
startMinimized = new SimpleBooleanProperty(null, "startMinimized", settings.startMinimized);
|
||||||
showGridLinesInTables = new SimpleBooleanProperty(null, "showGridLinesInTables", settings.showGridLinesInTables);
|
showGridLinesInTables = new SimpleBooleanProperty(null, "showGridLinesInTables", settings.showGridLinesInTables);
|
||||||
defaultPriority = new SimpleIntegerProperty(null, "defaultPriority", settings.defaultPriority);
|
defaultPriority = new SimpleIntegerProperty(null, "defaultPriority", settings.defaultPriority);
|
||||||
timeoutRecordingStartingAt = new LocalTimeProperty(null, "timeoutRecordingStartingAt", settings.timeoutRecordingStartingAt);
|
timeoutRecordingStartingAt = new LocalTimeProperty(null, "timeoutRecordingStartingAt", settings.timeoutRecordingStartingAt);
|
||||||
|
@ -220,6 +223,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
Setting.of("Enable live previews (experimental)", livePreviews),
|
Setting.of("Enable live previews (experimental)", livePreviews),
|
||||||
Setting.of("Enable recently watched tab", recentlyWatched).needsRestart(),
|
Setting.of("Enable recently watched tab", recentlyWatched).needsRestart(),
|
||||||
Setting.of("Minimize to tray", minimizeToTray, "Removes the app from the task bar, if minimized"),
|
Setting.of("Minimize to tray", minimizeToTray, "Removes the app from the task bar, if minimized"),
|
||||||
|
Setting.of("Start minimized", startMinimized, "Start the app minimized to the tray, automatically activates \"Minimize to tray\""),
|
||||||
Setting.of("Add models from clipboard", monitorClipboard, "Monitor clipboard for model URLs and automatically add them to the recorder").needsRestart(),
|
Setting.of("Add models from clipboard", monitorClipboard, "Monitor clipboard for model URLs and automatically add them to the recorder").needsRestart(),
|
||||||
Setting.of("Show confirmation dialogs", confirmationDialogs, "Show confirmation dialogs for irreversible actions"),
|
Setting.of("Show confirmation dialogs", confirmationDialogs, "Show confirmation dialogs for irreversible actions"),
|
||||||
Setting.of("Recording tab per site", recordedModelsPerSite, "Add a Recording tab for each site").needsRestart(),
|
Setting.of("Recording tab per site", recordedModelsPerSite, "Add a Recording tab for each site").needsRestart(),
|
||||||
|
@ -250,7 +254,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
Setting.of("Split recordings bigger than", splitBiggerThan).converter(SplitBiggerThanOption.converter()).onChange(this::splitValuesChanged),
|
Setting.of("Split recordings bigger than", splitBiggerThan).converter(SplitBiggerThanOption.converter()).onChange(this::splitValuesChanged),
|
||||||
Setting.of("Restrict Resolution", resolutionRange, "Only record streams with resolution within the given range"),
|
Setting.of("Restrict Resolution", resolutionRange, "Only record streams with resolution within the given range"),
|
||||||
Setting.of("Concurrent Recordings (0 = unlimited)", concurrentRecordings),
|
Setting.of("Concurrent Recordings (0 = unlimited)", concurrentRecordings),
|
||||||
Setting.of("Default Priority", defaultPriority),
|
Setting.of("Default Priority", defaultPriority, "lowest 0 - 10000 highest"),
|
||||||
Setting.of("Default duration for \"Record until\" (minutes)", recordUntilDefaultDurationInMinutes),
|
Setting.of("Default duration for \"Record until\" (minutes)", recordUntilDefaultDurationInMinutes),
|
||||||
Setting.of("Leave space on device (GiB)", leaveSpaceOnDevice,
|
Setting.of("Leave space on device (GiB)", leaveSpaceOnDevice,
|
||||||
"Stop recording, if the free space on the device gets below this threshold").converter(new GigabytesConverter()),
|
"Stop recording, if the free space on the device gets below this threshold").converter(new GigabytesConverter()),
|
||||||
|
@ -340,6 +344,16 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
||||||
prefs.getSetting("downloadFilename").ifPresent(s -> bindEnabledProperty(s, recordLocal));
|
prefs.getSetting("downloadFilename").ifPresent(s -> bindEnabledProperty(s, recordLocal));
|
||||||
prefs.getSetting("hlsdlExecutable").ifPresent(s -> bindEnabledProperty(s, useHlsdl.not()));
|
prefs.getSetting("hlsdlExecutable").ifPresent(s -> bindEnabledProperty(s, useHlsdl.not()));
|
||||||
prefs.getSetting("loghlsdlOutput").ifPresent(s -> bindEnabledProperty(s, useHlsdl.not()));
|
prefs.getSetting("loghlsdlOutput").ifPresent(s -> bindEnabledProperty(s, useHlsdl.not()));
|
||||||
|
startMinimized.addListener((obs, oldV, newV) -> {
|
||||||
|
if (Objects.equals(newV, Boolean.TRUE)) {
|
||||||
|
minimizeToTray.set(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
minimizeToTray.addListener((obs, oldV, newV) -> {
|
||||||
|
if (Objects.equals(newV, Boolean.FALSE)) {
|
||||||
|
startMinimized.set(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
postProcessingStepPanel.disableProperty().bind(recordLocal.not());
|
postProcessingStepPanel.disableProperty().bind(recordLocal.not());
|
||||||
variablesHelpButton.disableProperty().bind(recordLocal);
|
variablesHelpButton.disableProperty().bind(recordLocal);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
Manifest-Version: 1.0
|
Manifest-Version: 1.0
|
||||||
Main-Class: ctbrec.ui.Launcher
|
Main-Class: ctbrec.ui.Launcher
|
||||||
SplashScreen-Image: splash.png
|
|
||||||
Built-By: 0xb00bface
|
Built-By: 0xb00bface
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class Config {
|
||||||
File src = currentConfigDir;
|
File src = currentConfigDir;
|
||||||
if (src.exists()) {
|
if (src.exists()) {
|
||||||
File target = new File(src.getParentFile(), src.getName() + "_backup_" + dateTimeFormatter.format(LocalDateTime.now()));
|
File target = new File(src.getParentFile(), src.getName() + "_backup_" + dateTimeFormatter.format(LocalDateTime.now()));
|
||||||
LOG.info("Creating a backup of the config in {}", target);
|
LOG.info("Creating a backup of {} the config in {}", src, target);
|
||||||
FileUtils.copyDirectory(src, target, pathname -> !(pathname.toString().contains("minimal-browser") && pathname.toString().contains("Cache")), true);
|
FileUtils.copyDirectory(src, target, pathname -> !(pathname.toString().contains("minimal-browser") && pathname.toString().contains("Cache")), true);
|
||||||
deleteOldBackups(currentConfigDir);
|
deleteOldBackups(currentConfigDir);
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,7 @@ public class Settings {
|
||||||
public int splitRecordingsAfterSecs = 0;
|
public int splitRecordingsAfterSecs = 0;
|
||||||
public long splitRecordingsBiggerThanBytes = 0;
|
public long splitRecordingsBiggerThanBytes = 0;
|
||||||
public String startTab = "Settings";
|
public String startTab = "Settings";
|
||||||
|
public boolean startMinimized = false;
|
||||||
public String streamatePassword = "";
|
public String streamatePassword = "";
|
||||||
public String streamateUsername = "";
|
public String streamateUsername = "";
|
||||||
public String stripchatUsername = "";
|
public String stripchatUsername = "";
|
||||||
|
|
Loading…
Reference in New Issue