Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,29 @@ export PATH=$QTDIR:$PATH
export DIVE_ROOT_PATH=/path/to/dive
```

### macOS

- Install build dependencies: `brew install cmake ninja python`
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the "##Environment Variables" section, I think we have platform independent prerequisites installation stuff under "#Prerequisites". I would suggest doing a bit of restructuring:

# Prerequisites

## Dependencies
General overview here
### Windows
### Linux
move the section "On Linux, set up environment variables for building GFXReconstruct as explained..."
### macOS
your new special info here for "brew install"

## Environment Variables
### Windows
### Linux
### macOS
your new section on env vars

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Personally, if I'm developing on Linux or MacOS, I'd prefer everything related to that platform at one places and in execution order. so that I can copy paste the commands, instead of read the whole doc and find each related sections, and worry about if I missing something somewhere

Copy link
Collaborator

Choose a reason for hiding this comment

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

Then I think maybe:

# Prerequisites
General overview
## Windows
## Linux
## macOS
specific instructions and env vars

Personally, if I'm developing on Linux or MacOS, I'd prefer everything related to that platform at one places and in execution order. so that I can copy paste the commands, instead of read the whole doc and find each related sections, and worry about if I missing something somewhere

But I will point out that this is the current organizational structure of the BUILD.md and the README.md. The docs do not have everything related to a platform at one place: we are branching the platform-dependent stuff as the lowest level header usually. If you want to do a rearrangement that's fine but I think it should be applied consistently.

- Install Qt 5: `brew install qt@5`
- Install Java 17: `brew install openjdk@17`
```sh
# Example setup

# Android NDK prerequisite
export ANDROID_NDK_HOME=~/Library/Android/sdk/ndk/25.2.9519653

# gfxreconstruct prerequisite (Java 17)
export JAVA_HOME=$(brew --prefix openjdk@17)/libexec/openjdk.jdk/Contents/Home

# QT prerequisite
export QTDIR="$(brew --prefix qt@5)"
export CMAKE_PREFIX_PATH=$QTDIR
export PATH=$QTDIR/bin:$PATH

# Recommended but not necessary
export DIVE_ROOT_PATH=~/src/dive
```

### Windows
```bat
REM Example setup
Expand All @@ -60,7 +83,7 @@ set DIVE_ROOT_PATH=C:\path\to\dive

## Dive Host Tools

### Linux
### Linux / macOS

```sh
# Assumes python is on the path
Expand Down Expand Up @@ -104,7 +127,7 @@ TODO(b/462767957): Fix Windows build host tools install

## Dive Device Libraries

### Linux
### Linux / macOS

Warning: Release build is not supported

Expand Down