mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Merge remote-tracking branch 'origin/GP-6014_ryanmkurtz_osgi' into
Ghidra_12.0 (#6455)
This commit is contained in:
commit
cc4a4e5ed2
2 changed files with 33 additions and 2 deletions
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -396,6 +396,7 @@ public class BundleStatusTableModel
|
|||
columnDescriptor.addVisibleColumn(new BuildSummaryColumn());
|
||||
columnDescriptor.addHiddenColumn(new OSGiStatusColumn());
|
||||
columnDescriptor.addHiddenColumn(new BundleTypeColumn());
|
||||
columnDescriptor.addHiddenColumn(new BundleLocationId());
|
||||
|
||||
return columnDescriptor;
|
||||
}
|
||||
|
@ -548,6 +549,27 @@ public class BundleStatusTableModel
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private class BundleLocationId extends Column<String> {
|
||||
|
||||
BundleLocationId() {
|
||||
super("Bundle Location ID");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getValue(BundleStatus status, Settings settings, List<BundleStatus> data,
|
||||
ServiceProvider serviceProvider0) throws IllegalArgumentException {
|
||||
GhidraBundle bundle = bundleHost.getGhidraBundle(status.getFile());
|
||||
if (bundle != null) {
|
||||
String id = bundle.getLocationIdentifier();
|
||||
if (id != null) {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private class BundleFileRenderer extends AbstractGColumnRenderer<ResourceFile> {
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ import aQute.bnd.osgi.Clazz.QUERY;
|
|||
import generic.io.NullPrintWriter;
|
||||
import generic.jar.ResourceFile;
|
||||
import ghidra.app.script.*;
|
||||
import ghidra.framework.Application;
|
||||
import ghidra.framework.ApplicationProperties;
|
||||
import ghidra.util.Msg;
|
||||
import util.CollectionUtils;
|
||||
import utilities.util.FileUtilities;
|
||||
|
@ -880,6 +882,13 @@ public class GhidraSourceBundle extends GhidraBundle {
|
|||
|
||||
analyzer.setProperty("Export-Package", "!*.private.*,!*.internal.*,*");
|
||||
|
||||
String minJava =
|
||||
Application.getApplicationProperty(ApplicationProperties.APPLICATION_JAVA_MIN_PROPERTY);
|
||||
if (minJava != null) {
|
||||
analyzer.setProperty("Require-Capability",
|
||||
"osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version>=%s))\"".formatted(minJava));
|
||||
}
|
||||
|
||||
try {
|
||||
Manifest manifest;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue