summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-11-15 01:02:34 -0800
committerAndreas Rumpf <rumpf_a@web.de>2018-11-15 10:02:34 +0100
commit6e003eeecb364f26b6f051d9d6e643322a819115 (patch)
tree6b8c3fb756ab2cd7b65dec61bb0b899133552580
parentae36dfb747a8ed4ebd0944fc75ea11676120cb1e (diff)
downloadNim-6e003eeecb364f26b6f051d9d6e643322a819115.tar.gz
refs #9637 ; cleanup installation of nimsuggest (#9703)
-rw-r--r--koch.nim21
-rw-r--r--nimsuggest/nimsuggest.nim.cfg1
2 files changed, 9 insertions, 13 deletions
diff --git a/koch.nim b/koch.nim
index 6d32e8edb..87c9c9a81 100644
--- a/koch.nim
+++ b/koch.nim
@@ -149,11 +149,9 @@ proc buildNimble(latest: bool) =
   nimexec("c --noNimblePath --nilseqs:on -d:release " & installDir / "src/nimble.nim")
   copyExe(installDir / "src/nimble".exe, "bin/nimble".exe)
 
-proc bundleNimsuggest(buildExe: bool) =
-  if buildExe:
-    nimexec("c --noNimblePath -d:release nimsuggest/nimsuggest.nim")
-    copyExe("nimsuggest/nimsuggest".exe, "bin/nimsuggest".exe)
-    removeFile("nimsuggest/nimsuggest".exe)
+proc bundleNimsuggest() =
+  nimexec "c -d:release -o:" & ("bin/nimsuggest".exe) &
+      " nimsuggest/nimsuggest.nim"
 
 proc buildVccTool() =
   nimexec("c -o:bin/vccexe.exe tools/vccenv/vccexe")
@@ -172,7 +170,7 @@ proc bundleWinTools() =
 
 proc zip(latest: bool; args: string) =
   bundleNimbleExe(latest)
-  bundleNimsuggest(true)
+  bundleNimsuggest()
   bundleWinTools()
   nimexec("cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" %
        [VersionAsString, compileNimInst])
@@ -189,7 +187,8 @@ proc ensureCleanGit() =
 proc xz(latest: bool; args: string) =
   ensureCleanGit()
   bundleNimbleSrc(latest)
-  bundleNimsuggest(false)
+  when false:
+    bundleNimsuggest()
   nimexec("cc -r $2 --var:version=$1 --var:mingw=none --main:compiler/nim.nim scripts compiler/installer.ini" %
        [VersionAsString, compileNimInst])
   exec("$# --var:version=$# --var:mingw=none --main:compiler/nim.nim xz compiler/installer.ini" %
@@ -200,9 +199,7 @@ proc buildTool(toolname, args: string) =
   copyFile(dest="bin" / splitFile(toolname).name.exe, source=toolname.exe)
 
 proc buildTools(latest: bool) =
-  nimexec "c --noNimblePath -d:release -o:" & ("bin/nimsuggest".exe) &
-      " nimsuggest/nimsuggest.nim"
-
+  bundleNimsuggest()
   nimexec "c -d:release -o:" & ("bin/nimgrep".exe) & " tools/nimgrep.nim"
   when defined(windows): buildVccTool()
 
@@ -212,7 +209,7 @@ proc buildTools(latest: bool) =
 
 proc nsis(latest: bool; args: string) =
   bundleNimbleExe(latest)
-  bundleNimsuggest(true)
+  bundleNimsuggest()
   bundleWinTools()
   # make sure we have generated the niminst executables:
   buildTool("tools/niminst/niminst", args)
@@ -550,7 +547,7 @@ when isMainModule:
       of "nimble":
         if stable: buildNimble(false)
         else: buildNimble(existsDir(".git") or latest)
-      of "nimsuggest": bundleNimsuggest(buildExe=true)
+      of "nimsuggest": bundleNimsuggest()
       of "tools":
         if stable: buildTools(false)
         else: buildTools(existsDir(".git") or latest)
diff --git a/nimsuggest/nimsuggest.nim.cfg b/nimsuggest/nimsuggest.nim.cfg
index 434c462d7..394449740 100644
--- a/nimsuggest/nimsuggest.nim.cfg
+++ b/nimsuggest/nimsuggest.nim.cfg
@@ -22,4 +22,3 @@ define:nimcore
 #define:noDocgen
 --path:"$nim"
 --threads:on
---noNimblePath