X-Git-Url: http://git.nikiroo.be/?p=nikiroo-utils.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FInstance.java;h=84a583e6635d8ec966c7fb8cf1ef334ecaa0bb9a;hp=ef7799fbc497d246e7d64ddaf80f8d0cde59546f;hb=ee9b7083501b94c9ff00ab1d7e481d6f8dec8b05;hpb=0bb51c9c66697fe63ba066715207deabbcc1d479 diff --git a/src/be/nikiroo/fanfix/Instance.java b/src/be/nikiroo/fanfix/Instance.java index ef7799f..84a583e 100644 --- a/src/be/nikiroo/fanfix/Instance.java +++ b/src/be/nikiroo/fanfix/Instance.java @@ -42,7 +42,21 @@ public class Instance { private static TraceHandler tracer; private static TempFiles tempFiles; - static { + private static boolean init; + + /** + * Initialise the instance -- if already initialised, nothing will happen. + *

+ * Before calling this method, you may call {@link Bundles#getDirectory()} + * if wanted. + */ + static public void init() { + if (init) { + return; + } + + init = true; + // Before we can configure it: Boolean debug = checkEnv("DEBUG"); boolean trace = debug != null && debug;