Fix: nintendoswitch compilation (#21368)

* Fix: make nintendoswitch someGcc, remove symlink support for nintendoswitch, add getAppFilename for nintendoswitch

* Fix: use getApplHeuristic on nintendoswitch
This commit is contained in:
Dmitry Arkhipenko
2023-02-25 13:47:19 +03:00
committed by GitHub
parent d4782c9e42
commit b2edfe7a02
4 changed files with 11 additions and 5 deletions

View File

@@ -254,7 +254,7 @@ proc findExe*(exe: string, followSymlinks: bool = true;
for ext in extensions:
var x = addFileExt(x, ext)
if fileExists(x):
when not defined(windows):
when not (defined(windows) or defined(nintendoswitch)):
while followSymlinks: # doubles as if here
if x.symlinkExists:
var r = newString(maxSymlinkLen)
@@ -702,6 +702,8 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1", tags: [ReadIOEffect], noW
result = getApplHaiku()
elif defined(openbsd):
result = getApplOpenBsd()
elif defined(nintendoswitch):
result = ""
# little heuristic that may work on other POSIX-like systems:
if result.len == 0: