Skip to content

Commit

Permalink
ARM manual and more color changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pabx06 committed Oct 2, 2020
1 parent 19bf372 commit 8c75127
Show file tree
Hide file tree
Showing 9 changed files with 153 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
⋅⋅* [v1.0.3](https://github.com/pabx06/buildghidra/releases/tag/v1.0.3) ghidra 0cdc722921cef61b7ca1b7236bdc21079fd4c03e
⋅⋅* [v1.0.2](https://github.com/pabx06/buildghidra/releases/tag/v1.0.2) ghidra 7e5f015d651b9c5e7825cb10bc50338b5af67538
2. Patch _code_browser.tcd if not already done `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser.tcd` to `~/.ghidra/.ghidra_9.2_DEV/tools/_code_browser_dark_night.tcd` with [ghidra_darknight](https://github.com/elliiot/ghidra_darknight)

### ChangeLog
- v1.1.0 Color About,Tips of the day, Bytes Viewer, save data, CodeBrowser Tooltip, ARM manual
Binary file modified Screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions patch/AbstractReferenceHover.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractReferenceHover.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractReferenceHover.java
index ee2335e0c..214c0ac1d 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractReferenceHover.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractReferenceHover.java
@@ -44,7 +44,7 @@ public abstract class AbstractReferenceHover extends AbstractConfigurableHover {

public static final int WINDOW_OFFSET = 50;

- protected static final Color BACKGROUND_COLOR = new Color(255, 255, 230);
+ protected static final Color BACKGROUND_COLOR = new Color(0x32, 0x32, 0x32);

protected CodeFormatService codeFormatService;
protected ListingPanel panel;
13 changes: 13 additions & 0 deletions patch/ByteViewerComponent.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java
index 125554a2d..e7ac5be12 100644
--- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java
+++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java
@@ -867,7 +867,7 @@ public class ByteViewerComponent extends FieldPanel implements FieldMouseListene

private class ByteViewerBackgroundColorModel implements BackgroundColorModel {

- private Color defaultBackgroundColor = Color.WHITE;
+ private Color defaultBackgroundColor = Color.darkGray;

@Override
public Color getBackgroundColor(BigInteger index) {
13 changes: 13 additions & 0 deletions patch/ByteViewerPanel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
index bbc94f4ea..fd5e033ad 100644
--- a/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
+++ b/Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java
@@ -815,7 +815,7 @@ public class ByteViewerPanel extends JPanel implements TableColumnModelListener,

columnHeader.addColumn(ByteViewerComponentProvider.DEFAULT_INDEX_NAME, indexPanel);
scrollp.setColumnHeaderComp(columnHeader);
- compPanel.setBackground(Color.WHITE);
+ compPanel.setBackground(Color.darkGray);

statusPanel = createStatusPanel();
add(scrollp, BorderLayout.CENTER);
73 changes: 73 additions & 0 deletions patch/InfoPanel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java b/Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java
index 2e27f4e91..ffca05dbb 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java
@@ -49,7 +49,7 @@ class InfoPanel extends JPanel {
private String marking;
private String distributionInfo;

- private Color bgColor; // background color for all panels
+ private final static Color bgColor = new Color(243, 250, 255);; // background color for all panels
private int imageWidth;
private final static String SPLASH_FILENAME = "splash.txt";
private final static String CLOUD_REV_FILENAME = "images/cloudbarReversed.jpg";
@@ -58,7 +58,7 @@ class InfoPanel extends JPanel {

InfoPanel() {
getAboutInfo();
- bgColor = new Color(243, 250, 255);
+
create();
}

@@ -69,14 +69,14 @@ class InfoPanel extends JPanel {
setLayout(new BorderLayout());
add(createImagePanel(), BorderLayout.CENTER);
add(createSouthPanel(), BorderLayout.SOUTH);
- setBackground(bgColor);
+ //setBackground(bgColor);
}

private Component buildTextPanel() {

JPanel panel = new JPanel(new VerticalLayout(10));
panel.setBorder(BorderFactory.createEmptyBorder(MARGIN, MARGIN, MARGIN, MARGIN));
- panel.setBackground(bgColor);
+ //panel.setBackground(bgColor);

if (Application.isTestBuild()) {
panel.add(buildTestBuildLabel());
@@ -135,7 +135,7 @@ class InfoPanel extends JPanel {

private Component buildVersionPanel() {
JPanel vPanel = new JPanel(new BorderLayout());
- vPanel.setBackground(bgColor);
+ //vPanel.setBackground(bgColor);
vPanel.add(buildVersionLabel(), BorderLayout.CENTER);
vPanel.add(buildJavaVersionComponent(), BorderLayout.SOUTH);
return vPanel;
@@ -164,7 +164,7 @@ class InfoPanel extends JPanel {
}

panel.add(buildTextPanel(), BorderLayout.CENTER);
- panel.setBackground(bgColor);
+ //panel.setBackground(bgColor);

return panel;
}
@@ -174,13 +174,13 @@ class InfoPanel extends JPanel {
Font font = versionLabel.getFont();
font = font.deriveFont(14f).deriveFont(Font.BOLD);
versionLabel.setFont(font);
- versionLabel.setForeground(Color.BLACK);
+ //versionLabel.setForeground(Color.BLACK);
return versionLabel;
}

private Component createImagePanel() {
JPanel imagePanel = new JPanel();
- imagePanel.setBackground(bgColor);
+ //imagePanel.setBackground(bgColor);

imagePanel.setLayout(new BorderLayout());
ImageIcon ghidraSplashImage = ResourceManager.loadImage(GHIDRA_FILENAME);
13 changes: 13 additions & 0 deletions patch/SaveDataDialog.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java
index 125c130d9..bbdf903ab 100644
--- a/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java
+++ b/Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java
@@ -266,7 +266,7 @@ public class SaveDataDialog extends DialogComponentProvider {
yesButton.setEnabled(false);
for (int i = 0; i < files.size(); i++) {
checkboxes[i] = new GCheckBox(files.get(i).getName());
- checkboxes[i].setBackground(Color.white);
+ checkboxes[i].setBackground(Color.darkGray);
saveable[i] = files.get(i).canSave();
if (!saveable[i]) {
String text = files.get(i).getName() + readOnlyString;
13 changes: 13 additions & 0 deletions patch/TipOfTheDayDialog.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/totd/TipOfTheDayDialog.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/totd/TipOfTheDayDialog.java
index 799af68a5..d0f356d6f 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/totd/TipOfTheDayDialog.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/totd/TipOfTheDayDialog.java
@@ -96,7 +96,7 @@ class TipOfTheDayDialog extends DialogComponentProvider {
BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10),
BorderFactory.createLineBorder(Color.BLACK));
panel.setBorder(panelBorder);
- panel.setBackground(Color.WHITE);
+ //panel.setBackground(Color.WHITE);

JLabel label = new GLabel("Did you know...", tipIcon, SwingConstants.LEFT);
label.setFont(new Font("dialog", Font.BOLD, 12));
12 changes: 12 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ patch ./Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GTableHeade
patch ./Ghidra/Framework/Docking/src/main/java/ghidra/docking/util/DockingWindowsLookAndFeelUtils.java ../patch/DockingWindowsLookAndFeelUtils.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorDialog.java ../patch/FunctionEditorDialog.java
patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/editor/FunctionEditorDialog.java ../patch/FunctionEditorDialog.java.bis

patch ./Ghidra/Framework/Project/src/main/java/ghidra/framework/main/SaveDataDialog.java ../patch/SaveDataDialog.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/hover/AbstractReferenceHover.java ../patch/AbstractReferenceHover.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/totd/TipOfTheDayDialog.java ../patch/TipOfTheDayDialog.patch
patch ./Ghidra/Features/Base/src/main/java/ghidra/framework/main/InfoPanel.java ../patch/InfoPanel.patch
patch ./Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerPanel.java ../patch/ByteViewerPanel.patch
patch ./Ghidra/Features/ByteViewer/src/main/java/ghidra/app/plugin/core/byteviewer/ByteViewerComponent.java ../patch/ByteViewerComponent.patch

#patch launch.sh
patch ./Ghidra/RuntimeScripts/Common/support/launch.properties ../patch/launch.properties.patch
patch ./Ghidra/RuntimeScripts/Linux/support/launch.sh ../patch/launch.sh.patch
Expand All @@ -23,6 +31,10 @@ patch ./Ghidra/Framework/Docking/build.gradle ../patch/build.gradle.patch
patch ./gradle/support/fetchDependencies.gradle ../patch/fetchDependencies.gradle.patch
patch ./Ghidra/Framework/Docking/Module.manifest ../patch/Docking.Module.manifest

#Processors Manuals
wget 'https://raw.githubusercontent.com/bdarmofal/proc_manual/master/ghidra_manuals/Armv7AR_errata.pdf' -O ./Ghidra/Processors/ARM/data/manuals/Armv7AR_errata.pdf
#todo take a look at https://github.com/rickhohler/ghidra_2020/blob/bfd123123eb886b65220571f5cbf60c64784d8d5/scripts/ghidra_processor_docs_downloader.py

#grep -r 'import db.\*;' *|awk -F':' '{print "sed -i " " \"s|import db.*;|import db.*;import db.Record;|g\" "$1}'|bash

gradle -q --init-script gradle/support/fetchDependencies.gradle init >/dev/null
Expand Down

0 comments on commit 8c75127

Please sign in to comment.