From c0202b5956ab6aba0c3c98fbcc74f5d77f0cd9ab Mon Sep 17 00:00:00 2001 From: kat Date: Mon, 4 Nov 2024 10:21:45 -0500 Subject: [SharedCache] Changes to the alpha popup/info tab --- view/sharedcache/ui/dsctriage.cpp | 98 ++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 48 deletions(-) (limited to 'view/sharedcache/ui/dsctriage.cpp') diff --git a/view/sharedcache/ui/dsctriage.cpp b/view/sharedcache/ui/dsctriage.cpp index 29bec7ec..8b0decdc 100644 --- a/view/sharedcache/ui/dsctriage.cpp +++ b/view/sharedcache/ui/dsctriage.cpp @@ -17,7 +17,7 @@ #define QSETTINGS_KEY_SELECTED_TAB "DSCTriage-SelectedTab" #define QSETTINGS_KEY_TAB_LAYOUT "DSCTriage-TabLayout" #define QSETTINGS_KEY_IMAGELOAD_TAB_LAYOUT "DSCTriage-ImageLoadTabLayout" -#define QSETTINGS_KEY_ALPHA_POPUP_SEEN "DSCTriage-AlphaPopupSeen" +#define QSETTINGS_KEY_ALPHA_POPUP_SEEN "DSCTriage-AlphaPopupSeenV2" DSCCacheBlocksView::DSCCacheBlocksView(QWidget* parent, BinaryViewRef data, Ref cache) @@ -639,51 +639,6 @@ DSCTriageView::DSCTriageView(QWidget* parent, BinaryViewRef data) : QWidget(pare QWidget* defaultWidget = nullptr; - // check for alpha popup qsetting - QSettings settings; - if (!(settings.contains(QSETTINGS_KEY_ALPHA_POPUP_SEEN) && settings.value(QSETTINGS_KEY_ALPHA_POPUP_SEEN).toBool())) - { - - QTextBrowser *tb = new QTextBrowser(this); - { - tb->setOpenExternalLinks(true); - auto alphaHtml = - R"( -
-

Shared Cache Alpha

- -

This is the alpha release of the sharedcache viewer! We are hard at work improving this and adding features, but we wanted -to make it available for users to play with as soon as possible.

- -

Supported Platforms

- - -

iOS parsing should work well for now. macOS parsing should be usable, but is still a work in progress.

- -

Getting the latest version of the plugin

- -

We frequently release "dev" builds which will contain the latest version of the SharedCache plugin (and many other things). - -You can find instructions on how to install these builds here.

- -

Reading / building the source

-

You can read the source and find instructions for building it here. - -Contributions are always welcome!

-)"; - tb->setHtml(alphaHtml); - - m_triageTabs->addTab(tb, "Shared Cache Alpha"); - - } - settings.setValue(QSETTINGS_KEY_ALPHA_POPUP_SEEN, true); - defaultWidget = tb; - } - m_bottomRegionCollection = new DockableTabCollection(); m_bottomRegionTabs = new SplitTabWidget(m_bottomRegionCollection); m_bottomRegionTabs->setTabStyle(new GlobalAreaTabStyle()); @@ -774,8 +729,7 @@ Contributions are always welcome!

loadImageTable->setSelectionMode(QAbstractItemView::SingleSelection); m_triageTabs->addTab(loadImageWidget, "Images"); - if (!defaultWidget) - defaultWidget = loadImageWidget; + defaultWidget = loadImageWidget; m_triageTabs->setCanCloseTab(loadImageWidget, false); } // loadImageTable @@ -857,6 +811,54 @@ Contributions are always welcome!

// m_triageTabs->addTab(loadedRegionsWidget, "Loaded Regions"); } // loadedRegions + + + // check for alpha popup qsetting + QSettings settings; + + QTextBrowser *tb = new QTextBrowser(this); + { + tb->setOpenExternalLinks(true); + auto alphaHtml = + R"( +
+

Shared Cache Alpha

+ +

This is an experimental alpha release of the sharedcache view! We are hard at work improving this and adding features, but we wanted +to make it available for users to experiment with as soon as possible.

+ +

Platforms

+ + +

iOS parsing should work fairly well for now. macOS parsing should be usable, but both are still a work in progress.

+ +

Getting the latest version of the plugin

+ +

We frequently release "dev" builds which will contain the latest version of the SharedCache plugin (and many other things). + +You can find instructions on how to install these builds here.

+ +

Reading / building the source

+

You can read the source and find instructions for building it here. + +Contributions are always welcome!

+)"; + tb->setHtml(alphaHtml); + + m_triageTabs->addTab(tb, "Shared Cache Alpha"); + + } + if (!(settings.contains(QSETTINGS_KEY_ALPHA_POPUP_SEEN) && settings.value(QSETTINGS_KEY_ALPHA_POPUP_SEEN).toBool())) + { + LogAlert("dyld_shared_cache support is highly experimental! We do not expect it to work on all versions yet! See the 'alpha' tab in the Triage view for more information. "); + settings.setValue(QSETTINGS_KEY_ALPHA_POPUP_SEEN, true); + defaultWidget = tb; + } + containerWidget->addWidget(m_bottomRegionTabs); m_triageTabs->addTab(cacheInfoWidget, "Cache Info"); -- cgit v1.3.1