jamriska / ebsynth

Fast Example-based Image Synthesis and Style Transfer
https://ebsynth.com
1.5k stars 194 forks source link

15 was unexpected at this time #11

Open fermin-silva opened 4 years ago

fermin-silva commented 4 years ago

Hi, im running build-win64-cpu+cuda.bat and its immediately failing with "15 was unexpected at this time" I guess its probably coming from this line: https://github.com/jamriska/ebsynth/blob/master/vcvarsall.bat#L6 if %vsver% geq 15 (

Im running windows 10 64 bits. Thanks

OndrejTexler commented 4 years ago

I did not test it, but if the line 6, or any line, of vcvarsall.bat is causing any problems. Try to locate vcvarsall.bat manually, in my case (of VS 2019) it is located at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build. And call it directly from https://github.com/jamriska/ebsynth/blob/master/build-win64-cpu%2Bcuda.bat, i.e., replace the line call vcvarsall.bat amd64 with call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64

I hope it works :-)

fermin-silva commented 4 years ago

Changed it but it didnt have any effect. Apparently its because this variable is empty: if %vsver% geq 15 (

If i run manually the command that sets this variable i get an empty output. vswhere -latest -legacy -property installationVersion returns empty.

Maybe because i dont have some dev tools needed to compile c++ ? In MacOS I didnt have to install anything. In any case, a simple "how to build" in the readme would be cool for the non programmers (or at least the non c++ programmers, like myself)

OndrejTexler commented 4 years ago

And you are not able to locate the vcvarsall.bat manually in your Visual Studio installation, right?

Maybe, you are missing some tools. VS with C++ build tools and Windows SDK should be only thing you need. Check whether your VS installation looks like this: image

fermin-silva commented 4 years ago

thanks for the support! i dont have anything related to visual studio installed, i will probably end up downloading the precompiled version.

in any case, it would be nice to either have a how to build section in the readme or to make the build script check the dependencies and giving a nicer error message

OndrejTexler commented 4 years ago

Thank you for your suggestion. I agree that it would be nice to have a more robust build script or robust build tutorial, however, to make it really robust across all the MS Windows versions, VS versions, CUDA versions, etc. would be hard.

So this repo offers two "extreme" options, (1) user-friendly option of downloading the binaries, (2) advanced option for experienced C++ developers. And it would be hard to create something between these two "extreme" options.