yep, I maked something like a build_debug.nims: 
    
    
    import ospaths
    
    mode = ScriptMode.Verbose
    
    version = "1.0"
    author = "Username"
    description = "Build with debug configuration"
    license = "MIT"
    
    let out_dir = "bin/debug"
    let qml_files = @["qmlui/main.qml"]
    
    let build_cmd = "nim" &
      " " & "cc" &
      " " & "--nimcache:" & joinPath(@[out_dir, "nimcache"]) &
      " " & "--out:" & joinPath(@[out_dir, "main"]) &
      " " & "-d:debug" &
      " " & "--debuginfo" &
      " " & "--lineDir:on" &
      " " & "--debugger:native" &
      " " & "src/main.nim"
    
    exec build_cmd
    
    for qf in qml_files:
      exec "cp " & qf & " " & joinPath(@[out_dir, extractFilename(qf)])
    

Is this a "good practice"? Maybe you could suggest what can be do better?

Reply via email to