|
11 | 11 | } |
12 | 12 | }, |
13 | 13 | }, |
| 14 | + "linux": { |
| 15 | + "options": { |
| 16 | + "shell": { |
| 17 | + "executable": "bash", |
| 18 | + "args": [ |
| 19 | + "-c", |
| 20 | + ] |
| 21 | + } |
| 22 | + }, |
| 23 | + }, |
14 | 24 | "tasks": [ |
15 | 25 | { |
16 | 26 | "label": "Setup", |
17 | 27 | "type": "shell", |
18 | | - "command": [ |
19 | | - "python -m venv .venv;", |
20 | | - ". .\\.venv\\Scripts\\activate.ps1;", |
21 | | - "pip install -r .\\scripts\\requirements.txt;", |
22 | | - "Set-Content -value ('pushd;\n& \"\"\"' + (resolve-path 'C:\\Program Files\\Microsoft Visual Studio\\*\\*\\Common7\\Tools\\Launch-VsDevShell.ps1').path + '\"\"\" -Arch $env:PROCESSOR_ARCHITECTURE -HostArch $env:PROCESSOR_ARCHITECTURE;\npopd') -path '${workspaceFolder}\\.venv\\profile.ps1';", |
23 | | - ], |
24 | 28 | "options": { |
25 | 29 | "cwd": "${workspaceFolder}/", |
26 | 30 | }, |
|
31 | 35 | "panel": "shared", |
32 | 36 | "showReuseMessage": true, |
33 | 37 | "clear": false, |
| 38 | + }, |
| 39 | + "windows": { |
| 40 | + "command": [ |
| 41 | + "python -m venv .venv;", |
| 42 | + ". .\\.venv\\Scripts\\activate.ps1;", |
| 43 | + "pip install -r .\\scripts\\requirements.txt;", |
| 44 | + "Set-Content -value ('pushd;\n& \"\"\"' + (resolve-path 'C:\\Program Files\\Microsoft Visual Studio\\*\\*\\Common7\\Tools\\Launch-VsDevShell.ps1').path + '\"\"\" -Arch $env:PROCESSOR_ARCHITECTURE -HostArch $env:PROCESSOR_ARCHITECTURE;\npopd') -path '${workspaceFolder}\\.venv\\profile.ps1';", |
| 45 | + ], |
| 46 | + }, |
| 47 | + "linux": { |
| 48 | + "command": [ |
| 49 | + "python3 -m venv .venv;", |
| 50 | + ". ./.venv/bin/activate;", |
| 51 | + "pip install -r ./scripts/requirements.txt;", |
| 52 | + ], |
34 | 53 | } |
35 | 54 | }, |
36 | 55 | { |
37 | 56 | "label": "Clean", |
38 | 57 | "type": "shell", |
39 | | - "command": [ |
40 | | - "del -recurse bin_*,bin;", |
41 | | - ], |
| 58 | + "windows": { |
| 59 | + "command": [ |
| 60 | + "del -recurse bin_*,bin,.venv;", |
| 61 | + ], |
| 62 | + }, |
| 63 | + "linux": { |
| 64 | + "command": [ |
| 65 | + "rm -rf bin_* bin .venv" |
| 66 | + ] |
| 67 | + }, |
42 | 68 | "options": { |
43 | 69 | "cwd": "${workspaceFolder}/", |
44 | 70 | }, |
|
54 | 80 | { |
55 | 81 | "label": "Build [Debug]", |
56 | 82 | "type": "shell", |
57 | | - "command": "python", |
58 | | - "args": [ |
59 | | - ".\\scripts\\build.py", |
60 | | - "cmake", |
61 | | - "bin", |
62 | | - "--arch", |
63 | | - "amd64", |
64 | | - "--config", |
65 | | - "Debug", |
66 | | - ], |
| 83 | + "windows": { |
| 84 | + "command": "python", |
| 85 | + "args": [ |
| 86 | + ".\\scripts\\build.py", |
| 87 | + "cmake", |
| 88 | + "bin", |
| 89 | + "--arch", |
| 90 | + "amd64", |
| 91 | + "--config", |
| 92 | + "Debug", |
| 93 | + ], |
| 94 | + }, |
| 95 | + "linux": { |
| 96 | + "command": [ |
| 97 | + "[ -f ./.venv/bin/activate ] && . ./.venv/bin/activate;", |
| 98 | + "python3 ./scripts/build.py cmake bin --arch amd64 --config Debug;", |
| 99 | + "exit", |
| 100 | + ] |
| 101 | + }, |
67 | 102 | "options": { |
68 | 103 | "cwd": "${workspaceFolder}/", |
69 | 104 | }, |
|
0 commit comments