Update platform defaults

This commit is contained in:
Reinhard Pointner 2018-07-01 23:36:32 +07:00
parent 6cc6a9b320
commit 582cfd1acd
8 changed files with 25 additions and 31 deletions

View File

@ -12,6 +12,7 @@ update.url: https://app.filebot.net/update.xml
# Store
link.mas: macappstore://itunes.apple.com/app/id905384638
link.mws: ms-windows-store://review/?ProductId=9NBLGGH52T9X
link.usc: snap://filebot
# Links
link.app.help: https://www.filebot.net/getting-started/embed.html

View File

@ -344,7 +344,7 @@
</target>
<target name="mas" depends="revision">
<target name="mas" depends="revision" description="Build MAS package">
<property name="dir.staging" location="${dir.dist}/mas" />
<property name="path.app" location="${dir.staging}/${application.name}.app" />
@ -430,7 +430,7 @@
</target>
<target name="app" depends="revision" description="Build Mac app bundle">
<target name="app" depends="revision" description="Build macOS app bundle">
<property name="dir.staging" location="${dir.dist}/app" />
<copy-replace todir="${dir.staging}">
@ -457,7 +457,7 @@
</target>
<target name="pkg" depends="revision" description="Build Mac installer package">
<target name="pkg" depends="revision" description="Build macOS installer package">
<property name="dir.staging" location="${dir.dist}/pkg" />
<copy-replace todir="${dir.staging}">
@ -504,7 +504,7 @@
</target>
<target name="snap" depends="revision" description="Build Ubuntu snap package">
<target name="snap" depends="revision" description="Build Ubuntu SNAP package">
<property name="dir.staging" location="${dir.dist}/snap" />
<property name="dir.base" location="${dir.staging}/base" />
@ -531,11 +531,11 @@
</target>
<target name="portable" depends="revision" description="Build portable package">
<property name="dir.staging" location="${dir.dist}/portable" />
<target name="tar" depends="revision" description="Build Linux Portable TAR package">
<property name="dir.staging" location="${dir.dist}/tar" />
<copy-replace todir="${dir.staging}">
<fileset dir="${dir.installer}/portable" includes="*.sh" />
<fileset dir="${dir.installer}/tar" includes="*.sh" />
</copy-replace>
<tar destfile="${dir.dist}/${release}-portable.tar.xz" compression="${tar.compression}" longfile="posix" encoding="utf-8">
@ -693,7 +693,6 @@
<target name="deploy-release" description="Upload release files">
<!-- create release folder and upload release files -->
<release-deploy dir="${dir.release.index}" todir="${scp.release}" />
</target>

View File

@ -42,4 +42,4 @@ APP_DATA="$FILEBOT_HOME/data"
LIBRARY_PATH="$PACKAGE_LIBRARY_PATH:$LD_LIBRARY_PATH"
# start filebot
java -Dapplication.deployment=portable -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.Archive.extractor="$EXTRACTOR" @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"
java -Dapplication.deployment=tar -Dnet.filebot.media.parser="$MEDIA_PARSER" -Dnet.filebot.Archive.extractor="$EXTRACTOR" @{java.application.options} @{linux.application.options} @{linux.portable.application.options} $JAVA_OPTS $FILEBOT_OPTS -jar "$FILEBOT_HOME/jar/filebot.jar" "$@"

View File

@ -8,7 +8,7 @@
@{windows.portable.application.options}
# Deployment Options
-Dapplication.deployment=portable
-Dapplication.deployment=zip
# Use Java API move/copy operations
-DuseNativeShell=false

View File

@ -8,7 +8,7 @@
@{windows.portable.application.options}
# Deployment Options
-Dapplication.deployment=portable
-Dapplication.deployment=zip
# Use Java API move/copy operations
-DuseNativeShell=false

View File

@ -208,12 +208,8 @@ public class Main {
}
private static void startUserInterface(ArgumentBean args) {
// use native LaF an all platforms (use platform-independent laf for standalone jar deployment)
if (isPortableApp()) {
setNimbusLookAndFeel();
} else {
setSystemLookAndFeel();
}
// use native LaF an all platforms
setSystemLookAndFeel();
// start multi panel or single panel frame
PanelBuilder[] panels = args.getPanelBuilders();
@ -243,7 +239,7 @@ public class Main {
// configure main window
if (isMacApp()) {
// Mac specific configuration
// macOS-specific configuration
MacAppUtilities.initializeApplication(FileBotMenuBar.createHelp(), files -> {
if (LICENSE.isFile() && files.size() == 1 && containsOnly(files, LICENSE_FILES)) {
configureLicense(files.get(0));
@ -252,15 +248,12 @@ public class Main {
SwingEventBus.getInstance().post(new FileTransferable(files));
}
});
} else if (isUbuntuApp()) {
// Ubuntu/Debian specific configuration
frame.setIconImages(ResourceManager.getApplicationIconImages());
} else if (isWindowsApp()) {
// Windows specific configuration
// Windows-specific configuration
WinAppUtilities.initializeApplication();
frame.setIconImages(ResourceManager.getApplicationIconImages());
} else {
// generic Linux/FreeBSD/Solaris configuration
// generic Linux / FreeBSD / Solaris configuration
frame.setIconImages(ResourceManager.getApplicationIconImages());
}

View File

@ -80,20 +80,20 @@ public final class Settings {
return System.getProperty("application.deployment", "jar");
}
public static boolean isPortableApp() {
return isApplicationDeployment("portable", "jar");
}
public static boolean isAppStore() {
return isApplicationDeployment("appx", "mas");
}
public static boolean isWindowsApp() {
return isApplicationDeployment("appx", "msi");
return isApplicationDeployment("appx", "msi", "zip");
}
public static boolean isUbuntuApp() {
return isApplicationDeployment("deb", "snap");
return isApplicationDeployment("snap");
}
public static boolean isLinuxApp() {
return isApplicationDeployment("snap", "deb", "tar");
}
public static boolean isMacApp() {
@ -109,7 +109,7 @@ public final class Settings {
}
public static boolean isAutoUpdateEnabled() {
return isApplicationDeployment("mas", "appx", "snap", "spk", "aur");
return isApplicationDeployment("appx", "mas", "snap", "spk");
}
private static boolean isApplicationDeployment(String... ids) {
@ -172,7 +172,7 @@ public final class Settings {
if (isWindowsApp())
return getApplicationProperty("link.mws");
if (isUbuntuApp())
return null;
return getApplicationProperty("link.usc");
return null;
}

View File

@ -9,6 +9,7 @@ github.master: @{github.master}
link.mas: @{link.mas}
link.mws: @{link.mws}
link.usc: @{link.usc}
link.app.help: @{link.app.help}
link.app.purchase: @{link.app.purchase}