Get the directory that can store settings. (Library on OS X, App Data or something similar on Windows, a dot folder on Linux.) Removed this as a preference for 3.0a3 because we need this to be stable, but adding back for 4.0 beta 4 so that folks can do 'portable' versions again.
()
| 2193 | * for 4.0 beta 4 so that folks can do 'portable' versions again. |
| 2194 | */ |
| 2195 | static public File getSettingsFolder() { |
| 2196 | File settingsFolder = null; |
| 2197 | |
| 2198 | try { |
| 2199 | settingsFolder = Platform.getSettingsFolder(); |
| 2200 | |
| 2201 | // create the folder if it doesn't exist already |
| 2202 | if (!settingsFolder.exists()) { |
| 2203 | if (!settingsFolder.mkdirs()) { |
| 2204 | Messages.showError("Settings issues", |
| 2205 | "Processing cannot run because it could not\n" + |
| 2206 | "create a folder to store your settings at\n" + |
| 2207 | settingsFolder, null); |
| 2208 | } |
| 2209 | } |
| 2210 | } catch (Exception e) { |
| 2211 | Messages.showTrace("An rare and unknowable thing happened", |
| 2212 | "Could not get the settings folder. Please report:\n" + |
| 2213 | "http://github.com/processing/processing/issues/new", |
| 2214 | e, true); |
| 2215 | } |
| 2216 | return settingsFolder; |
| 2217 | } |
| 2218 | |
| 2219 | |
| 2220 | static public File getSettingsOverride() { |
no test coverage detected