blob: 85fa9aebba6b095b9b4081248f833e69d7b2f9fd [file] [log] [blame]
Carlos Chinchilla5b83e822020-08-20 14:12:16 -07001:<<"::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 Montanez445f8882020-11-06 15:12:24 -080028set "_pw_bootstrap_script=%~dp0.\third_party\pigweed\bootstrap.bat"
Armando Montanezdba40bd2020-11-07 15:42:40 -080029set "PW_PROJECT_ROOT=%~dp0."
30set "SAMPLE_PROJECT_ROOT=%PW_PROJECT_ROOT%"
Armando Montanez445f8882020-11-06 15:12:24 -080031
32:: Set your project's banner and color.
Armando Montanezdba40bd2020-11-07 15:42:40 -080033set "PW_BRANDING_BANNER=%PW_PROJECT_ROOT%\banner.txt"
34set "PW_BRANDING_BANNER_COLOR=cyan"
Carlos Chinchilla5b83e822020-08-20 14:12:16 -070035
Rob Mohr06f372c2020-11-05 07:05:54 -080036if not exist "%_pw_bootstrap_script%" (
Anthony DiGirolamo95eff362023-09-14 22:42:25 +000037 echo Updating git submodules
38 git submodule update --init
39)
40
41set "_tinyusb_license=%~dp0.\third_party\pico_sdk\lib\tinyusb\LICENSE"
42if not exist "%_tinyusb_license%" (
43 cd third_party\pico_sdk
44 git submodule update --init lib\tinyusb
45 cd ..
46 cd ..
Carlos Chinchilla5b83e822020-08-20 14:12:16 -070047)
48
Rob Mohr06f372c2020-11-05 07:05:54 -080049call "%_pw_bootstrap_script%"
Carlos Chinchilla5b83e822020-08-20 14:12:16 -070050
51:: Add user-defined initial setup here.
52
53:finish
54::WINDOWS_ONLY