Make nimble windows friendly
This commit is contained in:
parent
ea55f461b5
commit
a66af737d8
1 changed files with 13 additions and 4 deletions
17
libnx.nimble
17
libnx.nimble
|
|
@ -1,23 +1,32 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.1.6"
|
version = "0.1.7"
|
||||||
author = "Joey Payne"
|
author = "Joey Payne"
|
||||||
description = "Nintendo Switch library libnx for Nim."
|
description = "Nintendo Switch library libnx for Nim."
|
||||||
license = "The Unlicense"
|
license = "The Unlicense"
|
||||||
|
|
||||||
srcDir = "src"
|
srcDir = "src"
|
||||||
|
|
||||||
|
import distros
|
||||||
|
|
||||||
|
var prefix = ""
|
||||||
|
var username = "$USER"
|
||||||
|
if detectOs(Windows):
|
||||||
|
prefix = "cmd /c "
|
||||||
|
username = "%username%"
|
||||||
|
|
||||||
# Deps
|
# Deps
|
||||||
requires "nim >= 0.18.1", "https://github.com/genotrance/nimgen#head"
|
requires "nim >= 0.18.1", "https://github.com/genotrance/nimgen#head"
|
||||||
requires "switch-build >= 0.1.6"
|
requires "switch-build >= 0.1.6"
|
||||||
|
|
||||||
task setup, "Download and generate bindings":
|
task setup, "Download and generate bindings":
|
||||||
echo "Building libnx..."
|
echo "Building libnx..."
|
||||||
exec "nimgen libnxGen.cfg"
|
exec prefix & "nimgen libnxGen.cfg"
|
||||||
|
|
||||||
task buildExamples, "Build switch examples":
|
task buildExamples, "Build switch examples":
|
||||||
exec "switch_build --libnxPath='" & thisDir() & "/src/libnx/wrapper/nx/' --author='jyapayne' --version='1.0.0' examples/helloworld/helloworld.nim"
|
echo prefix & "switch_build --libnxPath='" & thisDir() & "/src/libnx/wrapper/nx/' --author=\"" & username & "\" --version='1.0.0' examples/helloworld/helloworld.nim"
|
||||||
exec "switch_build --libnxPath='" & thisDir() & "/src/libnx/wrapper/nx/' --author='jyapayne' --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/helloworld/helloworld.nim"
|
||||||
|
exec prefix & "switch_build --libnxPath='" & thisDir() & "/src/libnx/wrapper/nx/' --author=\"" & username & "\" --version='1.0.0' examples/accounts/account_ex.nim"
|
||||||
|
|
||||||
before install:
|
before install:
|
||||||
setupTask()
|
setupTask()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue