version: 2.41.{build}
+clone_depth: 25
image: Visual Studio 2015
environment:
+ CTEST_OUTPUT_ON_FAILURE: TRUE
+ graphviz_install_dir: C:\Graphviz
matrix:
- - build_system: msbuild
- build_system: cmake
+ - build_system: msbuild
configuration:
- Debug
# Test
- ps: >-
- if($env:build_system -eq "cmake") {
- # No tests yet
+ if($env:build_system -eq "cmake" -and $env:configuration -eq "Release") {
+ mv Graphviz-*.exe Graphviz-install.exe;
+ # Install using installer and add bin directory to path.
+ # Piping the output of the installer to Out-Null, makes the script wait
+ # for the .exe to exit, instead continuing to the next command (which
+ # will then fail because the install hasn't finished)
+ ./Graphviz-install.exe /S /D=$env:graphviz_install_dir | Out-Null;
+ $env:Path += ";" + $env:graphviz_install_dir + "\bin"
+ dot -c;
+ ctest -C $env:configuration;
}
elseif($env:build_system -eq "msbuild") {
# Append build destination to the PATH, configure dot and execute regression tests
name: graphviz-windows
- path: Debug
name: graphviz-windows-debug
+ - path: build/Graphviz-install.exe
+ name: Graphviz-Windows-install
--- /dev/null
+# CMake does not allow for braces in $ENV{}, so a temporary variable must be used.
+set(PROGRAMFILES_X86 "ProgramFiles(x86)")
+
+find_program(NSIS_MAKE
+ NAMES makensis
+ PATHS $ENV{PROGRAMFILES}/NSIS $ENV{${PROGRAMFILES_X86}}/NSIS
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE)
set(CPACK_RESOURCE_FILE_README "${TOP_SOURCE_DIR}/README.md" )
set(CPACK_GENERATOR ZIP)
+
+find_package(NSIS)
+if(NSIS_FOUND)
+ set(CPACK_NSIS_MUI_ICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" )
+ set(CPACK_NSIS_MUI_UNIICON "${TOP_SOURCE_DIR}/windows/build/Graphviz.ico" )
+ set(CPACK_NSIS_INSTALLED_ICON_NAME "Uninstall.exe" )
+ set(CPACK_NSIS_HELP_LINK "http://www.graphviz.org" )
+ set(CPACK_NSIS_URL_INFO_ABOUT "http://www.graphviz.org" )
+ set(CPACK_NSIS_MODIFY_PATH ON )
+ LIST(APPEND CPACK_GENERATOR NSIS)
+endif()