-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwindows.json
69 lines (69 loc) · 3.87 KB
/
windows.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
[
{
"text": "Installing Git",
"download_URL": ["https://github.com/git-for-windows/git/releases/download/v2.45.0.windows.1/Git-2.45.0-64-bit.exe", "git_installer.exe"],
"cmd": "git_installer.exe /SILENT",
"path": "C:\\Program Files\\Git"
},
{
"text": "Installing VS Code",
"download_URL": ["https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user", "vs_code_installer.exe"],
"cmd": "vs_code_installer.exe /silent /mergetasks=!runcode",
"path": "~~~\\AppData\\Local\\Programs\\Microsoft VS Code"
},
{
"text": "Installing VS Code Extension \"%ITER%\"",
"cmd": "cd \"~~~\\AppData\\Local\\Programs\\Microsoft VS Code\\bin\\\" && .\\code --install-extension %ITER% --force",
"iterations": ["ms-vscode-remote.vscode-remote-extensionpack", "ms-azuretools.vscode-docker", "ms-vscode.cpptools-extension-pack", "ms-python.python"]
},
{
"text": "Installing Docker (takes a while)",
"download_URL": ["https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=module", "docker_installer.exe"],
"cmd": "docker_installer.exe install --quiet",
"path": "C:\\Program Files\\Docker",
"pause": "Open Docker Desktop, accept the license, skip sign-in. Once \"Starting the Docker Engine\" goes away, leave the app open and continue"
},
{
"text": "Installing WSL USB",
"download_URL": ["https://github.com/dorssel/usbipd-win/releases/download/v4.2.0/usbipd-win_4.2.0.msi", "wslusb_installer.msi"],
"cmd": "Msiexec /i wslusb_installer.msi /quiet",
"path": "C:\\Program Files\\usbipd-win"
},
{
"text": "Updating all packages on WSL (takes a while)",
"cmd": "wsl sh -c \"echo %IN% | sudo -S apt-get -y update && echo %IN% | sudo -S apt-get -y upgrade\""
},
{
"text": "Installing \"%ITER%\" package on WSL using apt-get",
"cmd": "wsl sh -c \"echo %IN% | sudo -S apt-get -y install %ITER%\"",
"skip_cmd": "wsl sh -c \"dpkg-query -W -f='\\${Status}' %ITER% | grep -q 'installed'\"",
"iterations": ["git", "cmake", "libusb-1.0-0-dev"]
},
{
"text": "Installing ST-Flash on WSL using dpkg (takes a while)",
"cmd": "wsl sh -c \"wget -P /tmp/ https://github.com/stlink-org/stlink/releases/download/v1.7.0/stlink_1.7.0-1_amd64.deb && echo %IN% | sudo -S dpkg -i --force-overwrite /tmp/stlink_1.7.0-1_amd64.deb || echo %IN% | sudo -S apt -y --fix-broken install\"",
"skip_cmd": "wsl sh -c \"dpkg-query -W -f='\\${Status}' stlink | grep -q 'installed'\""
},
{
"text": "Creating a directory for code on WSL at \"solarCarRepo\"",
"cmd": "wsl sh -c \"mkdir ~/solarCarRepo\"",
"skip_cmd": "wsl sh -c \"[ -d \"~/solarCarRepo\" ] && exit 0 || exit 1\""
},
{
"text": "Cloning the \"%ITER%\" repository",
"cmd": "wsl sh -c \"cd ~/solarCarRepo/ && git clone https://github.com/solarcaratuva/%ITER%.git\"",
"skip_cmd": "wsl sh -c \"[ -d \"~/solarCarRepo/%ITER%\" ] && exit 0 || exit 1\"",
"iterations": ["Rivanna2S", "Rivanna3"]
},
{
"text": "Creating the \"%ITER%_compile\" docker container (takes a while)",
"cmd": "wsl sh -c \"docker run -d -it --name %ITER%_compile -v ~/solarCarRepo/%ITER%/:/root/Rivanna2:Z ghcr.io/solarcaratuva/rivanna2-env\"",
"skip_cmd": "wsl sh -c \"docker ps -a --format '{{.Names}}' | grep -q \"%ITER%_compile\" && exit 0 || exit 1\"",
"iterations": ["Rivanna2S", "Rivanna3"]
},
{
"text": "Running \"mbed-tools deploy\" to initialize the compiler in the \"%ITER%_compile\" container",
"cmd": "wsl sh -c \"docker exec %ITER%_compile sh -c 'cd Rivanna2 && mbed-tools deploy'\"",
"iterations": ["Rivanna2S", "Rivanna3"]
}
]