Support building with standard nim 1.6.4

This commit is contained in:
Scott Wadden 2022-04-18 22:16:34 -03:00
parent b37c78420d
commit 7b893dceb4
No known key found for this signature in database
GPG Key ID: 281836B32D24AA27
2 changed files with 13 additions and 6 deletions

View File

@ -37,7 +37,7 @@ requires "nim 1.6.4",
proc gen: string =
if generator_path == "":
exec &"nimble c {generator}"
exec &"nimble c -d:ssl {generator}"
generator_path = find_exe generator
generator_path

View File

@ -1,13 +1,16 @@
#!/usr/bin/env nim r --warnings:off --hints:off
# bits of the build process that don't work from NimScript
import godotapigen, os, cpuinfo, cligen, strformat,
compiler/nimeval
import std / [os, cpuinfo, strformat, httpclient]
import pkg / [compiler/nimeval, cligen]
import godotapigen
include "../installer/export_presets.cfg.nimf"
include "../installer/Info.plist.nimf"
const STDLIB = find_nim_std_lib_compile_time()
const
stdlib = find_nim_std_lib_compile_time()
macros_url = "https://raw.githubusercontent.com/dsrw/Nim/v1.6.4-enu/lib/core/macros.nim"
proc core_count = echo count_processors()
@ -26,15 +29,19 @@ proc build_last_test(debug = false) =
quit exec_shell_cmd(cmd)
proc copy_stdlib(destination: string) =
var client = new_http_client()
let macros_source = client.get_content(macros_url)
remove_dir destination
create_dir destination
for path in @["core", "pure", "std", "fusion", "system"]:
copy_dir join_path(STDLIB, path), join_path(destination, path)
copy_dir join_path(stdlib, path), join_path(destination, path)
for file in @["system.nim", "stdlib.nimble"]:
copy_file join_path(STDLIB, file),
copy_file join_path(stdlib, file),
join_path(destination, file)
write_file destination / "core" / "macros.nim", macros_source
proc run_tests =
discard