mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
deprecated install_nimble.nims in favor of 'koch nimble'; refs #4934
This commit is contained in:
@@ -3,6 +3,8 @@ import ospaths
|
||||
|
||||
mode = ScriptMode.Verbose
|
||||
|
||||
echo "This script is deprecated. Use 'koch nimble' instead."
|
||||
|
||||
var id = 0
|
||||
while dirExists("nimble" & $id):
|
||||
inc id
|
||||
@@ -20,4 +22,4 @@ try:
|
||||
mvFile "nimble" & $id & "/src/nimble".toExe, "bin/nimble".toExe
|
||||
except OSError:
|
||||
cpFile "nimble" & $id & "/src/nimble".toExe, "bin/nimble".toExe
|
||||
|
||||
|
||||
|
||||
23
koch.nim
23
koch.nim
@@ -49,6 +49,7 @@ Possible Commands:
|
||||
tests [options] run the testsuite
|
||||
temp options creates a temporary compiler for testing
|
||||
winrelease creates a release (for coredevs only)
|
||||
nimble builds the Nimble tool
|
||||
Boot options:
|
||||
-d:release produce a release version of the compiler
|
||||
-d:tinyc include the Tiny C backend (not supported on Windows)
|
||||
@@ -148,6 +149,8 @@ proc csource(args: string) =
|
||||
[args, VersionAsString, compileNimInst, findNim()])
|
||||
|
||||
proc bundleNimbleSrc() =
|
||||
## bunldeNimbleSrc() bundles a specific Nimble commit with the tarball. We
|
||||
## always bundle the latest official release.
|
||||
if dirExists("dist/nimble/.git"):
|
||||
exec("git --git-dir dist/nimble/.git pull")
|
||||
else:
|
||||
@@ -163,6 +166,23 @@ proc bundleNimbleExe() =
|
||||
exec(findNim() & " c dist/nimble/src/nimble.nim")
|
||||
copyExe("dist/nimble/src/nimble".exe, "bin/nimble".exe)
|
||||
|
||||
proc buildNimble() =
|
||||
## buildNimble() builds Nimble for the building via "github". As such, we
|
||||
## choose the most recent commit of Nimble too.
|
||||
var installDir = "dist/nimble"
|
||||
if dirExists("dist/nimble/.git"):
|
||||
exec("git --git-dir dist/nimble/.git pull")
|
||||
else:
|
||||
# if dist/nimble exist, but is not a git repo, don't mess with it:
|
||||
if dirExists(installDir):
|
||||
var id = 0
|
||||
while dirExists("dist/nimble" & $id):
|
||||
inc id
|
||||
installDir = "dist/nimble" & $id
|
||||
exec("git clone https://github.com/nim-lang/nimble.git " & installDir)
|
||||
exec(findNim() & " c " & installDir / "src/nimble.nim")
|
||||
copyExe(installDir / "src/nimble".exe, "bin/nimble".exe)
|
||||
|
||||
proc bundleNimsuggest(buildExe: bool) =
|
||||
if dirExists("dist/nimsuggest/.git"):
|
||||
exec("git --git-dir dist/nimsuggest/.git pull")
|
||||
@@ -371,7 +391,7 @@ of cmdArgument:
|
||||
of "boot": boot(op.cmdLineRest)
|
||||
of "clean": clean(op.cmdLineRest)
|
||||
of "web": web(op.cmdLineRest)
|
||||
of "docs": web("--onlyDocs " & op.cmdLineRest)
|
||||
of "doc", "docs": web("--onlyDocs " & op.cmdLineRest)
|
||||
of "json2": web("--json2 " & op.cmdLineRest)
|
||||
of "website": website(op.cmdLineRest & " --googleAnalytics:UA-48159761-1")
|
||||
of "web0":
|
||||
@@ -389,5 +409,6 @@ of cmdArgument:
|
||||
of "test", "tests": tests(op.cmdLineRest)
|
||||
of "temp": temp(op.cmdLineRest)
|
||||
of "winrelease": winRelease()
|
||||
of "nimble": buildNimble()
|
||||
else: showHelp()
|
||||
of cmdEnd: showHelp()
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# strip those silly GTK/ATK prefixes...
|
||||
|
||||
import
|
||||
expandimportc, os
|
||||
|
||||
const
|
||||
filelist = [
|
||||
("sdl/sdl", "sdl"),
|
||||
("sdl/sdl_net", "sdl"),
|
||||
("sdl/sdl_gfx", "sdl"),
|
||||
("sdl/sdl_image", "sdl"),
|
||||
("sdl/sdl_mixer_nosmpeg", "sdl"),
|
||||
("sdl/sdl_mixer", "sdl"),
|
||||
("sdl/sdl_ttf", "sdl"),
|
||||
("sdl/smpeg", "sdl"),
|
||||
|
||||
("libcurl", "curl"),
|
||||
("mysql", "mysql"),
|
||||
("postgres", ""),
|
||||
("sqlite3", "sqlite3"),
|
||||
|
||||
("pcre/pcre", "pcre")
|
||||
]
|
||||
|
||||
proc createDirs =
|
||||
createDir("lib/newwrap/sdl")
|
||||
createDir("lib/newwrap/pcre")
|
||||
|
||||
for filename, prefix in items(filelist):
|
||||
var f = addFileExt(filename, "nim")
|
||||
main("lib/wrappers" / f, "lib/newwrap" / f, prefix)
|
||||
|
||||
Reference in New Issue
Block a user