diff --git a/Core/src/org/sleuthkit/autopsy/core/Installer.java b/Core/src/org/sleuthkit/autopsy/core/Installer.java index 0d61453cd4..9418028545 100644 --- a/Core/src/org/sleuthkit/autopsy/core/Installer.java +++ b/Core/src/org/sleuthkit/autopsy/core/Installer.java @@ -26,8 +26,8 @@ import javafx.embed.swing.JFXPanel; import org.sleuthkit.autopsy.coreutils.Logger; import org.openide.modules.ModuleInstall; import org.openide.windows.WindowManager; -import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; +import org.sleuthkit.autopsy.coreutils.PlatformUtil; /** * Wrapper over Installers in packages in Core module This is the main @@ -39,6 +39,56 @@ public class Installer extends ModuleInstall { private static final Logger logger = Logger.getLogger(Installer.class.getName()); private static volatile boolean javaFxInit = false; + static { + loadDynLibraries(); + } + + private static void loadDynLibraries() { + if (PlatformUtil.isWindowsOS()) { + try { + //on windows force loading ms crt dependencies first + //in case linker can't find them on some systems + //Note: if shipping with a different CRT version, this will only print a warning + //and try to use linker mechanism to find the correct versions of libs. + //We should update this if we officially switch to a new version of CRT/compiler + System.loadLibrary("msvcr100"); + System.loadLibrary("msvcp100"); + logger.log(Level.INFO, "MS CRT libraries loaded"); + } catch (UnsatisfiedLinkError e) { + logger.log(Level.SEVERE, "Error loading ms crt libraries, ", e); + } + } + + try { + System.loadLibrary("zlib"); + logger.log(Level.INFO, "ZLIB library loaded loaded"); + } catch (UnsatisfiedLinkError e) { + logger.log(Level.SEVERE, "Error loading ZLIB library, ", e); + } + + try { + System.loadLibrary("libewf"); + logger.log(Level.INFO, "EWF library loaded"); + } catch (UnsatisfiedLinkError e) { + logger.log(Level.SEVERE, "Error loading EWF library, ", e); + } + + /* We should rename the Windows dll, to remove the lib prefix. + */ +// try { +// String tskLibName = null; +// if (PlatformUtil.isWindowsOS()) { +// tskLibName = "libtsk_jni"; +// } else { +// tskLibName = "tsk_jni"; +// } +// System.loadLibrary(tskLibName); +// logger.log(Level.INFO, "TSK_JNI library loaded"); +// } catch (UnsatisfiedLinkError e) { +// logger.log(Level.SEVERE, "Error loading tsk_jni library", e); +// } + } + public Installer() { logger.log(Level.INFO, "core installer created"); javaFxInit = false; diff --git a/build-windows.xml b/build-windows.xml index 09795298a4..06cba8fa66 100644 --- a/build-windows.xml +++ b/build-windows.xml @@ -3,7 +3,128 @@ Release + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build.xml b/build.xml index 9712dd93fd..bab5fbdfd2 100644 --- a/build.xml +++ b/build.xml @@ -72,6 +72,12 @@ + + + + + + @@ -126,7 +132,16 @@ - + + + + + + + + + +