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

Test won't run on Windows #4

Open
kewp opened this issue May 4, 2017 · 11 comments
Open

Test won't run on Windows #4

kewp opened this issue May 4, 2017 · 11 comments

Comments

@kewp
Copy link

kewp commented May 4, 2017

C:\Users\Karl\tst\linc_nanovg\test\snow>flow run
flow / 1.0.0-alpha.2 (node.js v0.12.7)
flow / target is windows ( arch 32 )
flow / haxe version 3.4.2 (git build master @ 890f8c7)

flow / build - linc_nanovg_test 1.0.0 for windows
flow / icons - failed - do you have visual C++ installed?
flow / not running project build because failure state is set

I do have Visual Studio installed (2017) with C++ modules.

@ruby0x1
Copy link
Member

ruby0x1 commented May 4, 2017

@dazKind any hints?

@kewp can you run with flow build --log 3 and see what it notes near the VS stuff?

@kewp
Copy link
Author

kewp commented May 4, 2017

flow / hooks - running hook from snow in C:/HaxeToolkit/haxe/lib/snow/git/
flow / hooks - running pre hook snow pre build from flow/build/hook.pre.js
flow / hooks - desc : handles pre-build steps for snow
flow / icons / converting C:\HaxeToolkit\haxe\lib\snow\git\flow\icons\ for use
flow / util - copying file from C:/HaxeToolkit/haxe/lib/snow/git/flow/icons/windows/snow.ico to bin\windows.build\cpp\snow.ico
flow / util - copying file from C:\HaxeToolkit\haxe\lib\flow\git\src\flow\cmd\icons\windows\icon.xml to bin\windows.build\cpp__icon.xml
flow / icons - vsdir detected as undefined
flow / icons - checked 120: undefined
flow / icons - checked 140: undefined
flow / icons - checked 110: undefined
flow / icons - checked 100: undefined
flow / icons - failed - do you have visual C++ installed?
flow / files - verifying ...
flow / files - copying project files to bin/windows/

I don't understand what it has to do with icons ...

The new visual studio (2017) has changed things at the back, like the location of vcvarsall ...

@dazKind
Copy link
Collaborator

dazKind commented May 4, 2017

I suspect haxe/hxcpp/flow doesnt cope with VS2017 yet?

@ruby0x1
Copy link
Member

ruby0x1 commented May 4, 2017

At this stage it's before hxcpp, @kewp I think long back there was some issues that catching a missing msvc early was better and it was just where it happened to be doing checks anyway.

You can see the code here, I'd appreciate some insight into what has changed for the new version to be supported? Alternatively just disable the failed and see if it continues.

@kewp
Copy link
Author

kewp commented May 4, 2017

Yes - Once vcvarsall is run VS150COMNTOOLS is set (and in the code that isn't checked)

@ruby0x1
Copy link
Member

ruby0x1 commented May 4, 2017

Does that mean the order is wrong in 2017?
I added the env var in master

@kewp
Copy link
Author

kewp commented May 5, 2017

(Not sure what you mean by 'the order is wrong')

Still doesn't work. See here https://developercommunity.visualstudio.com/content/problem/13223/no-environmental-variable-vscomntools150.html

Looks like Visual Studio 2017 stopped setting the environment variables (like VS150COMNTOOLS). So you have to run vcvarsall FIRST... not sure how you would from flow.

Also, in icons.windows.js, the path for vcvarsall (line 62 in your link above) is wrong - in 2017 it needs to be
var vsvars = path.resolve(vsdir, '../../vc/auxilary/build/vcvarsall.bat');

That is moot, though, since you can't rely on the environment variable.

Here it says you need to use a tool called vswhere.exe https://blogs.msdn.microsoft.com/vcblog/2017/03/06/finding-the-visual-c-compiler-tools-in-visual-studio-2017/

I suppose the best is to include it in the distribution ?

@kewp
Copy link
Author

kewp commented May 5, 2017

Been trying all morning to tie this into your scripts but getting the environment variable set in a batch file to persist out to node is a nightmare.

@ruby0x1
Copy link
Member

ruby0x1 commented May 5, 2017

ah, at this point it's clear that 2017 just isn't supported. Gotta love Microsoft approach to breaking everything at least.

Did you try without the failed = true line to see if you can progress?
I'm wary that even if you do hxcpp may not support 2017 yet either (I haven't checked), so using 2015 immediate term would be the most direct path to ignore all this till we get 2017 working.

@kewp
Copy link
Author

kewp commented May 7, 2017

Same thing - looks like hxcpp doesn't work with visual studio 2017 either.

hxcpp (Haxe C++ Runtime Support) (3.4.64)

Using makefile: flow.Build.xml
Reading HXCPP config: C:\Users\Karl.hxcpp_config.xml
No specified toolchain

  • Parsing include: C:/HaxeToolkit/haxe/lib/hxcpp/3,4,64/toolchain/setup.xml
  • Parsing include: C:\Users\Karl.hxcpp_config.xml (section "vars")
    Using Windows compiler: MSVC
  • Parsing include: C:/HaxeToolkit/haxe/lib/hxcpp/3,4,64/toolchain/finish-setup.xml
    C:\Users\Karl\tst\linc_nanovg\test\snow\bin\windows.build\cpp>setlocal enabledelayedexpansion
    Warning: Could not find environment variables for Visual Studio
    Missing HXCPP_VARS
    Error: Could not automatically setup MSVC
    flow /
    build - stopping because of errors in hxcpp compile, while building arch 32

@Kasparsu
Copy link

MSCV 2017 support was added in 3.4.185: https://github.com/HaxeFoundation/hxcpp/blob/master/Changes.md#34185

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

4 participants