Skip to content

Commit 34cf623

Browse files
authored
Merge pull request #16 from zapta/main
Assorted tweaks and fixes.
2 parents 828aa47 + cc60e3c commit 34cf623

4 files changed

Lines changed: 18 additions & 7 deletions

File tree

commands.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ const HELP_TREE = [
276276
title: "commands",
277277
tooltip: "Show Apio commands documentation",
278278
id: "apio.docsCommands",
279-
action: { url: "https://fpgawars.github.io/apio/docs/cmd-apio-build" },
279+
action: { url: "https://fpgawars.github.io/apio/docs/commands-list" },
280280
},
281281
{
282282
title: "project file apio.ini",

extension.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,11 @@ function _determineActivationInfo() {
539539
}
540540

541541
// Determine the path of the expected apio project dir.
542-
const wsDirPath = ws.uri.fsPath;
543-
apioLog.msg(`wsFolderPath: ${wsDirPath}`);
542+
let wsDirPath = ws.uri.fsPath;
543+
apioLog.msg(`original wsFolderPath: ${wsDirPath}`);
544+
545+
wsDirPath = path.resolve(wsDirPath);
546+
apioLog.msg(`canonical wsFolderPath: ${wsDirPath}`);
544547

545548
// Determine the path of the expected apio.ini file.
546549
const apioIniPath = path.join(wsDirPath, "apio.ini");

get-example-wizard.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const cp = require("child_process");
1010
const utils = require("./utils.js");
1111
const apioLog = require("./apio-log.js");
1212

13-
1413
// Load the examples json data from apio. Before invoking this
1514
// wizard we run 'apio api get-examples -o <output-file>'.
1615
function loadApioExamplesData() {
@@ -136,8 +135,11 @@ function getWebviewContent() {
136135

137136
// Dispatched when the user submit the form to create the project.
138137
async function createProjectFromExample(context, msg, panel) {
139-
const folderPath = msg.folder.trim();
138+
// Get the destination directory.
139+
let folderPath = msg.folder.trim();
140140

141+
// Make sure it's absolute, though on windows, this doesn't verify that
142+
// the driver letter exists.
141143
if (!path.isAbsolute(folderPath)) {
142144
panel.webview.postMessage({
143145
command: "status",
@@ -147,6 +149,12 @@ async function createProjectFromExample(context, msg, panel) {
147149
return;
148150
}
149151

152+
// Use the absolute canonical form of the destination folder. On windows
153+
// for example, this include the drive letter c:\ even if the user
154+
// didn't specify it.
155+
folderPath = path.resolve(folderPath);
156+
157+
// Construct example full name.
150158
const example = msg.board + "/" + msg.example;
151159

152160
try {
@@ -182,7 +190,7 @@ async function createProjectFromExample(context, msg, panel) {
182190
});
183191

184192
// Signal to the apio activate() that will be called on the new
185-
// workspace to automatically open apio.ini.
193+
// workspace to automatically open apio.ini.
186194
await context.globalState.update("apio.justCreatedProject", true);
187195

188196
// Switch to the new workspace. This will start a new instance of

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"activitybar": [
4040
{
4141
"id": "apioContainer",
42-
"title": "Apio",
42+
"title": "Apio FPGA",
4343
"icon": "media/sidebar-icon.svg"
4444
}
4545
]

0 commit comments

Comments
 (0)