commit
52c7653556
2 changed files with 11 additions and 11 deletions
|
|
@ -2,12 +2,12 @@ import strutils, strtabs, os, osproc, vcvarsall, vccenv
|
||||||
|
|
||||||
type
|
type
|
||||||
VccVersion* = enum ## VCC compiler backend versions
|
VccVersion* = enum ## VCC compiler backend versions
|
||||||
vccUndefined = (0, ""), ## VCC version undefined, resolves to the latest recognizable VCC version
|
vccUndefined = 0, ## VCC version undefined, resolves to the latest recognizable VCC version
|
||||||
vcc90 = vs90, ## Visual Studio 2008 (Version 9.0)
|
vcc90 = ord(vs90) ## Visual Studio 2008 (Version 9.0)
|
||||||
vcc100 = vs100, ## Visual Studio 2010 (Version 10.0)
|
vcc100 = ord(vs100) ## Visual Studio 2010 (Version 10.0)
|
||||||
vcc110 = vs110, ## Visual Studio 2012 (Version 11.0)
|
vcc110 = ord(vs110) ## Visual Studio 2012 (Version 11.0)
|
||||||
vcc120 = vs120, ## Visual Studio 2013 (Version 12.0)
|
vcc120 = ord(vs120) ## Visual Studio 2013 (Version 12.0)
|
||||||
vcc140 = vs140 ## Visual Studio 2015 (Version 14.0)
|
vcc140 = ord(vs140) ## Visual Studio 2015 (Version 14.0)
|
||||||
|
|
||||||
proc discoverVccVcVarsAllPath*(version: VccVersion = vccUndefined): string =
|
proc discoverVccVcVarsAllPath*(version: VccVersion = vccUndefined): string =
|
||||||
## Returns the path to the vcvarsall utility of the specified VCC compiler backend.
|
## Returns the path to the vcvarsall utility of the specified VCC compiler backend.
|
||||||
|
|
@ -101,12 +101,12 @@ command was specified
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
var vccversionArg: seq[string] = @[]
|
var vccversionArg: seq[string] = @[]
|
||||||
var printPathArg: bool = false
|
var printPathArg: bool = false
|
||||||
var vcvarsallArg: string = nil
|
var vcvarsallArg: string
|
||||||
var commandArg: string = nil
|
var commandArg: string
|
||||||
var noCommandArg: bool = false
|
var noCommandArg: bool = false
|
||||||
var platformArg: VccArch
|
var platformArg: VccArch
|
||||||
var sdkTypeArg: VccPlatformType
|
var sdkTypeArg: VccPlatformType
|
||||||
var sdkVersionArg: string = nil
|
var sdkVersionArg: string
|
||||||
var verboseArg: bool = false
|
var verboseArg: bool = false
|
||||||
|
|
||||||
var clArgs: seq[TaintedString] = @[]
|
var clArgs: seq[TaintedString] = @[]
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ type
|
||||||
vccplatUWP = "uwp", ## Universal Windows Platform (UWP) Application
|
vccplatUWP = "uwp", ## Universal Windows Platform (UWP) Application
|
||||||
vccplatOneCore = "onecore" # Undocumented platform type in the Windows SDK, probably XBox One SDK platform type.
|
vccplatOneCore = "onecore" # Undocumented platform type in the Windows SDK, probably XBox One SDK platform type.
|
||||||
|
|
||||||
proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type: VccPlatformType = vccplatEmpty, sdk_version: string = nil, verbose: bool = false): StringTableRef =
|
proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type: VccPlatformType = vccplatEmpty, sdk_version: string = "", verbose: bool = false): StringTableRef =
|
||||||
## Returns a string table containing the proper process environment to successfully execute VCC compile commands for the specified SDK version, CPU architecture and platform type.
|
## Returns a string table containing the proper process environment to successfully execute VCC compile commands for the specified SDK version, CPU architecture and platform type.
|
||||||
##
|
##
|
||||||
## path
|
## path
|
||||||
|
|
@ -50,7 +50,7 @@ proc vccVarsAll*(path: string, arch: VccArch = vccarchUnspecified, platform_type
|
||||||
|
|
||||||
var vccvarsallpath = path
|
var vccvarsallpath = path
|
||||||
# Assume that default executable is in current directory or in PATH
|
# Assume that default executable is in current directory or in PATH
|
||||||
if path == nil or path.len < 1:
|
if path == "":
|
||||||
vccvarsallpath = vcvarsallDefaultPath
|
vccvarsallpath = vcvarsallDefaultPath
|
||||||
|
|
||||||
var args: seq[string] = @[]
|
var args: seq[string] = @[]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue