|
8 | 8 | "& (mkdir \"${workspaceFolder}\\libs\\bin\\Release\")" |
9 | 9 | ], |
10 | 10 | "group": {"kind": "build", "isDefault": false}, |
11 | | - "label": "Create \\libs\\obj\\Release and \\libs\\bin\\Release folders", |
| 11 | + "label": "Create `\\libs\\obj\\Release` and `\\libs\\bin\\Release` folders", |
12 | 12 | "type": "shell" |
13 | 13 | }, |
14 | 14 | { |
|
23 | 23 | "group": {"kind": "build", "isDefault": false}, |
24 | 24 | "label": "Compile libs project", |
25 | 25 | "type": "shell", |
26 | | - "dependsOn": "Create \\libs\\obj\\Release and \\libs\\bin\\Release folders" |
| 26 | + "dependsOn": "Create `\\libs\\obj\\Release` and `\\libs\\bin\\Release` folders" |
| 27 | + }, |
| 28 | + { |
| 29 | + "command": [ |
| 30 | + "(if exist \"${workspaceFolder}\\src\\obj\" rmdir /s /q \"${workspaceFolder}\\src\\obj\")", |
| 31 | + "& (mkdir \"${workspaceFolder}\\src\\obj\\Release\")", |
| 32 | + "& (if exist \"${workspaceFolder}\\src\\bin\" rmdir /s /q \"${workspaceFolder}\\src\\bin\")", |
| 33 | + "& (mkdir \"${workspaceFolder}\\src\\bin\\Release\")" |
| 34 | + ], |
| 35 | + "group": {"kind": "build", "isDefault": false}, |
| 36 | + "label": "Create `\\src\\obj\\Release` and `\\src\\bin\\Release` folders", |
| 37 | + "type": "shell" |
| 38 | + }, |
| 39 | + { |
| 40 | + "command": "copy \"${workspaceFolder}\\src\\SDL2.dll\" \"${workspaceFolder}\\src\\bin\\Release\\SDL2.dll\"", |
| 41 | + "dependsOn": "Create `\\src\\obj\\Release` and `\\src\\bin\\Release` folders", |
| 42 | + "group": {"kind": "build", "isDefault": false}, |
| 43 | + "label": "Copy `SDL2.dll` file from `.\\src\\` into `.\\src\\bin\\Release\\", |
| 44 | + "type": "shell" |
27 | 45 | }, |
28 | 46 | { |
29 | 47 | "args": [ |
30 | 48 | "-fdiagnostics-color=always", |
31 | 49 | "-g", |
32 | | - "${file}", |
| 50 | + "${workspaceFolder}\\src\\*.c", |
| 51 | + "${workspaceFolder}\\src\\sdl\\*.c", |
33 | 52 | "-o", |
34 | | - "${fileDirname}\\bin\\Release\\${fileBasenameNoExtension}.exe", |
| 53 | + "${workspaceFolder}\\src\\bin\\Release\\src.exe", |
| 54 | + "-I${workspaceFolder}\\src\\sdl\\SDL2\\include\\SDL2", |
| 55 | + "-I${workspaceFolder}\\src\\sdl\\SDL2\\include", |
| 56 | + "-L${workspaceFolder}\\src\\sdl\\SDL2\\lib", |
| 57 | + "-lSDL2", |
| 58 | + "-lSDL2main", |
35 | 59 | "-s", |
36 | 60 | "${workspaceFolder}\\libs\\bin\\Release\\libs.a" |
37 | 61 | ], |
38 | 62 | "command": "gcc", |
39 | | - "dependsOn": "Compile libs project", |
| 63 | + "dependsOn": [ |
| 64 | + "Compile libs project", |
| 65 | + "Copy `SDL2.dll` file from `.\\src\\` into `.\\src\\bin\\Release\\" |
| 66 | + ], |
40 | 67 | "group": {"kind": "build", "isDefault": true}, |
41 | 68 | "label": "C/C++: gcc.exe build active file", |
42 | 69 | "problemMatcher": ["$gcc"], |
|
0 commit comments