hererocks icon indicating copy to clipboard operation
hererocks copied to clipboard

Cannot install using Visual Studio 2017

Open henriquegemignani opened this issue 8 years ago • 4 comments

Output when opening a prompt, running the VS script for variable setup, then calling hererocks

(here) C:\DELETEME>"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
**********************************************************************
** Visual Studio 2017 RC Developer Command Prompt v15.0.26206.0
** Copyright (c) 2016 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

(here) C:\DELETEME>hererocks -l 5.1 lua51
Using cl.exe found in PATH.
Traceback (most recent call last):
  File "C:\DELETEME\here\Scripts\hererocks-script.py", line 9, in <module>
    load_entry_point('hererocks==0.15.0', 'console_scripts', 'hererocks')()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 1892, in main
    if RioLua(opts.lua).update_identifiers(identifiers):
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 571, in update_identifiers
    self.set_identifiers()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 1050, in set_identifiers
    super(RioLua, self).set_identifiers()
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 625, in set_identifiers
    cl_help = get_output("cl")
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 275, in get_output
    return run(get_output=True, *args)
  File "c:\deleteme\here\lib\site-packages\hererocks.py", line 272, in run
    return capture and output.decode("UTF-8").strip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc6 in position 44: invalid continuation byte```

There's also no `vs17` option in the `--target` option.

henriquegemignani avatar Apr 05 '17 20:04 henriquegemignani

Looks like an error when decoding compiler output, what does cl command output after initializing VS17?

I'll add vs17 target, need to check what registry keys VS17 uses.

mpeterv avatar Apr 26 '17 20:04 mpeterv

VS17 does not use the registry anymore: https://blogs.msdn.microsoft.com/vcblog/2017/03/06/finding-the-visual-c-compiler-tools-in-visual-studio-2017/

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.10.24911 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

henriquegemignani avatar Apr 27 '17 01:04 henriquegemignani

I've fixed the encoding issue on master branch I hope, can you try it? (Set up variables first)

I'll research the COM option in the post you linked, it's not as easy to use as the registry. And other options rely on dependencies that may be missing.

mpeterv avatar May 02 '17 19:05 mpeterv

Seems to be working fine, if you setup the env vars before invoking hererocks.

henriquegemignani avatar Jun 15 '17 19:06 henriquegemignani