Rename wrappers for now
This commit is contained in:
parent
a596c86f50
commit
54d10731d3
131 changed files with 179 additions and 236 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import libnx/gfx
|
||||
import libnx/console
|
||||
import libnx/hid
|
||||
import libnx/applet
|
||||
import libnx_wrapper/gfx
|
||||
import libnx_wrapper/console
|
||||
import libnx_wrapper/hid
|
||||
import libnx_wrapper/applet
|
||||
|
||||
proc printf(formatstr: cstring) {.importc: "printf", varargs,
|
||||
header: "<stdio.h>".}
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
let buildDir = "build"
|
||||
let dkpPath = getEnv("DEVKITPRO")
|
||||
let toolsPath = dkpPath & "/tools/bin"
|
||||
let dkpCompilerPath = dkpPath & "/devkitA64/bin"
|
||||
|
||||
switch("path", toolsPath)
|
||||
switch("path", dkpCompilerPath)
|
||||
|
||||
task build, "Build hello world":
|
||||
|
||||
let author = "Unspecified Author"
|
||||
let version = "1.0.0"
|
||||
|
||||
if existsDir buildDir:
|
||||
rmDir buildDir
|
||||
|
||||
echo "Building..."
|
||||
|
||||
mkDir buildDir
|
||||
|
||||
|
||||
exec "nim c --os:nintendoswitch helloworld.nim"
|
||||
|
||||
echo "Making nso..."
|
||||
exec "elf2nso helloworld.elf " & buildDir & "/helloworld.nso"
|
||||
|
||||
echo "Making pfs0..."
|
||||
mkdir buildDir & "/exefs"
|
||||
exec "cp " & buildDir & "/helloworld.nso " & buildDir & "/exefs/main"
|
||||
exec "build_pfs0 " & buildDir & "/exefs " & buildDir & "/helloworld.pfs0"
|
||||
|
||||
echo "Making lst..."
|
||||
exec "aarch64-none-elf-gcc-nm helloworld.elf > " & buildDir & "/helloworld.lst"
|
||||
|
||||
echo "Making nacp..."
|
||||
# Some meta data for the homebrew launcher
|
||||
exec "nacptool --create helloworld '" & author & "' '" & version & "' " & buildDir & "/helloworld.nacp"
|
||||
|
||||
echo "Making nro..."
|
||||
# This is the important one. The above are just extras.
|
||||
exec "elf2nro helloworld.elf helloworld.nro --icon=" & dkpPath & "/libnx/default_icon.jpg --nacp=" & buildDir & "/helloworld.nacp"
|
||||
|
||||
echo "Done! helloworld.nro is now in the current directory."
|
||||
echo "Other build files are in the build folder."
|
||||
|
||||
task clean, "Cleanup files":
|
||||
if existsDir buildDir:
|
||||
rmDir buildDir
|
||||
|
||||
if existsDir "nimcache":
|
||||
rmDir "nimcache"
|
||||
|
||||
if existsFile "helloworld.elf":
|
||||
rmFile "helloworld.elf"
|
||||
|
||||
if existsFile "helloworld.nro":
|
||||
rmFile "helloworld.nro"
|
||||
Loading…
Add table
Add a link
Reference in a new issue