Add windows support
This commit is contained in:
parent
a66af737d8
commit
919ff32b1b
5 changed files with 45 additions and 57 deletions
|
|
@ -1,4 +0,0 @@
|
||||||
switch("passC", "-I" & thisDir() & "/src/libnx/wrapper/nx/include")
|
|
||||||
switch("passL", "-specs="&thisDir()&"/src/libnx/wrapper/nx/switch.specs -L"&thisDir()&"/src/libnx/wrapper/nx/lib -lnx")
|
|
||||||
#switch("passC", "-I$DEVKITPRO/libnx/include")
|
|
||||||
#switch("passL", "-specs=$DEVKITPRO/libnx/switch.specs -L$DEVKITPRO/libnx/lib -lnx")
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# Package
|
# Package
|
||||||
|
|
||||||
version = "0.1.7"
|
version = "0.1.8"
|
||||||
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"
|
||||||
|
|
|
||||||
90
libnxGen.cfg
90
libnxGen.cfg
|
|
@ -22,12 +22,46 @@ filter=lock
|
||||||
"${output}/nim.cfg"
|
"${output}/nim.cfg"
|
||||||
"${output}/config.nims"
|
"${output}/config.nims"
|
||||||
|
|
||||||
|
[svc.h]
|
||||||
|
search = "PACKED"
|
||||||
|
replace = ""
|
||||||
|
|
||||||
|
search.noreturn = "NORETURN"
|
||||||
|
replace.noreturn = ""
|
||||||
|
|
||||||
|
defines=true
|
||||||
|
|
||||||
|
[result.h]
|
||||||
|
defines = true
|
||||||
|
|
||||||
|
[hid.h]
|
||||||
|
defines = true
|
||||||
|
search.static_assert = "static_assert"
|
||||||
|
replace.static_assert = "// static_assert"
|
||||||
|
search.touch = "touchPosition"
|
||||||
|
replace.touch = "TouchPosition"
|
||||||
|
|
||||||
|
[ipc.h]
|
||||||
|
defines = true
|
||||||
|
|
||||||
|
[romfs_dev.h]
|
||||||
|
search = "romfs_"
|
||||||
|
replace = "Romfs_"
|
||||||
|
|
||||||
|
[gfx.h]
|
||||||
|
defines = true
|
||||||
|
|
||||||
|
[ioctl.h]
|
||||||
|
defines = true
|
||||||
|
search = "_NV_"
|
||||||
|
replace = "UNV_"
|
||||||
|
|
||||||
|
search.nv = "__nv_"
|
||||||
|
replace.nv = "DUnv_"
|
||||||
|
|
||||||
[n.wildcard]
|
[n.wildcard]
|
||||||
wildcard.1 = "console.h"
|
wildcard.1 = "console.h"
|
||||||
rename = "$replace(console=con)"
|
rename = "$replace(console=cons)"
|
||||||
|
|
||||||
search = "_Bool"
|
|
||||||
replace = "bool"
|
|
||||||
|
|
||||||
wildcard.2 = "*.h"
|
wildcard.2 = "*.h"
|
||||||
|
|
||||||
|
|
@ -68,10 +102,7 @@ replace.cdecl = "cdecl"
|
||||||
|
|
||||||
[n.prepare]
|
[n.prepare]
|
||||||
git = "https://github.com/switchbrew/libnx"
|
git = "https://github.com/switchbrew/libnx"
|
||||||
execute = """
|
#execute = """cd ${output}; make;"""
|
||||||
cd ${output}
|
|
||||||
make
|
|
||||||
"""
|
|
||||||
|
|
||||||
[n.post]
|
[n.post]
|
||||||
reset=true
|
reset=true
|
||||||
|
|
@ -81,56 +112,21 @@ create = """
|
||||||
--path:"../"
|
--path:"../"
|
||||||
--path:"../../"
|
--path:"../../"
|
||||||
"""
|
"""
|
||||||
|
noprocess=true
|
||||||
|
|
||||||
[src/libnx/wrapper/config.nims]
|
[src/libnx/wrapper/config.nims]
|
||||||
create = """
|
create = """
|
||||||
switch("passC", "-I" & thisDir() & "/nx/include")
|
switch("passC", "-I" & thisDir() & "/nx/include")
|
||||||
switch("passL", "-specs=" & thisDir() & "/nx/switch.specs -L" & thisDir() & "/nx/lib -lnx")
|
switch("passL", "-specs=" & thisDir() & "/nx/switch.specs -L" & thisDir() & "/nx/lib -lnx")
|
||||||
"""
|
"""
|
||||||
|
noprocess=true
|
||||||
[result.h]
|
|
||||||
defines = true
|
|
||||||
|
|
||||||
[hid.h]
|
|
||||||
defines = true
|
|
||||||
search.static_assert = "static_assert"
|
|
||||||
replace.static_assert = "// static_assert"
|
|
||||||
search.touch = "touchPosition"
|
|
||||||
replace.touch = "TouchPosition"
|
|
||||||
|
|
||||||
[ipc.h]
|
|
||||||
defines = true
|
|
||||||
|
|
||||||
[romfs_dev.h]
|
|
||||||
search = "romfs_"
|
|
||||||
replace = "Romfs_"
|
|
||||||
|
|
||||||
[gfx.h]
|
|
||||||
defines = true
|
|
||||||
|
|
||||||
[ioctl.h]
|
|
||||||
defines = true
|
|
||||||
search = "_NV_"
|
|
||||||
replace = "UNV_"
|
|
||||||
|
|
||||||
search.nv = "__nv_"
|
|
||||||
replace.nv = "DUnv_"
|
|
||||||
|
|
||||||
[svc.h]
|
|
||||||
search = "PACKED"
|
|
||||||
replace = ""
|
|
||||||
|
|
||||||
search.noreturn = "NORETURN"
|
|
||||||
replace.noreturn = ""
|
|
||||||
|
|
||||||
defines=true
|
|
||||||
pipe = "vim -es +'g/^static inline.*{/norm f{d%r;' -es +%print -es +q! $file"
|
|
||||||
|
|
||||||
[switch.h]
|
[switch.h]
|
||||||
preprocess = true
|
preprocess = true
|
||||||
defines = true
|
defines = true
|
||||||
recurse = true
|
recurse = true
|
||||||
|
|
||||||
|
|
||||||
[types.nim]
|
[types.nim]
|
||||||
search.o = " uint8*"
|
search.o = " uint8*"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
|
|
@ -313,7 +309,7 @@ prepend.o = """
|
||||||
import libnx/ext/integer128
|
import libnx/ext/integer128
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[con.nim]
|
[cons.nim]
|
||||||
search.o = "type\n"
|
search.o = "type\n"
|
||||||
prepend.o = """
|
prepend.o = """
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
switch("passC", "-I" & thisDir() & "/wrapper/nx/include")
|
|
||||||
switch("passL", "-specs=" & thisDir() & "/wrapper/nx/switch.specs -L" & thisDir() & "/wrapper/nx/lib -lnx")
|
|
||||||
#switch("passC", "-I$DEVKITPRO/libnx/include")
|
|
||||||
#switch("passL", "-specs=$DEVKITPRO/libnx/switch.specs -L$DEVKITPRO/libnx/lib -lnx")
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import libnx/wrapper/con
|
import libnx/wrapper/cons
|
||||||
import libnx/utils
|
import libnx/utils
|
||||||
import macros, strutils
|
import macros, strutils
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue