Carlos Chinchilla | 5b83e82 | 2020-08-20 14:12:16 -0700 | [diff] [blame] | 1 | :<<"::WINDOWS_ONLY" |
| 2 | @echo off |
| 3 | :: Copyright 2020 The Pigweed Authors |
| 4 | :: |
| 5 | :: Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 6 | :: use this file except in compliance with the License. You may obtain a copy of |
| 7 | :: the License at |
| 8 | :: |
| 9 | :: https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | :: |
| 11 | :: Unless required by applicable law or agreed to in writing, software |
| 12 | :: distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | :: WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 14 | :: License for the specific language governing permissions and limitations under |
| 15 | :: the License. |
| 16 | ::WINDOWS_ONLY |
| 17 | :; echo "ERROR: Attempting to run Windows .bat from a Unix/POSIX shell!" |
| 18 | :; echo "Instead, run the following command." |
| 19 | :; echo "" |
| 20 | :; echo " source ./activate.sh" |
| 21 | :; echo "" |
| 22 | :<<"::WINDOWS_ONLY" |
| 23 | |
| 24 | :: The bootstrap.bat must be run initially to install all required programs. |
| 25 | :: After that, use activate.bat to enter the environment in a shell. |
| 26 | |
| 27 | :: First, activate the Pigweed development environment. |
Armando Montanez | 445f888 | 2020-11-06 15:12:24 -0800 | [diff] [blame] | 28 | set "_pw_bootstrap_script=%~dp0.\third_party\pigweed\bootstrap.bat" |
Armando Montanez | dba40bd | 2020-11-07 15:42:40 -0800 | [diff] [blame] | 29 | set "PW_PROJECT_ROOT=%~dp0." |
| 30 | set "SAMPLE_PROJECT_ROOT=%PW_PROJECT_ROOT%" |
Armando Montanez | 445f888 | 2020-11-06 15:12:24 -0800 | [diff] [blame] | 31 | |
| 32 | :: Set your project's banner and color. |
Armando Montanez | dba40bd | 2020-11-07 15:42:40 -0800 | [diff] [blame] | 33 | set "PW_BRANDING_BANNER=%PW_PROJECT_ROOT%\banner.txt" |
| 34 | set "PW_BRANDING_BANNER_COLOR=cyan" |
Carlos Chinchilla | 5b83e82 | 2020-08-20 14:12:16 -0700 | [diff] [blame] | 35 | |
Rob Mohr | 06f372c | 2020-11-05 07:05:54 -0800 | [diff] [blame] | 36 | if not exist "%_pw_bootstrap_script%" ( |
Anthony DiGirolamo | 95eff36 | 2023-09-14 22:42:25 +0000 | [diff] [blame] | 37 | echo Updating git submodules |
| 38 | git submodule update --init |
| 39 | ) |
| 40 | |
| 41 | set "_tinyusb_license=%~dp0.\third_party\pico_sdk\lib\tinyusb\LICENSE" |
| 42 | if not exist "%_tinyusb_license%" ( |
| 43 | cd third_party\pico_sdk |
| 44 | git submodule update --init lib\tinyusb |
| 45 | cd .. |
| 46 | cd .. |
Carlos Chinchilla | 5b83e82 | 2020-08-20 14:12:16 -0700 | [diff] [blame] | 47 | ) |
| 48 | |
Rob Mohr | 06f372c | 2020-11-05 07:05:54 -0800 | [diff] [blame] | 49 | call "%_pw_bootstrap_script%" |
Carlos Chinchilla | 5b83e82 | 2020-08-20 14:12:16 -0700 | [diff] [blame] | 50 | |
| 51 | :: Add user-defined initial setup here. |
| 52 | |
| 53 | :finish |
| 54 | ::WINDOWS_ONLY |