From: Erwin Janssen Date: Tue, 17 Jan 2017 16:41:06 +0000 (+0100) Subject: Use prebuild libgd from windows deps submodule X-Git-Tag: 2.42.0~213^2~2^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81f2505b6b43907cd83d503b0f7725a0597894cf;p=graphviz Use prebuild libgd from windows deps submodule Instead of building libgd manually before Graphviz can be build, we included a prebuild version of libgd in the graphviz windows dependencies submodule. The doc/winbuild.html is updated to reflect this. --- diff --git a/.gitmodules b/.gitmodules index 50745e16c..633063e15 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "windows/dependencies/libgd"] - path = windows/dependencies/libgd - url = https://github.com/libgd/libgd.git [submodule "windows/dependencies/graphviz-build-utilities"] path = windows/dependencies/graphviz-build-utilities url = https://github.com/ErwinJanssen/graphviz-build-utilities.git diff --git a/appveyor.yml b/appveyor.yml index 6d3c51856..5e7584f08 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,29 +19,6 @@ install: - git submodule update --init # Only has to be installed when MSYS2 or Cygwin are enabled. #- cinst ghostscript - # Compile libgd - - cd windows\dependencies\libgd - - mkdir deps - - cd deps - - ps: wget http://windows.php.net/downloads/php-sdk/deps/archives/vc14/x86/freetype-2.6.2-vc14-x86.zip -O freetype.zip - - ps: wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libiconv-1.14-vc14-x86.zip -O iconv.zip - - ps: wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libjpeg-9b-vc14-x86.zip -O jpeg.zip - - ps: wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libpng-1.6.21-vc14-x86.zip -O png.zip - - ps: wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/zlib-1.2.8-vc14-x86.zip -O zlib.zip - - 7z x freetype.zip - - 7z x iconv.zip - - 7z x jpeg.zip - - 7z x png.zip - - 7z x zlib.zip - - cd .. - - cmd: >- - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86 - - set WITH_DEVEL=deps - - set WITH_BUILD=build - - nmake /f windows/Makefile.vc build_libs before_build: # This file is deleted to reduce noise in the build output. Otherwise several diff --git a/contrib/diffimg/diffimg.vcxproj b/contrib/diffimg/diffimg.vcxproj index 4a433b164..f373258b2 100644 --- a/contrib/diffimg/diffimg.vcxproj +++ b/contrib/diffimg/diffimg.vcxproj @@ -51,7 +51,7 @@ Disabled - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libgd\src + $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include _DEBUG;_CONSOLE;NONDLL;%(PreprocessorDefinitions) true EnableFastChecks @@ -63,7 +63,7 @@ 4996 - $(OutDir);$(SolutionDir)windows\dependencies\libgd\build;$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) + $(OutDir);$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) true Console @@ -71,12 +71,12 @@ libgd.lib;gvc.lib;png.lib;%(AdditionalDependencies) - copy $(SolutionDir)windows\dependencies\libgd\build\libgd.dll $(OutDir)libgd.dll + copy $(SolutionDir)windows\dependencies\libraries\bin\libgd.dll $(OutDir)libgd.dll - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libgd\src + $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include NDEBUG;_CONSOLE;NONDLL;%(PreprocessorDefinitions) MultiThreaded @@ -85,7 +85,7 @@ 4996 - $(OutDir);$(SolutionDir)windows\dependencies\libgd\build;$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) + $(OutDir);$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) No Console true @@ -95,7 +95,7 @@ libgd.lib;gvc.lib;png.lib;%(AdditionalDependencies) - copy $(SolutionDir)windows\dependencies\libgd\build\libgd.dll $(OutDir)libgd.dll + copy $(SolutionDir)windows\dependencies\libraries\bin\libgd.dll $(OutDir)libgd.dll diff --git a/doc/winbuild.html b/doc/winbuild.html index ee98186d5..90d059aa6 100644 --- a/doc/winbuild.html +++ b/doc/winbuild.html @@ -10,31 +10,6 @@ For building on Windows:

First, in the root of the repository, perform git submodule update --init. This will download all submodules, which are mostly the dependencies for the Windows build. Next, add the windows\dependencies\graphviz-build-utilities directory to your PATH (and restart Visual Studio or the prompt with which you execute msbuild after that). This folder contains the tools Bison, Flex and SED (and future additions) with versions that are tested. -The final step is building libgd from the source (they do not provide Windows releases), this is a bit of a hassle. The script used in the Appveyor build assumes 7-zip is installed and in the path and that Visual Studio 14.0 is installed. -In Powershell, cd to windows\dependencies\libgd in the Graphviz repo and run the following lines: - -

-mkdir deps
-cd deps
-wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/archives/freetype-2.6.2-vc14-x86.zip -O freetype.zip
-wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libiconv-1.14-vc14-x86.zip -O iconv.zip
-wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libjpeg-9b-vc14-x86.zip -O jpeg.zip
-wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/libpng-1.6.21-vc14-x86.zip -O png.zip
-wget http://windows.php.net/downloads/php-sdk/deps/vc14/x86/zlib-1.2.8-vc14-x86.zip -O zlib.zip
-7z x freetype.zip
-7z x iconv.zip
-7z x jpeg.zip
-7z x png.zip
-7z x zlib.zip
-
-Then, using the cmd command prompt, cd to the same directory and run the following lines (change the path in the first line if you use a different Visual Studio version): - -
-call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
-set WITH_DEVEL=deps
-set WITH_BUILD=build
-nmake /f windows/Makefile.vc build_libs
-
If all went right, the dependencies are now set up and you can build Graphviz.

diff --git a/plugin/gd/gvplugin_gd.vcxproj b/plugin/gd/gvplugin_gd.vcxproj index bb209ecfe..85c5ba290 100644 --- a/plugin/gd/gvplugin_gd.vcxproj +++ b/plugin/gd/gvplugin_gd.vcxproj @@ -51,7 +51,7 @@ Disabled - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include;$(SolutionDir)windows\dependencies\libraries\include\cairo;$(SolutionDir)windows\dependencies\libgd\src;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include;$(SolutionDir)windows\dependencies\libraries\include\cairo;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories) _DEBUG;_WINDOWS;_USRDLL;GVPLUGIN_GD_EXPORTS;WIN32_DLL;NONDLL;%(PreprocessorDefinitions) true EnableFastChecks @@ -63,7 +63,7 @@ 4996 - $(OutDir);$(SolutionDir)windows\dependencies\libgd\build;$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) + $(OutDir);$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) gvplugin_gd.def true Windows @@ -72,7 +72,7 @@ cgraph.lib;libpng12.lib;libgd.lib;libcairo-2.lib;fontconfig.lib;gvc.lib;freetype.lib;iconv.lib;jpeg.lib;z.lib;pathplan.lib;%(AdditionalDependencies) - copy $(SolutionDir)windows\dependencies\libgd\build\libgd.dll $(OutDir)libgd.dll + copy $(SolutionDir)windows\dependencies\libraries\bin\libgd.dll $(OutDir)libgd.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libcairo-2.dll $(OutDir)libcairo-2.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libfontconfig-1.dll $(OutDir)libfontconfig-1.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libfreetype-6.dll $(OutDir)libfreetype-6.dll @@ -84,7 +84,7 @@ copy $(SolutionDir)windows\dependencies\libraries\bin\iconv.dll $(OutDir)iconv.d - $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include;$(SolutionDir)windows\dependencies\libraries\include\cairo;$(SolutionDir)windows\dependencies\libgd\src;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories) + $(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\include;$(SolutionDir)windows\dependencies\libraries\include\cairo;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;%(AdditionalIncludeDirectories) NDEBUG;_WINDOWS;_USRDLL;GVPLUGIN_GD_EXPORTS;WIN32_DLL;NONDLL;%(PreprocessorDefinitions) MultiThreadedDLL @@ -93,7 +93,7 @@ copy $(SolutionDir)windows\dependencies\libraries\bin\iconv.dll $(OutDir)iconv.d 4996 - $(OutDir);$(SolutionDir)windows\dependencies\libgd\build;$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) + $(OutDir);$(SolutionDir)windows\dependencies\libraries\lib;%(AdditionalLibraryDirectories) gvplugin_gd.def No Windows @@ -104,7 +104,7 @@ copy $(SolutionDir)windows\dependencies\libraries\bin\iconv.dll $(OutDir)iconv.d cgraph.lib;libpng12.lib;libgd.lib;libcairo-2.lib;fontconfig.lib;gvc.lib;freetype.lib;iconv.lib;jpeg.lib;z.lib;pathplan.lib;%(AdditionalDependencies) - copy $(SolutionDir)windows\dependencies\libgd\build\libgd.dll $(OutDir)libgd.dll + copy $(SolutionDir)windows\dependencies\libraries\bin\libgd.dll $(OutDir)libgd.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libcairo-2.dll $(OutDir)libcairo-2.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libfontconfig-1.dll $(OutDir)libfontconfig-1.dll copy $(SolutionDir)windows\dependencies\libraries\bin\libfreetype-6.dll $(OutDir)libfreetype-6.dll diff --git a/windows/dependencies/libgd b/windows/dependencies/libgd deleted file mode 160000 index 26122f1b4..000000000 --- a/windows/dependencies/libgd +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 26122f1b4c588b40747d5a348679be717c80ba53 diff --git a/windows/dependencies/libraries b/windows/dependencies/libraries index 20ea909fe..adbed2889 160000 --- a/windows/dependencies/libraries +++ b/windows/dependencies/libraries @@ -1 +1 @@ -Subproject commit 20ea909fec21043be6d93f2a4b01ff0981a4fb66 +Subproject commit adbed28897131b16a0372b81269624c2bedfe472