* play with mas compatibility
This commit is contained in:
parent
d235fc1e0c
commit
c3f59e96e5
|
@ -276,9 +276,9 @@
|
|||
<runtime dir="/Library/Java/JavaVirtualMachines/jdk1.8.0_11.jdk/Contents/Home" />
|
||||
|
||||
<!-- WORKING_DIR is sandbox data folder -->
|
||||
<option value="-Dapplication.dir=./Library/Application Support" />
|
||||
<option value="-Dapplication.dir=./Library/Application Support/User Data" />
|
||||
<option value="-Dapplication.cache=./Library/Caches/ehcache.disk.store" />
|
||||
<option value="-Djava.io.tmpdir=./Library/Caches/java.io.tmpdir" />
|
||||
<option value="-Duser.home=./Library/Caches/ehcache.disk.store" />
|
||||
|
||||
<!-- FULL DIRECTORY ACCESS when processing files in the sandbox -->
|
||||
<option value="-Dapple.awt.fileDialogForDirectories=true" />
|
||||
|
|
|
@ -374,8 +374,9 @@ public class Main {
|
|||
return;
|
||||
}
|
||||
|
||||
String message = String.format(Locale.ROOT,
|
||||
"<html><p style='font-size:16pt; font-weight:bold'>Thank you for using FileBot!</p><br><p>It has taken many nights to develop this application. If you enjoy using it,<br>please consider a donation to me and my work. It will help to<br>make FileBot even better!<p><p style='font-size:14pt; font-weight:bold'>You've renamed %,d files.</p><br><html>", renameCount);
|
||||
.format(Locale.ROOT,
|
||||
"<html><p style='font-size:16pt; font-weight:bold'>Thank you for using FileBot!</p><br><p>It has taken many nights to develop this application. If you enjoy using it,<br>please consider a donation to me and my work. It will help to<br>make FileBot even better!<p><p style='font-size:14pt; font-weight:bold'>You've renamed %,d files.</p><br><html>",
|
||||
renameCount);
|
||||
String[] actions = new String[] { "Donate! :)", donationRev > 0 ? "Not this time" : "Later" };
|
||||
JOptionPane pane = new JOptionPane(message, INFORMATION_MESSAGE, YES_NO_OPTION, ResourceManager.getIcon("message.donate"), actions, actions[0]);
|
||||
pane.createDialog(null, "Please Donate").setVisible(true);
|
||||
|
@ -423,7 +424,7 @@ public class Main {
|
|||
*/
|
||||
private static void initializeCache() {
|
||||
// prepare cache folder for this application instance
|
||||
File cacheRoot = new File(getApplicationFolder(), "cache");
|
||||
File cacheRoot = getApplicationCache();
|
||||
|
||||
try {
|
||||
for (int i = 0; true; i++) {
|
||||
|
|
|
@ -94,10 +94,26 @@ public final class Settings {
|
|||
if (!applicationFolder.exists()) {
|
||||
applicationFolder.mkdirs();
|
||||
}
|
||||
|
||||
return applicationFolder;
|
||||
}
|
||||
|
||||
public static File getApplicationCache() {
|
||||
String cacheDefaultPath = System.getProperty("application.cache");
|
||||
|
||||
File cacheDir = null;
|
||||
if (cacheDefaultPath != null) {
|
||||
cacheDir = new File(cacheDefaultPath);
|
||||
} else {
|
||||
cacheDir = new File(getApplicationFolder(), "cache");
|
||||
}
|
||||
|
||||
// create folder if necessary
|
||||
if (!cacheDir.exists()) {
|
||||
cacheDir.mkdirs();
|
||||
}
|
||||
return cacheDir;
|
||||
}
|
||||
|
||||
public static Settings forPackage(Class<?> type) {
|
||||
return new Settings(Preferences.userNodeForPackage(type));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue