zerasul / genesis-code

Visual Studio Code Genesis Development Extension
https://marketplace.visualstudio.com/items?itemName=zerasul.genesis-code
MIT License
42 stars 9 forks source link

Cannot resolve %GDK% #223

Closed Ravenheart closed 3 years ago

Ravenheart commented 3 years ago
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS D:\dev\genesis\megapong> set GDK=D:\dev\genesis\tools\sgdk
PS D:\dev\genesis\megapong> %GDK%\bin\make -f %GDK%\makefile.gen
%GDK%\bin\make : The module '%GDK%' could not be loaded. For more information, run 'Import-Module %GDK%'.
At line:1 char:1
+ %GDK%\bin\make -f %GDK%\makefile.gen
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (%GDK%\bin\make:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CouldNotAutoLoadModule

PS D:\dev\genesis\megapong>

I have correctly setup SGDK and have correct GDK and GDK_WIN variables and infact if I run the following command everything works fine.

cmd /C %GDK%\bin\make -f %GDK%\makefile.gen

I am using the latest Windows 10 Pro x64 and VSCode, Genesis Code is 1.3.1

zerasul commented 3 years ago

hi; it seems that is an error to use PowerShell. Try to configure your vscode for use CMD instead.

Im going to implement in the next versions, the use of powershell or CMD.

Ravenheart commented 3 years ago

I switched to Command Prompt, it works but if the GDK directory is explicitly set (in Genesis Code settings) then I get the following error:

Microsoft Windows [Version 10.0.19041.572]
(c) 2020 Microsoft Corporation. All rights reserved.

D:\dev\genesis\megapong>set GDK=D:\dev\genesis\tools\sgdk

D:\dev\genesis\megapong>%GDK%\bin\make -f %GDK%\makefile.gen
D:\dev\genesis\tools\sgdk/bin/mkdir -p src/boot
D:\dev\genesis\tools\sgdk/bin/sh: D:devgenesistoolssgdk/bin/mkdir: No such file or directory
make: *** [pre-build] Error 127

D:\dev\genesis\megapong>
zerasul commented 3 years ago

what version of SGDK are you using??

Ravenheart commented 3 years ago

SGDK 1.51 (april 2020), I think the problem is it expect it with forward-slashes (like on linux) rather than backslashes.

JuanjoSalvador commented 3 years ago

TL;DR: switch the default console on VSCode to CMD and reload editor. This will fix the issue.

Same error here. I'm trying to make a workaround by setting GDK and GDK_WIN environment variables on PowerShell, but that could create other problems...

Update, already fixed.

Switching the default shell to CMD and reloading VSCode makes it works. By the other hand, switching the environment variables to PS mode, will not, because SGDK is built for %GDK% instead of $GDK (PS style). So, this is a SGDK-related issue, not the extension.