Giter Site home page Giter Site logo

5guis's Introduction

The 5 GUIs Application

... the app for the tweet:

With its eclectic mix of AppKit, Catalyst, iOS, SwiftUI, and web apps, macOS should consider rebranding to “Five GUIs”

— Joe Groff (@jckarter) September 28, 2020

GUI is an abbreviation for Graphical User Interface.

How it works

5 GUIs first grabs some information from the app bundle. It then uses LLVM's objdump to check what libraries the app links, e.g. Electron or UIKit, to figure out what technology is being used.

5 GUIs itself is a SwiftUI 1 macOS application (i.e. it runs on Catalina and macOS BS).

Idea and Implementation

The idea for this kind of app exists for quite some time, but when @jckarter tweeted the proper name for this: “5 GUIs”, it finally had to be done.

This is a quick hack, put together in about 2 days. The source is not “nice” at all, don't use it as a proper example 🙈 PRs with cleanups are warmly welcome.

Help wanted!

All improvements are very welcome, but most of all this app could use better design. SwiftUI gives you something OKayish looking out of the box, but if someone has the time to add some fancy animations, better colors, iconography and styling, that would be very welcome!

Also checkout the Issues page of this repository. It'll have some.

3rd Party Software Used

Building the Project in Xcode

Before the app can be build, an llvm-objdump binary needs to be put into the LLVM folder (the binary was a little big for inclusion in the repository).

For testing purposes the one included in Xcode should be fine, it should be living over here: /Applications/Xcode.app//Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-objdump.

For deployment it is probably better to build an own one. To do so:

  • grab the LLVM source code from the downloads page
  • Unpack it somewhere, e.g.: cd /tmp; && tar zxf llvm-10.0.1.src.tar.xz
  • Create a build dir: mkdir /tmp/build-dir && cd /tmp/build-dir
  • Create the makefiles: cmake ../llvm-10.0.1.src/
  • Build it: cd tools/llvm-objdump && cmake --build .

Who

5 GUIs is brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

5guis's People

Contributors

helje5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

5guis's Issues

Also scan for embedded plugins and apps

Several apps carry additional apps in their Frameworks folder, e.g.:

Zini18:~ helge$ ls -d /Applications/zoom.us.app/Contents/Frameworks/*.app
/Applications/zoom.us.app/Contents/Frameworks/CptHost.app
/Applications/zoom.us.app/Contents/Frameworks/Transcode.app
/Applications/zoom.us.app/Contents/Frameworks/ZMScreenshot.app
/Applications/zoom.us.app/Contents/Frameworks/ZoomUninstaller.app
/Applications/zoom.us.app/Contents/Frameworks/caphost.app

We should scan those as well and incorporate into the result. The ExecutableFileTechnologyInfo is prepared for that already.

More Qt apps failing to be identified as Qt

5GUIs incorrectly identifies these Qt apps as AppKit:

Tableau Desktop
VirtualBox
Blackmagic Desktop Video
Blackmagic RAW Player
Blackmagic RAW Speed Test
DaVinci Resolve

(I am horrified by the realization that DaVinci Resolve is a Qt app. It was supposed to save us from Premiere...)

Detect Platypus & Automator & AppleScript apps

Detect Platypus apps that run scripts e.g. at ./Contents/Resources/script
Right now, 5GUIs thinks they're fine (AppKit Objective-C), but that's just the Platypus wrapper for the script.

snap1

Detect Automator apps that run scripts e.g. at ./Contents/Resources/Scripts/main.scpt
Right now 5GUIs doesn't know what to do with them.

snap2

Catalyst apps are reported as phone apps on macOS BS

Not 100% sure whether Catalyst and plain UIKit apps (i.e. running iPhone/iPad apps natively on a DTK/Apple silicon Mac) are actually the same thing on macOS BS. I would think not, but who knows.

On Catalina Catalyst apps are detected when they link UIKitMacHelper.framework. Maybe the bug is also just a result of Issue #2? (the b0rked dependency traversal due to the shared cache)

Chrome reported w/o AppKit, even though it's being used

What seems to break in this case is that 5 GUIs tries and fails to detect AppKit (“No 👨🏽‍🦳 AppKit usage to be found? 🤔”). That’s probably because of the structure of Chromium. In order to update cleanly, Chromium (and Google Chrome) is separated into an outer bundle and an inner framework, and the only job of the outer bundle is to call into the inner framework. If all that is being analyzed is the outermost binary, you’re not going to find usage of any system framework. All of Chromium’s AppKit usage (it’s an old-school ~2008 AppKit app) is through the inner framework that isn’t ever explicitly linked to any of the .apps.

I’m not sure of an easy, not special-cased way to detect this. The main function uses dlopen to open a hard-coded path to the inner framework, so there are no obvious traces in metadata.

Add more information to Details popover

This should show everything we detect (e.g. all languages etc), and also allow the user to browse the different embedded apps and frameworks individually.

Crashes on macOS 13?

In an app review, someone mentioned that 5 GUIs crashes on macOS 13 betas. I don't have them installed yet, but should check that.

Switch from `objdump` to dlopen on macOS BS to detect nested dependencies

macOS BS has the "dyld shared cache" which breaks running objdump on the dependencies. E.g. this results in BS Safari not having any features detected.

$ otool -L /Applications/Safari.app/Contents/MacOS/Safari
/Applications/Safari.app/Contents/MacOS/Safari (architecture x86_64):
	/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari (compatibility version 528.0.0, current version 610.2.6)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)
/Applications/Safari.app/Contents/MacOS/Safari (architecture arm64e):
	/System/Library/PrivateFrameworks/Safari.framework/Versions/A/Safari (compatibility version 528.0.0, current version 610.2.6)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.0.0)

W/ the "dyld shared cache", the /System/Library/PrivateFrameworks/Safari.framework doesn't actually exist on disk anymore (hence objdump can't analyse it).

Maybe we can use dlopen to load and open an executable and then somehow traverse the link list (w/o actually executing the binary)?

Also check for Java apps

First: Thanks for the idea and the app. Neat one.

You might also check for Java, like "Arduino.app". Probably detectable via the "Java" directory in the bundle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.