comparison config.nims @ 777:754835bf175e

add: changing rendering system, not finished yet, also upgrading to Nim 2
author Sam <sam@basx.dev>
date Mon, 07 Aug 2023 00:23:00 +0700
parents a432a4a99110
children 857cd931d24b
comparison
equal deleted inserted replaced
776:002d9c576756 777:754835bf175e
35 switch("outdir", outdir) 35 switch("outdir", outdir)
36 setCommand "c" 36 setCommand "c"
37 rmDir(outdir) 37 rmDir(outdir)
38 mkDir(outdir) 38 mkDir(outdir)
39 let resourcedir = joinPath(projectDir(), RESOURCEROOT) 39 let resourcedir = joinPath(projectDir(), RESOURCEROOT)
40 if existsDir(resourcedir): 40 if dirExists(resourcedir):
41 let outdir_resources = joinPath(outdir, RESOURCEROOT) 41 let outdir_resources = joinPath(outdir, RESOURCEROOT)
42 if BUNDLETYPE == "dir": 42 if BUNDLETYPE == "dir":
43 cpDir(resourcedir, outdir_resources) 43 cpDir(resourcedir, outdir_resources)
44 elif BUNDLETYPE == "zip": 44 elif BUNDLETYPE == "zip":
45 mkDir(outdir_resources) 45 mkDir(outdir_resources)
63 63
64 task build_all_release, "build all examples for release": 64 task build_all_release, "build all examples for release":
65 for file in listFiles("examples"): 65 for file in listFiles("examples"):
66 if file.endsWith(".nim"): 66 if file.endsWith(".nim"):
67 exec(&"nim build -d:release {file}") 67 exec(&"nim build -d:release {file}")
68
69 task test_all, "Run all test programs":
70 for file in listFiles("tests"):
71 if file.endsWith(".nim"):
72 exec(&"nim build --run {file}")
68 73
69 task clean, "remove all build files": 74 task clean, "remove all build files":
70 exec(&"rm -rf {BUILDBASE}") 75 exec(&"rm -rf {BUILDBASE}")
71 76
72 task publish, "publish all build": 77 task publish, "publish all build":