mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 07:35:54 +08:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -27,7 +27,7 @@ import ghidra.GhidraApplicationLayout;
|
|||||||
import ghidra.GhidraTestApplicationLayout;
|
import ghidra.GhidraTestApplicationLayout;
|
||||||
import ghidra.base.project.GhidraProject;
|
import ghidra.base.project.GhidraProject;
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
import ghidra.framework.GhidraApplicationConfiguration;
|
import ghidra.framework.HeadlessGhidraApplicationConfiguration;
|
||||||
import ghidra.framework.data.OpenMode;
|
import ghidra.framework.data.OpenMode;
|
||||||
import ghidra.framework.model.DomainFile;
|
import ghidra.framework.model.DomainFile;
|
||||||
import ghidra.framework.model.ProjectData;
|
import ghidra.framework.model.ProjectData;
|
||||||
@@ -163,8 +163,8 @@ public class IsfServer extends Thread {
|
|||||||
public static void main(String[] args) throws FileNotFoundException, IOException {
|
public static void main(String[] args) throws FileNotFoundException, IOException {
|
||||||
GhidraApplicationLayout layout =
|
GhidraApplicationLayout layout =
|
||||||
new GhidraTestApplicationLayout(new File(AbstractGTest.getTestDirectoryPath()));
|
new GhidraTestApplicationLayout(new File(AbstractGTest.getTestDirectoryPath()));
|
||||||
GhidraApplicationConfiguration config = new GhidraApplicationConfiguration();
|
HeadlessGhidraApplicationConfiguration config =
|
||||||
config.setShowSplashScreen(false);
|
new HeadlessGhidraApplicationConfiguration();
|
||||||
Application.initializeApplication(layout, config);
|
Application.initializeApplication(layout, config);
|
||||||
|
|
||||||
IsfServer server = new IsfServer(null, 54321);
|
IsfServer server = new IsfServer(null, 54321);
|
||||||
|
|||||||
+14
-2
@@ -4,9 +4,9 @@
|
|||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package ghidra.framework;
|
package ghidra.framework;
|
||||||
|
|
||||||
|
import java.awt.GraphicsEnvironment;
|
||||||
|
|
||||||
import docking.DockingErrorDisplay;
|
import docking.DockingErrorDisplay;
|
||||||
import docking.DockingWindowManager;
|
import docking.DockingWindowManager;
|
||||||
import docking.framework.ApplicationInformationDisplayFactory;
|
import docking.framework.ApplicationInformationDisplayFactory;
|
||||||
@@ -37,6 +39,16 @@ public class GhidraApplicationConfiguration extends HeadlessGhidraApplicationCon
|
|||||||
private static final String USER_AGREEMENT_PROPERTY_NAME = "USER_AGREEMENT";
|
private static final String USER_AGREEMENT_PROPERTY_NAME = "USER_AGREEMENT";
|
||||||
private boolean showSplashScreen = true;
|
private boolean showSplashScreen = true;
|
||||||
|
|
||||||
|
public GhidraApplicationConfiguration() {
|
||||||
|
if (GraphicsEnvironment.isHeadless()) {
|
||||||
|
System.err.println(
|
||||||
|
"ERROR: Unable to launch Ghidra GUI application in headless environment.");
|
||||||
|
System.err.println(
|
||||||
|
"If launching from a remote SSH shell, you must have an X11 compatible client with X11 forwarding enabled.");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isHeadless() {
|
public boolean isHeadless() {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user