Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting specific WindowsPlatform #147

Closed
TheJare opened this issue Apr 14, 2017 · 1 comment
Closed

Setting specific WindowsPlatform #147

TheJare opened this issue Apr 14, 2017 · 1 comment

Comments

@TheJare
Copy link

TheJare commented Apr 14, 2017

The toolchain script currently only allows configuring the windowsTargetPlatformVersion project setting if the toolset target is set to "--vs=winstore82". Otherwise the project setting will default to 8.1. It seems this parameter should be settable always. Three suggestions (can't make a pull request right now):

  1. Move the 3 lines that assign the platform, from the "winstore82" subsection up to the enclosing if, right before starting to check specific "--vs" toolsets.

     or _ACTION == "vs2013"
     or _ACTION == "vs2015"
     or _ACTION == "vs2017"
     then
    
     	local action = premake.action.current()
     	action.vstudio.windowsTargetPlatformVersion = windowsPlatform
     	action.vstudio.windowsTargetPlatformMinVersion = windowsPlatform
    
     if (_ACTION .. "-clang") == _OPTIONS["vs"] then
    
  2. Allow a smarter default for the "--with-windows" argument that sets the "windowsPlatform" variable, based on the standard environment variable "WindowsSDKVersion", and in its absence, default to a more conservative platform of 8.1.

     local windowsPlatform = "8.1"
     if os.getenv("WindowsSDKVersion") then
     	windowsPlatform = os.getenv("WindowsSDKVersion")
     end
     if _OPTIONS["with-windows"] then
     	windowsPlatform = _OPTIONS["with-windows"]
     end
    

Perhaps the various toolsets may enforce higher values for this setting, so for example if requesting winstore82 then convert 8.1 into the previous default of 10.0.10240.0

  1. Update the newoption for with-windows to describe the new default more accurately.

     newoption {
     	trigger = "with-windows",
     	value = "#",
     	description = "Set the Windows target platform version (default: $WindowsSDKVersion or 8.1).",
     }
    
@bkaradzic
Copy link
Owner

I'll add option 2, 3. WindowsSDKVersion environment variable is way to go.

pigpigyyy added a commit to pigpigyyy/bx that referenced this issue Apr 24, 2017
* master:
  Cleanup.
  Renaming string functions.
  Fixed issue bkaradzic#149.
  Cleanup.
  GENie 813.
  Renaming string functions.
  Updated toolchain for specifying Windows SDK version. Issue bkaradzic#147.
  Fixed Emscripten 1.37.9 build.
  GENie 811.
  Fixed include.
  assume LLVM libc++ if __llvm__ is defined but __GLIBC__ is undefined (bkaradzic#145)
  Trying to fix GitHub detecting licesnse.
  Cleanup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants