{"action":"opened","issue":{"url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/213","repository_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp","labels_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/213/comments","events_url":"https://api.github.com/repos/GodotNativeTools/godot-cpp/issues/213/events","html_url":"https://github.com/GodotNativeTools/godot-cpp/issues/213","id":385100430,"node_id":"MDU6SXNzdWUzODUxMDA0MzA=","number":213,"title":"SConstruct host_platform","user":{"login":"willnationsdev","id":16217563,"node_id":"MDQ6VXNlcjE2MjE3NTYz","avatar_url":"https://avatars1.githubusercontent.com/u/16217563?v=4","gravatar_id":"","url":"https://api.github.com/users/willnationsdev","html_url":"https://github.com/willnationsdev","followers_url":"https://api.github.com/users/willnationsdev/followers","following_url":"https://api.github.com/users/willnationsdev/following{/other_user}","gists_url":"https://api.github.com/users/willnationsdev/gists{/gist_id}","starred_url":"https://api.github.com/users/willnationsdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willnationsdev/subscriptions","organizations_url":"https://api.github.com/users/willnationsdev/orgs","repos_url":"https://api.github.com/users/willnationsdev/repos","events_url":"https://api.github.com/users/willnationsdev/events{/privacy}","received_events_url":"https://api.github.com/users/willnationsdev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-28T04:48:01Z","updated_at":"2018-11-28T04:48:01Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Looking at the current SConstruct file (after #212), it seems like the `host_platform` value could potentially raise an error even before the `platform` parameter is evaluated. I think we should not raise an error until after the parameter has been collected and evaluated.\r\n\r\nChange the following section:\r\n\r\n    # Try to detect the host platform automatically\r\n    # This is used if no `platform` argument is passed\r\n    if sys.platform.startswith('linux'):\r\n        host_platform = 'linux'\r\n    elif sys.platform == 'darwin':\r\n        host_platform = 'osx'\r\n    elif sys.platform == 'win32':\r\n        host_platform = 'windows'\r\n    else: # MOVE THIS LINE TO A SEPARATE `if env['platform']:` LINE AFTER THE PARAM EVALS BELOW\r\n        raise ValueError('Could not detect platform automatically, please specify with platform=<platform>')\r\n    \r\n    opts = Variables([], ARGUMENTS)\r\n    \r\n    opts.Add(EnumVariable('platform', 'Target platform', host_platform,\r\n                    allowed_values=('linux', 'osx', 'windows'),\r\n                    ignorecase=2))"}}
{"actor":{"display_login":"willnationsdev"}}