mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-10 13:28:02 -05:00
Experiment with PGP signed messages
This commit is contained in:
parent
cefd6dc6bb
commit
92495f0256
@ -10,11 +10,6 @@ public enum LicenseModel {
|
||||
|
||||
private final Resource<Boolean> CHECK = Resource.lazy(() -> !getAppUserModelID().equals("PointPlanck.FileBot"));
|
||||
|
||||
@Override
|
||||
public boolean isAppStore() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void check() throws LicenseError {
|
||||
try {
|
||||
@ -31,11 +26,6 @@ public enum LicenseModel {
|
||||
|
||||
private final Resource<Boolean> CHECK = Resource.lazy(() -> !File.listRoots()[0].canRead());
|
||||
|
||||
@Override
|
||||
public boolean isAppStore() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void check() throws LicenseError {
|
||||
try {
|
||||
@ -50,11 +40,6 @@ public enum LicenseModel {
|
||||
|
||||
PGPSignedMessage {
|
||||
|
||||
@Override
|
||||
public boolean isAppStore() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void check() throws LicenseError {
|
||||
try {
|
||||
@ -65,7 +50,9 @@ public enum LicenseModel {
|
||||
}
|
||||
};
|
||||
|
||||
public abstract boolean isAppStore();
|
||||
public boolean isFile() {
|
||||
return this == PGPSignedMessage;
|
||||
}
|
||||
|
||||
public abstract void check() throws LicenseError;
|
||||
|
||||
|
@ -114,7 +114,7 @@ public class Main {
|
||||
// CLI mode => run command-line interface and then exit
|
||||
if (args.runCLI()) {
|
||||
// just import and print license when running with --license option
|
||||
if (args.getLicenseFile() != null && !LICENSE.isAppStore()) {
|
||||
if (LICENSE.isFile() && args.getLicenseFile() != null) {
|
||||
configureLicense(args);
|
||||
System.exit(0);
|
||||
}
|
||||
@ -178,10 +178,13 @@ public class Main {
|
||||
SwingEventBus.getInstance().post(new FileTransferable(files));
|
||||
}
|
||||
|
||||
// import license if launched with license file
|
||||
if (args.getLicenseFile() != null && !LICENSE.isAppStore()) {
|
||||
configureLicense(args);
|
||||
if (LICENSE.isFile()) {
|
||||
// import license if launched with license file
|
||||
if (args.getLicenseFile() != null) {
|
||||
configureLicense(args);
|
||||
}
|
||||
|
||||
// make sure license is validated and cached
|
||||
try {
|
||||
LICENSE.check();
|
||||
} catch (Throwable e) {
|
||||
|
Loading…
Reference in New Issue
Block a user