mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Merge remote-tracking branch 'upstream' into develop
This commit is contained in:
commit
2c9285541e
@ -26,6 +26,7 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
|||||||
import java.awt.Cursor;
|
import java.awt.Cursor;
|
||||||
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
|
import org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
|
||||||
import java.awt.Frame;
|
import java.awt.Frame;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
@ -207,9 +208,11 @@ public class Case {
|
|||||||
* changing the main window title.
|
* changing the main window title.
|
||||||
*/
|
*/
|
||||||
static {
|
static {
|
||||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
mainFrame = WindowManager.getDefault().getMainWindow();
|
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||||
});
|
mainFrame = WindowManager.getDefault().getMainWindow();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -406,7 +406,11 @@ public class Installer extends ModuleInstall {
|
|||||||
ensurePythonModulesFolderExists();
|
ensurePythonModulesFolderExists();
|
||||||
ensureClassifierFolderExists();
|
ensureClassifierFolderExists();
|
||||||
ensureOcrLanguagePacksFolderExists();
|
ensureOcrLanguagePacksFolderExists();
|
||||||
initJavaFx();
|
|
||||||
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
|
initJavaFx();
|
||||||
|
}
|
||||||
|
|
||||||
initializeSevenZip();
|
initializeSevenZip();
|
||||||
for (ModuleInstall mi : packageInstallers) {
|
for (ModuleInstall mi : packageInstallers) {
|
||||||
try {
|
try {
|
||||||
@ -544,7 +548,10 @@ public class Installer extends ModuleInstall {
|
|||||||
@Override
|
@Override
|
||||||
public boolean closing() {
|
public boolean closing() {
|
||||||
if (IngestRunningCheck.checkAndConfirmProceed(Bundle.Installer_closing_confirmationDialog_title(), Bundle.Installer_closing_confirmationDialog_message())) {
|
if (IngestRunningCheck.checkAndConfirmProceed(Bundle.Installer_closing_confirmationDialog_title(), Bundle.Installer_closing_confirmationDialog_message())) {
|
||||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
if (!GraphicsEnvironment.isHeadless() && RuntimeProperties.runningWithGUI()) {
|
||||||
|
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
|
}
|
||||||
|
|
||||||
FutureTask<Void> future = new FutureTask<>(new Callable<Void>() {
|
FutureTask<Void> future = new FutureTask<>(new Callable<Void>() {
|
||||||
@Override
|
@Override
|
||||||
public Void call() throws Exception {
|
public Void call() throws Exception {
|
||||||
@ -562,7 +569,9 @@ public class Installer extends ModuleInstall {
|
|||||||
logger.log(Level.SEVERE, "Error closing the current case", ex);
|
logger.log(Level.SEVERE, "Error closing the current case", ex);
|
||||||
MessageNotifyUtil.Message.error(Bundle.Installer_closing_messageBox_caseCloseExceptionMessage(ex.getMessage()));
|
MessageNotifyUtil.Message.error(Bundle.Installer_closing_messageBox_caseCloseExceptionMessage(ex.getMessage()));
|
||||||
} finally {
|
} finally {
|
||||||
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
if (!GraphicsEnvironment.isHeadless() && RuntimeProperties.runningWithGUI()) {
|
||||||
|
WindowManager.getDefault().getMainWindow().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
package org.sleuthkit.autopsy.corecomponents;
|
package org.sleuthkit.autopsy.corecomponents;
|
||||||
|
|
||||||
import java.awt.Font;
|
import java.awt.Font;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.awt.Insets;
|
import java.awt.Insets;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
@ -39,10 +40,10 @@ import javax.swing.plaf.FontUIResource;
|
|||||||
import org.netbeans.spi.sendopts.OptionProcessor;
|
import org.netbeans.spi.sendopts.OptionProcessor;
|
||||||
import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
|
import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
|
||||||
import org.openide.modules.ModuleInstall;
|
import org.openide.modules.ModuleInstall;
|
||||||
import org.openide.util.Exceptions;
|
|
||||||
import org.openide.util.Lookup;
|
import org.openide.util.Lookup;
|
||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
||||||
|
import org.sleuthkit.autopsy.commandlineingest.CommandLineIngestManager;
|
||||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor;
|
import org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor;
|
||||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||||
@ -80,12 +81,15 @@ public class Installer extends ModuleInstall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
SwingUtilities.invokeLater(() -> {
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
setLookAndFeel();
|
SwingUtilities.invokeLater(() -> {
|
||||||
});
|
setLookAndFeel();
|
||||||
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
|
});
|
||||||
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
|
|
||||||
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
|
UIManager.put("ViewTabDisplayerUI", "org.sleuthkit.autopsy.corecomponents.NoTabsTabDisplayerUI");
|
||||||
|
UIManager.put(DefaultTabbedContainerUI.KEY_VIEW_CONTENT_BORDER, BorderFactory.createEmptyBorder());
|
||||||
|
UIManager.put("TabbedPane.contentBorderInsets", new Insets(0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
final CommandLineOptionProcessor finalprocessor = processor;
|
final CommandLineOptionProcessor finalprocessor = processor;
|
||||||
|
|
||||||
@ -100,20 +104,35 @@ public class Installer extends ModuleInstall {
|
|||||||
// Why not just listen to the command processor instead of using the invokeWhen?
|
// Why not just listen to the command processor instead of using the invokeWhen?
|
||||||
// If there were no command line options supplied then the process method will never
|
// If there were no command line options supplied then the process method will never
|
||||||
// be called.
|
// be called.
|
||||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
if (GraphicsEnvironment.isHeadless()) {
|
||||||
if(WindowManager.getDefault().getMainWindow().isVisible() || finalprocessor == null || finalprocessor.getState() == CommandLineOptionProcessor.ProcessState.COMPLETED) {
|
if (finalprocessor.getState() == CommandLineOptionProcessor.ProcessState.COMPLETED) {
|
||||||
StartupWindowProvider.getInstance().open();
|
new CommandLineIngestManager().start();
|
||||||
} else {
|
} else {
|
||||||
finalprocessor.addPropertyChangeListener(new PropertyChangeListener(){
|
finalprocessor.addPropertyChangeListener(new PropertyChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void propertyChange(PropertyChangeEvent evt) {
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
if(evt.getPropertyName().equals(CommandLineOptionProcessor.PROCESSING_COMPLETED)) {
|
if (evt.getPropertyName().equals(CommandLineOptionProcessor.PROCESSING_COMPLETED)) {
|
||||||
StartupWindowProvider.getInstance().open();
|
new CommandLineIngestManager().start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
} else {
|
||||||
|
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||||
|
if(WindowManager.getDefault().getMainWindow().isVisible() || finalprocessor == null || finalprocessor.getState() == CommandLineOptionProcessor.ProcessState.COMPLETED) {
|
||||||
|
StartupWindowProvider.getInstance().open();
|
||||||
|
} else {
|
||||||
|
finalprocessor.addPropertyChangeListener(new PropertyChangeListener(){
|
||||||
|
@Override
|
||||||
|
public void propertyChange(PropertyChangeEvent evt) {
|
||||||
|
if(evt.getPropertyName().equals(CommandLineOptionProcessor.PROCESSING_COMPLETED)) {
|
||||||
|
StartupWindowProvider.getInstance().open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.ingest;
|
|||||||
import com.google.common.eventbus.Subscribe;
|
import com.google.common.eventbus.Subscribe;
|
||||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||||
import java.awt.EventQueue;
|
import java.awt.EventQueue;
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.beans.PropertyChangeEvent;
|
import java.beans.PropertyChangeEvent;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
@ -574,15 +575,17 @@ public class IngestManager implements IngestProgressSnapshotProvider {
|
|||||||
|
|
||||||
// initialize IngestMessageInbox, if it hasn't been initialized yet. This can't be done in
|
// initialize IngestMessageInbox, if it hasn't been initialized yet. This can't be done in
|
||||||
// the constructor because that ends up freezing the UI on startup (JIRA-7345).
|
// the constructor because that ends up freezing the UI on startup (JIRA-7345).
|
||||||
if (SwingUtilities.isEventDispatchThread()) {
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
initIngestMessageInbox();
|
if (SwingUtilities.isEventDispatchThread()) {
|
||||||
} else {
|
initIngestMessageInbox();
|
||||||
try {
|
} else {
|
||||||
SwingUtilities.invokeAndWait(() -> initIngestMessageInbox());
|
try {
|
||||||
} catch (InterruptedException ex) {
|
SwingUtilities.invokeAndWait(() -> initIngestMessageInbox());
|
||||||
// ignore interruptions
|
} catch (InterruptedException ex) {
|
||||||
} catch (InvocationTargetException ex) {
|
// ignore interruptions
|
||||||
logger.log(Level.WARNING, "There was an error starting ingest message inbox", ex);
|
} catch (InvocationTargetException ex) {
|
||||||
|
logger.log(Level.WARNING, "There was an error starting ingest message inbox", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.sleuthkit.autopsy.ingest;
|
package org.sleuthkit.autopsy.ingest;
|
||||||
|
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -68,7 +69,9 @@ public class Installer extends ModuleInstall {
|
|||||||
@Override
|
@Override
|
||||||
public boolean closing() {
|
public boolean closing() {
|
||||||
//force ingest inbox closed on exit and save state as such
|
//force ingest inbox closed on exit and save state as such
|
||||||
IngestMessageTopComponent.findInstance().close();
|
if (!GraphicsEnvironment.isHeadless()) {
|
||||||
|
IngestMessageTopComponent.findInstance().close();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="autoAIPath" description="Attempt to find the AI path based on standard installation location">
|
<target name="autoAIPath" description="Attempt to find the AI path based on standard installation location">
|
||||||
<property name="AI.path" value="C:\Program Files (x86)\Caphyon\Advanced Installer 10.3\bin\x86\AdvancedInstaller.com" />
|
<!-- latest taken from https://www.advancedinstaller.com/download.html -->
|
||||||
|
<property name="AI.path" value="C:\Program Files (x86)\Caphyon\Advanced Installer 22.3\bin\x86\AdvancedInstaller.com" />
|
||||||
<available file="${AI.path}"
|
<available file="${AI.path}"
|
||||||
property="ai-exe-path"
|
property="ai-exe-path"
|
||||||
value="${AI.path}"/>
|
value="${AI.path}"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user