nimx
                                
                                 nimx copied to clipboard
                                
                                    nimx copied to clipboard
                            
                            
                            
                        Documentation for NimX is unclear.
I cannot seem to find a solution to changing some of the attributes of "Builder".
I'm trying to do it like this after looking through the code:
import nimx/naketools
import strformat
const
    appName           = "CollectiveGallery"
    appVersion        = "1.0"
    javaPackageId     = &"eu.example.{appName}"
    activityClassName = &"{javaPackageId}.MainActivity"
    mainFile          = "src/CollectiveGallery"
    bin               = mainFile
var cgBuild = newBuilder() # cg = CollectiveGallery
cgBuild.appName           = appName
cgBuild.appVersion        = appVersion
cgBuild.javaPackageId     = javaPackageId
cgBuild.activityClassName = activityClassName
cgBuild.mainFile          = mainFile
beforeBuild(cgBuild)
But, as expected, this doesn't work and I'm met with a SIGSEGV error.
There also doesn't seem to be a way to change what name the binary ends up as.
Here's how it should look like:
import nimx/naketools
# Your constants here ...
beforeBuild = proc(b: Builder) =
  b.mainFile = mainFile
  b.appName = appName
  # ... etc...
There also doesn't seem to be a way to change what name the binary ends up as.
True, there's no way to adjust final executable name. It is either appName.* or main.* depending on target platform. What is the reason you want the binary name to be different?
What is the reason you want the binary name to be different?
A bit late because i forgor💀, but because why not?
There's no reason not to be able to have the name of the resulting executable not be customizable.
You don't have to use naketools then. Just use nim c -r --threads:on <file>.nim