Get a cache directory where all nimterop artifacts can be stored
+
Projects can use this location to download source code and build binaries that can be then accessed by multiple apps. This is created under the per-user Nim cache directory.
+
Use name to specify the subdirectory name for a project.
+
forceClean is enabled by default and effectively deletes the folder if Nim is compiled with the -f or --forceBuild flag. This allows any project to start out with a clean cache dir on a forced build.
+
NOTE: avoid calling getProjectCacheDir() multiple times on the same name when forceClean = true else checked out source might get deleted at the wrong time during build.
+
E.g.
+
nimgit2 downloads libgit2 source so name = "libgit2"
+
nimarchive downloads libarchive, bzlib, liblzma and zlib so name = "nimarchive" / "libarchive" for libarchive, etc.
+
+
+
+
procextractZip(zipfile,outdir:string){...}{.raises:[OSError,Exception,IOError,Defect,
@@ -1050,12 +1075,13 @@ Hard reset the git repository at the specified directory
-
-
Run the make command to build all binaries in the specified path
check is a file that will be generated by the make command. This is required to prevent make from running on every build. It is relative to the path and should not be an absolute path.
flags are any flags that should be passed to the make command.
+
regex can be set to true if check is a regular expression.
If make.exe is missing and mingw32-make.exe is available, it will be copied over to make.exe in the same location.
@@ -1196,6 +1235,13 @@ Set a cmake directive
Clear all defines set using setDefines().
+
+
+Check if -d:xxx is set globally or via setDefines()
+
macrogetHeader(header:static[string];giturl:static[string]="";
@@ -1208,6 +1254,7 @@ Clear all defines set using setDe
This proc checks -d:xxx defines based on the header name (e.g. lzma from lzma.h), and accordingly employs different ways to obtain the source.
-d:xxxStd - search standard system paths. E.g. /usr/include and /usr/lib on Linux -d:xxxGit - clone source from a git repo specified in giturl-d:xxxDL - download source from dlurl and extract if required
This allows a single wrapper to be used in different ways depending on the user's needs. If no -d:xxx defines are specified, outdir will be searched for the header as is.
+
If multiple -d:xxx defines are specified, precedence is Std and then Git or DL. This allows using a system installed library if available before falling back to manual building.
-d:xxxSetVer=x.y.z can be used to specify which version to use. It is used as a tag name for Git whereas for DL, it replaces $1 in the URL defined.
All defines can also be set in code using setDefines().
The library is then configured (with cmake or autotools if possible) and built using make, unless using -d:xxxStd which presumes that the system package manager was used to install prebuilt headers and binaries.
Checkout the specified file in the git repository specified
-
This effectively resets all changes in the file and can be used to undo any changes that were made to source files to enable successful wrapping with cImport() or c2nImport().
Pull the specified git repository to the output directory
-
plist is the list of specific files and directories or wildcards to sparsely checkout. Multiple values can be specified one entry per line. It is optional and if omitted, the entire repository will be checked out.
-
checkout is the git tag, branch or commit hash to checkout once the repository is downloaded. This allows for pinning to a specific version of the code.
Run the GNU configure command to generate all Makefiles or other build scripts in the specified path
-
If a configure script is not present and an autogen.sh script is present, it will be run before attempting configure.
-
check is a file that will be generated by the configure command. This is required to prevent configure from running on every build. It is relative to the path and should not be an absolute path.
-
flags are any flags that should be passed to the configure command.
Run the cmake command to generate all Makefiles or other build scripts in the specified path
-
path will be created since typically cmake is run in an empty directory.
-
check is a file that will be generated by the cmake command. This is required to prevent cmake from running on every build. It is relative to the path and should not be an absolute path.
-
flags are any flags that should be passed to the cmake command. Unlike configure, it is required since typically it will be the path to the repository, typically .. when path is a subdir.
Run the make command to build all binaries in the specified path
-
check is a file that will be generated by the make command. This is required to prevent make from running on every build. It is relative to the path and should not be an absolute path.
-
flags are any flags that should be passed to the make command.
-
If make.exe is missing and mingw32-make.exe is available, it will be copied over to make.exe in the same location.