commit
904e17b094
3 changed files with 17 additions and 1 deletions
|
|
@ -217,6 +217,15 @@ proc testCompileOptionArg*(switch, arg: string, info: TLineInfo): bool =
|
||||||
of "none": result = gOptions * {optOptimizeSpeed, optOptimizeSize} == {}
|
of "none": result = gOptions * {optOptimizeSpeed, optOptimizeSize} == {}
|
||||||
else: localError(info, errNoneSpeedOrSizeExpectedButXFound, arg)
|
else: localError(info, errNoneSpeedOrSizeExpectedButXFound, arg)
|
||||||
of "verbosity": result = $gVerbosity == arg
|
of "verbosity": result = $gVerbosity == arg
|
||||||
|
of "app":
|
||||||
|
case arg.normalize
|
||||||
|
of "gui": result = contains(gGlobalOptions, optGenGuiApp)
|
||||||
|
of "console": result = not contains(gGlobalOptions, optGenGuiApp)
|
||||||
|
of "lib": result = contains(gGlobalOptions, optGenDynLib) and
|
||||||
|
not contains(gGlobalOptions, optGenGuiApp)
|
||||||
|
of "staticlib": result = contains(gGlobalOptions, optGenStaticLib) and
|
||||||
|
not contains(gGlobalOptions, optGenGuiApp)
|
||||||
|
else: localError(info, errGuiConsoleOrLibExpectedButXFound, arg)
|
||||||
else: invalidCmdLineOption(passCmd1, switch, info)
|
else: invalidCmdLineOption(passCmd1, switch, info)
|
||||||
|
|
||||||
proc testCompileOption*(switch: string, info: TLineInfo): bool =
|
proc testCompileOption*(switch: string, info: TLineInfo): bool =
|
||||||
|
|
|
||||||
|
|
@ -3670,3 +3670,8 @@ template closureScope*(body: untyped): untyped =
|
||||||
|
|
||||||
when defined(nimconfig):
|
when defined(nimconfig):
|
||||||
include "system/nimscript"
|
include "system/nimscript"
|
||||||
|
|
||||||
|
when defined(windows) and appType == "console":
|
||||||
|
proc setConsoleOutputCP(codepage: cint): cint {.stdcall, dynlib: "kernel32",
|
||||||
|
importc: "SetConsoleOutputCP".}
|
||||||
|
discard setConsoleOutputCP(65001) # 65001 - utf-8 codepage
|
||||||
|
|
@ -26,7 +26,7 @@ Changes affecting backwards compatibility
|
||||||
|
|
||||||
Warning: a [b] will be parsed as command syntax; spacing is deprecated
|
Warning: a [b] will be parsed as command syntax; spacing is deprecated
|
||||||
|
|
||||||
See `https://github.com/nim-lang/Nim/issues/3898`_ for the relevant
|
See `<https://github.com/nim-lang/Nim/issues/3898>`_ for the relevant
|
||||||
discussion.
|
discussion.
|
||||||
- Overloading the special operators ``.``, ``.()``, ``.=``, ``()`` now
|
- Overloading the special operators ``.``, ``.()``, ``.=``, ``()`` now
|
||||||
should be enabled via ``{.experimental.}``.
|
should be enabled via ``{.experimental.}``.
|
||||||
|
|
@ -52,6 +52,8 @@ that have tuple name:
|
||||||
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64] ]()
|
var rocketaims = initOrderedTable[string, Table[tuple[k: int8, v: int8], int64] ]()
|
||||||
rocketaims["hi"] = {(k: -1.int8, v: 0.int8): 0.int64}.toTable()
|
rocketaims["hi"] = {(k: -1.int8, v: 0.int8): 0.int64}.toTable()
|
||||||
|
|
||||||
|
- Now when you compile console application for Windows, console output
|
||||||
|
encoding is automatically set to UTF-8.
|
||||||
|
|
||||||
Library Additions
|
Library Additions
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue