Skip to content

Conversation

@angela28chen
Copy link
Collaborator

@angela28chen angela28chen commented Jan 5, 2026

Changes:

  • Rename install/ to pkg/ and have separate folders within for host tools, device resources, and plugins
  • Change logic for locating resources
    • Remove CMAKE_GENERATED_INSTALL_DIR_PATH and predict the location of different resources relative to the location of the host tool.
    • Split the resolving logic into separate functions that forces the caller to specify which type of resource they are looking for (so that the caller doesn't need knowledge of the layout of resources dir)
    • Added new resource_defs.h so that version_defs.h doesn't get included by many libraries
  • Fix the mac install/deploy process, moving some processes (macdeployqt, signing, copying of plugin folders and etc.) out of cmake's install stage and into a separate bash script. This is done because cmake's install portion is inflexible (difficult to even add log messages) and it's error-prone to insert blocks of code.
  • Changed BUILD.md to reference scripts rather than repeat their contents

@angela28chen
Copy link
Collaborator Author

The next and last step planned is to make the "unified build folder" by putting build_android and pkg/ (formerly install/) under build

@angela28chen
Copy link
Collaborator Author

angela28chen commented Jan 6, 2026

High-level summary of pkg/ which was formerly the install/ folder

.
├── device
│   ├── DEVICE_RESOURCES_VERSION.csv
│   ├── gfxr-replay.apk
│   ├── gfxrecon.py
│   ├── libVkLayer_dive.so
│   ├── libVkLayer_gfxreconstruct.so
│   ├── libVkLayer_khronos_validation.so
│   ├── libVkLayer_rt_dive.so
│   ├── libwrap.so
│   ├── libXrApiLayer_dive.so
│   └── XrApiLayer_dive.json
├── dive_profiling_plugin (copy in here manually before running the mac deploy script)
├── dive_sample_plugin
│   └── libdive_plugin_sample.dylib
├── dive.app (produced/moved as a result of running the mac deploy script)
│   └── Contents
└── host
     ├── dive_client_cli
     ├── dive (UI location for linux or windows platforms)
     └── NOTICE

Host tools, UI, mac application should all be able to locate these resources when launched from under pkg/. For releases, if the file structure here is preserved then the files should still be locatable.

@angela28chen angela28chen marked this pull request as ready for review January 6, 2026 18:37
@hysw
Copy link
Collaborator

hysw commented Jan 6, 2026

What is the rationale to put host tool in pkg/host instead of pkg?

third_party/freedreno/libs/
third_party/freedreno/obj
.gradle/
pkg/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put it at build/pkg?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want put it at pkg/ for now (same place as install/) and then move build_android/ and pkg/ under build/ in the next PR.

@angela28chen
Copy link
Collaborator Author

What is the rationale to put host tool in pkg/host instead of pkg?

It's a little easier to copy files from pkg/host/ for the apple bundle, also if you want to do a clean build for just the host side you can rm -rf pkg/host. I think in general it also helps with understanding the system while we still have the dual build thing (i.e. these are the direct outputs from building host tools).

done

# Ad-hoc signing the application bundle
codesign --force --deep --sign - ${INSTALL_DIR}/dive.app || exit 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we want to make signing optional like it was in CMake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure? All I know is that on macbook you can't run your local builds right now without doing the signing, macOS will not let you run the application. I assumed this means that for mac users we currently NEED to sign. I believe it was optional in the cmakelists file because signing is not required for local builds on other platforms? @RenfengLiu probably knows more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to skip signing if you will be using a different key (e.g. release process)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok makes sense, I will make it optional

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it optional (takes --no-sign), by default the bundle will be signed.

I also took out the parameter for the install folder name since we're now telling users to use the script to build device resources (so the name "pkg" is already used there)

@angela28chen angela28chen force-pushed the fix-mac2 branch 2 times, most recently from 5f1cbd6 to e9e2219 Compare January 7, 2026 18:22
@angela28chen
Copy link
Collaborator Author

Manual Testing (2026/01/08 4:10 EST):

  • Windows
    • dive_client_cli.exe --version
    • Verified UI "About Dive" correct version string and 3rd party license files
  • Mac
    • dive_client_cli.exe --version (both locations under pkg/, inside and outside the app bundle)
    • Verified UI "About Dive" correct version string and 3rd party license files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants