1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-09 04:48:38 -05:00

Build self-contained APP bundle (non-MAS)

This commit is contained in:
Reinhard Pointner 2018-06-12 04:09:42 +07:00
parent 155c5cd5f9
commit 3f960d685e
2 changed files with 13 additions and 10 deletions

View File

@ -124,10 +124,12 @@ public class License implements Serializable {
return String.format("%s License %s (Valid-Until: %s)", product, id, expires == null ? null : expires.atZone(ZoneOffset.UTC).format(DateTimeFormatter.ISO_LOCAL_DATE));
}
public static final SystemProperty<File> FILE = SystemProperty.of("net.filebot.license", File::new, ApplicationFolder.AppData.resolve(".license"));
public static final SystemProperty<File> FILE = SystemProperty.of("net.filebot.license", File::new, ApplicationFolder.AppData.resolve("license.txt"));
public static final MemoizedResource<License> INSTANCE = Resource.lazy(() -> new License(FILE.get()));
public static License configure(File file) throws Exception {
// lock memoized resource while validating and setting a new license
synchronized (INSTANCE) {
// check if license file is valid and not expired
License license = new License(file);
license.check();
@ -140,5 +142,6 @@ public class License implements Serializable {
return license;
}
}
}

View File

@ -188,7 +188,7 @@ public class Main {
try {
LICENSE.check();
} catch (Throwable e) {
log.warning(e::getMessage);
debug.finest(e::toString);
}
}