make the vccexe helper tool compile again
This commit is contained in:
parent
975114e114
commit
46204eba1f
2 changed files with 7 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ proc getVsComnToolsPath*(): TaintedString =
|
|||
return vsComnToolsEnvVal
|
||||
|
||||
proc getVccEnv*(platform: string, windowsStoreSdk: bool = false,
|
||||
sdkVersion: string = nil): StringTableRef =
|
||||
sdkVersion: string = ""): StringTableRef =
|
||||
var comSpecCommandString = getEnv comSpecEnvKey
|
||||
if comSpecCommandString.len == 0:
|
||||
comSpecCommandString = "cmd"
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ when defined(release):
|
|||
else:
|
||||
let vccOptions = {poEchoCmd, poParentStreams}
|
||||
|
||||
const
|
||||
const
|
||||
platformPrefix = "--platform"
|
||||
winstorePrefix = "--winstore"
|
||||
sdkversionPrefix = "--sdkversion"
|
||||
|
||||
platformSepIdx = platformPrefix.len
|
||||
sdkversionSepIdx = sdkversionPrefix.len
|
||||
|
||||
|
||||
HelpText = """
|
||||
+-----------------------------------------------------------------+
|
||||
| Microsoft C/C++ compiler wrapper for Nim |
|
||||
|
|
@ -26,7 +26,7 @@ Options:
|
|||
<arch>: x86 | amd64 | arm | x86_amd64 | x86_arm | amd64_x86 | amd64_arm
|
||||
--winstore Use Windows Store (rather than desktop) development tools
|
||||
--sdkversion:<v> Use a specific Windows SDK version:
|
||||
<v> is either the full Windows 10 SDK version number or
|
||||
<v> is either the full Windows 10 SDK version number or
|
||||
"8.1" to use the windows 8.1 SDK
|
||||
|
||||
Other command line arguments are passed on to the
|
||||
|
|
@ -34,8 +34,8 @@ Microsoft C/C++ compiler for the specified SDK toolset
|
|||
"""
|
||||
|
||||
when isMainModule:
|
||||
var platformArg: string = nil
|
||||
var sdkVersionArg: string = nil
|
||||
var platformArg: string = ""
|
||||
var sdkVersionArg: string = ""
|
||||
var storeArg: bool = false
|
||||
|
||||
var clArgs: seq[TaintedString] = @[]
|
||||
|
|
@ -54,7 +54,7 @@ when isMainModule:
|
|||
echo HelpText
|
||||
clArgs.add(wargv)
|
||||
|
||||
var vccEnvStrTab = getVccEnv(platformArg, storeArg, sdkVersionArg)
|
||||
var vccEnvStrTab = getVccEnv(platformArg, storeArg, sdkVersionArg)
|
||||
if vccEnvStrTab != nil:
|
||||
for vccEnvKey, vccEnvVal in vccEnvStrTab:
|
||||
putEnv(vccEnvKey, vccEnvVal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue