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

Add support for Visual Studio 2017 #122

Closed
nacho opened this issue Feb 28, 2017 · 7 comments
Closed

Add support for Visual Studio 2017 #122

nacho opened this issue Feb 28, 2017 · 7 comments

Comments

@nacho
Copy link
Contributor

nacho commented Feb 28, 2017

Fan already started to add support for it upstream. We should check it out and add support for it.

@nacho
Copy link
Contributor Author

nacho commented Mar 8, 2017

So it seems Visual Studio 2017 has been released already.

@guruDanny67
Copy link
Contributor

As a workaround, just now, is possible to use the Vs2017 to build everything.

You need to say to the script that you're using the visual studio 2015 (--vs-ver 14) but you point at the 2017 installation --vs-install-path where\you\install\all (in my case, since I hate the spaces in the directory names, is something like c:\dev\vs2017).

In this way when meson or cmake is used with ninja there is no problem (the compiler is 19.10.xxxxx or 19.11.xxxxx instead of 19.00.xxxx) and when you need to use the solution, even when ther is no Vs2017 directory, the one from the old compiler is used.

All the gtk stack can be compiled in this way :)

@dave-khuon
Copy link

not sure my issue is relevant here or not. I have tried to run a GTK-app (gramps) under VS 2017. It needs PyGTK and/or Pygobject. Not surre how to get them to add to VS 2017 python environment (Accounda, for example). Dont know where to get clean packages for windows. Any help, please. Thanks.
dave

@dave-khuon
Copy link

dave-khuon commented Jan 20, 2018

## Here is what I got when attempting to add Pygobject:

----- Installing 'PyGObject==3.27.1' -----
Collecting PyGObject==3.27.1
  Using cached PyGObject-3.27.1.tar.gz
Requirement already satisfied: pycairo>=1.11.1 in c:\program files (x86)\microsoft visual studio\shared\anaconda3_64\lib\site-packages (from PyGObject==3.27.1)
Building wheels for collected packages: PyGObject
  Running setup.py bdist_wheel for PyGObject: started
  Running setup.py bdist_wheel for PyGObject: finished with status 'error'
  Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-build-uudqaxym\\PyGObject\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\Public\Documents\Wondershare\CreatorTemp\tmp_4lto_vxpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\gi
  copying gi\docstring.py -> build\lib.win-amd64-3.6\gi
  copying gi\importer.py -> build\lib.win-amd64-3.6\gi
  copying gi\module.py -> build\lib.win-amd64-3.6\gi
  copying gi\pygtkcompat.py -> build\lib.win-amd64-3.6\gi
  copying gi\types.py -> build\lib.win-amd64-3.6\gi
  copying gi\_constants.py -> build\lib.win-amd64-3.6\gi
  copying gi\_error.py -> build\lib.win-amd64-3.6\gi
  copying gi\_option.py -> build\lib.win-amd64-3.6\gi
  copying gi\_ossighelper.py -> build\lib.win-amd64-3.6\gi
  copying gi\_propertyhelper.py -> build\lib.win-amd64-3.6\gi
  copying gi\_signalhelper.py -> build\lib.win-amd64-3.6\gi
  copying gi\__init__.py -> build\lib.win-amd64-3.6\gi
  creating build\lib.win-amd64-3.6\pygtkcompat
  copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.6\pygtkcompat
  copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.6\pygtkcompat
  copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.6\pygtkcompat
  creating build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\Gio.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\GLib.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\GObject.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\Pango.py -> build\lib.win-amd64-3.6\gi\overrides
  copying gi\overrides\__init__.py -> build\lib.win-amd64-3.6\gi\overrides
  creating build\lib.win-amd64-3.6\gi\repository
  copying gi\repository\__init__.py -> build\lib.win-amd64-3.6\gi\repository
  running build_ext
  building 'gi._gi' extension
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\gi
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_CONFIG_H -IC:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-uudqaxym\PyGObject -IC:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-uudqaxym\PyGObject\gi "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tcgi\gimodule.c /Fobuild\temp.win-amd64-3.6\Release\gi\gimodule.obj
  gimodule.c
  **gi\gimodule.c(25): fatal error C1083: Cannot open include file: 'glib-object.h': No such file or directory**
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
  
  ----------------------------------------
  Running setup.py clean for PyGObject
  Failed building wheel for PyGObject
Failed to build PyGObject
Installing collected packages: PyGObject
  Running setup.py install for PyGObject: started
    Running setup.py install for PyGObject: finished with status 'error'
    Complete output from command "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-build-uudqaxym\\PyGObject\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-o6pj4hga-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\gi
    copying gi\docstring.py -> build\lib.win-amd64-3.6\gi
    copying gi\importer.py -> build\lib.win-amd64-3.6\gi
    copying gi\module.py -> build\lib.win-amd64-3.6\gi
    copying gi\pygtkcompat.py -> build\lib.win-amd64-3.6\gi
    copying gi\types.py -> build\lib.win-amd64-3.6\gi
    copying gi\_constants.py -> build\lib.win-amd64-3.6\gi
    copying gi\_error.py -> build\lib.win-amd64-3.6\gi
    copying gi\_option.py -> build\lib.win-amd64-3.6\gi
    copying gi\_ossighelper.py -> build\lib.win-amd64-3.6\gi
    copying gi\_propertyhelper.py -> build\lib.win-amd64-3.6\gi
    copying gi\_signalhelper.py -> build\lib.win-amd64-3.6\gi
    copying gi\__init__.py -> build\lib.win-amd64-3.6\gi
    creating build\lib.win-amd64-3.6\pygtkcompat
    copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.6\pygtkcompat
    copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.6\pygtkcompat
    copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.6\pygtkcompat
    creating build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\Gio.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\GLib.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\GObject.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\Pango.py -> build\lib.win-amd64-3.6\gi\overrides
    copying gi\overrides\__init__.py -> build\lib.win-amd64-3.6\gi\overrides
    creating build\lib.win-amd64-3.6\gi\repository
    copying gi\repository\__init__.py -> build\lib.win-amd64-3.6\gi\repository
    running build_ext
    building 'gi._gi' extension
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\gi
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DHAVE_CONFIG_H -IC:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-uudqaxym\PyGObject -IC:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-uudqaxym\PyGObject\gi "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.16299.0\winrt" /Tcgi\gimodule.c /Fobuild\temp.win-amd64-3.6\Release\gi\gimodule.obj
    gimodule.c
    gi\gimodule.c(25): fatal error C1083: Cannot open include file: 'glib-object.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
    
    ----------------------------------------
Command ""C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Public\\Documents\\Wondershare\\CreatorTemp\\pip-build-uudqaxym\\PyGObject\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-o6pj4hga-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Public\Documents\Wondershare\CreatorTemp\pip-build-uudqaxym\PyGObject\
----- Failed to install 'PyGObject==3.27.1' -----

@guruDanny67
Copy link
Contributor

I'm not familiar with gramps (the geneological program ?) and with the installation of pygobject in anaconda.

The error that is show is the compiler that can't find the glib/gtk include: on linux normally this is the missing of the -devel package (if you install gtk3 only the dll/exe needed for running the programs are copied if you want to develop with that you need also the includes, the import library (on windows), some other utilities to create things and this files are in these -devel package) but on windows or you find an installaer for pygobject3 or you need to build all from source, starting with the gtk3 and all the dependencies :(

Adding the pygobject3 to the this build system in in my todo list (because I can't find a Gtk3/Pygobject3 installation for pyhon 3.5/3.6 that are built with Visual Studio 2015) but I'm actually a little bit busy (need to finish a program for an exhibition and then support our commercial people on the program).

I have some running scripts but were made with some old gtk version, If I found a couple of hours I can try to put the that build on a branch on this project: you need to install amanually the pygobject3 and the gtk bin but should work.

@dave-khuon
Copy link

Thanks for your reply, and hoping you will be able to tie up your current commitments, and then find time to complete this task.

@nacho
Copy link
Contributor Author

nacho commented Jan 30, 2018

I will now close this issue since I think it is quite complete. If we need to fix other issues for other projects we should probably file specific issues for them

@nacho nacho closed this as completed Jan 30, 2018
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

3 participants