Skip to content

Commit

Permalink
update path hunting on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ironsheep committed Dec 13, 2024
1 parent 5f5c1ea commit 3807d99
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions spin2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ Possible next additions:
- Add new-file templates as Snippets
- Add additional Snippets as the community identifies them

## [2.3.2] 2024-12-12

Minor updates to Compiler detection for P1/P2 on Windows

- Repair parsing of PATH on windows and how expected location paths are created
- Extension logging is enabled for now to help us diagnose new-user installations

## [2.3.1] 2024-12-12

Minor updates to Compiler detection for P1/P2
Expand Down
12 changes: 6 additions & 6 deletions spin2/client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1100,17 +1100,17 @@ async function locateTools(): Promise<void> {
const optLocalBin = path.join(`${path.sep}opt`, 'local', 'bin');
let platformPaths: string[] = [];
if (isWindows()) {
const envDirs = envPath.split(':').filter(Boolean);
const envDirs = envPath.split(';').filter(Boolean); // Windows is ';' separated
// C:\Program Files (x86)\Parallax Inc\PNut
// C:\Programs\IronSheepProductions\pnut_ts
// C:\Programs\TotalSpectrum\flexprop
const appFlexProp = path.join(`${path.sep}Programs`, 'TotalSpectrum', 'flexprop', 'bin');
const appPNutTS = path.join(`${path.sep}Programs`, 'IronSheepProductions', 'pnut_ts');
const appParallax = path.join(`${path.sep}Program Files (x86)`, 'Parallax Inc');
const appFlexProp = path.join(`C:${path.sep}Programs`, 'TotalSpectrum', 'flexprop', 'bin');
const appPNutTS = path.join(`C:${path.sep}Programs`, 'IronSheepProductions', 'pnut_ts');
const appParallax = path.join(`C:${path.sep}Program Files (x86)`, 'Parallax Inc');
const appPNut = path.join(`${appParallax}`, 'PNut');
platformPaths = [...envDirs, appParallax, appPNut, appPNutTS, appFlexProp];
} else if (isMac()) {
const envDirs = envPath.split(':').filter(Boolean);
const envDirs = envPath.split(':').filter(Boolean); // macOS is ':' separated
// /Applications/flexprop/bin
// /Applications
// ~/Applications
Expand All @@ -1123,7 +1123,7 @@ async function locateTools(): Promise<void> {
// assume linux, RPi
// /opt/flexprop
// /opt/pnut_ts
const envDirs = envPath.split(':').filter(Boolean);
const envDirs = envPath.split(':').filter(Boolean); // linux is ':' separated
const optPNutTS = path.join(`${path.sep}opt`, 'pnut_ts');
const optFlexpropBin = path.join(`${path.sep}opt`, 'flexprop', 'bin');
platformPaths = [...envDirs, userBin, userLocalBin, optFlexpropBin, optPNutTS];
Expand Down
2 changes: 1 addition & 1 deletion spin2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"icon": "images/Propeller.ico",
"author": "IronSheep",
"license": "MIT",
"version": "2.3.1",
"version": "2.3.2",
"repository": {
"type": "git",
"url": "https://github.com/ironsheep/P2-vscode-langserv-extension"
Expand Down

0 comments on commit 3807d99

Please sign in to comment.