Browse Source

AutoBuild tweaks

Scott Lahteine 4 years ago
parent
commit
1e57c6e6e3

+ 4
- 4
buildroot/share/vscode/AutoBuildMarlin/README.md View File

@@ -34,7 +34,7 @@ Before you install AutoBuildMarlin you'll first need to [Install PlatformIO in V
34 34
 
35 35
   Icon|Action
36 36
   ----|------
37
-  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/B_small.png)|Start **PIO Build** to test your Marlin build
38
-  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/C_small.png)|Start **PIO Clean** to delete old build files
39
-  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/U_small.png)|Start **PIO Upload** to install Marlin on your board
40
-  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/T_small.png)|Start **PIO Upload (traceback)** to install Marlin with debugging
37
+  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/B_small.png)|Start **Marlin Build** to test your Marlin build
38
+  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/U_small.png)|Start **Marlin Upload** to install Marlin on your board
39
+  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/T_small.png)|Start **Marlin Upload (traceback)** to install Marlin with debugging
40
+  ![](https://github.com/MarlinFirmware/Marlin/raw/bugfix-2.0.x/buildroot/share/vscode/AutoBuildMarlin/img/C_small.png)|Start **Marlin Clean** to delete old build files

+ 15
- 15
buildroot/share/vscode/AutoBuildMarlin/extension.js View File

@@ -7,34 +7,34 @@ function activate(context) {
7 7
   console.log('Extension "AutoBuildMarlin" is now active!');
8 8
 
9 9
   var NEXT_TERM_ID = 1;
10
-  var pio_build     = vscode.commands.registerCommand('piobuild',     function () {
10
+  var mf_build     = vscode.commands.registerCommand('mfbuild',     function () {
11 11
     vscode.commands.executeCommand('workbench.action.files.saveAll');
12
-    const terminal = vscode.window.createTerminal(`AB Build #${NEXT_TERM_ID++}`);
12
+    const terminal = vscode.window.createTerminal(`Marlin Build #${NEXT_TERM_ID++}`);
13 13
     terminal.show(true);
14 14
     terminal.sendText("python buildroot/share/atom/auto_build.py build");
15 15
     });
16
-  var pio_clean     = vscode.commands.registerCommand('pioclean',     function () {
17
-    const terminal = vscode.window.createTerminal(`AB Clean #${NEXT_TERM_ID++}`);
18
-    terminal.show(true);
19
-    terminal.sendText("python buildroot/share/atom/auto_build.py clean");
20
-  });
21
-  var pio_upload    = vscode.commands.registerCommand('pioupload',    function () {
16
+  var mf_upload    = vscode.commands.registerCommand('mfupload',    function () {
22 17
     vscode.commands.executeCommand('workbench.action.files.saveAll');
23
-    const terminal = vscode.window.createTerminal(`AB Upload #${NEXT_TERM_ID++}`);
18
+    const terminal = vscode.window.createTerminal(`Marlin Upload #${NEXT_TERM_ID++}`);
24 19
     terminal.show(true);
25 20
     terminal.sendText("python buildroot/share/atom/auto_build.py upload");
26 21
   });
27
-  var pio_traceback = vscode.commands.registerCommand('piotraceback', function () {
22
+  var mf_traceback = vscode.commands.registerCommand('mftraceback', function () {
28 23
     vscode.commands.executeCommand('workbench.action.files.saveAll');
29
-    const terminal = vscode.window.createTerminal(`AB Traceback #${NEXT_TERM_ID++}`);
24
+    const terminal = vscode.window.createTerminal(`Marlin Traceback #${NEXT_TERM_ID++}`);
30 25
     terminal.show(true);
31 26
     terminal.sendText("python buildroot/share/atom/auto_build.py traceback");
32 27
   });
28
+  var mf_clean     = vscode.commands.registerCommand('mfclean',     function () {
29
+    const terminal = vscode.window.createTerminal(`Marlin Clean #${NEXT_TERM_ID++}`);
30
+    terminal.show(true);
31
+    terminal.sendText("python buildroot/share/atom/auto_build.py clean");
32
+  });
33 33
 
34
-  context.subscriptions.push(pio_build);
35
-  context.subscriptions.push(pio_clean);
36
-  context.subscriptions.push(pio_upload);
37
-  context.subscriptions.push(pio_traceback);
34
+  context.subscriptions.push(mf_build);
35
+  context.subscriptions.push(mf_upload);
36
+  context.subscriptions.push(mf_traceback);
37
+  context.subscriptions.push(mf_clean);
38 38
 }
39 39
 exports.activate = activate;
40 40
 

+ 38
- 30
buildroot/share/vscode/AutoBuildMarlin/package.json View File

@@ -6,65 +6,69 @@
6 6
   "publisher": "marlinfirmware",
7 7
   "icon": "logo.svg",
8 8
   "engines": {
9
-    "vscode": "^1.23.0"
9
+    "vscode": "^1.32.0"
10 10
   },
11 11
   "enableProposedApi": true,
12 12
   "categories": [
13 13
     "Other"
14 14
   ],
15 15
   "activationEvents": [
16
-    "onCommand:piobuild",
17
-    "onCommand:pioclean",
18
-    "onCommand:pioupload",
19
-    "onCommand:piotraceback"
16
+    "onCommand:mfbuild",
17
+    "onCommand:mfclean",
18
+    "onCommand:mfupload",
19
+    "onCommand:mftraceback"
20 20
   ],
21 21
   "main": "./extension",
22 22
   "contributes": {
23 23
     "viewsContainers": {
24 24
       "activitybar": [
25 25
         {
26
-          "id": "auto-build",
27
-          "title": "Auto Build Marlin",
26
+          "id": "autoBuildVC",
27
+          "title": "Marlin Build",
28 28
           "icon": "resources/AB.svg"
29 29
         }
30 30
       ]
31 31
     },
32 32
     "views": {
33
-      "auto-build": [
33
+      "autoBuildVC": [
34 34
         {
35
-          "id": "autobuild",
36
-          "name": " "
35
+          "id": "autoBuildView",
36
+          "name": "Build…"
37
+        },
38
+        {
39
+          "id": "marlinView",
40
+          "name": "Marlin Info"
37 41
         }
38 42
       ]
39 43
     },
40 44
     "commands": [
41 45
       {
42
-        "command": "piobuild",
43
-        "title": "PIO Build",
46
+        "command": "mfbuild",
47
+        "title": "Build",
44 48
         "icon": {
45 49
           "light": "resources/B48x48_light.svg",
46 50
           "dark": "resources/B48x48_dark.svg"
47 51
         }
48 52
       },
49 53
       {
50
-        "command": "pioupload",
51
-        "title": "PIO Upload",
54
+        "command": "mfupload",
55
+        "title": "Upload",
52 56
         "icon": {
53 57
           "light": "resources/U48x48_light.svg",
54 58
           "dark": "resources/U48x48_dark.svg"
55 59
         }
56 60
       },
57 61
       {
58
-        "command": "piotraceback",
59
-        "title": "PIO Upload (traceback)",
62
+        "command": "mftraceback",
63
+        "title": "Upload (traceback)",
60 64
         "icon": {
61 65
           "light": "resources/T48x48_light.svg",
62 66
           "dark": "resources/T48x48_dark.svg"
63 67
         }
64 68
       },
65 69
       {
66
-        "command": "pioclean",
67
-        "title": "PIO Clean",
70
+        "command": "mfclean",
71
+        "title": "Clean",
68 72
         "icon": {
69 73
           "light": "resources/C48x48_light.svg",
70 74
           "dark": "resources/C48x48_dark.svg"
@@ -74,20 +78,24 @@
74 78
     "menus": {
75 79
       "view/title": [
76 80
         {
77
-          "command": "piobuild",
78
-          "group": "navigation@1"
81
+          "command": "mfbuild",
82
+          "group": "navigation@1",
83
+          "when": "view == autoBuildView || view == marlinView"
79 84
         },
80 85
         {
81
-          "command": "pioupload",
82
-          "group": "navigation@2"
86
+          "command": "mfupload",
87
+          "group": "navigation@2",
88
+          "when": "view == autoBuildView || view == marlinView"
83 89
         },
84 90
         {
85
-          "command": "piotraceback",
86
-          "group": "navigation@3"
91
+          "command": "mftraceback",
92
+          "group": "navigation@3",
93
+          "when": "view == autoBuildView || view == marlinView"
87 94
         },
88 95
         {
89
-          "command": "pioclean",
90
-          "group": "navigation@4"
96
+          "command": "mfclean",
97
+          "group": "navigation@4",
98
+          "when": "view == autoBuildView || view == marlinView"
91 99
         }
92 100
       ]
93 101
     }
@@ -100,10 +108,10 @@
100 108
     "test": "npm run compile && node ./node_modules/vscode/bin/test"
101 109
   },
102 110
   "devDependencies": {
103
-    "vscode": "^1.1.17",
104
-    "typescript": "^2.6.1",
105
-    "tslint": "^5.8.0",
106
-    "@types/node": "^7.0.43",
111
+    "@types/vscode": "^1.34.0",
112
+    "typescript": "^3.5.1",
113
+    "tslint": "^5.16.0",
114
+    "@types/node": "^10.14.17",
107 115
     "@types/mocha": "^2.2.42"
108 116
   }
109 117
 }

Loading…
Cancel
Save