-
Notifications
You must be signed in to change notification settings - Fork 0
Add depot-tools meant for chromium development #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d8452fb
Add depot-tools meant for chromium development
FrederickEngelhardt 7442a5f
fix install scripts for depot_tools and install to external-libs
FrederickEngelhardt b2335dc
add tests
FrederickEngelhardt 9a7055e
fix tests
FrederickEngelhardt d412bb8
add guards so depot_tools cannot be installed on macos to prevent misβ¦
FrederickEngelhardt 56b270c
Fix script so it initializes if depot_tools is installed
FrederickEngelhardt b76ca63
Add success step so pending status passes
FrederickEngelhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Install cmake for building C/C++ projects | ||
|
||
| echo "Installing cmake " | ||
FrederickEngelhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| brew install cmake | ||
FrederickEngelhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| #!/usr/bin/env zsh | ||
| # Install/update depot_tools - Chromium development utilities | ||
| # https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html | ||
|
|
||
| # Platform detection | ||
| local os_type=$(uname -s) | ||
|
|
||
| # Check if running on macOS | ||
| if [[ "$os_type" == "Darwin" ]]; then | ||
| echo "β οΈ depot_tools is primarily designed for Linux development (especially Chromium builds)" | ||
| echo "" | ||
| echo "β οΈ macOS Support: Limited and not recommended" | ||
| echo " - depot_tools works better on Linux for Chromium development" | ||
| echo " - Consider using a Linux machine or WSL 2 for optimal Chromium development" | ||
| echo " - If you need depot_tools on macOS for specific workflows, run on Linux instead" | ||
| echo "" | ||
| echo "To continue with Chromium development on this macOS machine:" | ||
| echo " 1. Set up a Linux VM or use WSL 2 (recommended)" | ||
| echo " 2. Run depot_tools installation on that Linux environment" | ||
| echo "" | ||
| echo "For more information on Chromium development:" | ||
| echo " https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/mac_build_instructions.md" | ||
| echo "" | ||
| return 0 | ||
| fi | ||
|
|
||
| echo "Installing depot_tools (Chromium development utilities)..." | ||
|
|
||
| # Configuration - install to external-libs like other tools | ||
| DEPOT_TOOLS_REPO="${DEPOT_TOOLS_REPO:-https://chromium.googlesource.com/chromium/tools/depot_tools.git}" | ||
| DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$OSA_REPO_PATH/external-libs/depot_tools}" | ||
|
|
||
| # Create parent directory if needed | ||
| mkdir -p "$(dirname "$DEPOT_TOOLS_DIR")" | ||
|
|
||
| # Check if depot_tools is already installed | ||
| if [[ -d "$DEPOT_TOOLS_DIR/.git" ]]; then | ||
| echo "Updating depot_tools..." | ||
| cd "$DEPOT_TOOLS_DIR" | ||
| if ! git pull --rebase; then | ||
| echo "β Failed to update depot_tools via git pull" | ||
| return 1 | ||
| fi | ||
| cd - > /dev/null | ||
| else | ||
| # Clone depot_tools if not already present | ||
| echo "Cloning depot_tools from $DEPOT_TOOLS_REPO..." | ||
|
|
||
| if ! git clone "$DEPOT_TOOLS_REPO" "$DEPOT_TOOLS_DIR"; then | ||
| echo "β Failed to clone depot_tools from $DEPOT_TOOLS_REPO" | ||
| echo "Ensure git is installed and you have internet access" | ||
| return 1 | ||
| fi | ||
| fi | ||
|
|
||
| # Note: depot_tools will be added to PATH via plugin-init/depot-tools.zsh | ||
| # which sources the symlink created by initialize-repo-symlinks.zsh | ||
|
|
||
| echo "β depot_tools installed at: $DEPOT_TOOLS_DIR" | ||
| echo "" | ||
| echo "To complete setup:" | ||
| echo " 1. Restart your shell or run: source ~/.zshrc" | ||
| echo " 2. Verify installation: gclient --version" | ||
| echo "" | ||
| echo "For Chromium development, run:" | ||
| echo " cd ~/chromium_workspace" | ||
| echo " fetch chromium" | ||
| echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env zsh | ||
| # Install tree which is a useful utility for displaying directory structures | ||
FrederickEngelhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "Installing tree utility..." | ||
| brew install tree | ||
FrederickEngelhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/usr/bin/env zsh | ||
| # depot_tools plugin initialization | ||
| # Add depot_tools to PATH if installed | ||
| # https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html | ||
|
|
||
| DEPOT_TOOLS_HOME="${DEPOT_TOOLS_HOME:-$OSA_CONFIG/external-libs/depot_tools}" | ||
|
|
||
| if [[ -d "$DEPOT_TOOLS_HOME" ]]; then | ||
| export PATH="$DEPOT_TOOLS_HOME:$PATH" | ||
| else | ||
| # Inform user depot_tools is not installed | ||
| if [[ -z "$DEPOT_TOOLS_INIT_MESSAGE_SHOWN" ]]; then | ||
| echo "Note: depot_tools not found at: $DEPOT_TOOLS_HOME" | ||
| echo "Install with: ./osa-cli.zsh --enable depot-tools" | ||
| echo "Or manually: git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ~/.depot_tools" | ||
| export DEPOT_TOOLS_INIT_MESSAGE_SHOWN=1 | ||
| fi | ||
| fi |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.