Hello,
Seems that we don't have the perfect solution satisfying everyone.
I am new to that, with the same problems in other projects with also custom tools but working on both Linux and Windows.
I gave cmake a try. A brainless try, simply following instructions. I already quite happy I got something.
Go to http://www.cmake.org/cmake/resources/software.html
Download cmake installer win32
During setup click "register cmake in path for all users".
go to
http://wiki.inkscape.org/wiki/index.php/CMake
follow instructions
mkdir buildinkscape
cd buildinkscape
cmake ./path/to/inkscape/sources
make
------------------------------- C:\Project\OpenSource\inkscape>mkdir buildinkscape
C:\Project\OpenSource\inkscape>cd buildinkscape
C:\Project\OpenSource\inkscape\buildinkscape>cmake .. -- Building for: Visual Studio 9 2008 -- Check for working C compiler using: Visual Studio 9 2008 Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w hile Visual Studio is running. Please exit all running instances of Visual Studi o before continuing.
CMake needs to register Visual Studio macros when its macros file is updated or when it detects that its current macros file is no longer registered with Visual Studio.
-- Check for working C compiler using: Visual Studio 9 2008 -- works -- Detecting C compiler ABI info Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w hile Visual Studio is running. Please exit all running instances of Visual Studi o before continuing.
CMake needs to register Visual Studio macros when its macros file is updated or when it detects that its current macros file is no longer registered with Visual Studio.
-- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 9 2008 Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w hile Visual Studio is running. Please exit all running instances of Visual Studi o before continuing.
CMake needs to register Visual Studio macros when its macros file is updated or when it detects that its current macros file is no longer registered with Visual Studio.
-- Check for working CXX compiler using: Visual Studio 9 2008 -- works -- Detecting CXX compiler ABI info Could not register CMake's Visual Studio macros file 'CMakeVSMacros2.vsmacros' w hile Visual Studio is running. Please exit all running instances of Visual Studi o before continuing.
CMake needs to register Visual Studio macros when its macros file is updated or when it detects that its current macros file is no longer registered with Visual Studio.
-- Detecting CXX compiler ABI info - done -- Creating build files in: C:/Project/OpenSource/inkscape/buildinkscape -- Some or all of the gtk libraries were not found. (missing: GTK2_GTK_LIBRARY GTK2_GTK_INCLUDE_DIR GTK2_GLIB_INCLUDE_DIR GTK2_GLIBCONFIG_INCLUDE_DIR GTK2_GLIB _LIBRARY GTK2_GDK_INCLUDE_DIR GTK2_GDKCONFIG_INCLUDE_DIR GTK2_GDK_LIBRARY) -- Some or all of the gtkmm libraries were not found. (missing: GTK2_GTKMM_LIBR ARY GTK2_GTKMM_INCLUDE_DIR GTK2_GTKMMCONFIG_INCLUDE_DIR GTK2_GLIBMM_INCLUDE_DIR GTK2_GLIBMMCONFIG_INCLUDE_DIR GTK2_GLIBMM_LIBRARY GTK2_GDKMM_INCLUDE_DIR GTK2_GD KMMCONFIG_INCLUDE_DIR GTK2_GDKMM_LIBRARY) CMake Error at CMakeScripts/FindXML2.cmake:82 (message): Could not find XML2 Call Stack (most recent call first): CMakeScripts/DefineDependsandFlags.cmake:6 (find_package) CMakeLists.txt:15 (INCLUDE)
-- Configuring incomplete, errors occurred!
C:\Project\OpenSource\inkscape\buildinkscape>
---------------------------------
Reading cmake documentation I agree that I didn't see the language as specially attractive. What I hope is that some macros take nicely care of disperancies between linux and windows. This is why I wanted to try.
It seems to me that the hardest work in all btool, cmake and waf is to find the location and release of various libraries.
Something we do only from time to time while partial rebuild for compilation and debug are done hundreds of time per day.
I fully agree with Krzysztof about the eventual need of scripts to solve nasty things. And yes if it is not straightforward in cmake why not calling a python script. Keeping cmake just a the framework and skeleton. That would give best of both world. If you look into buildtool.cpp 7000 lines out of 9000 are standard libraries (xml, uri) that cmake could replace and several templates and things very specific to inkscape. This could be a few python scripts that can be debugged separately and are part of the source.
I was thinking of things like " FindBoost.cmake" also that needs constant updates (it is for 1.36 on inkscape cmake while Boost is 1.46). But specifically such files are maintained by others so it's a shared effort. Luckily because it doesn't look pleasant to do. You get it in CMake 2.8\share\cmake-2.8\Modules. So IMO it should be removed from inkscape/CMakeScripts or at least moved to devlibs.
FYI: Generating vcproj is pretty easy since we just want to have a list of files. It's an xml tree with relative paths.
<?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="9.00" Name="KKKKHelper" ProjectGUID="{33A1B193-CC14-4AF9-A559-F8F4FFF39950}" > <Platforms> <Platform Name="Win32" /> </Platforms> <Files> <File RelativePath=".\DesignNotes.txt" > </File> </Files> </VisualStudioProject>
Bruno Winck Email: bwinck@...2632... Blog: http://www.kneaver.com/blog Kneaver Corp http://www.kneaver.com/ Twitter:http://twitter.com/kneaver SKYPE:brunowinck PH: +1 (415) 749 5850 CELL: +1 (415) 513 3160
-----Original Message----- From: Krzysztof Kosinski [mailto:tweenk.pl@...400...] Sent: Monday, June 13, 2011 12:26 AM To: Bruno Winck Cc: inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Use of MINGW64 (minor)
2011/6/10 Bruno Winck <bw@...2632...>:
I take a look at the waf scripts. It's new to me. I see a benefit : portability, I am surprised it is very procedural. Large work.
The build is not procedural. When the build() function of the wscript executes, it only defines the tasks. The compilation happens *after* the build() function returns.
It is : Wscript Waf.bat Waf InkWaf.py
Is there more ?
There are also the wscripts in subdirectories, but most of them are recursion stubs.
Still I am somehow wondering about all the wscript files. Any developer willing to add a file will have to know how to modify them and so know at least something about waf and python.
Same can be said about basically any build system in existence, including btool.exe. The advantages of Waf in this regard are that file moves do not require any modification to the build system (at least the way I implemented it), and it works on all platforms we support (Windows, Unix, OSX).
Regards, Krzysztof