Skip to content

Commit

Permalink
1.2.0: Reorganise source tree so nimble is happier
Browse files Browse the repository at this point in the history
  • Loading branch information
niv committed Nov 13, 2018
1 parent c575f5f commit c9bf143
Show file tree
Hide file tree
Showing 43 changed files with 9 additions and 6 deletions.
File renamed without changes.
11 changes: 7 additions & 4 deletions neverwinter.nimble
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import sequtils, ospaths, strutils

version = "1.1.1"
version = "1.2.0"
author = "Bernhard Stöckner <[email protected]>"
description = "Neverwinter Nights 1 data accessor library and utilities"
license = "MIT"

requires "nim >= 0.18.0"

srcDir = "src"
installDirs = @["neverwinter"]

binDir = "bin"
bin = listFiles("src").
binDir = "bin/"
bin = listFiles(".").
mapIt(it.splitFile.name).
filterIt(it.startsWith("nwn_")).
# There appears to be a compiler bug on 0.19.0 that segfaults it when
# compiling nwn_net. So we skip it for 0.19.0.
filterIt(NimVersion != "0.19.0" or it != "nwn_net")

task clean, "Remove compiled binaries and temporary data":
for b in bin: rmFile(binDir / b)
rmdir(nimcacheDir())
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/private/version.nim → private/version.nim
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const GitBranch*: string = staticExec("git symbolic-ref -q --short HEAD").strip
const GitRev*: string = staticExec("git rev-parse HEAD").strip
# const BuildTime = format(getLocalTime(getTime()), "d MMMM yyyy HH:mm")

const Template: string = readFile(currentSourcePath().splitFile().dir / ".." / ".." / "VERSION").strip
const Licence: string = readFile(currentSourcePath().splitFile().dir / ".." / ".." / "LICENCE").strip
const Template: string = readFile(currentSourcePath().splitFile().dir / ".." / "VERSION").strip
const Licence: string = readFile(currentSourcePath().splitFile().dir / ".." / "LICENCE").strip

proc printVersion*() =
let version = GitBranch & " (" & GitRev[0..5] & ")"
Expand Down

0 comments on commit c9bf143

Please sign in to comment.