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 org.sleuthkit.autopsy.casemodule.multiusercases.CaseNodeData;
|
||||
import java.awt.Frame;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeListener;
|
||||
@ -207,9 +208,11 @@ public class Case {
|
||||
* changing the main window title.
|
||||
*/
|
||||
static {
|
||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||
mainFrame = WindowManager.getDefault().getMainWindow();
|
||||
});
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||
mainFrame = WindowManager.getDefault().getMainWindow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,7 +406,11 @@ public class Installer extends ModuleInstall {
|
||||
ensurePythonModulesFolderExists();
|
||||
ensureClassifierFolderExists();
|
||||
ensureOcrLanguagePacksFolderExists();
|
||||
initJavaFx();
|
||||
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
initJavaFx();
|
||||
}
|
||||
|
||||
initializeSevenZip();
|
||||
for (ModuleInstall mi : packageInstallers) {
|
||||
try {
|
||||
@ -544,7 +548,10 @@ public class Installer extends ModuleInstall {
|
||||
@Override
|
||||
public boolean closing() {
|
||||
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>() {
|
||||
@Override
|
||||
public Void call() throws Exception {
|
||||
@ -562,7 +569,9 @@ public class Installer extends ModuleInstall {
|
||||
logger.log(Level.SEVERE, "Error closing the current case", ex);
|
||||
MessageNotifyUtil.Message.error(Bundle.Installer_closing_messageBox_caseCloseExceptionMessage(ex.getMessage()));
|
||||
} 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;
|
||||
} else {
|
||||
|
@ -19,6 +19,7 @@
|
||||
package org.sleuthkit.autopsy.corecomponents;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.Insets;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
@ -39,10 +40,10 @@ import javax.swing.plaf.FontUIResource;
|
||||
import org.netbeans.spi.sendopts.OptionProcessor;
|
||||
import org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI;
|
||||
import org.openide.modules.ModuleInstall;
|
||||
import org.openide.util.Exceptions;
|
||||
import org.openide.util.Lookup;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineIngestManager;
|
||||
import org.sleuthkit.autopsy.commandlineingest.CommandLineOptionProcessor;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.coreutils.ModuleSettings;
|
||||
@ -80,12 +81,15 @@ public class Installer extends ModuleInstall {
|
||||
}
|
||||
|
||||
|
||||
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));
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
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));
|
||||
}
|
||||
|
||||
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?
|
||||
// If there were no command line options supplied then the process method will never
|
||||
// be called.
|
||||
WindowManager.getDefault().invokeWhenUIReady(() -> {
|
||||
if(WindowManager.getDefault().getMainWindow().isVisible() || finalprocessor == null || finalprocessor.getState() == CommandLineOptionProcessor.ProcessState.COMPLETED) {
|
||||
StartupWindowProvider.getInstance().open();
|
||||
if (GraphicsEnvironment.isHeadless()) {
|
||||
if (finalprocessor.getState() == CommandLineOptionProcessor.ProcessState.COMPLETED) {
|
||||
new CommandLineIngestManager().start();
|
||||
} else {
|
||||
finalprocessor.addPropertyChangeListener(new PropertyChangeListener(){
|
||||
finalprocessor.addPropertyChangeListener(new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if(evt.getPropertyName().equals(CommandLineOptionProcessor.PROCESSING_COMPLETED)) {
|
||||
StartupWindowProvider.getInstance().open();
|
||||
if (evt.getPropertyName().equals(CommandLineOptionProcessor.PROCESSING_COMPLETED)) {
|
||||
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
|
||||
|
@ -21,6 +21,7 @@ package org.sleuthkit.autopsy.ingest;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
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
|
||||
// the constructor because that ends up freezing the UI on startup (JIRA-7345).
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
initIngestMessageInbox();
|
||||
} else {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> initIngestMessageInbox());
|
||||
} catch (InterruptedException ex) {
|
||||
// ignore interruptions
|
||||
} catch (InvocationTargetException ex) {
|
||||
logger.log(Level.WARNING, "There was an error starting ingest message inbox", ex);
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
if (SwingUtilities.isEventDispatchThread()) {
|
||||
initIngestMessageInbox();
|
||||
} else {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> initIngestMessageInbox());
|
||||
} catch (InterruptedException ex) {
|
||||
// ignore interruptions
|
||||
} 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;
|
||||
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
@ -68,7 +69,9 @@ public class Installer extends ModuleInstall {
|
||||
@Override
|
||||
public boolean closing() {
|
||||
//force ingest inbox closed on exit and save state as such
|
||||
IngestMessageTopComponent.findInstance().close();
|
||||
if (!GraphicsEnvironment.isHeadless()) {
|
||||
IngestMessageTopComponent.findInstance().close();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,8 @@
|
||||
</target>
|
||||
|
||||
<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}"
|
||||
property="ai-exe-path"
|
||||
value="${AI.path}"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user