Make buildexamples use dkp for windows
This commit is contained in:
parent
65299fc325
commit
6d465e4de1
1 changed files with 11 additions and 3 deletions
10
libnx.nimble
10
libnx.nimble
|
|
@ -16,7 +16,7 @@ if detectOs(Windows):
|
||||||
username = getEnv("USERNAME")
|
username = getEnv("USERNAME")
|
||||||
|
|
||||||
# Deps
|
# Deps
|
||||||
requires "nim >= 0.18.1", "https://github.com/genotrance/nimgen#head"
|
requires "nim >= 0.18.1", "nimgen#dc9943a22c9c8f6a5a6a92f0055e1de4dfaf87d2"
|
||||||
requires "switch_build >= 0.1.3"
|
requires "switch_build >= 0.1.3"
|
||||||
|
|
||||||
task setup, "Download and generate bindings":
|
task setup, "Download and generate bindings":
|
||||||
|
|
@ -24,6 +24,14 @@ task setup, "Download and generate bindings":
|
||||||
exec prefix & "nimgen libnxGen.cfg"
|
exec prefix & "nimgen libnxGen.cfg"
|
||||||
|
|
||||||
task buildExamples, "Build switch examples":
|
task buildExamples, "Build switch examples":
|
||||||
|
if detectOs(Windows):
|
||||||
|
let devkitPath = getEnv("DEVKITPRO")
|
||||||
|
if devkitPath == "" or not dirExists(devkitPath):
|
||||||
|
echo "You must set the DEVKITPRO environment variable to something valid!"
|
||||||
|
else:
|
||||||
|
exec prefix & "switch_build --libnxPath=\"" & devkitPath & "/libnx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/helloworld/helloworld.nim"
|
||||||
|
exec prefix & "switch_build --libnxPath=\"" & devkitPath & "/libnx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/accounts/account_ex.nim"
|
||||||
|
else:
|
||||||
exec prefix & "switch_build --libnxPath=\"" & thisDir() & "/src/libnx/wrapper/nx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/helloworld/helloworld.nim"
|
exec prefix & "switch_build --libnxPath=\"" & thisDir() & "/src/libnx/wrapper/nx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/helloworld/helloworld.nim"
|
||||||
exec prefix & "switch_build --libnxPath=\"" & thisDir() & "/src/libnx/wrapper/nx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/accounts/account_ex.nim"
|
exec prefix & "switch_build --libnxPath=\"" & thisDir() & "/src/libnx/wrapper/nx/\" --author=\"" & username & "\" --version=\"1.0.0\" examples/accounts/account_ex.nim"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue