Implement #7 - [n.sourcefile] section, add nimclipboard
This commit is contained in:
parent
7d60e2eea7
commit
e46d3b2332
4 changed files with 21 additions and 10 deletions
|
|
@ -46,6 +46,8 @@ To see examples of nimgen in action check out the following wrappers:-
|
||||||
* git sparse checkout
|
* git sparse checkout
|
||||||
* [nimbigwig](https://github.com/genotrance/nimbigwig) - libbigWig wrapper: [docs](http://nimgen.genotrance.com/nimbigwig)
|
* [nimbigwig](https://github.com/genotrance/nimbigwig) - libbigWig wrapper: [docs](http://nimgen.genotrance.com/nimbigwig)
|
||||||
* git checkout
|
* git checkout
|
||||||
|
* [nimclipboard](https://github.com/genotrance/nimclipboard) - libclipboard wrapper: [docs](http://nimgen.genotrance.com/nimclipboard)
|
||||||
|
* git checkout
|
||||||
* [nimfuzz](https://github.com/genotrance/nimfuzz) - fts_fuzzy_match wrapper: [docs](http://nimgen.genotrance.com/nimfuzz)
|
* [nimfuzz](https://github.com/genotrance/nimfuzz) - fts_fuzzy_match wrapper: [docs](http://nimgen.genotrance.com/nimfuzz)
|
||||||
* download header file
|
* download header file
|
||||||
* [nimkerberos](https://github.com/genotrance/nimkerberos) - WinKerberos wrapper: [docs](http://nimgen.genotrance.com/nimkerberos)
|
* [nimkerberos](https://github.com/genotrance/nimkerberos) - WinKerberos wrapper: [docs](http://nimgen.genotrance.com/nimkerberos)
|
||||||
|
|
@ -134,6 +136,10 @@ File wildcards such as *.nim, ssl*.h, etc. can be used to perform tasks across a
|
||||||
|
|
||||||
```wildcard``` = pattern to match against. All keys following the wildcard declaration will apply to matched files
|
```wildcard``` = pattern to match against. All keys following the wildcard declaration will apply to matched files
|
||||||
|
|
||||||
|
_[n.sourcefile]_
|
||||||
|
|
||||||
|
This section allows selection of multiple sourcefiles without requiring a detailed section for each file. Each specific file can be listed one line at a time and file wildcards can be used to include multiple source files. E.g. `$output/include/*/h`. `[n.wildcard]` definitions can be used to perform common operations on these source files if required.
|
||||||
|
|
||||||
_[sourcefile]_
|
_[sourcefile]_
|
||||||
|
|
||||||
The following keys apply to library source code and help with generating the .nim files. -win, -lin and -osx can be used for OS specific tasks. E.g. dynlib-win, pragma-win
|
The following keys apply to library source code and help with generating the .nim files. -win, -lin and -osx can be used for OS specific tasks. E.g. dynlib-win, pragma-win
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,8 @@ for:
|
||||||
on_finish:
|
on_finish:
|
||||||
- 7z a -r buildlogs-win.zip %USERPROFILE%\.nimble\pkgs
|
- 7z a -r buildlogs-win.zip %USERPROFILE%\.nimble\pkgs
|
||||||
- appveyor PushArtifact buildlogs-win.zip
|
- appveyor PushArtifact buildlogs-win.zip
|
||||||
|
- 7z a -r nimgen-docs.zip %BASE_DIR%\nimgen\web
|
||||||
|
- appveyor PushArtifact nimgen-docs.zip
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- c:\projects\i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z
|
- c:\projects\i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,15 @@ proc getKey(ukey: string): tuple[key: string, val: bool] =
|
||||||
|
|
||||||
return (kv[0], false)
|
return (kv[0], false)
|
||||||
|
|
||||||
proc runFile*(file: string, cfgin: OrderedTableRef) =
|
proc runFile*(file: string, cfgin: OrderedTableRef = newOrderedTable[string, string]()) =
|
||||||
var
|
var
|
||||||
cfg = cfgin
|
cfg = cfgin
|
||||||
sfile = search(file)
|
sfile = search(file)
|
||||||
|
|
||||||
for pattern in gWildcards.keys():
|
for pattern in gWildcards.keys():
|
||||||
var match: RegexMatch
|
var m: RegexMatch
|
||||||
let pat = pattern.replace(".", "\\.").replace("*", ".*").replace("?", ".?")
|
let pat = pattern.replace(".", "\\.").replace("*", ".*").replace("?", ".?")
|
||||||
if file.find(toPattern(pat), match):
|
if file.find(toPattern(pat), m):
|
||||||
echo "Appending " & file & " " & pattern
|
echo "Appending " & file & " " & pattern
|
||||||
for key in gWildcards[pattern].keys():
|
for key in gWildcards[pattern].keys():
|
||||||
cfg[key & "." & pattern] = gWildcards[pattern][key]
|
cfg[key & "." & pattern] = gWildcards[pattern][key]
|
||||||
|
|
@ -224,7 +224,12 @@ proc runCfg*(cfg: string) =
|
||||||
"n.prepare", "n.wildcard", "n.post"]:
|
"n.prepare", "n.wildcard", "n.post"]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
runFile(file, gConfig[file])
|
if file == "n.sourcefile":
|
||||||
|
for pattern in gConfig["n.sourcefile"].keys():
|
||||||
|
for file in walkFiles(pattern.addEnv):
|
||||||
|
runFile(file)
|
||||||
|
else:
|
||||||
|
runFile(file, gConfig[file])
|
||||||
|
|
||||||
if gConfig.hasKey("n.post"):
|
if gConfig.hasKey("n.post"):
|
||||||
for post in gConfig["n.post"].keys():
|
for post in gConfig["n.post"].keys():
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,9 @@
|
||||||
import distros
|
import distros, ospaths, strutils
|
||||||
import ospaths
|
|
||||||
import strutils
|
|
||||||
|
|
||||||
var
|
var
|
||||||
full = false
|
full = true
|
||||||
comps = @["libsvm", "nim7z", "nimarchive", "nimbass", "nimbigwig", "nimfuzz",
|
comps = @["libsvm", "nim7z", "nimarchive", "nimbass", "nimbigwig", "nimclipboard",
|
||||||
"nimpcre", "nimrax", "nimssl", "nimssh2"]
|
"nimfuzz", "nimpcre", "nimrax", "nimssl", "nimssh2"]
|
||||||
|
|
||||||
if detectOs(Windows):
|
if detectOs(Windows):
|
||||||
comps.add("nimkerberos")
|
comps.add("nimkerberos")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue