19 package org.sleuthkit.autopsy.core;
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.logging.Handler;
25 import java.util.logging.Level;
26 import javafx.application.Platform;
27 import javafx.embed.swing.JFXPanel;
28 import org.openide.modules.ModuleInstall;
29 import org.openide.util.NbBundle;
30 import org.openide.windows.WindowManager;
66 System.loadLibrary(
"msvcr100");
67 System.loadLibrary(
"msvcp100");
68 logger.log(Level.INFO,
"MS CRT libraries loaded");
69 }
catch (UnsatisfiedLinkError e) {
70 logger.log(Level.SEVERE,
"Error loading ms crt libraries, ", e);
74 System.loadLibrary(
"zlib");
75 logger.log(Level.INFO,
"ZLIB library loaded loaded");
76 }
catch (UnsatisfiedLinkError e) {
77 logger.log(Level.SEVERE,
"Error loading ZLIB library, ", e);
81 System.loadLibrary(
"libewf");
82 logger.log(Level.INFO,
"EWF library loaded");
83 }
catch (UnsatisfiedLinkError e) {
84 logger.log(Level.SEVERE,
"Error loading EWF library, ", e);
90 logger.log(Level.INFO,
"core installer created");
92 packageInstallers =
new ArrayList<>();
109 System.setProperty(
"javafx.macosx.embedded",
"true");
113 Platform.setImplicitExit(
false);
115 }
catch (UnsatisfiedLinkError | NoClassDefFoundError | Exception e) {
117 final String msg = NbBundle.getMessage(
Installer.class,
"Installer.errorInitJavafx.msg");
118 final String details = NbBundle.getMessage(
Installer.class,
"Installer.errorInitJavafx.details");
119 logger.log(Level.SEVERE, msg
122 WindowManager.getDefault().invokeWhenUIReady(
new Runnable() {
133 pythonModulesDir.mkdir();
141 for (ModuleInstall mi : packageInstallers) {
144 logger.log(Level.INFO,
"{0} restore succeeded", mi.getClass().getName());
145 }
catch (Exception e) {
146 String msg = mi.getClass().getName() +
" restore failed";
147 logger.log(Level.WARNING, msg, e);
150 logger.log(Level.INFO,
"Autopsy Core restore completed");
154 public void validate() throws IllegalStateException {
157 logger.log(Level.INFO,
"validate()");
158 for (ModuleInstall mi : packageInstallers) {
159 logger.log(Level.INFO,
"{0} validate()", mi.getClass().getName());
162 }
catch (Exception e) {
163 logger.log(Level.WARNING,
"", e);
172 logger.log(Level.INFO,
"uninstalled()");
174 for (ModuleInstall mi : packageInstallers) {
175 logger.log(Level.INFO,
"{0} uninstalled()", mi.getClass().getName());
178 }
catch (Exception e) {
179 logger.log(Level.WARNING,
"", e);
188 logger.log(Level.INFO,
"close()");
195 for (ModuleInstall mi : packageInstallers) {
196 logger.log(Level.INFO,
"{0} close()", mi.getClass().getName());
199 }
catch (Exception e) {
200 logger.log(Level.WARNING,
"", e);
203 for (Handler h : logger.getHandlers()) {
static void loadDynLibraries()
static boolean isJavaFxInited()
static final Logger logger
static synchronized Installer getDefault()
static volatile boolean javaFxInit
static synchronized Installer getDefault()
static void ensurePythonModulesFolderExists()
static synchronized Installer getDefault()
static void error(String title, String message)
final List< ModuleInstall > packageInstallers
static Logger getLogger(String name)
static synchronized Installer getDefault()