# HG changeset patch # User sam # Date 1730628068 -25200 # Node ID 49a7d05d3f28ed815711148e07bd43e82cc1be93 # Parent fe9a8922333c128f3e5b0a3011dac1aabc7c79d2 add: support to "import" unknown file types via plain copy diff -r fe9a8922333c -r 49a7d05d3f28 semicongine/build.nim --- a/semicongine/build.nim Sat Nov 02 23:40:32 2024 +0700 +++ b/semicongine/build.nim Sun Nov 03 17:01:08 2024 +0700 @@ -134,6 +134,7 @@ return var meshfiles: seq[(string, string)] var audiofiles: seq[(string, string)] + var copies: seq[(string, string)] for (target_rel, source_rel) in resourceMap: let target = thisDir().joinPath(target_rel) @@ -147,12 +148,16 @@ elif source.endsWith("mp3") or source.endsWith("ogg") or source.endsWith("wav"): audiofiles.add (source, target) else: - raise newException(Exception, &"unkown file type: {source}") + copies.add (source, target) target.parentDir().mkDir() else: echo &"{target} is up-to-date" + import_meshes meshfiles import_audio audiofiles + for (src, dst) in copies: + echo &"copy {src} -> {dst}" + src.cpFile(dst) # for steam-buildscript docs see https://partner.steamgames.com/doc/sdk/uploading proc semicongine_steam_upload*(steamaccount, password, buildscript: string) =