summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2017-06-23 15:38:19 +0000
committerMartin Owens <doctormo@gmail.com>2017-06-23 15:38:19 +0000
commit131b4d74439118c7533b0adb7353aa7e29ba93ae (patch)
treed502c01751d683ffa73aaec48f6d5e7ea48ca75d
parentAttempt to make paintbucket build option not cause errors for toolbar loading (diff)
parentAttempt to make paintbucket build option not cause errors for toolbar loading (diff)
downloadinkscape-131b4d74439118c7533b0adb7353aa7e29ba93ae.tar.gz
inkscape-131b4d74439118c7533b0adb7353aa7e29ba93ae.zip
Merge branch 'ui-files-for-ui-xml' of gitlab.com:inkscape/inkscape into ui-files-for-ui-xml
-rw-r--r--.bzrignore289
-rw-r--r--.gitignore11
-rw-r--r--.gitlab-ci.yml12
-rw-r--r--CMakeLists.txt38
-rw-r--r--CMakeScripts/ConfigChecks.cmake18
-rw-r--r--CMakeScripts/ConfigEnv.cmake4
-rw-r--r--CMakeScripts/ConfigPaths.cmake2
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake19
-rw-r--r--README.md23
-rw-r--r--config.h.cmake128
-rw-r--r--src/inkgc/gc-core.h4
-rw-r--r--src/path-prefix.h32
-rw-r--r--src/prefix.cpp75
-rw-r--r--src/prefix.h12
-rw-r--r--src/trace/trace.h2
-rw-r--r--src/util/ege-tags.cpp2
-rw-r--r--src/widgets/ege-paint-def.cpp2
-rw-r--r--src/xml/repr-util.cpp4
-rw-r--r--testfiles/CMakeLists.txt33
19 files changed, 105 insertions, 605 deletions
diff --git a/.bzrignore b/.bzrignore
deleted file mode 100644
index 792535e49..000000000
--- a/.bzrignore
+++ /dev/null
@@ -1,289 +0,0 @@
-./Info.plist
-./Makefile
-./ABOUT-NLS
-./build
-./build.dep
-./compile
-./compile.lst
-./config.guess
-./config.h
-./config.h.in
-./config.log
-./config.status
-./config.status.lineno
-./config.sub
-./configure
-./depcomp
-./inkscape
-./inkscape.1
-./inkscape.desktop
-./inkscape.de.1
-./inkscape.el.1
-./inkscape.fr.1
-./inkscape.ja.1
-./inkscape.sk.1
-./inkscape.zh_TW.1
-./man/inkscape.1
-./man/inkscape.de.1
-./man/inkscape.de.pod
-./man/inkscape.de.tmp
-./man/inkscape.el.1
-./man/inkscape.el.pod
-./man/inkscape.el.tmp
-./man/inkscape.fr.1
-./man/inkscape.fr.pod
-./man/inkscape.fr.tmp
-./man/inkscape.ja.1
-./man/inkscape.ja.pod
-./man/inkscape.ja.tmp
-./man/inkscape.pod
-./man/inkscape.sk.1
-./man/inkscape.sk.pod
-./man/inkscape.sk.tmp
-./man/inkscape.tmp
-./man/inkscape.zh_TW.1
-./man/inkscape.zh_TW.pod
-./man/inkscape.zh_TW.tmp
-./man/inkview.pod
-./inkscape.appdata.xml
-./inkscape.spec
-./inkview.1
-./install
-./install-sh
-./intltool-extract.in
-./intltool-merge.in
-./intltool-update.in
-./libtool
-./missing
-./stamp-h1
-./CMakeLists.txt.user
-.deps
-.dirstamp
-doc/Makefile
-packaging/autopackage/default.apspec
-po/.intltool-merge-cache
-po/*.gmo
-po/boldquot.sed
-po/en@boldquot.header
-po/en@quot.header
-po/insert-header.sin
-po/messages.mo
-po/Makefile
-po/Makefile.in.in
-po/Makevars.template
-po/POTFILES
-po/quot.sed
-po/remove-potcdate.sin
-po/Rules-quot
-po/stamp-it
-share/Makefile
-share/attributes/Makefile
-share/branding/Makefile
-share/clipart/Makefile
-share/examples/Makefile
-share/extensions/Barcode/Makefile
-share/extensions/Makefile
-share/extensions/Poly3DObjects/Makefile
-share/extensions/alphabet_soup/Makefile
-share/extensions/ink2canvas/Makefile
-share/extensions/test/Makefile
-share/extensions/xaml2svg/Makefile
-share/filters/Makefile
-share/filters/filters.svg.h
-share/fonts/Makefile
-share/gradients/Makefile
-share/icons/Makefile
-share/icons/application/16x16/Makefile
-share/icons/application/22x22/Makefile
-share/icons/application/24x24/Makefile
-share/icons/application/256x256/Makefile
-share/icons/application/32x32/Makefile
-share/icons/application/48x48/Makefile
-share/icons/application/Makefile
-share/keys/Makefile
-share/markers/Makefile
-share/palettes/Makefile
-share/palettes/palettes.h
-share/patterns/Makefile
-share/patterns/patterns.svg.h
-share/screens/Makefile
-share/symbols/Makefile
-share/symbols/symbols.h
-share/templates/Makefile
-share/templates/templates.h
-share/tutorials/Makefile
-share/ui/Makefile
-src/.libs/
-src/2geom/makefile
-src/Makefile
-src/algorithms/makefile
-src/application/makefile
-src/bind/makefile
-src/check-header-compile
-src/cxxtests.cpp
-src/debug/makefile
-src/dialogs/makefile
-src/display/makefile
-src/dom/makefile
-src/extension/dbus/wrapper/inkdbus.pc
-src/extension/implementation/makefile
-src/extension/internal/makefile
-src/extension/makefile
-src/extension/script/makefile
-src/filters/makefile
-src/helper/makefile
-src/helper/sp-marshal.cpp
-src/helper/sp-marshal.h
-src/inkscape
-src/inkscape-version.cpp
-src/inkview
-src/io/makefile
-src/jabber_whiteboard/makefile
-src/libavoid/makefile
-src/libcroco/makefile
-src/libgdl/makefile
-src/libnr/makefile
-src/libnrtype/makefile
-src/libuemf/makefile
-src/livarot/makefile
-src/live_effects/makefile
-src/live_effects/parameter/makefile
-src/pedro/makefile
-src/removeoverlap/makefile
-src/svg/makefile
-src/trace/makefile
-src/traits/makefile
-src/ui/cache/makefile
-src/ui/dialog/makefile
-src/ui/makefile
-src/ui/view/makefile
-src/ui/widget/makefile
-src/util/makefile
-src/widgets/makefile
-src/xml/makefile
-src/test-main.cpp
-src/test-src.cpp
-src/display/test-display.cpp
-src/helper/test-helper.cpp
-src/libnr/test-nr.cpp
-src/svg/test-svg.cpp
-src/util/test-util.cpp
-src/xml/test-xml.cpp
-gc.log
-ltmain.sh
-backup.bzr
-mkinstalldirs
-Inkscape.config
-Inkscape.creator
-Inkscape.creator.user
-Inkscape.files
-Inkscape.includes
-# osxapp (X11)
-build-osxapp
-inst-osxapp
-packaging/macosx/ScriptExec/build
-packaging/macosx/Inkscape.app
-
-# cmake bits
-cmake_install.cmake
-cmake_uninstall.cmake
-CMakeCache.txt
-CMakeFiles
-Makefile
-bin/
-lib/
-include/
-
-.project
-.cproject
-.settings
-am.po.old
-ar.po.old
-as.po.old
-az.po.old
-be.po.old
-bg.po.old
-bn_BD.po.old
-bn.po.old
-br.po.old
-brx.po.old
-ca.po.old
-ca@valencia.po.old
-cs.po.old
-da.po.old
-de.po.old
-doi.po.old
-dz.po.old
-el.po.old
-en_AU.po.old
-en_CA.po.old
-en_GB.po.old
-en_US@piglatin.po.old
-eo.po.old
-es_MX.po.old
-es.po.old
-et.po.old
-eu.po.old
-fa.po.old
-fi.po.old
-fr.po.old
-ga.po.old
-gl.po.old
-gu.po.old
-he.po.old
-hi.po.old
-hr.po.old
-hu.po.old
-hy.po.old
-id.po.old
-is.po.old
-it.po.old
-ja.po.old
-km.po.old
-kn.po.old
-kok@latin.po.old
-kok.po.old
-ko.po.old
-ks@aran.po.old
-ks@deva.po.old
-lt.po.old
-lv.po.old
-mai.po.old
-mk.po.old
-ml.po.old
-mni@beng.po.old
-mni.po.old
-mn.po.old
-mr.po.old
-nb.po.old
-ne.po.old
-nl.po.old
-nn.po.old
-or.po.old
-pa.po.old
-pl.po.old
-pt_BR.po.old
-pt.po.old
-ro.po.old
-ru.po.old
-rw.po.old
-sa.po.old
-sat@deva.po.old
-sat.po.old
-sd@deva.po.old
-sd.po.old
-sk.po.old
-sl.po.old
-sq.po.old
-sr@latin.po.old
-sr.po.old
-sv.po.old
-ta.po.old
-te.po.old
-th.po.old
-tr.po.old
-uk.po.old
-ur.po.old
-vi.po.old
-zh_CN.po.old
-zh_TW.po.old
diff --git a/.gitignore b/.gitignore
index 619692120..a56790eb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
-share/filters/filters.svg.h
-share/palettes/palettes.h
-share/patterns/patterns.svg.h
-share/symbols/symbols.h
-share/templates/templates.h
+build
+share/inkscape
+share/*/*.h
+
+*.old
+*.swp
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a57f8e61f..2d36019e6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,13 +1,9 @@
-image: ubuntu:16.04
+# Dependencies are managed in the Dockerfile in the inkscape-ci-docker
+# Git repository. Change them there, wait a bit, and then we'll use
+# the new ones here in these builds.
+image: registry.gitlab.com/inkscape/inkscape-ci-docker/master
before_script:
- - apt-get update -yqq
- # Tools
- - apt-get install -y -qq cmake intltool pkg-config python-dev libtool ccache
- # Libraries
- - apt-get install -y -qq libart-2.0-dev libaspell-dev libboost-dev libcdr-dev libgc-dev libgdl-3-dev libglib2.0-dev libgnomevfs2-dev libgsl-dev libgtk-3-dev libgtkmm-3.0-dev libgtkspell-dev liblcms2-dev libmagick++-dev libpango1.0-dev libpng12-dev libpoppler-glib-dev libpoppler-private-dev libpopt-dev libpotrace-dev librevenge-dev libsigc++-2.0-dev libvisio-dev libwpg-dev libxml-parser-perl libxml2-dev libxslt1-dev libyaml-dev python-lxml zlib1g-dev
- # Testing Tools
- - apt-get install -y -qq google-mock libgtest-dev
# CCache Config
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cb82492c..8daaabe3b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,8 +70,8 @@ set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING
# -----------------------------------------------------------------------------
# Redirect output files
# -----------------------------------------------------------------------------
-set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin CACHE INTERNAL "" )
-set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" )
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Output directory for runtime binaries")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib CACHE PATH "Output directory for libraries")
# -----------------------------------------------------------------------------
# Options
@@ -99,21 +99,26 @@ option(ENABLE_BINRELOC "Enable relocatable binaries" OFF)
# -----------------------------------------------------------------------------
# Test Harness
# -----------------------------------------------------------------------------
-if(NOT GMOCK_DIR)
- find_path(GMOCK_DIR
- NAMES src/gmock.cc
- PATHS "$ENV{GMOCK_DIR}"
- "/usr/src/googletest/googlemock"
- "/usr/src/gmock"
- "${CMAKE_SOURCE_DIR}/gtest/gmock-1.7.0"
- )
-endif(NOT GMOCK_DIR)
-
-if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
+find_package(gtest) # gtest 1.8.0 and later already include gmock
+if(GTEST_FOUND AND EXISTS "${GTEST_INCLUDE_DIR}/gmock" AND IS_DIRECTORY "${GTEST_INCLUDE_DIR}/gmock")
set(GMOCK_PRESENT ON)
else()
- set(GMOCK_PRESENT OFF)
- message("No gmock/gtest found! Perhaps you wish to run 'bash download-gtest.sh' to download it.")
+ unset(GTEST_FOUND)
+ if(NOT GMOCK_DIR)
+ find_path(GMOCK_DIR
+ NAMES src/gmock.cc
+ PATHS "$ENV{GMOCK_DIR}"
+ "/usr/src/googletest/googlemock"
+ "/usr/src/gmock"
+ "${CMAKE_SOURCE_DIR}/gtest/gmock-1.7.0"
+ )
+ endif(NOT GMOCK_DIR)
+ if(EXISTS "${GMOCK_DIR}" AND IS_DIRECTORY "${GMOCK_DIR}")
+ set(GMOCK_PRESENT ON)
+ else()
+ set(GMOCK_PRESENT OFF)
+ message("No gmock/gtest found! Perhaps you wish to run 'bash download-gtest.sh' to download it.")
+ endif()
endif()
include(CMakeScripts/DefineDependsandFlags.cmake) # Includes, Compiler Flags, and Link Libraries
@@ -241,8 +246,9 @@ add_custom_target(clean-all
#-----------------------------------------------------------------------------
if(GMOCK_PRESENT)
set(CMAKE_CTEST_COMMAND ctest -V)
+ set(CMAKE_CTEST_ENV INKSCAPE_DATADIR=${CMAKE_CURRENT_SOURCE_DIR}/share)
enable_testing()
- add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
+ add_custom_target(check COMMAND ${CMAKE_COMMAND} -E env ${CMAKE_CTEST_ENV} ${CMAKE_CTEST_COMMAND})
add_subdirectory(testfiles)
endif()
diff --git a/CMakeScripts/ConfigChecks.cmake b/CMakeScripts/ConfigChecks.cmake
index 3d986d8dd..04c077026 100644
--- a/CMakeScripts/ConfigChecks.cmake
+++ b/CMakeScripts/ConfigChecks.cmake
@@ -13,35 +13,21 @@ include(CheckStructHasMember)
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${INKSCAPE_LIBS})
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${INKSCAPE_INCS_SYS})
-CHECK_INCLUDE_FILE_CXX(boost/concept_check.hpp HAVE_BOOST_CONCEPT_CHECK_HPP)
CHECK_INCLUDE_FILES(cairo-pdf.h HAVE_CAIRO_PDF)
CHECK_FUNCTION_EXISTS(floor HAVE_FLOOR)
CHECK_FUNCTION_EXISTS(fpsetmask HAVE_FPSETMASK)
-CHECK_INCLUDE_FILES(gc/gc.h HAVE_GC_GC_H)
-CHECK_INCLUDE_FILES(gc.h HAVE_GC_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
-CHECK_FUNCTION_EXISTS(gtk_window_fullscreen HAVE_GTK_WINDOW_FULLSCREEN)
-CHECK_FUNCTION_EXISTS(gtk_window_set_default_icon_from_file HAVE_GTK_WINDOW_SET_DEFAULT_ICON_FROM_FILE)
CHECK_INCLUDE_FILES(ieeefp.h HAVE_IEEEFP_H)
CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILES(locale.h HAVE_LC_MESSAGES)
-CHECK_INCLUDE_FILES(locale.h HAVE_LOCALE_H)
-CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
CHECK_FUNCTION_EXISTS(mallinfo HAVE_MALLINFO)
CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H)
CHECK_FUNCTION_EXISTS(memmove HAVE_MEMMOVE)
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
CHECK_FUNCTION_EXISTS(memset HAVE_MEMSET)
-CHECK_FUNCTION_EXISTS(mkdir HAVE_MKDIR)
CHECK_FUNCTION_EXISTS(pow HAVE_POW)
CHECK_FUNCTION_EXISTS(sqrt HAVE_SQRT)
-CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)
CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
-CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
-CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
-CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
-CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
CHECK_FUNCTION_EXISTS(strpbrk HAVE_STRPBRK)
CHECK_FUNCTION_EXISTS(strrchr HAVE_STRRCHR)
CHECK_FUNCTION_EXISTS(strspn HAVE_STRSPN)
@@ -52,14 +38,10 @@ CHECK_STRUCT_HAS_MEMBER(fsmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_FSMBLKS)
CHECK_STRUCT_HAS_MEMBER(hblkhd mallinfo malloc.h HAVE_STRUCT_MALLINFO_HBLKHD)
CHECK_STRUCT_HAS_MEMBER(uordblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_UORDBLKS)
CHECK_STRUCT_HAS_MEMBER(usmblks mallinfo malloc.h HAVE_STRUCT_MALLINFO_USMBLKS)
-CHECK_INCLUDE_FILES(sys/filio.h HAVE_SYS_FILIO_H)
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
-CHECK_INCLUDE_FILES(zlib.h HAVE_ZLIB_H)
-
-CHECK_INCLUDE_FILE_CXX(unordered_set HAVE_NATIVE_UNORDERED_SET)
# Enable pango defines, necessary for compilation on Win32, how about Linux?
# yes but needs to be done a better way
diff --git a/CMakeScripts/ConfigEnv.cmake b/CMakeScripts/ConfigEnv.cmake
index dd4e7e10c..1c4a64b39 100644
--- a/CMakeScripts/ConfigEnv.cmake
+++ b/CMakeScripts/ConfigEnv.cmake
@@ -47,8 +47,4 @@ if(APPLE)
if(DEFINED ENV{GTKMM_BASEPATH})
message("GTKMM_BASEPATH: $ENV{GTKMM_BASEPATH}")
endif()
-
- # detect current GTK+ backend
- pkg_check_variable(gtk+-2.0 target)
- message("GTK2 backend: ${GTK+_2.0_TARGET}")
endif()
diff --git a/CMakeScripts/ConfigPaths.cmake b/CMakeScripts/ConfigPaths.cmake
index de053c4d8..f62d14c4e 100644
--- a/CMakeScripts/ConfigPaths.cmake
+++ b/CMakeScripts/ConfigPaths.cmake
@@ -7,7 +7,7 @@ if(WIN32)
endif()
set(INKSCAPE_LIBDIR "\\\\lib")
- set(INKSCAPE_DATADIR "")
+ set(INKSCAPE_DATADIR "") # can be set via the evironment variable INKSCAPE_DATADIR at runtime
set(PACKAGE_LOCALE_DIR "\\\\share\\\\locale")
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 8cc0f0cd9..52410fb2b 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -45,7 +45,6 @@ pkg_check_modules(INKSCAPE_DEP REQUIRED
pangocairo
pangoft2
fontconfig
- gthread-2.0
gsl
gmodule-2.0)
@@ -57,18 +56,6 @@ add_definitions(${INKSCAPE_DEP_CFLAGS_OTHER})
if(APPLE AND DEFINED ENV{CMAKE_PREFIX_PATH})
list(APPEND INKSCAPE_LIBS "-L$ENV{CMAKE_PREFIX_PATH}/lib")
endif()
-if(APPLE)
- if(${GTK+_2.0_TARGET} MATCHES "x11")
- pkg_check_modules(x11 REQUIRED x11)
- list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
- endif()
-elseif(WIN32)
-# X11 not available on windows
-else()
- pkg_check_modules(x11 REQUIRED x11)
- list(APPEND INKSCAPE_LIBS ${x11_LDFLAGS})
-
-endif()
if(WITH_GNOME_VFS)
find_package(GnomeVFS2)
@@ -299,11 +286,7 @@ set(TRY_GTKSPELL ON)
${GTKSPELL3_LIBRARIES}
)
-find_package(Freetype REQUIRED)
-list(APPEND INKSCAPE_INCS_SYS ${FREETYPE_INCLUDE_DIRS})
-list(APPEND INKSCAPE_LIBS ${FREETYPE_LIBRARIES})
-
-find_package(Boost REQUIRED)
+find_package(Boost 1.19.0 REQUIRED)
list(APPEND INKSCAPE_INCS_SYS ${Boost_INCLUDE_DIRS})
# list(APPEND INKSCAPE_LIBS ${Boost_LIBRARIES})
diff --git a/README.md b/README.md
index d4f2ba4bf..5e888763e 100644
--- a/README.md
+++ b/README.md
@@ -37,6 +37,29 @@ make install
Other platforms such as Windows and Mac require a lot more and are considered
a developer and packager task. These instructions are kept on the Inkscape wiki.
+Running Without Installing
+==========================
+
+For developers and others who want to run inkscape without installing it:
+
+```bash
+ln -s . share/inkscape
+mkdir -p build/conf
+cd build
+cmake -DCMAKE_INSTALL_PREFIX:PATH=$PWD/../
+make -j4
+export INKSCAPE_PROFILE_DIR=$PWD/conf
+./bin/inkscape
+```
+
+This won't work for other platforms such as Windows and Mac, see above. But
+what it is doing is linking the share directory into a location where
+the inkscape binary will be able to find it. Allowing you to change the
+inkscape shared files without rebuilding or installing.
+
+Then setting a local configuration directory, keeping your configurations
+seperate from any installed version.
+
Required Dependencies
=====================
diff --git a/config.h.cmake b/config.h.cmake
index 637d49558..35e9818a9 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -33,23 +33,11 @@
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#cmakedefine HAVE_BIND_TEXTDOMAIN_CODESET 1
-/* Define to 1 if you have the <concept_check.hpp> header file. */
-#cmakedefine HAVE_BOOST_CONCEPT_CHECK_HPP 1
-
/* Whether the Cairo PDF backend is available */
#cmakedefine HAVE_CAIRO_PDF 1
#cmakedefine PANGO_ENABLE_ENGINE 1
#cmakedefine RENDER_WITH_PANGO_CAIRO 1
-/* define to 1 if Carbon is available */
-#cmakedefine HAVE_CARBON 1
-
-/* Define to 1 if you have the `dcgettext' function. */
-#cmakedefine HAVE_DCGETTEXT 1
-
-/* Define to 1 if you have the `ecvt' function. */
-#cmakedefine HAVE_ECVT 1
-
/* Define to 1 if you have the <fcntl.h> header file. */
#cmakedefine HAVE_FCNTL_H 1
@@ -59,36 +47,15 @@
/* Define to 1 if you have the `fpsetmask' function. */
#cmakedefine HAVE_FPSETMASK 1
-/* Define to 1 if you have the <gc/gc.h> header file. */
-#cmakedefine HAVE_GC_GC_H 1
-
-/* Define to 1 if you have the <gc.h> header file. */
-#cmakedefine HAVE_GC_H 1
-
-#cmakedefine HAVE_GETOPT_H 1
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#cmakedefine HAVE_GETTEXT 1
-
/* Define to 1 if you have the `gettimeofday' function. */
#cmakedefine HAVE_GETTIMEOFDAY 1
-/* Define to 1 if you have the `gtk_window_fullscreen' function. */
-#cmakedefine HAVE_GTK_WINDOW_FULLSCREEN 1
-
-/* Define to 1 if you have the `gtk_window_set_default_icon_from_file'
- function. */
-#cmakedefine HAVE_GTK_WINDOW_SET_DEFAULT_ICON_FROM_FILE 1
-
/* Build with Gtkmm 3.0.x or higher */
#cmakedefine WITH_GTKMM_3_0 1
/* Build with Gtkmm 3.10.x or higher */
#cmakedefine WITH_GTKMM_3_10 1
-/* Build with external GDL */
-#cmakedefine WITH_EXT_GDL 1
-
/* Build with GDL 3.6 or higher */
#cmakedefine WITH_GDL_3_6 1
@@ -98,18 +65,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H 1
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#cmakedefine HAVE_LC_MESSAGES 1
-
-/* Define to 1 if you have the <libintl.h> header file. */
-#cmakedefine HAVE_LIBINTL_H 1
-
-/* Define to 1 if you have the `m' library (-lm). */
-#cmakedefine HAVE_LIBM 1
-
-/* Define to 1 if you have the <locale.h> header file. */
-#cmakedefine HAVE_LOCALE_H 1
-
/* Define to 1 if you have the `mallinfo' function. */
#cmakedefine HAVE_MALLINFO 1
@@ -125,9 +80,6 @@
/* Define to 1 if you have the `memset' function. */
#cmakedefine HAVE_MEMSET 1
-/* Define to 1 if you have the `mkdir' function. */
-#cmakedefine HAVE_MKDIR 1
-
/* Use OpenMP (via cmake) */
#cmakedefine HAVE_OPENMP 1
@@ -155,31 +107,9 @@
/* Define to 1 if you have the `sqrt' function. */
#cmakedefine HAVE_SQRT 1
-/* Define to 1 if `stat' has the bug that it succeeds when given the
- zero-length file name argument. */
-#cmakedefine HAVE_STAT_EMPTY_STRING_BUG 1
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#cmakedefine HAVE_STDDEF_H 1
-
/* Define to 1 if you have the <stdint.h> header file. */
#cmakedefine HAVE_STDINT_H 1
-/* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strftime' function. */
-#cmakedefine HAVE_STRFTIME 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strncasecmp' function. */
-#cmakedefine HAVE_STRNCASECMP 1
-
/* Define to 1 if you have the `strpbrk' function. */
#cmakedefine HAVE_STRPBRK 1
@@ -210,9 +140,6 @@
/* Define to 1 if `usmblks' is member of `struct mallinfo'. */
#cmakedefine HAVE_STRUCT_MALLINFO_USMBLKS 1
-/* Define to 1 if you have the <sys/filio.h> header file. */
-#cmakedefine HAVE_SYS_FILIO_H 1
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
@@ -225,31 +152,15 @@
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
-/* Define to 1 if you have the <unordered_set> header file. */
-#cmakedefine HAVE_NATIVE_UNORDERED_SET 1
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#cmakedefine HAVE_ZLIB_H 1
-
/* Base data directory -- only path-prefix.h should use it! */
#define INKSCAPE_DATADIR "${INKSCAPE_DATADIR}"
/* Base library directory -- only path-prefix.h should use it! */
#define INKSCAPE_LIBDIR "${INKSCAPE_LIBDIR}"
-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
- slash. */
-#cmakedefine LSTAT_FOLLOWS_SLASHED_SYMLINK 1
-
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#cmakedefine NO_MINUS_C_MINUS_O 1
-
/* Name of package */
#define PACKAGE "${PROJECT_NAME}"
-/* Define to the address where bug reports for this package should be sent. */
-#cmakedefine PACKAGE_BUGREPORT ""
-
/* Localization directory */
#define PACKAGE_LOCALE_DIR "${PACKAGE_LOCALE_DIR}"
@@ -268,21 +179,6 @@
/* Build in dbus */
#cmakedefine WITH_DBUS 1
-/* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE
-
-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-#cmakedefine STAT_MACROS_BROKEN 1
-
-/* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS 1
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#cmakedefine TIME_WITH_SYS_TIME 1
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#cmakedefine TM_IN_SYS_TIME 1
-
/* Use gnome vfs file load functionality */
#cmakedefine WITH_GNOME_VFS 1
@@ -295,12 +191,6 @@
/* Use libjpeg */
#cmakedefine HAVE_JPEG 1
-/* Build in Inkboard support */
-#cmakedefine WITH_INKBOARD 1
-
-/* Build in SSL support for Inkboard */
-#cmakedefine WITH_INKBOARD_SSL 1
-
/* Build in libcdr */
#cmakedefine WITH_LIBCDR 1
@@ -331,21 +221,6 @@
/* Build in libwpg-0.3 */
#cmakedefine WITH_LIBWPG03 1
-/* Use MMX optimizations, if CPU supports it */
-#cmakedefine WITH_MMX 1
-
-/* Use experimental module support */
-#cmakedefine WITH_MODULES 1
-
-/* use Perl for embedded scripting */
-#cmakedefine WITH_PERL 1
-
-/* use Python for embedded scripting */
-#cmakedefine WITH_PYTHON 1
-
-/* Use Xft font database */
-#cmakedefine WITH_XFT 1
-
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#cmakedefine WORDS_BIGENDIAN 1
@@ -353,9 +228,6 @@
/* Do we want experimental, unsupported, unguaranteed, etc., LivePathEffects enabled? */
#cmakedefine LPE_ENABLE_TEST_EFFECTS 1
-/* Define to `int' if <sys/types.h> does not define. */
-#cmakedefine mode_t
-
#endif /* _CONFIG_H_ */
diff --git a/src/inkgc/gc-core.h b/src/inkgc/gc-core.h
index a27510f50..407c857fb 100644
--- a/src/inkgc/gc-core.h
+++ b/src/inkgc/gc-core.h
@@ -19,11 +19,7 @@
#include <new>
#include <cstdlib>
-#ifdef HAVE_GC_GC_H
-# include <gc/gc.h>
-#else
# include <gc.h>
-#endif
namespace Inkscape {
namespace GC {
diff --git a/src/path-prefix.h b/src/path-prefix.h
index 8a39ede84..e54a80f28 100644
--- a/src/path-prefix.h
+++ b/src/path-prefix.h
@@ -51,22 +51,22 @@
#else
# ifdef WIN32
# define INKSCAPE_APPICONDIR WIN32_DATADIR("pixmaps")
-# define INKSCAPE_ATTRRELDIR WIN32_DATADIR("share\\attributes")
-# define INKSCAPE_BINDDIR WIN32_DATADIR("share\\bind")
-# define INKSCAPE_EXAMPLESDIR WIN32_DATADIR("share\\examples")
-# define INKSCAPE_EXTENSIONDIR WIN32_DATADIR("share\\extensions")
-# define INKSCAPE_FILTERDIR WIN32_DATADIR("share\\filters")
-# define INKSCAPE_GRADIENTSDIR WIN32_DATADIR("share\\gradients")
-# define INKSCAPE_KEYSDIR WIN32_DATADIR("share\\keys")
-# define INKSCAPE_PIXMAPDIR WIN32_DATADIR("share\\icons")
-# define INKSCAPE_MARKERSDIR WIN32_DATADIR("share\\markers")
-# define INKSCAPE_PALETTESDIR WIN32_DATADIR("share\\palettes")
-# define INKSCAPE_PATTERNSDIR WIN32_DATADIR("share\\patterns")
-# define INKSCAPE_SCREENSDIR WIN32_DATADIR("share\\screens")
-# define INKSCAPE_SYMBOLSDIR WIN32_DATADIR("share\\symbols")
-# define INKSCAPE_TUTORIALSDIR WIN32_DATADIR("share\\tutorials")
-# define INKSCAPE_TEMPLATESDIR WIN32_DATADIR("share\\templates")
-# define INKSCAPE_UIDIR WIN32_DATADIR("share\\ui")
+# define INKSCAPE_ATTRRELDIR WIN32_DATADIR("attributes")
+# define INKSCAPE_BINDDIR WIN32_DATADIR("bind")
+# define INKSCAPE_EXAMPLESDIR WIN32_DATADIR("examples")
+# define INKSCAPE_EXTENSIONDIR WIN32_DATADIR("extensions")
+# define INKSCAPE_FILTERDIR WIN32_DATADIR("filters")
+# define INKSCAPE_GRADIENTSDIR WIN32_DATADIR("gradients")
+# define INKSCAPE_KEYSDIR WIN32_DATADIR("keys")
+# define INKSCAPE_PIXMAPDIR WIN32_DATADIR("icons")
+# define INKSCAPE_MARKERSDIR WIN32_DATADIR("markers")
+# define INKSCAPE_PALETTESDIR WIN32_DATADIR("palettes")
+# define INKSCAPE_PATTERNSDIR WIN32_DATADIR("patterns")
+# define INKSCAPE_SCREENSDIR WIN32_DATADIR("screens")
+# define INKSCAPE_SYMBOLSDIR WIN32_DATADIR("symbols")
+# define INKSCAPE_TUTORIALSDIR WIN32_DATADIR("tutorials")
+# define INKSCAPE_TEMPLATESDIR WIN32_DATADIR("templates")
+# define INKSCAPE_UIDIR WIN32_DATADIR("ui")
//CREATE V0.1 WIN32 support
# define CREATE_GRADIENTSDIR WIN32_DATADIR("create\\gradients\\gimp")
# define CREATE_PALETTESDIR WIN32_DATADIR("create\\swatches")
diff --git a/src/prefix.cpp b/src/prefix.cpp
index 4e2204cff..c8bf7abec 100644
--- a/src/prefix.cpp
+++ b/src/prefix.cpp
@@ -419,72 +419,37 @@ br_extract_prefix (const char *path)
#ifdef __WIN32__
-
/**
* Provide a similar mechanism for Win32. Enable a macro,
* WIN32_DATADIR, that can look up subpaths for inkscape resources
- */
-
-#include <windows.h>
-#include <glibmm/ustring.h>
-
-/**
- * Return the directory of the .exe that is currently running
*/
-Glib::ustring win32_getExePath()
-{
- gunichar2 path[2048];
- GetModuleFileNameW(0, (WCHAR*) path, 2048);
- gchar *exe = g_utf16_to_utf8(path, -1, 0,0,0);
- gchar *dir = g_path_get_dirname(exe);
- Glib::ustring ret = dir;
- g_free(dir);
- g_free(exe);
- return ret;
-}
-
/**
- * Return the relocatable version of the datadir,
- * probably c:\inkscape
+ * Get the Windows-equivalent of INKSCAPE_DATADIR and append a relative path
+ *
+ * - by default INKSCAPE_DATADIR will be relative to the called executable
+ * (typically inkscape/share but also handles the case where the executable is in a /bin subfolder)
+ * - to override set the INKSCAPE_DATADIR environment variable
*/
-static Glib::ustring win32_getDataDir()
-{
- Glib::ustring dir = win32_getExePath();
- if (INKSCAPE_DATADIR && *INKSCAPE_DATADIR &&
- strcmp(INKSCAPE_DATADIR, ".") != 0)
- {
- dir += "\\";
- dir += INKSCAPE_DATADIR;
- }
- return dir;
-}
-
-static Glib::ustring win32_getResourcePath(const Glib::ustring &childPath)
+char *win32_append_datadir(const char *relative_path)
{
- Glib::ustring dir = win32_getDataDir();
- if (childPath.size() > 0)
- {
- dir += "\\";
- dir += childPath;
+ static gchar *datadir;
+ if (!datadir) {
+ gchar const *inkscape_datadir = g_getenv("INKSCAPE_DATADIR");
+ if (inkscape_datadir) {
+ datadir = g_strdup(inkscape_datadir);
+ } else {
+ gchar *module_path = g_win32_get_package_installation_directory_of_module(NULL);
+ datadir = g_build_filename(module_path, "share", NULL);
+ g_free(module_path);
}
- return dir;
-}
+ }
+ if (!relative_path) {
+ relative_path = "";
+ }
-/**
- * This is the visible utility function
- */
-char *win32_relative_path(const char *childPath)
-{
- static char *returnPath = 0;
- if (!childPath)
- childPath = "";
- Glib::ustring resourcePath = win32_getResourcePath(childPath);
- if (returnPath)
- free(returnPath);
- returnPath = strdup(resourcePath.c_str());
- return returnPath;
+ return g_build_filename(datadir, relative_path, NULL);
}
#endif /* __WIN32__ */
diff --git a/src/prefix.h b/src/prefix.h
index 7c5a1fd3c..d28e896d0 100644
--- a/src/prefix.h
+++ b/src/prefix.h
@@ -119,14 +119,10 @@ char *br_extract_prefix(const char *path);
#endif /* __cplusplus */
#ifdef __WIN32__
-
-#include <glibmm/ustring.h>
-
-Glib::ustring win32_getExePath();
-char *win32_relative_path(const char *childPath);
-
-#define WIN32_DATADIR(suffix) (win32_relative_path(suffix))
-
+char *win32_append_datadir(const char *relative_path);
+#undef INKSCAPE_DATADIR
+#define INKSCAPE_DATADIR win32_append_datadir(NULL)
+#define WIN32_DATADIR(suffix) (win32_append_datadir(suffix))
#endif
#endif /* _PREFIX_H_ */
diff --git a/src/trace/trace.h b/src/trace/trace.h
index f562e89aa..4bf13123b 100644
--- a/src/trace/trace.h
+++ b/src/trace/trace.h
@@ -13,9 +13,7 @@
# include "config.h"
#endif
-#ifdef HAVE_STRING_H
# include <string.h>
-#endif
#include <glibmm/refptr.h>
#include <gdkmm/pixbuf.h>
diff --git a/src/util/ege-tags.cpp b/src/util/ege-tags.cpp
index 8a2ce0529..dcc28f370 100644
--- a/src/util/ege-tags.cpp
+++ b/src/util/ege-tags.cpp
@@ -38,9 +38,7 @@
#include "config.h"
#endif // HAVE_CONFIG_H
-#if HAVE_LIBINTL_H
#include <libintl.h>
-#endif // HAVE_LIBINTL_H
#if !defined(_)
#define _(s) gettext(s)
diff --git a/src/widgets/ege-paint-def.cpp b/src/widgets/ege-paint-def.cpp
index 1a8ad041a..8e0ec9352 100644
--- a/src/widgets/ege-paint-def.cpp
+++ b/src/widgets/ege-paint-def.cpp
@@ -36,9 +36,7 @@
#include "config.h"
-#ifdef HAVE_LIBINTL_H
#include <libintl.h>
-#endif
#include <stdint.h>
#include <string>
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 4d093a4ea..6da1233db 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -17,13 +17,9 @@
#include "config.h"
-#if HAVE_STRING_H
# include <cstring>
-#endif
-#if HAVE_STDLIB_H
# include <cstdlib>
-#endif
#include <glib.h>
diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt
index 3de607894..af200bea8 100644
--- a/testfiles/CMakeLists.txt
+++ b/testfiles/CMakeLists.txt
@@ -1,17 +1,13 @@
# -----------------------------------------------------------------------------
#
# -----------------------------------------------------------------------------
-add_subdirectory(${GMOCK_DIR} ${CMAKE_BINARY_DIR}/gmock)
+if(NOT GTEST_FOUND) # not required for gtest 1.8.0 and later
+ add_subdirectory(${GMOCK_DIR} ${CMAKE_BINARY_DIR}/gmock)
-include_directories(SYSTEM ${GMOCK_DIR}/gtest/include
- ${GMOCK_DIR}/include
- ${CMAKE_SOURCE_DIR}/gtest/gtest/include)
-
-set_source_files_properties(
- ${CMAKE_BINARY_DIR}/src/inkscape-version.cpp
- PROPERTIES GENERATED TRUE)
-
-include_directories(${CMAKE_BINARY_DIR}/src)
+ include_directories(SYSTEM ${GMOCK_DIR}/gtest/include
+ ${GMOCK_DIR}/include
+ ${CMAKE_SOURCE_DIR}/gtest/gtest/include)
+endif()
set(TEST_SOURCES
attributes-test
@@ -22,25 +18,12 @@ set(TEST_SOURCES
set(TEST_LIBS
gmock_main
- inkscape_base
- nrtype_LIB
- croco_LIB
- avoid_LIB
- cola_LIB
- vpsc_LIB
- livarot_LIB
- uemf_LIB
- 2geom_LIB
- depixelize_LIB
- util_LIB
- gc_LIB
- ${INKSCAPE_LIBS}
-)
+ inkscape_base)
foreach(source ${TEST_SOURCES})
add_executable(${source} src/${source}.cpp unittest.cpp doc-per-case-test.cpp)
target_link_libraries(${source} ${TEST_LIBS})
- add_test(NAME ${source} COMMAND ${EXECUTABLE_OUTPUT_PATH}/${source})
+ add_test(NAME ${source} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source})
add_dependencies(${source} inkscape_version)
add_dependencies(check ${source})
endforeach() \ No newline at end of file