Merge lp:~zeller-benjamin/ubuntu-sdk-ide/snapcraft-step2 into lp:ubuntu-sdk-ide

Proposed by Benjamin Zeller on 2016-10-18
Status: Merged
Approved by: Zoltan Balogh on 2016-10-18
Approved revision: 165
Merged at revision: 164
Proposed branch: lp:~zeller-benjamin/ubuntu-sdk-ide/snapcraft-step2
Merge into: lp:ubuntu-sdk-ide
Diff against target: 303842 lines (+301319/-81)
446 files modified
CMakeLists.txt (+29/-2)
dist/qtcreator/src/plugins/ubuntu/UbuntuPlugin.pro (+2/-0)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro (+0/-32)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop (+0/-9)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro (+2/-19)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.desktop (+9/-0)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml (+10/-4)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json (+7/-12)
dist/qtcreator/src/plugins/ubuntu/share/qtcreator/ubuntu/scripts/run_snapcraft.py (+29/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/UbuntuProject.mimetypes.xml (+5/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.cpp (+41/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.h (+33/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.cpp (+145/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.h (+44/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.cpp (+65/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.h (+25/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.cpp (+156/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.h (+88/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.cpp (+42/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.h (+48/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.cpp (+64/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.h (+40/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp (+496/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.h (+136/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.cpp (+51/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.h (+31/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.cpp (+67/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.h (+33/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.cpp (+114/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.h (+59/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/snap.pri (+27/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.cpp (+5/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.h (+1/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuconstants.h (+10/-0)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntukitmanager.cpp (+4/-1)
dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp (+14/-2)
dist/yaml-cpp/.clang-format (+47/-0)
dist/yaml-cpp/.hgeol (+4/-0)
dist/yaml-cpp/.hgignore (+1/-0)
dist/yaml-cpp/.pc/.quilt_patches (+1/-0)
dist/yaml-cpp/.pc/.quilt_series (+1/-0)
dist/yaml-cpp/.pc/.version (+1/-0)
dist/yaml-cpp/.pc/applied-patches (+2/-0)
dist/yaml-cpp/.pc/install-cmake-dev-files.patch/CMakeLists.txt (+340/-0)
dist/yaml-cpp/.pc/pkgconfig.patch/yaml-cpp.pc.cmake (+11/-0)
dist/yaml-cpp/CMakeLists.txt (+356/-0)
dist/yaml-cpp/debian/changelog (+56/-0)
dist/yaml-cpp/debian/compat (+1/-0)
dist/yaml-cpp/debian/control (+39/-0)
dist/yaml-cpp/debian/copyright (+44/-0)
dist/yaml-cpp/debian/libyaml-cpp-dev.install (+5/-0)
dist/yaml-cpp/debian/libyaml-cpp0.5v5.install (+1/-0)
dist/yaml-cpp/debian/patches/install-cmake-dev-files.patch (+69/-0)
dist/yaml-cpp/debian/patches/pkgconfig.patch (+19/-0)
dist/yaml-cpp/debian/patches/series (+2/-0)
dist/yaml-cpp/debian/rules (+64/-0)
dist/yaml-cpp/debian/source/format (+1/-0)
dist/yaml-cpp/debian/watch (+3/-0)
dist/yaml-cpp/include/yaml-cpp/anchor.h (+17/-0)
dist/yaml-cpp/include/yaml-cpp/binary.h (+67/-0)
dist/yaml-cpp/include/yaml-cpp/contrib/anchordict.h (+37/-0)
dist/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h (+147/-0)
dist/yaml-cpp/include/yaml-cpp/dll.h (+37/-0)
dist/yaml-cpp/include/yaml-cpp/emitfromevents.h (+57/-0)
dist/yaml-cpp/include/yaml-cpp/emitter.h (+254/-0)
dist/yaml-cpp/include/yaml-cpp/emitterdef.h (+16/-0)
dist/yaml-cpp/include/yaml-cpp/emittermanip.h (+137/-0)
dist/yaml-cpp/include/yaml-cpp/emitterstyle.h (+16/-0)
dist/yaml-cpp/include/yaml-cpp/eventhandler.h (+40/-0)
dist/yaml-cpp/include/yaml-cpp/exceptions.h (+227/-0)
dist/yaml-cpp/include/yaml-cpp/mark.h (+27/-0)
dist/yaml-cpp/include/yaml-cpp/node/convert.h (+286/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h (+26/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/impl.h (+177/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/iterator.h (+65/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/iterator_fwd.h (+28/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/memory.h (+48/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/node.h (+165/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/node_data.h (+124/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/node_iterator.h (+159/-0)
dist/yaml-cpp/include/yaml-cpp/node/detail/node_ref.h (+95/-0)
dist/yaml-cpp/include/yaml-cpp/node/emit.h (+25/-0)
dist/yaml-cpp/include/yaml-cpp/node/impl.h (+441/-0)
dist/yaml-cpp/include/yaml-cpp/node/iterator.h (+31/-0)
dist/yaml-cpp/include/yaml-cpp/node/node.h (+143/-0)
dist/yaml-cpp/include/yaml-cpp/node/parse.h (+30/-0)
dist/yaml-cpp/include/yaml-cpp/node/ptr.h (+29/-0)
dist/yaml-cpp/include/yaml-cpp/node/type.h (+16/-0)
dist/yaml-cpp/include/yaml-cpp/noncopyable.h (+25/-0)
dist/yaml-cpp/include/yaml-cpp/null.h (+24/-0)
dist/yaml-cpp/include/yaml-cpp/ostream_wrapper.h (+72/-0)
dist/yaml-cpp/include/yaml-cpp/parser.h (+48/-0)
dist/yaml-cpp/include/yaml-cpp/stlemitter.h (+51/-0)
dist/yaml-cpp/include/yaml-cpp/traits.h (+103/-0)
dist/yaml-cpp/include/yaml-cpp/yaml.h (+24/-0)
dist/yaml-cpp/install.txt (+24/-0)
dist/yaml-cpp/license.txt (+19/-0)
dist/yaml-cpp/src/binary.cpp (+93/-0)
dist/yaml-cpp/src/collectionstack.h (+39/-0)
dist/yaml-cpp/src/contrib/graphbuilder.cpp (+17/-0)
dist/yaml-cpp/src/contrib/graphbuilderadapter.cpp (+94/-0)
dist/yaml-cpp/src/contrib/graphbuilderadapter.h (+79/-0)
dist/yaml-cpp/src/convert.cpp (+75/-0)
dist/yaml-cpp/src/directives.cpp (+22/-0)
dist/yaml-cpp/src/directives.h (+29/-0)
dist/yaml-cpp/src/emit.cpp (+25/-0)
dist/yaml-cpp/src/emitfromevents.cpp (+119/-0)
dist/yaml-cpp/src/emitter.cpp (+911/-0)
dist/yaml-cpp/src/emitterstate.cpp (+350/-0)
dist/yaml-cpp/src/emitterstate.h (+203/-0)
dist/yaml-cpp/src/emitterutils.cpp (+482/-0)
dist/yaml-cpp/src/emitterutils.h (+50/-0)
dist/yaml-cpp/src/exp.cpp (+136/-0)
dist/yaml-cpp/src/exp.h (+209/-0)
dist/yaml-cpp/src/indentation.h (+41/-0)
dist/yaml-cpp/src/memory.cpp (+26/-0)
dist/yaml-cpp/src/node.cpp (+12/-0)
dist/yaml-cpp/src/node_data.cpp (+296/-0)
dist/yaml-cpp/src/nodebuilder.cpp (+130/-0)
dist/yaml-cpp/src/nodebuilder.h (+70/-0)
dist/yaml-cpp/src/nodeevents.cpp (+101/-0)
dist/yaml-cpp/src/nodeevents.h (+64/-0)
dist/yaml-cpp/src/null.cpp (+5/-0)
dist/yaml-cpp/src/ostream_wrapper.cpp (+57/-0)
dist/yaml-cpp/src/parse.cpp (+68/-0)
dist/yaml-cpp/src/parser.cpp (+128/-0)
dist/yaml-cpp/src/ptr_stack.h (+53/-0)
dist/yaml-cpp/src/ptr_vector.h (+49/-0)
dist/yaml-cpp/src/regex_yaml.cpp (+45/-0)
dist/yaml-cpp/src/regex_yaml.h (+85/-0)
dist/yaml-cpp/src/regeximpl.h (+186/-0)
dist/yaml-cpp/src/scanner.cpp (+386/-0)
dist/yaml-cpp/src/scanner.h (+135/-0)
dist/yaml-cpp/src/scanscalar.cpp (+221/-0)
dist/yaml-cpp/src/scanscalar.h (+61/-0)
dist/yaml-cpp/src/scantag.cpp (+81/-0)
dist/yaml-cpp/src/scantag.h (+19/-0)
dist/yaml-cpp/src/scantoken.cpp (+436/-0)
dist/yaml-cpp/src/setting.h (+99/-0)
dist/yaml-cpp/src/simplekey.cpp (+128/-0)
dist/yaml-cpp/src/singledocparser.cpp (+413/-0)
dist/yaml-cpp/src/singledocparser.h (+65/-0)
dist/yaml-cpp/src/stream.cpp (+448/-0)
dist/yaml-cpp/src/stream.h (+76/-0)
dist/yaml-cpp/src/streamcharsource.h (+48/-0)
dist/yaml-cpp/src/stringsource.h (+48/-0)
dist/yaml-cpp/src/tag.cpp (+49/-0)
dist/yaml-cpp/src/tag.h (+33/-0)
dist/yaml-cpp/src/token.h (+69/-0)
dist/yaml-cpp/test/CMakeLists.txt (+34/-0)
dist/yaml-cpp/test/create-emitter-tests.py (+211/-0)
dist/yaml-cpp/test/gmock-1.7.0/CHANGES (+126/-0)
dist/yaml-cpp/test/gmock-1.7.0/CMakeLists.txt (+171/-0)
dist/yaml-cpp/test/gmock-1.7.0/CONTRIBUTORS (+40/-0)
dist/yaml-cpp/test/gmock-1.7.0/LICENSE (+28/-0)
dist/yaml-cpp/test/gmock-1.7.0/Makefile.am (+216/-0)
dist/yaml-cpp/test/gmock-1.7.0/Makefile.in (+1357/-0)
dist/yaml-cpp/test/gmock-1.7.0/README (+369/-0)
dist/yaml-cpp/test/gmock-1.7.0/aclocal.m4 (+9799/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/config.guess (+1530/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/config.h.in (+69/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/config.sub (+1773/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/depcomp (+688/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/install-sh (+527/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/ltmain.sh (+9661/-0)
dist/yaml-cpp/test/gmock-1.7.0/build-aux/missing (+331/-0)
dist/yaml-cpp/test/gmock-1.7.0/configure (+18535/-0)
dist/yaml-cpp/test/gmock-1.7.0/configure.ac (+146/-0)
dist/yaml-cpp/test/gmock-1.7.0/fused-src/gmock-gtest-all.cc (+11443/-0)
dist/yaml-cpp/test/gmock-1.7.0/fused-src/gmock/gmock.h (+14198/-0)
dist/yaml-cpp/test/gmock-1.7.0/fused-src/gmock_main.cc (+54/-0)
dist/yaml-cpp/test/gmock-1.7.0/fused-src/gtest/gtest.h (+20061/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/CHANGES (+157/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/CMakeLists.txt (+252/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/CONTRIBUTORS (+37/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/LICENSE (+28/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/Makefile.am (+306/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/Makefile.in (+1360/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/README (+435/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/aclocal.m4 (+1198/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/config.guess (+1530/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/config.h.in (+69/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/config.sub (+1773/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/depcomp (+688/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/install-sh (+527/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/ltmain.sh (+9661/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/build-aux/missing (+331/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/cmake/internal_utils.cmake (+227/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest.cbproj (+138/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest.groupproj (+54/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest_all.cc (+38/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest_link.cc (+40/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest_main.cbproj (+82/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/codegear/gtest_unittest.cbproj (+88/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/configure (+18222/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/configure.ac (+68/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/fused-src/gtest/gtest-all.cc (+9592/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/fused-src/gtest/gtest.h (+20061/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/fused-src/gtest/gtest_main.cc (+38/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-death-test.h (+294/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-message.h (+250/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-param-test.h (+1421/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-param-test.h.pump (+487/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-printers.h (+855/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-spi.h (+232/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-test-part.h (+179/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest-typed-test.h (+259/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest.h (+2291/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest_pred_impl.h (+358/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/gtest_prod.h (+58/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-death-test-internal.h (+319/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-filepath.h (+206/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-internal.h (+1158/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-linked_ptr.h (+233/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util-generated.h (+5143/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util-generated.h.pump (+301/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-param-util.h (+619/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-port.h (+1947/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-string.h (+167/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-tuple.h (+1012/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-tuple.h.pump (+339/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-type-util.h (+3331/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/include/gtest/internal/gtest-type-util.h.pump (+297/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/acx_pthread.m4 (+363/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/gtest.m4 (+74/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/libtool.m4 (+8001/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/ltoptions.m4 (+384/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/ltsugar.m4 (+123/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/ltversion.m4 (+23/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/m4/lt~obsolete.m4 (+98/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/make/Makefile (+82/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest-md.sln (+45/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest-md.vcproj (+126/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest.sln (+45/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest.vcproj (+126/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_main-md.vcproj (+129/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_main.vcproj (+129/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_prod_test-md.vcproj (+164/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_prod_test.vcproj (+164/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_unittest-md.vcproj (+147/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/msvc/gtest_unittest.vcproj (+147/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/prime_tables.h (+123/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample1.cc (+68/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample1.h (+43/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample10_unittest.cc (+144/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample1_unittest.cc (+153/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample2.cc (+56/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample2.h (+85/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample2_unittest.cc (+109/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample3-inl.h (+172/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample3_unittest.cc (+151/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample4.cc (+46/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample4.h (+53/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample4_unittest.cc (+45/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample5_unittest.cc (+199/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample6_unittest.cc (+224/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample7_unittest.cc (+130/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample8_unittest.cc (+173/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/samples/sample9_unittest.cc (+160/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/scripts/fuse_gtest_files.py (+250/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/scripts/gen_gtest_pred_impl.py (+730/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/scripts/gtest-config.in (+274/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/scripts/pump.py (+855/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/scripts/test/Makefile (+59/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-all.cc (+48/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-death-test.cc (+1344/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-filepath.cc (+382/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-internal-inl.h (+1218/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-port.cc (+805/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-printers.cc (+363/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-test-part.cc (+110/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest-typed-test.cc (+110/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest.cc (+5015/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/src/gtest_main.cc (+38/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-death-test_ex_test.cc (+93/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-death-test_test.cc (+1367/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-filepath_test.cc (+680/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-linked_ptr_test.cc (+154/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-listener_test.cc (+310/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-message_test.cc (+159/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-options_test.cc (+215/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-param-test2_test.cc (+65/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-param-test_test.cc (+904/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-param-test_test.h (+57/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-port_test.cc (+1253/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-printers_test.cc (+1566/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-test-part_test.cc (+208/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-tuple_test.cc (+320/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-typed-test2_test.cc (+45/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-typed-test_test.cc (+360/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-typed-test_test.h (+66/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest-unittest-api_test.cc (+341/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_all_test.cc (+47/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_break_on_failure_unittest.py (+212/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_break_on_failure_unittest_.cc (+88/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_catch_exceptions_test.py (+237/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_catch_exceptions_test_.cc (+311/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_color_test.py (+130/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_color_test_.cc (+71/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_env_var_test.py (+103/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_env_var_test_.cc (+126/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_environment_test.cc (+192/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_filter_unittest.py (+633/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_filter_unittest_.cc (+140/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_help_test.py (+172/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_help_test_.cc (+46/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_list_tests_unittest.py (+207/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_list_tests_unittest_.cc (+157/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_main_unittest.cc (+45/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_no_test_unittest.cc (+56/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_output_test.py (+335/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_output_test_.cc (+1034/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_output_test_golden_lin.txt (+720/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_pred_impl_unittest.cc (+2427/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_premature_exit_test.cc (+141/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_prod_test.cc (+57/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_repeat_test.cc (+253/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_shuffle_test.py (+325/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_shuffle_test_.cc (+103/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_sole_header_test.cc (+57/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_stress_test.cc (+256/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_test_utils.py (+320/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_throw_on_failure_ex_test.cc (+92/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_throw_on_failure_test.py (+171/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_throw_on_failure_test_.cc (+72/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_uninitialized_test.py (+70/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_uninitialized_test_.cc (+43/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_unittest.cc (+7415/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_outfile1_test_.cc (+49/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_outfile2_test_.cc (+49/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_outfiles_test.py (+132/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_output_unittest.py (+307/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_output_unittest_.cc (+181/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/gtest_xml_test_utils.py (+194/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/production.cc (+36/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/test/production.h (+55/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/DebugProject.xcconfig (+30/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/FrameworkTarget.xcconfig (+17/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/General.xcconfig (+41/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/ReleaseProject.xcconfig (+32/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/StaticLibraryTarget.xcconfig (+18/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Config/TestTarget.xcconfig (+8/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Resources/Info.plist (+30/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/Info.plist (+28/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj (+457/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/runtests.sh (+62/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/widget.cc (+63/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/widget.h (+59/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Samples/FrameworkSample/widget_test.cc (+68/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Scripts/runtests.sh (+65/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/Scripts/versiongenerate.py (+100/-0)
dist/yaml-cpp/test/gmock-1.7.0/gtest/xcode/gtest.xcodeproj/project.pbxproj (+1135/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-actions.h (+1078/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-cardinalities.h (+147/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-actions.h (+2415/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-actions.h.pump (+821/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-function-mockers.h (+991/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-function-mockers.h.pump (+265/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-matchers.h (+2190/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-matchers.h.pump (+674/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-nice-strict.h (+397/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-generated-nice-strict.h.pump (+161/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-matchers.h (+3986/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-more-actions.h (+233/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-more-matchers.h (+58/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock-spec-builders.h (+1791/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/gmock.h (+94/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/internal/gmock-generated-internal-utils.h (+279/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/internal/gmock-generated-internal-utils.h.pump (+136/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/internal/gmock-internal-utils.h (+498/-0)
dist/yaml-cpp/test/gmock-1.7.0/include/gmock/internal/gmock-port.h (+78/-0)
dist/yaml-cpp/test/gmock-1.7.0/make/Makefile (+101/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2005/gmock.sln (+32/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2005/gmock.vcproj (+191/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2005/gmock_config.vsprops (+15/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2005/gmock_main.vcproj (+187/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2005/gmock_test.vcproj (+201/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2010/gmock.sln (+32/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2010/gmock.vcxproj (+82/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2010/gmock_config.props (+19/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2010/gmock_main.vcxproj (+88/-0)
dist/yaml-cpp/test/gmock-1.7.0/msvc/2010/gmock_test.vcxproj (+101/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/fuse_gmock_files.py (+240/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/LICENSE (+203/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/README (+35/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/README.cppclean (+115/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/cpp/ast.py (+1723/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/cpp/gmock_class.py (+226/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/cpp/keywords.py (+59/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/cpp/tokenize.py (+287/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/cpp/utils.py (+41/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/generator/gmock_gen.py (+31/-0)
dist/yaml-cpp/test/gmock-1.7.0/scripts/gmock-config.in (+303/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock-all.cc (+47/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock-cardinalities.cc (+156/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock-internal-utils.cc (+174/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock-matchers.cc (+498/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock-spec-builders.cc (+813/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock.cc (+182/-0)
dist/yaml-cpp/test/gmock-1.7.0/src/gmock_main.cc (+54/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-actions_test.cc (+1256/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-cardinalities_test.cc (+428/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-generated-actions_test.cc (+1225/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-generated-function-mockers_test.cc (+588/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-generated-internal-utils_test.cc (+127/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-generated-matchers_test.cc (+1289/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-internal-utils_test.cc (+649/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-matchers_test.cc (+5247/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-more-actions_test.cc (+705/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-nice-strict_test.cc (+424/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-port_test.cc (+43/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock-spec-builders_test.cc (+2613/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_all_test.cc (+48/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_ex_test.cc (+78/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_leak_test.py (+108/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_leak_test_.cc (+100/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_link2_test.cc (+40/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_link_test.cc (+40/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_link_test.h (+669/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_output_test.py (+180/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_output_test_.cc (+291/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_output_test_golden.txt (+310/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_stress_test.cc (+322/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_test.cc (+255/-0)
dist/yaml-cpp/test/gmock-1.7.0/test/gmock_test_utils.py (+112/-0)
dist/yaml-cpp/test/handler_test.h (+32/-0)
dist/yaml-cpp/test/integration/emitter_test.cpp (+1016/-0)
dist/yaml-cpp/test/integration/encoding_test.cpp (+182/-0)
dist/yaml-cpp/test/integration/gen_emitter_test.cpp (+9759/-0)
dist/yaml-cpp/test/integration/handler_spec_test.cpp (+1611/-0)
dist/yaml-cpp/test/integration/handler_test.cpp (+46/-0)
dist/yaml-cpp/test/integration/load_node_test.cpp (+202/-0)
dist/yaml-cpp/test/integration/node_spec_test.cpp (+1131/-0)
dist/yaml-cpp/test/main.cpp (+6/-0)
dist/yaml-cpp/test/mock_event_handler.h (+26/-0)
dist/yaml-cpp/test/node/node_test.cpp (+416/-0)
dist/yaml-cpp/test/ostream_wrapper_test.cpp (+66/-0)
dist/yaml-cpp/test/specexamples.h (+846/-0)
dist/yaml-cpp/util/CMakeLists.txt (+11/-0)
dist/yaml-cpp/util/api.cpp (+137/-0)
dist/yaml-cpp/util/parse.cpp (+61/-0)
dist/yaml-cpp/util/read.cpp (+33/-0)
dist/yaml-cpp/util/sandbox.cpp (+36/-0)
dist/yaml-cpp/yaml-cpp-config-version.cmake.in (+11/-0)
dist/yaml-cpp/yaml-cpp-config.cmake.in (+14/-0)
dist/yaml-cpp/yaml-cpp.pc.cmake (+10/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/ubuntu-sdk-ide/snapcraft-step2
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve on 2016-10-18
Zoltan Balogh (community) 2016-10-18 Approve on 2016-10-18
Review via email: mp+308693@code.launchpad.net

Commit message

Snapcraft support plan step 2
-> support snapcraft.yaml as project format
-> build snap files directly from the IDE
-> basic template
-> support building in containers

Description of the change

Snapcraft support plan step 2
-> support snapcraft.yaml as project format
-> build snap files directly from the IDE
-> basic template
-> support building in containers

To post a comment you must log in.
165. By Benjamin Zeller on 2016-10-18

Add missing yaml library

review: Approve (continuous-integration)
Zoltan Balogh (bzoltan) wrote :

Let's see

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2016-09-22 16:11:03 +0000
3+++ CMakeLists.txt 2016-10-18 07:57:32 +0000
4@@ -64,7 +64,11 @@
5 COMMAND ${CMAKE_SOURCE_DIR}/get_bzr_source.py -d "${EXT_SOURCE_DIR}/qtcreator/src/plugins/ubuntu" lp:qtcreator-plugin-ubuntu
6 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
7
8-add_custom_target(sources DEPENDS QtSource LibDusSource MaliitSource fcitx-qtSource AppmenuSource QtCreatorSource)
9+add_custom_target(YamlCppSource
10+ ${CMAKE_SOURCE_DIR}/get_package_source.py yaml-cpp
11+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
12+
13+add_custom_target(sources DEPENDS QtSource LibDusSource MaliitSource fcitx-qtSource AppmenuSource QtCreatorSource YamlCppSource)
14
15 add_custom_command(TARGET sources
16 PRE_BUILD
17@@ -123,6 +127,29 @@
18 INSTALL_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make install"
19 )
20
21+ConcatStrings (LIBYAML_BUILD_SCRIPT
22+ "${CMAKE_COMMAND} "
23+ "-DCMAKE_INSTALL_PREFIX=${QT_INSTALL_DIR} "
24+ "-DCMAKE_PREFIX_PATH=${QT_INSTALL_DIR} "
25+ "-DCMAKE_BUILD_TYPE=DEBUG" #${CMAKE_BUILD_TYPE_STRING} "
26+ "-DCMAKE_INSTALL_LIBDIR=lib ${EXT_SOURCE_DIR}/yaml-cpp "
27+ "-DCMAKE_C_FLAGS=-fPIC "
28+ "-DCMAKE_CXX_FLAGS=-fPIC "
29+)
30+
31+SET (LIBYAML_PREFIX "${CMAKE_BINARY_DIR}/yaml-cpp")
32+ExternalProject_Add(libyaml-cpp
33+ DEPENDS ${QT_VERSION}
34+ PREFIX "${LIBYAML_PREFIX}"
35+ SOURCE_DIR "${EXT_SOURCE_DIR}/yaml-cpp"
36+ BINARY_DIR "${LIBYAML_PREFIX}/build"
37+ INSTALL_DIR "${QT_INSTALL_DIR}"
38+ DOWNLOAD_COMMAND sh -c "exit 0"
39+ CONFIGURE_COMMAND sh -c "${LIBYAML_BUILD_SCRIPT}"
40+ BUILD_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make ${GENERATED_MAKE_FLAGS}"
41+ INSTALL_COMMAND sh -c "LD_LIBRARY_PATH=${QT_INSTALL_DIR}/lib make install"
42+)
43+
44 SET (MALIITPLUGIN_PREFIX "${CMAKE_BINARY_DIR}/maliit-plugin-qt-build")
45 ExternalProject_Add(maliit-plugin
46 DEPENDS ${QT_VERSION}
47@@ -172,7 +199,7 @@
48
49 SET (QTCREATOR_PREFIX "${CMAKE_BINARY_DIR}/qtcreator-build")
50 ExternalProject_Add(qtcreator_3.5.0
51- DEPENDS appmenu-qt5 fcitx-qt5 maliit-plugin
52+ DEPENDS appmenu-qt5 fcitx-qt5 maliit-plugin libyaml-cpp
53 PREFIX "${QTCREATOR_PREFIX}"
54 SOURCE_DIR "${EXT_SOURCE_DIR}/qtcreator"
55 BINARY_DIR "${QTCREATOR_PREFIX}/build"
56
57=== modified file 'dist/qtcreator/src/plugins/ubuntu/UbuntuPlugin.pro'
58--- dist/qtcreator/src/plugins/ubuntu/UbuntuPlugin.pro 2016-09-22 16:11:03 +0000
59+++ dist/qtcreator/src/plugins/ubuntu/UbuntuPlugin.pro 2016-10-18 07:57:32 +0000
60@@ -220,6 +220,8 @@
61 src/ubuntu/device/remote/ubuntudirectuploadstep.h \
62 src/ubuntu/device/remote/ubuntudeploystepfactory.h
63
64+include(src/ubuntu/snap/snap.pri)
65+
66
67 FORMS += \
68 src/ubuntu/device/remote/ubunturemoterunconfigurationwidget.ui \
69
70=== removed file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro'
71--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro 2016-09-22 16:11:03 +0000
72+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName.pro 1970-01-01 00:00:00 +0000
73@@ -1,32 +0,0 @@
74-# This is the basic qmake template for the Ubuntu-SDK
75-# it handles creation and installation of the manifest
76-# file and takes care of subprojects
77-TEMPLATE = subdirs
78-
79-SUBDIRS += %{ProjectNameL}
80-
81-# enables/disabled the extra targets to build a snapcraft package
82-# also tells the IDE this is a snapcraft project
83-CONFIG += snapcraft
84-
85-snapcraft {
86-
87- SNAPCRAFT_FILE=snapcraft.yaml
88-
89- #the Ubuntu SDK IDE uses the snap target to create the package
90- snappy.target = snap
91- snappy.commands = cd $$OUT_PWD
92- snappy.commands += && rm -rf \'$$OUT_PWD/snap-deploy\'
93- snappy.commands += && make INSTALL_ROOT=$$OUT_PWD/snap-deploy install
94- snappy.commands += && cd $$OUT_PWD/snap-deploy
95- snappy.commands += && snapcraft
96-
97- OTHER_FILES+=$$SNAPCRAFT_FILE
98- QMAKE_EXTRA_TARGETS += snappy
99-
100- packaging.files = $$SNAPCRAFT_FILE
101- packaging.path = /
102-
103- INSTALLS+=packaging
104-}
105-
106
107=== removed file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop'
108--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop 2016-09-22 16:11:03 +0000
109+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.desktop 1970-01-01 00:00:00 +0000
110@@ -1,9 +0,0 @@
111-[Desktop Entry]
112-Version=1.0
113-Name=%{ProjectNameL}
114-Exec=%{ProjectNameL}
115-TryExec=%{ProjectNameL}
116-Icon=${SNAP}/meta/gui/%{ProjectNameL}.png
117-Terminal=false
118-Type=Application
119-X-Ubuntu-Touch=true
120
121=== removed file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png'
122Binary files dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 2016-09-22 16:11:03 +0000 and dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.png 1970-01-01 00:00:00 +0000 differ
123=== modified file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro'
124--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro 2016-09-22 16:11:03 +0000
125+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/appName/appName.pro 2016-10-18 07:57:32 +0000
126@@ -16,33 +16,16 @@
127
128 CONF_FILES += %{ProjectNameL}.png
129
130-AP_TEST_FILES += tests/autopilot/run \
131- $$files(tests/*.py,true)
132-
133 #show all the files in QtCreator
134 OTHER_FILES += $${CONF_FILES} \
135 $${QML_FILES} \
136- $${AP_TEST_FILES} \
137 %{ProjectNameL}.desktop \
138 %{ProjectNameL}.wrapper
139
140 snapcraft {
141- #specify where the config files are installed to
142- config_files.path = /setup/gui
143- config_files.files += $${CONF_FILES}
144- INSTALLS+=config_files
145-
146- #install the desktop file
147- desktop_file.path = /setup/gui
148- desktop_file.files = $$PWD/%{ProjectNameL}.desktop
149- desktop_file.CONFIG += no_check_exist
150- INSTALLS+=desktop_file
151-
152- # Default rules for deployment.
153-
154 wrapper.files = %{ProjectNameL}.wrapper
155- wrapper.path = /deploy/bin
156+ wrapper.path = /bin
157
158- target.path = /deploy/bin
159+ target.path = /bin
160 INSTALLS+=target wrapper
161 }
162
163=== added directory 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup'
164=== added directory 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui'
165=== added file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.desktop'
166--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.desktop 1970-01-01 00:00:00 +0000
167+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.desktop 2016-10-18 07:57:32 +0000
168@@ -0,0 +1,9 @@
169+[Desktop Entry]
170+Version=1.0
171+Name=%{ProjectNameL}
172+Exec=%{ProjectNameL}
173+TryExec=%{ProjectNameL}
174+Icon=${SNAP}/meta/gui/%{ProjectNameL}.png
175+Terminal=false
176+Type=Application
177+X-Ubuntu-Touch=true
178
179=== added file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.png'
180Binary files dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.png 1970-01-01 00:00:00 +0000 and dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/setup/gui/appName.png 2016-10-18 07:57:32 +0000 differ
181=== modified file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml'
182--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml 2016-09-22 16:11:03 +0000
183+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/snapcraft.yaml 2016-10-18 07:57:32 +0000
184@@ -11,13 +11,19 @@
185
186 parts:
187 %{ProjectNameL}:
188- plugin: dump
189- source: deploy/
190+ plugin: qmake
191+ source: %{ProjectNameL}/
192+ qt-version: qt5
193+ options: ["CONFIG+=snapcraft"]
194+ project-files: [%{ProjectNameL}]
195+ build-packages:
196+ - build-essential
197+ - qtbase5-dev
198+ - qt5-qmake
199 stage-packages:
200 - ubuntu-sdk-libs
201 - qtubuntu-desktop
202 - qtmir-desktop
203 - mir-graphics-drivers-desktop
204-
205-
206+ after: [qt5conf]
207
208
209=== modified file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json'
210--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json 2016-09-22 16:11:03 +0000
211+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/templates/wizards/ubuntu/snap-qtquick-app-qmake/wizard.json 2016-10-18 07:57:32 +0000
212@@ -1,13 +1,13 @@
213 {
214 "version": 1,
215- "supportedProjectTypes": [ "Qt4ProjectManager.Qt4Project" ],
216+ "supportedProjectTypes": [ "SnapcraftProjectManager.SnapcraftProject" ],
217 "id": "A.QtQuick Snappy Application",
218 "category": "B.Snapcraft",
219 "trDescription": "Creates a experimental C++ Ubuntu snappy application project with a sample UI containing a Label and a Button.",
220 "trDisplayName": "QtQuick App with QML Ubuntu UI",
221 "trDisplayCategory": "Snapcraft",
222 "icon": "../share/ubuntu.png",
223- "enabled": "%{JS: [ %{Plugins} ].indexOf('QmakeProjectManager') >= 0}",
224+ "enabled": "%{JS: [ %{Plugins} ].indexOf('Ubuntu') >= 0}",
225
226 "options":
227 [
228@@ -62,15 +62,10 @@
229 "data":
230 [
231 {
232- "source": "appName.pro",
233- "target": "%{ProjectFile}",
234+ "source": "snapcraft.yaml",
235 "openAsProject": true
236 },
237 {
238- "source": "snapcraft.yaml",
239- "openInEditor": true
240- },
241- {
242 "source": "appName/main.cpp",
243 "target": "%{ProjectDirectory}/%{ProjectNameL}/%{CppFileName}",
244 "openInEditor": true
245@@ -81,12 +76,12 @@
246 "openInEditor": true
247 },
248 {
249- "source": "appName/appName.desktop",
250- "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.desktop"
251+ "source": "setup/gui/appName.desktop",
252+ "target": "%{ProjectDirectory}/setup/gui/%{ProjectNameL}.desktop"
253 },
254 {
255- "source": "appName/appName.png",
256- "target": "%{ProjectDirectory}/%{ProjectNameL}/%{ProjectNameL}.png"
257+ "source": "setup/gui/appName.png",
258+ "target": "%{ProjectDirectory}/setup/gui/%{ProjectNameL}.png"
259 },
260 {
261 "source": "appName/appName.pro",
262
263=== added file 'dist/qtcreator/src/plugins/ubuntu/share/qtcreator/ubuntu/scripts/run_snapcraft.py'
264--- dist/qtcreator/src/plugins/ubuntu/share/qtcreator/ubuntu/scripts/run_snapcraft.py 1970-01-01 00:00:00 +0000
265+++ dist/qtcreator/src/plugins/ubuntu/share/qtcreator/ubuntu/scripts/run_snapcraft.py 2016-10-18 07:57:32 +0000
266@@ -0,0 +1,29 @@
267+#!/usr/bin/python3
268+
269+import os
270+import sys
271+import shutil
272+import subprocess
273+from optparse import OptionParser
274+
275+parser = OptionParser(usage="usage: %prog [options] lp:branch")
276+parser.add_option(
277+ "-s", "--snapcraft", dest="snapcraft")
278+options, args = parser.parse_args()
279+
280+if options.snapcraft is None:
281+ options.snapcraft = shutil.which("snapcraft")
282+
283+if options.snapcraft is None:
284+ parser.error("Snapcraft not found.")
285+
286+if not os.path.isfile(options.snapcraft) or not os.access(options.snapcraft, os.X_OK):
287+ parser.error("-s must specify a executable file.")
288+
289+print("Using snapcraft from :"+options.snapcraft)
290+
291+ret = subprocess.call([options.snapcraft, "clean"])
292+if ret != 0:
293+ sys.exit(ret)
294+
295+sys.exit(subprocess.call([options.snapcraft]+args))
296
297=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/UbuntuProject.mimetypes.xml'
298--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/UbuntuProject.mimetypes.xml 2016-06-09 08:47:42 +0000
299+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/UbuntuProject.mimetypes.xml 2016-10-18 07:57:32 +0000
300@@ -17,4 +17,9 @@
301 <sub-class-of type="application/json"/>
302 <glob pattern="manifest.json*"/>
303 </mime-type>
304+ <mime-type type="application/x-snapcraft">
305+ <comment>Snapcraft project file</comment>
306+ <sub-class-of type="application/x-yaml"/>
307+ <glob pattern="snapcraft.yaml"/>
308+ </mime-type>
309 </mime-info>
310
311=== added directory 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project'
312=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.cpp'
313--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.cpp 1970-01-01 00:00:00 +0000
314+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.cpp 2016-10-18 07:57:32 +0000
315@@ -0,0 +1,41 @@
316+#include "snapcraftbuildconfiguration.h"
317+
318+#include <ubuntu/ubuntuconstants.h>
319+
320+namespace Ubuntu {
321+namespace Internal {
322+
323+SnapcraftBuildConfiguration::SnapcraftBuildConfiguration(ProjectExplorer::Target *target)
324+ : ProjectExplorer::BuildConfiguration(target, Constants::SNAPCRAFT_BUILDCONFIGURATION_ID)
325+{
326+
327+}
328+
329+SnapcraftBuildConfiguration::SnapcraftBuildConfiguration(ProjectExplorer::Target *target, ProjectExplorer::BuildConfiguration *source)
330+ : ProjectExplorer::BuildConfiguration(target, source)
331+{
332+
333+}
334+
335+bool SnapcraftBuildConfiguration::fromMap(const QVariantMap &map)
336+{
337+ return ProjectExplorer::BuildConfiguration::fromMap(map);
338+}
339+
340+QVariantMap SnapcraftBuildConfiguration::toMap() const
341+{
342+ return ProjectExplorer::BuildConfiguration::toMap();
343+}
344+
345+ProjectExplorer::NamedWidget *SnapcraftBuildConfiguration::createConfigWidget()
346+{
347+ return nullptr;
348+}
349+
350+ProjectExplorer::BuildConfiguration::BuildType SnapcraftBuildConfiguration::buildType() const
351+{
352+ return ProjectExplorer::BuildConfiguration::Unknown;
353+}
354+
355+} // namespace Internal
356+} // namespace Ubuntu
357
358=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.h'
359--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.h 1970-01-01 00:00:00 +0000
360+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfiguration.h 2016-10-18 07:57:32 +0000
361@@ -0,0 +1,33 @@
362+#ifndef UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATION_H
363+#define UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATION_H
364+
365+#include <projectexplorer/buildconfiguration.h>
366+
367+namespace Ubuntu {
368+namespace Internal {
369+
370+class SnapcraftBuildConfigurationFactory;
371+
372+class SnapcraftBuildConfiguration : public ProjectExplorer::BuildConfiguration
373+{
374+ Q_OBJECT
375+
376+public:
377+ friend class SnapcraftBuildConfigurationFactory;
378+ // ProjectConfiguration interface
379+ virtual bool fromMap(const QVariantMap &map) override;
380+ virtual QVariantMap toMap() const override;
381+
382+ // BuildConfiguration interface
383+ virtual ProjectExplorer::NamedWidget *createConfigWidget() override;
384+ virtual BuildType buildType() const override;
385+
386+protected:
387+ SnapcraftBuildConfiguration(ProjectExplorer::Target *target);
388+ SnapcraftBuildConfiguration(ProjectExplorer::Target *target, BuildConfiguration *source);
389+};
390+
391+} // namespace Internal
392+} // namespace Ubuntu
393+
394+#endif // UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATION_H
395
396=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.cpp'
397--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.cpp 1970-01-01 00:00:00 +0000
398+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.cpp 2016-10-18 07:57:32 +0000
399@@ -0,0 +1,145 @@
400+#include "snapcraftbuildconfigurationfactory.h"
401+
402+#include "snapcraftproject.h"
403+#include "snapcraftbuildconfiguration.h"
404+#include "snapcraftrsyncstep.h"
405+#include "snapcraftstep.h"
406+#include <ubuntu/ubuntuconstants.h>
407+
408+#include <projectexplorer/target.h>
409+#include <projectexplorer/kit.h>
410+#include <projectexplorer/projectmacroexpander.h>
411+#include <projectexplorer/projectexplorerconstants.h>
412+#include <projectexplorer/buildsteplist.h>
413+
414+#include <coreplugin/documentmanager.h>
415+#include <utils/mimetypes/mimedatabase.h>
416+#include <utils/qtcassert.h>
417+
418+namespace Ubuntu {
419+namespace Internal {
420+
421+SnapcraftBuildInfo::SnapcraftBuildInfo(const SnapcraftBuildConfigurationFactory *factory)
422+ :ProjectExplorer::BuildInfo(factory)
423+{
424+
425+}
426+
427+SnapcraftBuildConfigurationFactory::SnapcraftBuildConfigurationFactory()
428+{
429+
430+}
431+
432+QList<ProjectExplorer::BuildInfo *> SnapcraftBuildConfigurationFactory::availableBuilds(const ProjectExplorer::Target *parent) const
433+{
434+ if (qobject_cast<SnapcraftProject *>(parent->project()))
435+ return {};
436+
437+ QList<ProjectExplorer::BuildInfo *> infoList;
438+ ProjectExplorer::BuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectFilePath().toString());
439+ if (info)
440+ infoList << info;
441+
442+ return infoList;
443+}
444+
445+int SnapcraftBuildConfigurationFactory::priority(const ProjectExplorer::Target *) const
446+{
447+ return 0;
448+}
449+
450+int SnapcraftBuildConfigurationFactory::priority(const ProjectExplorer::Kit *, const QString &) const
451+{
452+ return 0;
453+}
454+
455+QList<ProjectExplorer::BuildInfo *> SnapcraftBuildConfigurationFactory::availableSetups(const ProjectExplorer::Kit *k, const QString &projectPath) const
456+{
457+ Utils::MimeDatabase db;
458+
459+ auto mimeType = db.mimeTypeForFile(projectPath);
460+ if (!mimeType.matchesName(Constants::SNAPCRAFT_PROJECT_MIMETYPE))
461+ return {};
462+
463+ QList<ProjectExplorer::BuildInfo *> infoList;
464+ ProjectExplorer::BuildInfo *info = createBuildInfo(k, projectPath);
465+ if (info)
466+ infoList << info;
467+
468+ return infoList;
469+}
470+
471+ProjectExplorer::BuildConfiguration *SnapcraftBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const ProjectExplorer::BuildInfo *info) const
472+{
473+ SnapcraftBuildConfiguration *conf = new SnapcraftBuildConfiguration(parent);
474+
475+ conf->setDisplayName(info->displayName);
476+ conf->setBuildDirectory(info->buildDirectory);
477+
478+ ProjectExplorer::BuildStepList *bs = conf->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
479+ bs->insertStep(0, new SnapcraftRsyncStep(bs));
480+ bs->insertStep(1, new SnapcraftStep(bs));
481+
482+ return conf;
483+}
484+
485+bool SnapcraftBuildConfigurationFactory::canRestore(const ProjectExplorer::Target *, const QVariantMap &map) const
486+{
487+ return (ProjectExplorer::idFromMap(map) == Constants::SNAPCRAFT_BUILDCONFIGURATION_ID);
488+}
489+
490+ProjectExplorer::BuildConfiguration *SnapcraftBuildConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
491+{
492+ QTC_ASSERT(parent, return nullptr);
493+ SnapcraftBuildConfiguration *conf = new SnapcraftBuildConfiguration(parent);
494+ if (conf->fromMap(map))
495+ return conf;
496+
497+ delete conf;
498+ return nullptr;
499+}
500+
501+bool SnapcraftBuildConfigurationFactory::canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *product) const
502+{
503+ QTC_ASSERT(parent, return false);
504+ QTC_ASSERT(product, return false);
505+ return (product->id() == Constants::SNAPCRAFT_BUILDCONFIGURATION_ID);
506+}
507+
508+ProjectExplorer::BuildConfiguration *SnapcraftBuildConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *product)
509+{
510+ QTC_ASSERT(parent, return nullptr);
511+ QTC_ASSERT(product, return nullptr);
512+
513+ SnapcraftBuildConfiguration *conf = new SnapcraftBuildConfiguration(parent, product);
514+ return conf;
515+}
516+
517+ProjectExplorer::BuildInfo *SnapcraftBuildConfigurationFactory::createBuildInfo(const ProjectExplorer::Kit *k, const QString &projectPath) const
518+{
519+ SnapcraftBuildInfo *build = new SnapcraftBuildInfo(this);
520+ build->buildType = ProjectExplorer::BuildConfiguration::Release;
521+ build->typeName = tr("Build");
522+ build->kitId = k->id();
523+ build->displayName = ProjectExplorer::BuildConfiguration::buildTypeName(build->buildType);
524+ build->buildDirectory = shadowBuildDirectory(k, projectPath);
525+ return {build};
526+}
527+
528+Utils::FileName SnapcraftBuildConfigurationFactory::shadowBuildDirectory(const ProjectExplorer::Kit *k, const QString &projectPath) const
529+{
530+
531+ Utils::FileName projectDir = ProjectExplorer::Project::projectDirectory(Utils::FileName::fromString(projectPath));
532+ const QString projectName = projectDir.fileName();
533+
534+ ProjectExplorer::ProjectMacroExpander expander(projectPath, projectName,
535+ k, tr("build"),
536+ ProjectExplorer::BuildConfiguration::Release);
537+
538+ QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());
539+ return Utils::FileName::fromString(QDir::cleanPath(QDir(projectDir.toString()).absoluteFilePath(buildPath)));
540+}
541+
542+
543+} // namespace Internal
544+} // namespace Ubuntu
545
546=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.h'
547--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.h 1970-01-01 00:00:00 +0000
548+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildconfigurationfactory.h 2016-10-18 07:57:32 +0000
549@@ -0,0 +1,44 @@
550+#ifndef UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATIONFACTORY_H
551+#define UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATIONFACTORY_H
552+
553+#include <projectexplorer/buildconfiguration.h>
554+#include <projectexplorer/buildinfo.h>
555+
556+namespace Ubuntu {
557+namespace Internal {
558+
559+class SnapcraftBuildConfigurationFactory;
560+
561+class SnapcraftBuildInfo : public ProjectExplorer::BuildInfo
562+{
563+public:
564+ SnapcraftBuildInfo(const SnapcraftBuildConfigurationFactory *factory);
565+};
566+
567+class SnapcraftBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurationFactory
568+{
569+public:
570+ SnapcraftBuildConfigurationFactory();
571+
572+ // IBuildConfigurationFactory interface
573+ virtual QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const override;
574+
575+ virtual int priority(const ProjectExplorer::Target *parent) const override;
576+ virtual int priority(const ProjectExplorer::Kit *k, const QString &projectPath) const override;
577+
578+ virtual QList<ProjectExplorer::BuildInfo *> availableSetups(const ProjectExplorer::Kit *k, const QString &projectPath) const override;
579+ virtual ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const ProjectExplorer::BuildInfo *info) const override;
580+ virtual bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const override;
581+ virtual ProjectExplorer::BuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map) override;
582+ virtual bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *product) const override;
583+ virtual ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *product) override;
584+
585+private:
586+ ProjectExplorer::BuildInfo *createBuildInfo (const ProjectExplorer::Kit *k, const QString &projectPath) const;
587+ Utils::FileName shadowBuildDirectory(const ProjectExplorer::Kit *k, const QString &projectPath) const;
588+};
589+
590+} // namespace Internal
591+} // namespace Ubuntu
592+
593+#endif // UBUNTU_INTERNAL_SNAPCRAFTBUILDCONFIGURATIONFACTORY_H
594
595=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.cpp'
596--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.cpp 1970-01-01 00:00:00 +0000
597+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.cpp 2016-10-18 07:57:32 +0000
598@@ -0,0 +1,65 @@
599+#include "snapcraftbuildstepfactory.h"
600+#include "snapcraftrsyncstep.h"
601+#include "snapcraftstep.h"
602+#include "snapcraftproject.h"
603+
604+#include <ubuntu/ubuntuconstants.h>
605+
606+#include <projectexplorer/projectexplorerconstants.h>
607+#include <projectexplorer/buildsteplist.h>
608+#include <projectexplorer/target.h>
609+#include <utils/algorithm.h>
610+
611+namespace Ubuntu {
612+namespace Internal {
613+
614+SnapcraftBuildStepFactory::SnapcraftBuildStepFactory(QObject *parent) : ProjectExplorer::IBuildStepFactory (parent)
615+{
616+
617+}
618+
619+QList<ProjectExplorer::BuildStepInfo> SnapcraftBuildStepFactory::availableSteps(ProjectExplorer::BuildStepList *parent) const
620+{
621+ if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
622+ return {};
623+
624+ if (!parent->target() || !qobject_cast<SnapcraftProject *>(parent->target()->project()))
625+ return {};
626+
627+ return {
628+ ProjectExplorer::BuildStepInfo(Constants::SNAPCRAFT_RSYNCBUILSSTEP_ID, tr("Prepare build")),
629+ ProjectExplorer::BuildStepInfo(Constants::SNAPCRAFT_BUILDSTEP_ID, tr("Snapcraft"))
630+ };
631+}
632+
633+ProjectExplorer::BuildStep *SnapcraftBuildStepFactory::create(ProjectExplorer::BuildStepList *parent, Core::Id id)
634+{
635+ if (!Utils::contains(availableSteps(parent), [&id](const ProjectExplorer::BuildStepInfo &step){return id == step.id;}))
636+ return nullptr;
637+
638+ if (id == Constants::SNAPCRAFT_RSYNCBUILSSTEP_ID) {
639+ return new SnapcraftRsyncStep(parent);
640+ } else if (id == Constants::SNAPCRAFT_BUILDSTEP_ID) {
641+ return new SnapcraftStep(parent);
642+ }
643+
644+ return nullptr;
645+}
646+
647+ProjectExplorer::BuildStep *SnapcraftBuildStepFactory::clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product)
648+{
649+ Core::Id id = product->id();
650+ if (!Utils::contains(availableSteps(parent), [&id](const ProjectExplorer::BuildStepInfo &step){return id == step.id;}))
651+ return nullptr;
652+
653+ if (id == Constants::SNAPCRAFT_RSYNCBUILSSTEP_ID) {
654+ return new SnapcraftRsyncStep(parent, static_cast<SnapcraftRsyncStep *>(product));
655+ } else if (id == Constants::SNAPCRAFT_BUILDSTEP_ID) {
656+ return new SnapcraftStep(parent, static_cast<SnapcraftStep *>(product));
657+ }
658+
659+ return nullptr;
660+}
661+
662+} // namespace Internal
663+} // namespace Ubuntu
664
665=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.h'
666--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.h 1970-01-01 00:00:00 +0000
667+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftbuildstepfactory.h 2016-10-18 07:57:32 +0000
668@@ -0,0 +1,25 @@
669+#ifndef UBUNTU_INTERNAL_SNAPCRAFTBUILDSTEPFACTORY_H
670+#define UBUNTU_INTERNAL_SNAPCRAFTBUILDSTEPFACTORY_H
671+
672+#include <projectexplorer/buildstep.h>
673+
674+namespace Ubuntu {
675+namespace Internal {
676+
677+class SnapcraftBuildStepFactory : public ProjectExplorer::IBuildStepFactory
678+{
679+ Q_OBJECT
680+public:
681+ SnapcraftBuildStepFactory(QObject *parent = nullptr);
682+
683+ // IBuildStepFactory interface
684+public:
685+ virtual QList<ProjectExplorer::BuildStepInfo> availableSteps(ProjectExplorer::BuildStepList *parent) const override;
686+ virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id) override;
687+ virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *product) override;
688+};
689+
690+} // namespace Internal
691+} // namespace Ubuntu
692+
693+#endif // UBUNTU_INTERNAL_SNAPCRAFTBUILDSTEPFACTORY_H
694
695=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.cpp'
696--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.cpp 1970-01-01 00:00:00 +0000
697+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.cpp 2016-10-18 07:57:32 +0000
698@@ -0,0 +1,156 @@
699+/*
700+ * Copyright 2016 Canonical Ltd.
701+ *
702+ * This program is free software; you can redistribute it and/or modify
703+ * it under the terms of the GNU Lesser General Public License as published by
704+ * the Free Software Foundation; version 2.1.
705+ *
706+ * This program is distributed in the hope that it will be useful,
707+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
708+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
709+ * GNU Lesser General Public License for more details.
710+ *
711+ * You should have received a copy of the GNU Lesser General Public License
712+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
713+ *
714+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
715+ */
716+
717+#include "snapcraftproject.h"
718+#include "snapcraftprojectnode.h"
719+
720+#include <coreplugin/modemanager.h>
721+#include <coreplugin/icontext.h>
722+#include <coreplugin/documentmanager.h>
723+#include <projectexplorer/projectexplorerconstants.h>
724+#include <projectexplorer/kitinformation.h>
725+#include <projectexplorer/toolchain.h>
726+#include <projectexplorer/projectmacroexpander.h>
727+#include <qmljs/qmljssimplereader.h>
728+#include <qtsupport/qtkitinformation.h>
729+#include <qtsupport/qtsupportconstants.h>
730+
731+#pragma GCC diagnostic push
732+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
733+#include <yaml-cpp/yaml.h>
734+#pragma GCC diagnostic pop
735+
736+
737+using namespace Ubuntu;
738+using namespace Ubuntu::Internal;
739+
740+SnapcraftProject::SnapcraftProject(SnapcraftProjectManager *manager, const Utils::FileName &fileName)
741+ : m_manager(manager),
742+ m_fileName(fileName),
743+ m_watcher(new QFileSystemWatcher)
744+{
745+
746+ setId(Constants::SNAPCRAFT_PROJECT_ID);
747+
748+ setProjectContext(Core::Context(Constants::SNAPCRAFT_PROJECT_PROJECTCONTEXT));
749+
750+
751+ m_file = QPointer<SnapcraftProjectFile>(new SnapcraftProjectFile());
752+ Core::DocumentManager::addDocument(m_file.data(), true);
753+ setDocument(m_file.data());
754+
755+ m_file->setFilePath(fileName);
756+
757+ m_rootNode = QSharedPointer<SnapcraftProjectNode>(new SnapcraftProjectNode(this, fileName, &m_watcher));
758+
759+ ProjectExplorer::FileNode *projectFileNode = new ProjectExplorer::FileNode(fileName, ProjectExplorer::ProjectFileType, false);
760+ m_rootNode->addFileNodes({projectFileNode});
761+
762+ connect(m_file, &SnapcraftProjectFile::changed, this, &SnapcraftProject::asyncUpdate);
763+
764+ //we show magic directories that are not listed in the snapcraft.yaml file, therefore we need to watch the directory
765+ //if one of those is changed or removed
766+ m_watcher.addPath(projectDirectory().toFileInfo().absoluteFilePath());
767+ connect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &SnapcraftProject::maybeUpdate);
768+
769+ QMetaObject::invokeMethod(this, "asyncUpdate", Qt::QueuedConnection);
770+}
771+
772+QString SnapcraftProject::displayName() const {
773+ return m_rootNode->displayName();
774+}
775+
776+ProjectExplorer::IProjectManager *SnapcraftProject::projectManager() const {
777+ return m_manager;
778+}
779+
780+ProjectExplorer::ProjectNode *SnapcraftProject::rootProjectNode() const {
781+ return m_rootNode.data();
782+}
783+
784+QStringList SnapcraftProject::files(FilesMode) const {
785+ QStringList files;
786+ //enumChild(projectDir(), files);
787+ return files;
788+}
789+
790+bool SnapcraftProject::supportsKit(ProjectExplorer::Kit *, QString *) const
791+{
792+#if 0
793+ UbuntuKitMatcher matcher;
794+ if (!matcher.matches(k)) {
795+ if(errorMessage)
796+ *errorMessage = tr("Only Desktop and Ubuntu Kits are supported");
797+ return false;
798+ }
799+#endif
800+ return true;
801+}
802+
803+bool SnapcraftProject::needsConfiguration() const
804+{
805+ return targets().size() == 0;
806+}
807+
808+bool SnapcraftProject::requiresTargetPanel() const
809+{
810+ return true;
811+}
812+
813+QString SnapcraftProject::shadowBuildDirectory(const QString &proFilePath
814+ , const ProjectExplorer::Kit *k
815+ , const QString &suffix
816+ , const ProjectExplorer::BuildConfiguration::BuildType buildType)
817+{
818+ if (proFilePath.isEmpty())
819+ return QString();
820+
821+ QFileInfo info(proFilePath);
822+
823+ QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k);
824+ if (version)
825+ return info.absolutePath();
826+
827+ const QString projectName = QFileInfo(proFilePath).completeBaseName();
828+ ProjectExplorer::ProjectMacroExpander expander(proFilePath, projectName, k, suffix, buildType);
829+ QDir projectDir = QDir(projectDirectory(Utils::FileName::fromString(proFilePath)).toString());
830+ QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());
831+ return QDir::cleanPath(projectDir.absoluteFilePath(buildPath));
832+}
833+
834+void SnapcraftProject::asyncUpdate()
835+{
836+ qDebug()<<"Syncing from yaml";
837+ try {
838+ YAML::Node yaml = YAML::LoadFile(m_fileName.toString().toStdString());
839+ if (!m_rootNode->syncFromYAMLNode(yaml)) {
840+ qDebug()<<"Invalid YAML file";
841+ }
842+ } catch (const YAML::Exception &e) {
843+ qDebug() << e.what();
844+ }
845+
846+ emit displayNameChanged();
847+}
848+
849+void SnapcraftProject::maybeUpdate(const QString &pathChanged)
850+{
851+ if (QFileInfo(pathChanged) == projectDirectory().toFileInfo()) {
852+ asyncUpdate();
853+ }
854+}
855
856=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.h'
857--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.h 1970-01-01 00:00:00 +0000
858+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftproject.h 2016-10-18 07:57:32 +0000
859@@ -0,0 +1,88 @@
860+/*
861+ * Copyright 2016 Canonical Ltd.
862+ *
863+ * This program is free software; you can redistribute it and/or modify
864+ * it under the terms of the GNU Lesser General Public License as published by
865+ * the Free Software Foundation; version 2.1.
866+ *
867+ * This program is distributed in the hope that it will be useful,
868+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
869+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
870+ * GNU Lesser General Public License for more details.
871+ *
872+ * You should have received a copy of the GNU Lesser General Public License
873+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
874+ *
875+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
876+ */
877+
878+#ifndef SNAPCRAFTPROJECT_H
879+#define SNAPCRAFTPROJECT_H
880+
881+#include "snapcraftprojectmanager.h"
882+#include "snapcraftprojectfile.h"
883+
884+#include <ubuntu/ubuntuconstants.h>
885+
886+#include <projectexplorer/buildconfiguration.h>
887+#include <projectexplorer/projectnodes.h>
888+#include <projectexplorer/project.h>
889+
890+#include <QPointer>
891+#include <QFileSystemWatcher>
892+
893+#include <yaml-cpp/node/node.h>
894+
895+namespace Ubuntu {
896+namespace Internal {
897+
898+class UbuntuProjectManager;
899+class SnapcraftProjectNode;
900+
901+class SnapcraftProject : public ProjectExplorer::Project
902+{
903+ Q_OBJECT
904+
905+public:
906+ SnapcraftProject(SnapcraftProjectManager *manager, const Utils::FileName &fileName);
907+
908+ QString displayName() const override;
909+ ProjectExplorer::IProjectManager *projectManager() const override;
910+
911+ ProjectExplorer::ProjectNode *rootProjectNode() const override;
912+ QStringList files(FilesMode fileMode) const override;
913+
914+ QDir projectDir() const {
915+ return projectDirectory().toString();
916+ }
917+
918+ QString filesFileName() const {
919+ return m_fileName.toString();
920+ }
921+
922+ // Project interface
923+ bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage) const override;
924+ bool needsConfiguration() const override;
925+ bool requiresTargetPanel() const override;
926+
927+ static QString shadowBuildDirectory(const QString &proFilePath, const ProjectExplorer::Kit *k,
928+ const QString &suffix = QString(),
929+ const ProjectExplorer::BuildConfiguration::BuildType buildType = ProjectExplorer::BuildConfiguration::Unknown);
930+
931+protected slots:
932+ void asyncUpdate ();
933+ void maybeUpdate (const QString &pathChanged);
934+
935+private:
936+ SnapcraftProjectManager *m_manager;
937+ QString m_projectName;
938+ QPointer<SnapcraftProjectFile> m_file;
939+
940+ Utils::FileName m_fileName;
941+ QSharedPointer<SnapcraftProjectNode> m_rootNode;
942+ QFileSystemWatcher m_watcher;
943+};
944+}
945+}
946+
947+#endif // SNAPCRAFTPROJECT_H
948
949=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.cpp'
950--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.cpp 1970-01-01 00:00:00 +0000
951+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.cpp 2016-10-18 07:57:32 +0000
952@@ -0,0 +1,42 @@
953+/*
954+ * Copyright 2016 Canonical Ltd.
955+ *
956+ * This program is free software; you can redistribute it and/or modify
957+ * it under the terms of the GNU Lesser General Public License as published by
958+ * the Free Software Foundation; version 2.1.
959+ *
960+ * This program is distributed in the hope that it will be useful,
961+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
962+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
963+ * GNU Lesser General Public License for more details.
964+ *
965+ * You should have received a copy of the GNU Lesser General Public License
966+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
967+ *
968+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
969+ */
970+
971+#include "snapcraftprojectfile.h"
972+
973+using namespace Ubuntu::Internal;
974+
975+SnapcraftProjectFile::SnapcraftProjectFile(Core::Id id)
976+ : TextEditor::TextDocument(id)
977+{
978+}
979+
980+Core::IDocument::ReloadBehavior SnapcraftProjectFile::reloadBehavior(Core::IDocument::ChangeTrigger state, Core::IDocument::ChangeType type) const
981+{
982+ Q_UNUSED(state)
983+ Q_UNUSED(type)
984+ return BehaviorSilent;
985+}
986+
987+bool SnapcraftProjectFile::reload(QString *errorString, Core::IDocument::ReloadFlag flag, Core::IDocument::ChangeType type)
988+{
989+ if (type != TypePermissions) {
990+ emit changed();
991+ }
992+
993+ return TextDocument::reload(errorString, flag, type);
994+}
995
996=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.h'
997--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.h 1970-01-01 00:00:00 +0000
998+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectfile.h 2016-10-18 07:57:32 +0000
999@@ -0,0 +1,48 @@
1000+/*
1001+ * Copyright 2016 Canonical Ltd.
1002+ *
1003+ * This program is free software; you can redistribute it and/or modify
1004+ * it under the terms of the GNU Lesser General Public License as published by
1005+ * the Free Software Foundation; version 2.1.
1006+ *
1007+ * This program is distributed in the hope that it will be useful,
1008+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1009+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1010+ * GNU Lesser General Public License for more details.
1011+ *
1012+ * You should have received a copy of the GNU Lesser General Public License
1013+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1014+ *
1015+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
1016+ */
1017+
1018+#ifndef SNAPCRAFTPROJECTFILE_H
1019+#define SNAPCRAFTPROJECTFILE_H
1020+
1021+#include <QObject>
1022+#include <ubuntu/ubuntuconstants.h>
1023+
1024+#include <texteditor/textdocument.h>
1025+#include <utils/fileutils.h>
1026+
1027+namespace Ubuntu {
1028+namespace Internal {
1029+class SnapcraftProject;
1030+class SnapcraftProjectFile : public TextEditor::TextDocument
1031+{
1032+ Q_OBJECT
1033+public:
1034+ SnapcraftProjectFile(Core::Id id = Core::Id());
1035+
1036+ // IDocument interface
1037+ virtual ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const override;
1038+ virtual bool reload(QString *errorString, ReloadFlag flag, ChangeType type) override;
1039+
1040+signals:
1041+ void changed ();
1042+
1043+};
1044+}
1045+}
1046+
1047+#endif // SNAPCRAFTPROJECTFILE_H
1048
1049=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.cpp'
1050--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.cpp 1970-01-01 00:00:00 +0000
1051+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.cpp 2016-10-18 07:57:32 +0000
1052@@ -0,0 +1,64 @@
1053+/*
1054+ * Copyright 2016 Canonical Ltd.
1055+ *
1056+ * This program is free software; you can redistribute it and/or modify
1057+ * it under the terms of the GNU Lesser General Public License as published by
1058+ * the Free Software Foundation; version 2.1.
1059+ *
1060+ * This program is distributed in the hope that it will be useful,
1061+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1062+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1063+ * GNU Lesser General Public License for more details.
1064+ *
1065+ * You should have received a copy of the GNU Lesser General Public License
1066+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1067+ *
1068+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
1069+ */
1070+
1071+#include "snapcraftprojectmanager.h"
1072+#include "snapcraftproject.h"
1073+
1074+#include <ubuntu/ubuntuconstants.h>
1075+
1076+#include <projectexplorer/session.h>
1077+#include <coreplugin/idocument.h>
1078+#include <utils/fileutils.h>
1079+
1080+#include <QFileInfo>
1081+
1082+
1083+namespace Ubuntu {
1084+namespace Internal {
1085+
1086+SnapcraftProjectManager::SnapcraftProjectManager()
1087+{
1088+
1089+}
1090+
1091+QString SnapcraftProjectManager::mimeType() const
1092+{
1093+ return QLatin1String(Constants::SNAPCRAFT_PROJECT_MIMETYPE);
1094+}
1095+
1096+ProjectExplorer::Project *SnapcraftProjectManager::openProject(const QString &fileName, QString *errorString)
1097+{
1098+ QFileInfo fileInfo(fileName);
1099+
1100+ foreach (ProjectExplorer::Project *pi, ProjectExplorer::SessionManager::projects()) {
1101+ if (fileName == pi->document()->filePath().toString()) {
1102+ if (errorString)
1103+ *errorString = tr("Failed opening project '%1': Project already open") .arg(QDir::toNativeSeparators(fileName));
1104+ return 0;
1105+ }
1106+ }
1107+
1108+ if (fileInfo.isFile())
1109+ return new SnapcraftProject(this, Utils::FileName(fileInfo));
1110+
1111+ *errorString = tr("Failed opening project '%1': Project file is not a file").arg(QDir::toNativeSeparators(fileName));
1112+ return 0;
1113+}
1114+
1115+} // namespace Internal
1116+} // namespace Ubuntu
1117
1118=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.h'
1119--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.h 1970-01-01 00:00:00 +0000
1120+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectmanager.h 2016-10-18 07:57:32 +0000
1121@@ -0,0 +1,40 @@
1122+/*
1123+ * Copyright 2016 Canonical Ltd.
1124+ *
1125+ * This program is free software; you can redistribute it and/or modify
1126+ * it under the terms of the GNU Lesser General Public License as published by
1127+ * the Free Software Foundation; version 2.1.
1128+ *
1129+ * This program is distributed in the hope that it will be useful,
1130+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1131+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1132+ * GNU Lesser General Public License for more details.
1133+ *
1134+ * You should have received a copy of the GNU Lesser General Public License
1135+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1136+ *
1137+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
1138+ */
1139+
1140+#ifndef UBUNTU_INTERNAL_SNAPCRAFTPROJECTMANAGER_H
1141+#define UBUNTU_INTERNAL_SNAPCRAFTPROJECTMANAGER_H
1142+
1143+#include <projectexplorer/iprojectmanager.h>
1144+
1145+namespace Ubuntu {
1146+namespace Internal {
1147+
1148+class SnapcraftProjectManager : public ProjectExplorer::IProjectManager
1149+{
1150+public:
1151+ SnapcraftProjectManager();
1152+
1153+ // IProjectManager interface
1154+ virtual QString mimeType() const override;
1155+ virtual ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString) override;
1156+};
1157+
1158+} // namespace Internal
1159+} // namespace Ubuntu
1160+
1161+#endif // UBUNTU_INTERNAL_SNAPCRAFTPROJECTMANAGER_H
1162
1163=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp'
1164--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp 1970-01-01 00:00:00 +0000
1165+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.cpp 2016-10-18 07:57:32 +0000
1166@@ -0,0 +1,496 @@
1167+/*
1168+ * Copyright 2016 Canonical Ltd.
1169+ *
1170+ * This program is free software; you can redistribute it and/or modify
1171+ * it under the terms of the GNU Lesser General Public License as published by
1172+ * the Free Software Foundation; version 2.1.
1173+ *
1174+ * This program is distributed in the hope that it will be useful,
1175+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1176+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1177+ * GNU Lesser General Public License for more details.
1178+ *
1179+ * You should have received a copy of the GNU Lesser General Public License
1180+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1181+ *
1182+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
1183+ */
1184+
1185+#include "snapcraftprojectnode.h"
1186+
1187+#include <projectexplorer/nodesvisitor.h>
1188+#include <coreplugin/fileiconprovider.h>
1189+#include <ubuntu/ubuntuconstants.h>
1190+
1191+#include <QFileInfo>
1192+#include <QDir>
1193+#include <QTimer>
1194+#include <QFileSystemWatcher>
1195+
1196+#pragma GCC diagnostic push
1197+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1198+#include <yaml-cpp/yaml.h>
1199+#pragma GCC diagnostic pop
1200+
1201+namespace Ubuntu {
1202+namespace Internal {
1203+
1204+static QIcon generateIcon(const QString &overlay) {
1205+ const QSize desiredSize = QSize(16, 16);
1206+
1207+ const QPixmap overlayPixmap(overlay);
1208+ const QIcon overlayIcon(overlayPixmap.scaled(12, 12));
1209+ const QPixmap pixmap
1210+ = Core::FileIconProvider::overlayIcon(QStyle::SP_DirIcon, overlayIcon, desiredSize);
1211+
1212+ QIcon result;
1213+ result.addPixmap(pixmap);
1214+
1215+ return result;
1216+}
1217+
1218+static QIcon generateProjectIcon () {
1219+ static QIcon projectIcon;
1220+ if (projectIcon.isNull())
1221+ projectIcon = generateIcon(QString::fromLatin1(Constants::UBUNTU_ICON));
1222+
1223+ return projectIcon;
1224+}
1225+
1226+SnapcraftProjectNode::SnapcraftProjectNode(SnapcraftProject *rootProject, const Utils::FileName &projectFilePath, QFileSystemWatcher *watcher)
1227+ : ProjectExplorer::ProjectNode (projectFilePath),
1228+ m_rootProject(rootProject),
1229+ m_watcher(watcher)
1230+{
1231+ setDisplayName(projectFilePath.parentDir().toString());
1232+ setIcon(generateProjectIcon());
1233+}
1234+
1235+SnapcraftProjectNode::~SnapcraftProjectNode()
1236+{
1237+ if (m_watcher) {
1238+
1239+ }
1240+}
1241+
1242+bool SnapcraftProjectNode::syncFromYAMLNode(YAML::Node rootNode)
1243+{
1244+ qDebug()<<"Sync from YAML node";
1245+ try {
1246+ QString displayName = QString::fromStdString(rootNode["name"].as<std::string>());
1247+ setDisplayName(displayName);
1248+
1249+ YAML::Node parts = rootNode["parts"];
1250+ if (!parts.IsMap()) {
1251+ qDebug()<<"Parts is not a map";
1252+ return false;
1253+ }
1254+
1255+ QList<ProjectExplorer::FolderNode *> existingNodes = subFolderNodes();
1256+ QList<ProjectExplorer::FolderNode *> nodesToRemove;
1257+ QList<ProjectExplorer::FolderNode *> nodesToAdd;
1258+
1259+ QStringList partsFromYaml;
1260+ QStringList existingParts;
1261+
1262+ for (const auto &part : existingNodes) {
1263+ existingParts << part->displayName();
1264+ }
1265+
1266+ //iterate over the parts
1267+ for (auto it = parts.begin(); it != parts.end(); ++it) {
1268+
1269+ YAML::Node subProject = it->second;
1270+ QString partName = QString::fromStdString(it->first.as<std::string>());
1271+ //QString subType = QString::fromStdString(subProject["plugin"].as<std::string>());
1272+ QString source = QDir::cleanPath(QString::fromStdString(subProject["source"].as<std::string>()));
1273+
1274+ partsFromYaml << partName;
1275+
1276+ // We only show a part if it locally exists and is a directory
1277+ QString sourcePathName = QDir::cleanPath(filePath().parentDir().appendPath(source).toString());
1278+ Utils::FileName sourcePath = Utils::FileName::fromString(sourcePathName);
1279+ if (sourcePath.exists() && sourcePath.toFileInfo().isDir()) {
1280+
1281+ int idx = existingParts.indexOf(partName);
1282+ if (idx >= 0) {
1283+ //check if source is still the same
1284+ SnapcraftGenericPartNode *n = static_cast<SnapcraftGenericPartNode *>(existingNodes.at(idx));
1285+ if (n->filePath() == sourcePath)
1286+ continue;
1287+
1288+ nodesToRemove << n;
1289+ }
1290+
1291+ SnapcraftGenericPartNode *partNode = new SnapcraftGenericPartNode(partName, sourcePath, m_watcher);
1292+ nodesToAdd << partNode;
1293+ }
1294+ }
1295+
1296+
1297+ //snapcraft has magic directories, like setup, we want to show in the project tree
1298+ QStringList magicSnapcraftDirs{
1299+ QStringLiteral("setup")
1300+ };
1301+
1302+ for (const QString &magicDir: magicSnapcraftDirs) {
1303+ Utils::FileName dirPath = filePath().parentDir().appendPath(magicDir);
1304+ if (dirPath.exists()) {
1305+ partsFromYaml << magicDir;
1306+ if(!existingParts.contains(magicDir)) {
1307+ SnapcraftGenericPartNode *partNode = new SnapcraftGenericPartNode(magicDir, dirPath, m_watcher);
1308+ nodesToAdd << partNode;
1309+ }
1310+ }
1311+ }
1312+
1313+ QSet<QString> obsoleteParts = existingParts.toSet() - partsFromYaml.toSet();
1314+ qDebug()<<"Parts in yaml"<<partsFromYaml;
1315+ qDebug()<<"Currently known parts"<<existingParts;
1316+ qDebug()<<"Parts now obsolete: "<<obsoleteParts;
1317+ for (const auto &part : obsoleteParts) {
1318+ int idx = existingParts.indexOf(part);
1319+ if (idx >= 0)
1320+ nodesToRemove << existingNodes.at(idx);
1321+ }
1322+
1323+ //remove old nodes
1324+ removeFolderNodes(nodesToRemove);
1325+ addFolderNodes(nodesToAdd);
1326+ } catch (const YAML::Exception &e) {
1327+ qDebug()<<"ERRROR ERROR ERROR "<<e.what();
1328+ return false;
1329+ }
1330+
1331+ return true;
1332+}
1333+
1334+/*!
1335+ \class Ubuntu::Internal::SnapcraftGenericPartNode
1336+ \brief The SnapcraftGenericPartNode class
1337+ Fallback node if the subproject type can not be handled by the plugin directly
1338+ */
1339+
1340+static void enumChild(const QDir &dir, QSet<Utils::FileName> &dirs, QSet<Utils::FileName> &res) {
1341+ foreach (const QFileInfo &info, dir.entryInfoList(QDir::NoDotAndDotDot|QDir::Dirs|QDir::Files|QDir::Hidden)) {
1342+ if (info.isDir()) {
1343+ dirs << Utils::FileName(info);
1344+ enumChild(QDir(info.absoluteFilePath()), dirs, res);
1345+ } else {
1346+ res.insert(Utils::FileName(info));
1347+ }
1348+ }
1349+}
1350+
1351+SnapcraftGenericPartNode::SnapcraftGenericPartNode(const QString &partName, const Utils::FileName &folderPath, QFileSystemWatcher *watcher)
1352+ : ProjectExplorer::FolderNode (folderPath, ProjectExplorer::FolderNodeType, partName)
1353+ , m_watcher(watcher)
1354+{
1355+ scheduleProjectScan();
1356+
1357+ setIcon(generateProjectIcon());
1358+
1359+ if (watcher->addPath(folderPath.toString())) {
1360+ qDebug()<<"Added"<<folderPath.toString()<<"to watcher";
1361+ } else {
1362+ qDebug()<<"Failed to add"<<folderPath.toString()<<"to watcher";
1363+ }
1364+ m_watcherConnection = QObject::connect(watcher, &QFileSystemWatcher::directoryChanged, [this](const QString &path){
1365+ maybeScheduleProjectScan(path);
1366+ });
1367+}
1368+
1369+SnapcraftGenericPartNode::~SnapcraftGenericPartNode()
1370+{
1371+ //@BUG the watcher is still watching all the subdirs and files!
1372+ if (m_watcher) {
1373+ QString myPath = filePath().toFileInfo().absoluteFilePath();
1374+ QStringList watched = m_watcher->directories();
1375+ QStringList toRemove;
1376+ for(const QString &path: watched) {
1377+ if(path.startsWith(myPath))
1378+ toRemove << path;
1379+ }
1380+ m_watcher->removePaths(toRemove);
1381+ QObject::disconnect(m_watcherConnection);
1382+ }
1383+}
1384+
1385+void SnapcraftGenericPartNode::maybeScheduleProjectScan(const QString &changedPath)
1386+{
1387+ Utils::FileName changed = Utils::FileName::fromString(changedPath);
1388+ if (filePath().toFileInfo() == changed.toFileInfo())
1389+ scheduleProjectScan();
1390+}
1391+
1392+void SnapcraftGenericPartNode::scheduleProjectScan()
1393+{
1394+ if (m_scanning)
1395+ return;
1396+
1397+ qDebug()<<"Scheduling Project scan";
1398+
1399+ m_scanning = true;
1400+
1401+ QTimer *rescanTimer = new QTimer();
1402+ rescanTimer->setSingleShot(true);
1403+ rescanTimer->start(0);
1404+ QObject::connect(rescanTimer, &QTimer::timeout, [this, rescanTimer](){
1405+ qDebug()<<"Starting Project scan";
1406+ delete rescanTimer;
1407+ this->scanProjectDirectory();
1408+
1409+ m_scanning = false;
1410+ });
1411+}
1412+
1413+void SnapcraftGenericPartNode::removeFileNodes(const QList<Utils::FileName> &files)
1414+{
1415+ foreach(const Utils::FileName &f, files) {
1416+ if(f.toFileInfo().isDir())
1417+ continue;
1418+
1419+ FindFileNodesForFileVisitor vis(f);
1420+ this->accept(&vis);
1421+
1422+ for (ProjectExplorer::FileNode *node : vis.nodes()) {
1423+ node->parentFolderNode()->removeFileNodes({node});
1424+ }
1425+ }
1426+}
1427+
1428+void SnapcraftGenericPartNode::removeFolderNodes(QList<Utils::FileName> &dirs)
1429+{
1430+
1431+ qSort(dirs.begin(), dirs.end(),[](const Utils::FileName &a, const Utils::FileName &b){
1432+ return a.toFileInfo().absoluteFilePath() > b.toFileInfo().absoluteFilePath();
1433+ });
1434+
1435+ foreach(const Utils::FileName &f, dirs) {
1436+ FindNodesForFolderVisitor vis(f);
1437+ this->accept(&vis);
1438+
1439+ FindNodesForFolderVisitor visParent(f.parentDir());
1440+ this->accept(&visParent);
1441+
1442+ if(visParent.nodes().size()) {
1443+ m_watcher->removePath(f.toFileInfo().absoluteFilePath());
1444+ visParent.nodes()[0]->removeFolderNodes(vis.nodes());
1445+ }
1446+ }
1447+}
1448+
1449+QList<ProjectExplorer::ProjectAction> SnapcraftGenericPartNode::supportedActions(ProjectExplorer::Node *node) const
1450+{
1451+ static const QList<ProjectExplorer::ProjectAction> fileActions {
1452+ ProjectExplorer::ProjectAction::Rename,
1453+ ProjectExplorer::ProjectAction::RemoveFile
1454+ };
1455+ static const QList<ProjectExplorer::ProjectAction> folderActions {
1456+ ProjectExplorer::ProjectAction::AddNewFile,
1457+ ProjectExplorer::ProjectAction::RemoveFile
1458+ };
1459+ switch (node->nodeType()) {
1460+ case ProjectExplorer::FileNodeType:
1461+ return fileActions;
1462+ case ProjectExplorer::FolderNodeType:
1463+ case ProjectExplorer::ProjectNodeType:
1464+ return folderActions;
1465+ default:
1466+ return ProjectExplorer::FolderNode::supportedActions(node);
1467+ }
1468+}
1469+
1470+bool SnapcraftGenericPartNode::addFiles(const QStringList &, QStringList *)
1471+{
1472+ return true;
1473+}
1474+
1475+bool SnapcraftGenericPartNode::removeFiles(const QStringList &, QStringList *)
1476+{
1477+ return true;
1478+}
1479+
1480+bool SnapcraftGenericPartNode::deleteFiles(const QStringList &)
1481+{
1482+ return true;
1483+}
1484+
1485+void SnapcraftGenericPartNode::scanProjectDirectory()
1486+{
1487+ QSet<Utils::FileName> dirs;
1488+ QSet<Utils::FileName> files;
1489+ enumChild(QDir(filePath().toString()), dirs, files);
1490+
1491+ FindFilesAndDirsVisitor vis;
1492+ this->accept(&vis);
1493+
1494+ QSet<Utils::FileName> oldFiles = QSet<Utils::FileName>::fromList(vis.filePaths());
1495+ QSet<Utils::FileName> oldDirs = QSet<Utils::FileName>::fromList(vis.dirPaths());
1496+ QSet<Utils::FileName> newFiles(files);
1497+ QSet<Utils::FileName> newDirs(dirs);
1498+
1499+ QSet<Utils::FileName> filesToRemove = oldFiles - newFiles;
1500+ QSet<Utils::FileName> filesToAdd = newFiles - oldFiles;
1501+ QList<Utils::FileName> dirsToRemove = (oldDirs - newDirs).toList();
1502+ QSet<Utils::FileName> dirsToAdd = newDirs - oldDirs;
1503+
1504+ qDebug()<<"Removing dirs " <<dirsToRemove;
1505+ qDebug()<<"Adding dirs " <<dirsToAdd;
1506+ qDebug()<<"Removing files" <<filesToRemove;
1507+ qDebug()<<"Adding files " <<filesToAdd;
1508+
1509+ removeFileNodes(filesToRemove.toList());
1510+ removeFolderNodes(dirsToRemove);
1511+
1512+ for (const Utils::FileName &dir : dirsToAdd) {
1513+ Utils::FileName relativeName = dir.relativeChildPath(filePath());
1514+ QStringList relativeNameList = relativeName.toUserOutput().split(QDir::separator());
1515+ createOrFindFolder(relativeNameList);
1516+ }
1517+
1518+ for (const Utils::FileName &file : filesToAdd) {
1519+ Utils::FileName folderPath = file.parentDir();
1520+
1521+ //do not show the project file twice
1522+ if (file == projectNode()->filePath())
1523+ continue;
1524+
1525+ ProjectExplorer::FolderNode *parentNode = nullptr;
1526+ if (folderPath == filePath()) {
1527+ parentNode = this;
1528+ } else {
1529+ Utils::FileName relativeName = folderPath.relativeChildPath(filePath());
1530+ QStringList relativeNameList = relativeName.toUserOutput().split(QDir::separator());
1531+ parentNode = createOrFindFolder(relativeNameList);
1532+ }
1533+
1534+ ProjectExplorer::FileNode *fNode = new ProjectExplorer::FileNode(file, ProjectExplorer::UnknownFileType, false);
1535+ parentNode->addFileNodes({fNode});
1536+ }
1537+}
1538+
1539+ProjectExplorer::FolderNode *SnapcraftGenericPartNode::createOrFindFolder(const QStringList &folder)
1540+{
1541+ QStringList watches;
1542+ ProjectExplorer::FolderNode *currFolder = this;
1543+
1544+ Utils::FileName currentPath = filePath();
1545+
1546+ for (const QString &folderName: folder) {
1547+
1548+ QList<ProjectExplorer::FolderNode *> subnodes = currFolder->subFolderNodes();
1549+ currentPath = currentPath.appendPath(folderName);
1550+
1551+ auto check = [&folderName](ProjectExplorer::FolderNode *f) {
1552+ return f->filePath().fileName() == folderName;
1553+ };
1554+
1555+ auto it = std::find_if(subnodes.begin(), subnodes.end(), check);
1556+
1557+ if (it != subnodes.end()) {
1558+ //node exists already
1559+ currFolder = *it;
1560+ continue;
1561+ }
1562+
1563+ //does not exist lets create a new one
1564+ ProjectExplorer::FolderNode *fNode = new SnapcraftGenericPartFolderNode(currentPath, ProjectExplorer::FolderNodeType, folderName);
1565+ currFolder->addFolderNodes({fNode});
1566+ currFolder = fNode;
1567+
1568+ watches << currentPath.toFileInfo().absoluteFilePath();
1569+ }
1570+ qDebug()<<"Failed to add watches: "<<m_watcher->addPaths(watches);
1571+ return currFolder;
1572+}
1573+
1574+Utils::FileNameList FindFilesAndDirsVisitor::filePaths() const
1575+{
1576+ return m_filePaths;
1577+}
1578+
1579+Utils::FileNameList FindFilesAndDirsVisitor::dirPaths() const
1580+{
1581+ return m_dirPaths;
1582+}
1583+
1584+void FindFilesAndDirsVisitor::visitProjectNode(ProjectExplorer::ProjectNode *projectNode)
1585+{
1586+ visitFolderNode(projectNode);
1587+}
1588+
1589+void FindFilesAndDirsVisitor::visitFolderNode(ProjectExplorer::FolderNode *folderNode)
1590+{
1591+ if (folderNode->nodeType() != ProjectExplorer::ProjectNodeType)
1592+ m_dirPaths.append(folderNode->filePath());
1593+
1594+ for (const ProjectExplorer::FileNode *fileNode : folderNode->fileNodes())
1595+ m_filePaths.append(fileNode->filePath());
1596+}
1597+
1598+FindFileNodesForFileVisitor::FindFileNodesForFileVisitor(const Utils::FileName &f)
1599+ : m_file(f)
1600+{
1601+
1602+}
1603+
1604+QList<ProjectExplorer::FileNode *> FindFileNodesForFileVisitor::nodes() const
1605+{
1606+ return m_nodes;
1607+}
1608+
1609+void FindFileNodesForFileVisitor::visitProjectNode(ProjectExplorer::ProjectNode *projectNode)
1610+{
1611+ visitFolderNode(projectNode);
1612+}
1613+
1614+void FindFileNodesForFileVisitor::visitFolderNode(ProjectExplorer::FolderNode *folderNode)
1615+{
1616+ for(auto fileNode: folderNode->fileNodes()) {
1617+ if (fileNode->filePath() == m_file)
1618+ m_nodes.append(fileNode);
1619+ }
1620+}
1621+
1622+FindNodesForFolderVisitor::FindNodesForFolderVisitor(const Utils::FileName &f)
1623+ : m_folder(f)
1624+{
1625+
1626+}
1627+
1628+QList<ProjectExplorer::FolderNode *> FindNodesForFolderVisitor::nodes() const
1629+{
1630+ return m_nodes;
1631+}
1632+
1633+void FindNodesForFolderVisitor::visitProjectNode(ProjectExplorer::ProjectNode *)
1634+{
1635+ return;
1636+}
1637+
1638+void FindNodesForFolderVisitor::visitFolderNode(ProjectExplorer::FolderNode *folderNode)
1639+{
1640+ if (m_folder == folderNode->filePath())
1641+ m_nodes.append(folderNode);
1642+}
1643+
1644+bool SnapcraftGenericPartFolderNode::addFiles(const QStringList &, QStringList *)
1645+{
1646+ return true;
1647+}
1648+
1649+bool SnapcraftGenericPartFolderNode::removeFiles(const QStringList &, QStringList *)
1650+{
1651+ return true;
1652+}
1653+
1654+bool SnapcraftGenericPartFolderNode::deleteFiles(const QStringList &)
1655+{
1656+ return true;
1657+}
1658+
1659+
1660+
1661+} // namespace Internal
1662+} // namespace Ubuntu
1663
1664=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.h'
1665--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.h 1970-01-01 00:00:00 +0000
1666+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftprojectnode.h 2016-10-18 07:57:32 +0000
1667@@ -0,0 +1,136 @@
1668+/*
1669+ * Copyright 2016 Canonical Ltd.
1670+ *
1671+ * This program is free software; you can redistribute it and/or modify
1672+ * it under the terms of the GNU Lesser General Public License as published by
1673+ * the Free Software Foundation; version 2.1.
1674+ *
1675+ * This program is distributed in the hope that it will be useful,
1676+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
1677+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1678+ * GNU Lesser General Public License for more details.
1679+ *
1680+ * You should have received a copy of the GNU Lesser General Public License
1681+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
1682+ *
1683+ * Author: Benjamin Zeller <benjamin.zeller@canonical.com>
1684+ */
1685+
1686+#ifndef UBUNTU_INTERNAL_SNAPCRAFTPROJECTNODE_H
1687+#define UBUNTU_INTERNAL_SNAPCRAFTPROJECTNODE_H
1688+
1689+#include <projectexplorer/projectnodes.h>
1690+#include <projectexplorer/nodesvisitor.h>
1691+#include <yaml-cpp/node/node.h>
1692+
1693+#include <QPointer>
1694+
1695+class QFileSystemWatcher;
1696+
1697+namespace Ubuntu {
1698+namespace Internal {
1699+
1700+class FindFilesAndDirsVisitor : public ProjectExplorer::NodesVisitor {
1701+public:
1702+ Utils::FileNameList filePaths() const;
1703+ Utils::FileNameList dirPaths() const;
1704+
1705+ void visitProjectNode(ProjectExplorer::ProjectNode *projectNode) override;
1706+ void visitFolderNode(ProjectExplorer::FolderNode *folderNode) override;
1707+
1708+private:
1709+ Utils::FileNameList m_filePaths;
1710+ Utils::FileNameList m_dirPaths;
1711+};
1712+
1713+class FindFileNodesForFileVisitor : public ProjectExplorer::NodesVisitor {
1714+
1715+public:
1716+ FindFileNodesForFileVisitor (const Utils::FileName &f);
1717+ QList<ProjectExplorer::FileNode *> nodes () const;
1718+
1719+ void visitProjectNode(ProjectExplorer::ProjectNode *projectNode) override;
1720+ void visitFolderNode(ProjectExplorer::FolderNode *folderNode) override;
1721+
1722+private:
1723+ Utils::FileName m_file;
1724+ QList<ProjectExplorer::FileNode *> m_nodes;
1725+};
1726+
1727+class FindNodesForFolderVisitor : public ProjectExplorer::NodesVisitor {
1728+
1729+public:
1730+ FindNodesForFolderVisitor (const Utils::FileName &f);
1731+ QList<ProjectExplorer::FolderNode *> nodes () const;
1732+
1733+ void visitProjectNode(ProjectExplorer::ProjectNode *projectNode) override;
1734+ void visitFolderNode(ProjectExplorer::FolderNode *folderNode) override;
1735+
1736+private:
1737+ Utils::FileName m_folder;
1738+ QList<ProjectExplorer::FolderNode *> m_nodes;
1739+};
1740+
1741+class SnapcraftProject;
1742+class SnapcraftGenericPartNode;
1743+
1744+class SnapcraftProjectNode : public ProjectExplorer::ProjectNode
1745+{
1746+public:
1747+ SnapcraftProjectNode(SnapcraftProject *rootProject, const Utils::FileName &projectFilePath, QFileSystemWatcher *watcher);
1748+ ~SnapcraftProjectNode();
1749+
1750+ bool syncFromYAMLNode(YAML::Node rootNode);
1751+
1752+private:
1753+ SnapcraftProject *m_rootProject = nullptr;
1754+ QPointer<QFileSystemWatcher> m_watcher;
1755+};
1756+
1757+class SnapcraftGenericPartFolderNode : public ProjectExplorer::FolderNode
1758+{
1759+public:
1760+
1761+ using ProjectExplorer::FolderNode::FolderNode;
1762+
1763+ // FolderNode interface
1764+ virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
1765+ virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved) override;
1766+ virtual bool deleteFiles(const QStringList &filePaths) override;
1767+};
1768+
1769+class SnapcraftGenericPartNode : public ProjectExplorer::FolderNode
1770+{
1771+public:
1772+ SnapcraftGenericPartNode(const QString &partName, const Utils::FileName &folderPath, QFileSystemWatcher *watcher);
1773+ ~SnapcraftGenericPartNode();
1774+
1775+ void maybeScheduleProjectScan(const QString &changedPath);
1776+ void scheduleProjectScan();
1777+
1778+ using ProjectExplorer::FolderNode::removeFileNodes;
1779+ void removeFileNodes (const QList<Utils::FileName> &files);
1780+
1781+ using ProjectExplorer::FolderNode::removeFolderNodes;
1782+ void removeFolderNodes (QList<Utils::FileName> &dirs);
1783+
1784+ // Node interface
1785+ virtual QList<ProjectExplorer::ProjectAction> supportedActions(ProjectExplorer::Node *node) const override;
1786+ virtual bool addFiles(const QStringList &filePaths, QStringList *notAdded) override;
1787+ virtual bool removeFiles(const QStringList &filePaths, QStringList *notRemoved) override;
1788+ virtual bool deleteFiles(const QStringList &filePaths) override;
1789+
1790+protected:
1791+ ProjectExplorer::FolderNode *createOrFindFolder (const QStringList &folder);
1792+ void scanProjectDirectory ();
1793+
1794+private:
1795+ bool m_scanning = false;
1796+ QMetaObject::Connection m_watcherConnection;
1797+ QPointer<QFileSystemWatcher> m_watcher;
1798+};
1799+
1800+} // namespace Internal
1801+} // namespace Ubuntu
1802+
1803+#endif // UBUNTU_INTERNAL_SNAPCRAFTPROJECTNODE_H
1804
1805=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.cpp'
1806--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.cpp 1970-01-01 00:00:00 +0000
1807+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.cpp 2016-10-18 07:57:32 +0000
1808@@ -0,0 +1,51 @@
1809+#include "snapcraftrsyncstep.h"
1810+#include "snapcraftproject.h"
1811+#include "snapcraftbuildconfiguration.h"
1812+
1813+#include <ubuntu/ubuntuconstants.h>
1814+
1815+#include <projectexplorer/target.h>
1816+
1817+namespace Ubuntu {
1818+namespace Internal {
1819+
1820+SnapcraftRsyncStep::SnapcraftRsyncStep(ProjectExplorer::BuildStepList *bsl)
1821+ : ProjectExplorer::AbstractProcessStep(bsl, Constants::SNAPCRAFT_RSYNCBUILSSTEP_ID)
1822+{
1823+ setDefaultDisplayName(tr("Prepare build"));
1824+}
1825+
1826+SnapcraftRsyncStep::SnapcraftRsyncStep(ProjectExplorer::BuildStepList *bsl, SnapcraftRsyncStep *bs)
1827+ : ProjectExplorer::AbstractProcessStep(bsl, bs)
1828+{
1829+
1830+}
1831+
1832+bool SnapcraftRsyncStep::init(QList<const ProjectExplorer::BuildStep *> &)
1833+{
1834+ QString projectDir = target()->project()->projectDirectory().toString();
1835+
1836+ ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration();
1837+ if(!bc)
1838+ return false;
1839+
1840+ ProjectExplorer::ProcessParameters *param = processParameters();
1841+ param->setWorkingDirectory(bc->buildDirectory().toUserOutput());
1842+ param->setCommand(QStringLiteral("rsync"));
1843+ param->setArguments(QString::fromLatin1("-a --delete \"%1/\" \"./\"")
1844+ .arg(QDir::cleanPath(projectDir)));
1845+ param->setMacroExpander(bc->macroExpander());
1846+ param->setEnvironment(bc->environment());
1847+
1848+ return true;
1849+}
1850+
1851+ProjectExplorer::BuildStepConfigWidget *SnapcraftRsyncStep::createConfigWidget()
1852+{
1853+ return new ProjectExplorer::SimpleBuildStepConfigWidget(this);
1854+}
1855+
1856+
1857+
1858+} // namespace Internal
1859+} // namespace Ubuntu
1860
1861=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.h'
1862--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.h 1970-01-01 00:00:00 +0000
1863+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftrsyncstep.h 2016-10-18 07:57:32 +0000
1864@@ -0,0 +1,31 @@
1865+#ifndef UBUNTU_INTERNAL_SNAPCRAFTRSYNCSTEP_H
1866+#define UBUNTU_INTERNAL_SNAPCRAFTRSYNCSTEP_H
1867+
1868+#include <projectexplorer/abstractprocessstep.h>
1869+
1870+namespace Ubuntu {
1871+namespace Internal {
1872+
1873+class SnapcraftBuildStepFactory;
1874+class SnapcraftBuildConfigurationFactory;
1875+
1876+class SnapcraftRsyncStep : public ProjectExplorer::AbstractProcessStep
1877+{
1878+ Q_OBJECT
1879+public:
1880+ friend class SnapcraftBuildStepFactory;
1881+ friend class SnapcraftBuildConfigurationFactory;
1882+
1883+ // BuildStep interface
1884+ virtual bool init(QList<const ProjectExplorer::BuildStep *> &earlierSteps) override;
1885+ virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
1886+
1887+protected:
1888+ SnapcraftRsyncStep(ProjectExplorer::BuildStepList *bsl);
1889+ SnapcraftRsyncStep(ProjectExplorer::BuildStepList *bsl, SnapcraftRsyncStep *bs);
1890+};
1891+
1892+} // namespace Internal
1893+} // namespace Ubuntu
1894+
1895+#endif // UBUNTU_INTERNAL_SNAPCRAFTRSYNCSTEP_H
1896
1897=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.cpp'
1898--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.cpp 1970-01-01 00:00:00 +0000
1899+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.cpp 2016-10-18 07:57:32 +0000
1900@@ -0,0 +1,67 @@
1901+#include "snapcraftstep.h"
1902+#include "snapcraftproject.h"
1903+#include "snapcraftbuildconfiguration.h"
1904+
1905+#include <ubuntu/snap/settings/snapcraftkitinformation.h>
1906+
1907+#include <ubuntu/ubuntuconstants.h>
1908+
1909+#include <projectexplorer/target.h>
1910+#include <utils/environment.h>
1911+
1912+namespace Ubuntu {
1913+namespace Internal {
1914+
1915+SnapcraftStep::SnapcraftStep(ProjectExplorer::BuildStepList *bsl)
1916+ : ProjectExplorer::AbstractProcessStep(bsl, Constants::SNAPCRAFT_BUILDSTEP_ID)
1917+{
1918+ setDefaultDisplayName(tr("Snapcraft"));
1919+}
1920+
1921+SnapcraftStep::SnapcraftStep(ProjectExplorer::BuildStepList *bsl, SnapcraftStep *bs)
1922+ : ProjectExplorer::AbstractProcessStep(bsl, bs)
1923+{
1924+
1925+}
1926+
1927+bool SnapcraftStep::init(QList<const ProjectExplorer::BuildStep *> &)
1928+{
1929+ //QString projectDir = target()->project()->projectDirectory().toString();
1930+ ProjectExplorer::BuildConfiguration *bc = target()->activeBuildConfiguration();
1931+ if(!bc)
1932+ return false;
1933+
1934+ Utils::FileName snapcraftBin = Utils::FileName::fromString(Constants::UBUNTU_SCRIPTPATH);
1935+ snapcraftBin = snapcraftBin.appendPath(QString::fromLatin1("run_snapcraft.py"));
1936+
1937+ ProjectExplorer::ProcessParameters *param = processParameters();
1938+ param->setWorkingDirectory(bc->buildDirectory().toUserOutput());
1939+ param->setCommand(snapcraftBin.toUserOutput());
1940+ param->setArguments(QString::fromLatin1("-s '%1'").arg(snapcraftBin.toFileInfo().absoluteFilePath()));
1941+ param->setMacroExpander(bc->macroExpander());
1942+ param->setEnvironment(bc->environment());
1943+
1944+ return true;
1945+}
1946+
1947+ProjectExplorer::BuildStepConfigWidget *SnapcraftStep::createConfigWidget()
1948+{
1949+ return new ProjectExplorer::SimpleBuildStepConfigWidget(this);
1950+}
1951+
1952+Utils::FileName SnapcraftStep::snapcraftCommand() const
1953+{
1954+ Utils::Environment env = Utils::Environment::systemEnvironment();
1955+ Utils::FileName fallback = env.searchInPath(QStringLiteral("snapcraft"));
1956+ if (!target())
1957+ return fallback;
1958+
1959+ Utils::FileName bin = SnapcraftKitInformation::snapcraftPath(target()->kit());
1960+ if (!bin.exists())
1961+ return fallback;
1962+
1963+ return bin;
1964+}
1965+
1966+} // namespace Internal
1967+} // namespace Ubuntu
1968
1969=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.h'
1970--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.h 1970-01-01 00:00:00 +0000
1971+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/project/snapcraftstep.h 2016-10-18 07:57:32 +0000
1972@@ -0,0 +1,33 @@
1973+#ifndef UBUNTU_INTERNAL_SNAPCRAFTSTEP_H
1974+#define UBUNTU_INTERNAL_SNAPCRAFTSTEP_H
1975+
1976+#include <projectexplorer/abstractprocessstep.h>
1977+
1978+namespace Ubuntu {
1979+namespace Internal {
1980+
1981+class SnapcraftBuildStepFactory;
1982+class SnapcraftBuildConfigurationFactory;
1983+
1984+class SnapcraftStep : public ProjectExplorer::AbstractProcessStep
1985+{
1986+ Q_OBJECT
1987+public:
1988+ friend class SnapcraftBuildStepFactory;
1989+ friend class SnapcraftBuildConfigurationFactory;
1990+
1991+ // BuildStep interface
1992+ virtual bool init(QList<const ProjectExplorer::BuildStep *> &earlierSteps) override;
1993+ virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
1994+
1995+ Utils::FileName snapcraftCommand () const;
1996+
1997+protected:
1998+ SnapcraftStep(ProjectExplorer::BuildStepList *bsl);
1999+ SnapcraftStep(ProjectExplorer::BuildStepList *bsl, SnapcraftStep *bs);
2000+};
2001+
2002+} // namespace Internal
2003+} // namespace Ubuntu
2004+
2005+#endif // UBUNTU_INTERNAL_SNAPCRAFTSTEP_H
2006
2007=== added directory 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings'
2008=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.cpp'
2009--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.cpp 1970-01-01 00:00:00 +0000
2010+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.cpp 2016-10-18 07:57:32 +0000
2011@@ -0,0 +1,114 @@
2012+#include "snapcraftkitinformation.h"
2013+
2014+#include <projectexplorer/kit.h>
2015+
2016+#include <utils/environment.h>
2017+#include <utils/qtcassert.h>
2018+#include <utils/pathchooser.h>
2019+
2020+#include <QFileInfo>
2021+
2022+namespace Ubuntu {
2023+namespace Internal {
2024+
2025+static const char TOOL_ID[] = "SnapcraftProjectManager.SnapcraftKitInformation";
2026+
2027+SnapcraftKitInformation::SnapcraftKitInformation()
2028+{
2029+ setObjectName(QStringLiteral("SnapcraftKitInformation"));
2030+ setId(TOOL_ID);
2031+ setPriority(29000);
2032+}
2033+
2034+Utils::FileName SnapcraftKitInformation::snapcraftPath(const ProjectExplorer::Kit *k)
2035+{
2036+ return k->value(TOOL_ID, QVariant::fromValue<Utils::FileName>(Utils::FileName())).value<Utils::FileName>();
2037+}
2038+
2039+void SnapcraftKitInformation::setSnapcraftPath(ProjectExplorer::Kit *k, const Utils::FileName &snapcraft)
2040+{
2041+ if (snapcraft.toFileInfo().isExecutable()) {
2042+ k->setValue(TOOL_ID, QVariant::fromValue<Utils::FileName>(snapcraft));
2043+ }
2044+}
2045+
2046+QVariant SnapcraftKitInformation::defaultValue(const ProjectExplorer::Kit *) const
2047+{
2048+ Utils::Environment env = Utils::Environment::systemEnvironment();
2049+ return QVariant::fromValue<Utils::FileName>(env.searchInPath(QStringLiteral("snapcraft")));
2050+}
2051+
2052+QList<ProjectExplorer::Task> SnapcraftKitInformation::validate(const ProjectExplorer::Kit *) const
2053+{
2054+ return QList<ProjectExplorer::Task>();
2055+}
2056+
2057+ProjectExplorer::KitInformation::ItemList SnapcraftKitInformation::toUserOutput(const ProjectExplorer::Kit *k) const
2058+{
2059+ Utils::FileName snap = snapcraftPath(k);
2060+ return ItemList {
2061+ qMakePair(tr("Snapcraft"), snap.exists() ? snap.toUserOutput() : tr("Unconfigured"))
2062+ };
2063+}
2064+
2065+ProjectExplorer::KitConfigWidget *SnapcraftKitInformation::createConfigWidget(ProjectExplorer::Kit *kit) const
2066+{
2067+ return new SnapcraftKitInformationWidget(kit, this);
2068+}
2069+
2070+SnapcraftKitInformationWidget::SnapcraftKitInformationWidget(ProjectExplorer::Kit *kit, const ProjectExplorer::KitInformation *ki)
2071+ : ProjectExplorer::KitConfigWidget(kit, ki)
2072+ , m_chooser(new Utils::PathChooser)
2073+ , m_ignoreChange(false)
2074+{
2075+ m_chooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
2076+ m_chooser->setFileName(SnapcraftKitInformation::snapcraftPath(kit));
2077+ connect(m_chooser, &Utils::PathChooser::pathChanged,
2078+ this, &SnapcraftKitInformationWidget::pathWasChanged);
2079+}
2080+
2081+SnapcraftKitInformationWidget::~SnapcraftKitInformationWidget()
2082+{
2083+ delete m_chooser;
2084+}
2085+
2086+QString SnapcraftKitInformationWidget::displayName() const
2087+{
2088+ return tr("Snapcraft");
2089+}
2090+
2091+void SnapcraftKitInformationWidget::makeReadOnly()
2092+{
2093+ m_chooser->setReadOnly(true);
2094+}
2095+
2096+void SnapcraftKitInformationWidget::refresh()
2097+{
2098+ if (!m_ignoreChange)
2099+ m_chooser->setPath(SnapcraftKitInformation::snapcraftPath(kit()).toUserOutput());
2100+}
2101+
2102+QWidget *SnapcraftKitInformationWidget::mainWidget() const
2103+{
2104+ return m_chooser->lineEdit();
2105+}
2106+
2107+QString SnapcraftKitInformationWidget::toolTip() const
2108+{
2109+ return tr("The snapcraft binary to use for this kit.");
2110+}
2111+
2112+QWidget *SnapcraftKitInformationWidget::buttonWidget() const
2113+{
2114+ return m_chooser->buttonAtIndex(0);
2115+}
2116+
2117+void SnapcraftKitInformationWidget::pathWasChanged()
2118+{
2119+ m_ignoreChange = true;
2120+ SnapcraftKitInformation::setSnapcraftPath(kit(), m_chooser->fileName());
2121+ m_ignoreChange = false;
2122+}
2123+
2124+} // namespace Internal
2125+} // namespace Ubuntu
2126
2127=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.h'
2128--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.h 1970-01-01 00:00:00 +0000
2129+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/settings/snapcraftkitinformation.h 2016-10-18 07:57:32 +0000
2130@@ -0,0 +1,59 @@
2131+#ifndef UBUNTU_INTERNAL_SNAPCRAFTKITINFORMATION_H
2132+#define UBUNTU_INTERNAL_SNAPCRAFTKITINFORMATION_H
2133+
2134+#include <projectexplorer/kitconfigwidget.h>
2135+#include <projectexplorer/kitinformation.h>
2136+
2137+namespace Utils {
2138+class PathChooser;
2139+}
2140+
2141+namespace Ubuntu {
2142+namespace Internal {
2143+
2144+class SnapcraftKitInformation : public ProjectExplorer::KitInformation
2145+{
2146+ Q_OBJECT
2147+public:
2148+ SnapcraftKitInformation();
2149+
2150+ static Utils::FileName snapcraftPath (const ProjectExplorer::Kit *k);
2151+ static void setSnapcraftPath (ProjectExplorer::Kit *k, const Utils::FileName &snapcraft);
2152+
2153+ // KitInformation interface
2154+ virtual QVariant defaultValue(const ProjectExplorer::Kit *) const override;
2155+ virtual QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *) const override;
2156+ virtual ItemList toUserOutput(const ProjectExplorer::Kit *) const override;
2157+ virtual ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *) const override;
2158+
2159+private:
2160+ Utils::FileName m_snapcraftPath;
2161+};
2162+
2163+class SnapcraftKitInformationWidget : public ProjectExplorer::KitConfigWidget
2164+{
2165+public:
2166+ SnapcraftKitInformationWidget(ProjectExplorer::Kit *kit, const ProjectExplorer::KitInformation *ki);
2167+ virtual ~SnapcraftKitInformationWidget();
2168+
2169+ // KitConfigWidget interface
2170+ virtual QString displayName() const override;
2171+ virtual void makeReadOnly() override;
2172+ virtual void refresh() override;
2173+ virtual QWidget *mainWidget() const override;
2174+ virtual QString toolTip() const override;
2175+ virtual QWidget *buttonWidget() const override;
2176+
2177+private:
2178+ void pathWasChanged();
2179+private:
2180+ Utils::PathChooser *m_chooser;
2181+ bool m_ignoreChange;
2182+
2183+
2184+};
2185+
2186+} // namespace Internal
2187+} // namespace Ubuntu
2188+
2189+#endif // UBUNTU_INTERNAL_SNAPCRAFTKITINFORMATION_H
2190
2191=== added file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/snap.pri'
2192--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/snap.pri 1970-01-01 00:00:00 +0000
2193+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/snap/snap.pri 2016-10-18 07:57:32 +0000
2194@@ -0,0 +1,27 @@
2195+
2196+LIBS+=-lyaml-cpp
2197+
2198+SOURCES += \
2199+ $$PWD/project/snapcraftproject.cpp \
2200+ $$PWD/project/snapcraftprojectfile.cpp \
2201+ $$PWD/project/snapcraftprojectnode.cpp \
2202+ $$PWD/project/snapcraftprojectmanager.cpp \
2203+ $$PWD/project/snapcraftbuildconfigurationfactory.cpp \
2204+ $$PWD/project/snapcraftbuildconfiguration.cpp \
2205+ $$PWD/project/snapcraftrsyncstep.cpp \
2206+ $$PWD/project/snapcraftstep.cpp \
2207+ $$PWD/project/snapcraftbuildstepfactory.cpp \
2208+ $$PWD/settings/snapcraftkitinformation.cpp
2209+
2210+HEADERS += \
2211+ $$PWD/project/snapcraftproject.h \
2212+ $$PWD/project/snapcraftprojectfile.h \
2213+ $$PWD/project/snapcraftprojectnode.h \
2214+ $$PWD/project/snapcraftprojectmanager.h \
2215+ $$PWD/project/snapcraftbuildconfigurationfactory.h \
2216+ $$PWD/project/snapcraftbuildconfiguration.h \
2217+ $$PWD/project/snapcraftrsyncstep.h \
2218+ $$PWD/project/snapcraftstep.h \
2219+ $$PWD/project/snapcraftbuildstepfactory.h \
2220+ $$PWD/settings/snapcraftkitinformation.h
2221+
2222
2223=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.cpp'
2224--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.cpp 2016-08-26 14:14:29 +0000
2225+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.cpp 2016-10-18 07:57:32 +0000
2226@@ -471,6 +471,11 @@
2227 return UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("make"),target);
2228 }
2229
2230+Utils::FileName UbuntuClickTool::findOrCreateSnapcraftWrapper(const UbuntuClickTool::Target &target)
2231+{
2232+ return Utils::FileName::fromString(UbuntuClickTool::findOrCreateToolWrapper(QStringLiteral("snapcraft"),target));
2233+}
2234+
2235 QString UbuntuClickTool::mapIncludePathsForCMake(const ProjectExplorer::Kit *k, const QString &in)
2236 {
2237 if (in.isEmpty())
2238
2239=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.h'
2240--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.h 2016-08-26 14:14:29 +0000
2241+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuclicktool.h 2016-10-18 07:57:32 +0000
2242@@ -86,6 +86,7 @@
2243 static QString findOrCreateToolWrapper(const QString &tool, const UbuntuClickTool::Target &target);
2244 static QString findOrCreateQMakeWrapper(const UbuntuClickTool::Target &target);
2245 static QString findOrCreateMakeWrapper(const UbuntuClickTool::Target &target);
2246+ static Utils::FileName findOrCreateSnapcraftWrapper(const UbuntuClickTool::Target &target);
2247 static QString mapIncludePathsForCMake(const ProjectExplorer::Kit *k, const QString &in);
2248 static QString hostArchitecture ();
2249 static bool compatibleWithHostArchitecture (const QString &targetArch);
2250
2251=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuconstants.h'
2252--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuconstants.h 2016-09-22 16:11:03 +0000
2253+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuconstants.h 2016-10-18 07:57:32 +0000
2254@@ -393,6 +393,16 @@
2255 const char CHROOT_UPDATE_LIST_SCRIPT[] = "%1/ubuntu/scripts/qtc_chroot_get_upgrades.py %2 %3";
2256
2257
2258+//Snapcraft
2259+const char SNAPCRAFT_PROJECT_MIMETYPE[] = "application/x-snapcraft";
2260+const char SNAPCRAFT_PROJECT_ID[ ] = "SnapcraftProjectManager.SnapcraftProject";
2261+const char SNAPCRAFT_PROJECT_PROJECTCONTEXT[] = "SnapcraftProject.ProjectContext";
2262+const char SNAPCRAFT_BUILDCONFIGURATION_ID[] = "SnapcraftProjectManager.SnapcraftBuildconfiguration.Id";
2263+const char SNAPCRAFT_RSYNCBUILSSTEP_ID[] = "SnapcraftProjectManager.SnapcraftRsyncStep.Id";
2264+const char SNAPCRAFT_BUILDSTEP_ID[] = "SnapcraftProjectManager.SnapcraftStep.Id";
2265+
2266+
2267+
2268 } // namespace Ubuntu
2269 } // namespace Constants
2270
2271
2272=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntukitmanager.cpp'
2273--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntukitmanager.cpp 2016-08-26 14:14:29 +0000
2274+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntukitmanager.cpp 2016-10-18 07:57:32 +0000
2275@@ -5,7 +5,8 @@
2276 #include "ubuntuclickdialog.h"
2277 #include "ubuntuqtversion.h"
2278 #include "settings.h"
2279-#include "device/container/containerdevice.h"
2280+#include <ubuntu/device/container/containerdevice.h>
2281+#include <ubuntu/snap/settings/snapcraftkitinformation.h>
2282
2283 #include <coreplugin/icore.h>
2284 #include <projectexplorer/kitmanager.h>
2285@@ -509,6 +510,8 @@
2286 ProjectExplorer::SysRootKitInformation::setSysRoot(k,Utils::FileName::fromString(UbuntuClickTool::targetBasePath(tc->clickTarget())));
2287 }
2288
2289+ SnapcraftKitInformation::setSnapcraftPath(k, UbuntuClickTool::findOrCreateSnapcraftWrapper(tc->clickTarget()));
2290+
2291 //make sure we point to a ubuntu device
2292 Core::Id devId = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(k);
2293 bool devValid = devId.isValid(); //invalid type
2294
2295=== modified file 'dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp'
2296--- dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp 2016-09-22 16:11:03 +0000
2297+++ dist/qtcreator/src/plugins/ubuntu/src/ubuntu/ubuntuplugin.cpp 2016-10-18 07:57:32 +0000
2298@@ -53,6 +53,11 @@
2299 #include <ubuntu/wizards/ubuntufirstrunwizard.h>
2300 #include <ubuntu/wizards/ubuntuprojectmigrationwizard.h>
2301
2302+#include <ubuntu/snap/project/snapcraftprojectmanager.h>
2303+#include <ubuntu/snap/project/snapcraftbuildconfigurationfactory.h>
2304+#include <ubuntu/snap/project/snapcraftbuildstepfactory.h>
2305+#include <ubuntu/snap/settings/snapcraftkitinformation.h>
2306+
2307 #include "ubuntujsextension.h"
2308
2309 #include <coreplugin/modemanager.h>
2310@@ -175,6 +180,13 @@
2311 addAutoReleasedObject(new UbuntuRemoteRunControlFactory);
2312 addAutoReleasedObject(new UbuntuLocalRunControlFactory);
2313
2314+
2315+ addAutoReleasedObject(new SnapcraftProjectManager);
2316+ addAutoReleasedObject(new SnapcraftBuildConfigurationFactory);
2317+ addAutoReleasedObject(new SnapcraftBuildStepFactory);
2318+
2319+ ProjectExplorer::KitManager::registerKitInformation(new SnapcraftKitInformation);
2320+
2321 // Build support
2322 addAutoReleasedObject(new ClickToolChainFactory);
2323 addAutoReleasedObject(new UbuntuHtmlBuildConfigurationFactory);
2324@@ -379,6 +391,7 @@
2325
2326 while (!ok) {
2327 QProcess proc;
2328+ qDebug()<<"Running "<<Constants::UBUNTU_TARGET_TOOL;
2329 proc.setProgram(Constants::UBUNTU_TARGET_TOOL);
2330
2331 QStringList args{QStringLiteral("initialized")};
2332@@ -407,8 +420,7 @@
2333 if (Settings::askForContainerSetup()) {
2334 QString text = tr("The container backend is not completely initialized.\n\n"
2335 "Create default configuration?\n"
2336- "Not setting up the container configuration will\nmake it impossible to run applications locally.\n\n"
2337- "Note: Will override existing LXD configurations."
2338+ "Not setting up the container configuration will\nmake it impossible to run applications locally."
2339 );
2340
2341 QMessageBox box(QMessageBox::Question, qApp->applicationName(),text, QMessageBox::Yes | QMessageBox::No | QMessageBox::Abort, Core::ICore::mainWindow());
2342
2343=== added directory 'dist/yaml-cpp'
2344=== added file 'dist/yaml-cpp/.clang-format'
2345--- dist/yaml-cpp/.clang-format 1970-01-01 00:00:00 +0000
2346+++ dist/yaml-cpp/.clang-format 2016-10-18 07:57:32 +0000
2347@@ -0,0 +1,47 @@
2348+---
2349+# BasedOnStyle: Google
2350+AccessModifierOffset: -1
2351+ConstructorInitializerIndentWidth: 4
2352+AlignEscapedNewlinesLeft: true
2353+AlignTrailingComments: true
2354+AllowAllParametersOfDeclarationOnNextLine: true
2355+AllowShortIfStatementsOnASingleLine: false
2356+AllowShortLoopsOnASingleLine: false
2357+AlwaysBreakTemplateDeclarations: true
2358+AlwaysBreakBeforeMultilineStrings: true
2359+BreakBeforeBinaryOperators: false
2360+BreakBeforeTernaryOperators: true
2361+BreakConstructorInitializersBeforeComma: false
2362+BinPackParameters: true
2363+ColumnLimit: 80
2364+ConstructorInitializerAllOnOneLineOrOnePerLine: true
2365+DerivePointerBinding: true
2366+ExperimentalAutoDetectBinPacking: false
2367+IndentCaseLabels: true
2368+MaxEmptyLinesToKeep: 1
2369+NamespaceIndentation: None
2370+ObjCSpaceBeforeProtocolList: false
2371+PenaltyBreakBeforeFirstCallParameter: 1
2372+PenaltyBreakComment: 60
2373+PenaltyBreakString: 1000
2374+PenaltyBreakFirstLessLess: 120
2375+PenaltyExcessCharacter: 1000000
2376+PenaltyReturnTypeOnItsOwnLine: 200
2377+PointerBindsToType: true
2378+SpacesBeforeTrailingComments: 2
2379+Cpp11BracedListStyle: true
2380+Standard: Auto
2381+IndentWidth: 2
2382+TabWidth: 8
2383+UseTab: Never
2384+BreakBeforeBraces: Attach
2385+IndentFunctionDeclarationAfterType: true
2386+SpacesInParentheses: false
2387+SpacesInAngles: false
2388+SpaceInEmptyParentheses: false
2389+SpacesInCStyleCastParentheses: false
2390+SpaceAfterControlStatementKeyword: true
2391+SpaceBeforeAssignmentOperators: true
2392+ContinuationIndentWidth: 4
2393+...
2394+
2395
2396=== added file 'dist/yaml-cpp/.hgeol'
2397--- dist/yaml-cpp/.hgeol 1970-01-01 00:00:00 +0000
2398+++ dist/yaml-cpp/.hgeol 2016-10-18 07:57:32 +0000
2399@@ -0,0 +1,4 @@
2400+**.h = native
2401+**.c = native
2402+**.cpp = native
2403+**.txt = native
2404
2405=== added file 'dist/yaml-cpp/.hgignore'
2406--- dist/yaml-cpp/.hgignore 1970-01-01 00:00:00 +0000
2407+++ dist/yaml-cpp/.hgignore 2016-10-18 07:57:32 +0000
2408@@ -0,0 +1,1 @@
2409+syntax: glob
2410
2411=== added directory 'dist/yaml-cpp/.pc'
2412=== added file 'dist/yaml-cpp/.pc/.quilt_patches'
2413--- dist/yaml-cpp/.pc/.quilt_patches 1970-01-01 00:00:00 +0000
2414+++ dist/yaml-cpp/.pc/.quilt_patches 2016-10-18 07:57:32 +0000
2415@@ -0,0 +1,1 @@
2416+debian/patches
2417
2418=== added file 'dist/yaml-cpp/.pc/.quilt_series'
2419--- dist/yaml-cpp/.pc/.quilt_series 1970-01-01 00:00:00 +0000
2420+++ dist/yaml-cpp/.pc/.quilt_series 2016-10-18 07:57:32 +0000
2421@@ -0,0 +1,1 @@
2422+series
2423
2424=== added file 'dist/yaml-cpp/.pc/.version'
2425--- dist/yaml-cpp/.pc/.version 1970-01-01 00:00:00 +0000
2426+++ dist/yaml-cpp/.pc/.version 2016-10-18 07:57:32 +0000
2427@@ -0,0 +1,1 @@
2428+2
2429
2430=== added file 'dist/yaml-cpp/.pc/applied-patches'
2431--- dist/yaml-cpp/.pc/applied-patches 1970-01-01 00:00:00 +0000
2432+++ dist/yaml-cpp/.pc/applied-patches 2016-10-18 07:57:32 +0000
2433@@ -0,0 +1,2 @@
2434+pkgconfig.patch
2435+install-cmake-dev-files.patch
2436
2437=== added directory 'dist/yaml-cpp/.pc/install-cmake-dev-files.patch'
2438=== added file 'dist/yaml-cpp/.pc/install-cmake-dev-files.patch/CMakeLists.txt'
2439--- dist/yaml-cpp/.pc/install-cmake-dev-files.patch/CMakeLists.txt 1970-01-01 00:00:00 +0000
2440+++ dist/yaml-cpp/.pc/install-cmake-dev-files.patch/CMakeLists.txt 2016-10-18 07:57:32 +0000
2441@@ -0,0 +1,340 @@
2442+###
2443+### CMake settings
2444+###
2445+## Due to Mac OSX we need to keep compatibility with CMake 2.6
2446+# see http://www.cmake.org/Wiki/CMake_Policies
2447+cmake_minimum_required(VERSION 2.6)
2448+# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0012
2449+if(POLICY CMP0012)
2450+ cmake_policy(SET CMP0012 OLD)
2451+endif()
2452+# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0015
2453+if(POLICY CMP0015)
2454+ cmake_policy(SET CMP0015 OLD)
2455+endif()
2456+
2457+include(CheckCXXCompilerFlag)
2458+
2459+
2460+###
2461+### Project settings
2462+###
2463+project(YAML_CPP)
2464+
2465+set(YAML_CPP_VERSION_MAJOR "0")
2466+set(YAML_CPP_VERSION_MINOR "5")
2467+set(YAML_CPP_VERSION_PATCH "2")
2468+set(YAML_CPP_VERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}.${YAML_CPP_VERSION_PATCH}")
2469+
2470+enable_testing()
2471+
2472+
2473+###
2474+### Project options
2475+###
2476+## Project stuff
2477+option(YAML_CPP_BUILD_TOOLS "Enable testing and parse tools" ON)
2478+option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON)
2479+
2480+## Build options
2481+# --> General
2482+# see http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:BUILD_SHARED_LIBS
2483+# http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_library
2484+option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
2485+
2486+# --> Apple
2487+option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF)
2488+
2489+# --> Microsoft Visual C++
2490+# see http://msdn.microsoft.com/en-us/library/aa278396(v=VS.60).aspx
2491+# http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=VS.71).aspx
2492+option(MSVC_SHARED_RT "MSVC: Build with shared runtime libs (/MD)" ON)
2493+option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (/ML until VS .NET 2003)" OFF)
2494+
2495+###
2496+### Sources, headers, directories and libs
2497+###
2498+
2499+# From http://www.cmake.org/pipermail/cmake/2010-March/035992.html:
2500+# function to collect all the sources from sub-directories
2501+# into a single list
2502+function(add_sources)
2503+ get_property(is_defined GLOBAL PROPERTY SRCS_LIST DEFINED)
2504+ if(NOT is_defined)
2505+ define_property(GLOBAL PROPERTY SRCS_LIST
2506+ BRIEF_DOCS "List of source files"
2507+ FULL_DOCS "List of all source files in the entire project")
2508+ endif()
2509+ # make absolute paths
2510+ set(SRCS)
2511+ foreach(s IN LISTS ARGN)
2512+ if(NOT IS_ABSOLUTE "${s}")
2513+ get_filename_component(s "${s}" ABSOLUTE)
2514+ endif()
2515+ list(APPEND SRCS "${s}")
2516+ endforeach()
2517+ # append to global list
2518+ set_property(GLOBAL APPEND PROPERTY SRCS_LIST "${SRCS}")
2519+endfunction(add_sources)
2520+
2521+set(header_directory "include/yaml-cpp/")
2522+
2523+file(GLOB sources "src/[a-zA-Z]*.cpp")
2524+file(GLOB_RECURSE public_headers "include/yaml-cpp/[a-zA-Z]*.h")
2525+file(GLOB private_headers "src/[a-zA-Z]*.h")
2526+
2527+if(YAML_CPP_BUILD_CONTRIB)
2528+ file(GLOB contrib_sources "src/contrib/[a-zA-Z]*.cpp")
2529+ file(GLOB contrib_public_headers "include/yaml-cpp/contrib/[a-zA-Z]*.h")
2530+ file(GLOB contrib_private_headers "src/contrib/[a-zA-Z]*.h")
2531+else()
2532+ add_definitions(-DYAML_CPP_NO_CONTRIB)
2533+endif()
2534+
2535+set(library_sources
2536+ ${sources}
2537+ ${public_headers}
2538+ ${private_headers}
2539+ ${contrib_sources}
2540+ ${contrib_public_headers}
2541+ ${contrib_private_headers}
2542+)
2543+add_sources(${library_sources})
2544+
2545+if(VERBOSE)
2546+ message(STATUS "sources: ${sources}")
2547+ message(STATUS "public_headers: ${public_headers}")
2548+ message(STATUS "private_headers: ${private_headers}")
2549+ message(STATUS "contrib_sources: ${contrib_sources}")
2550+ message(STATUS "contrib_public_headers: ${contrib_public_headers}")
2551+ message(STATUS "contrib_private_headers: ${contrib_private_headers}")
2552+endif()
2553+
2554+include_directories(${YAML_CPP_SOURCE_DIR}/src)
2555+include_directories(${YAML_CPP_SOURCE_DIR}/include)
2556+
2557+find_package(Boost REQUIRED)
2558+include_directories(${Boost_INCLUDE_DIRS})
2559+
2560+
2561+###
2562+### General compilation settings
2563+###
2564+set(yaml_c_flags ${CMAKE_C_FLAGS})
2565+set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})
2566+
2567+if(BUILD_SHARED_LIBS)
2568+ set(LABEL_SUFFIX "shared")
2569+else()
2570+ set(LABEL_SUFFIX "static")
2571+endif()
2572+
2573+if(APPLE)
2574+ if(APPLE_UNIVERSAL_BIN)
2575+ set(CMAKE_OSX_ARCHITECTURES ppc;i386)
2576+ endif()
2577+endif()
2578+
2579+if(IPHONE)
2580+ set(CMAKE_OSX_SYSROOT "iphoneos4.2")
2581+ set(CMAKE_OSX_ARCHITECTURES "armv6;armv7")
2582+endif()
2583+
2584+if(WIN32)
2585+ if(BUILD_SHARED_LIBS)
2586+ add_definitions(-D${PROJECT_NAME}_DLL) # use or build Windows DLL
2587+ endif()
2588+ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
2589+ set(CMAKE_INSTALL_PREFIX "C:/")
2590+ endif()
2591+endif()
2592+
2593+# GCC or Clang specialities
2594+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
2595+ "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
2596+ ### General stuff
2597+ if(WIN32)
2598+ set(CMAKE_SHARED_LIBRARY_PREFIX "") # DLLs do not have a "lib" prefix
2599+ set(CMAKE_IMPORT_LIBRARY_PREFIX "") # same for DLL import libs
2600+ set(CMAKE_LINK_DEF_FILE_FLAG "") # CMake workaround (2.8.3)
2601+ endif()
2602+
2603+ ### Project stuff
2604+ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
2605+ set(CMAKE_BUILD_TYPE Release)
2606+ endif()
2607+ #
2608+ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
2609+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
2610+ set(CMAKE_CXX_FLAGS_DEBUG "-g")
2611+ set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
2612+ #
2613+ set(GCC_EXTRA_OPTIONS "")
2614+ #
2615+ set(FLAG_TESTED "-Wextra")
2616+ check_cxx_compiler_flag(${FLAG_TESTED} FLAG_WEXTRA)
2617+ if(FLAG_WEXTRA)
2618+ set(GCC_EXTRA_OPTIONS "${GCC_EXTRA_OPTIONS} ${FLAG_TESTED}")
2619+ endif()
2620+ #
2621+ set(yaml_cxx_flags "-Wall ${GCC_EXTRA_OPTIONS} -pedantic -Wno-long-long ${yaml_cxx_flags}")
2622+
2623+ ### Make specific
2624+ if(${CMAKE_BUILD_TOOL} MATCHES make OR ${CMAKE_BUILD_TOOL} MATCHES gmake)
2625+ add_custom_target(debuggable $(MAKE) clean
2626+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
2627+ COMMENT "Adjusting settings for debug compilation"
2628+ VERBATIM)
2629+ add_custom_target(releasable $(MAKE) clean
2630+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
2631+ COMMENT "Adjusting settings for release compilation"
2632+ VERBATIM)
2633+ endif()
2634+endif()
2635+
2636+# Microsoft VisualC++ specialities
2637+if(MSVC)
2638+ ### General stuff
2639+ # a) Change MSVC runtime library settings (/MD[d], /MT[d], /ML[d] (single-threaded until VS 2003))
2640+ # plus set lib suffix for later use and project label accordingly
2641+ # see http://msdn.microsoft.com/en-us/library/aa278396(v=VS.60).aspx
2642+ # http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=VS.71).aspx
2643+ set(LIB_RT_SUFFIX "md") # CMake defaults to /MD for MSVC
2644+ set(LIB_RT_OPTION "/MD")
2645+ #
2646+ if(NOT MSVC_SHARED_RT) # User wants to have static runtime libraries (/MT, /ML)
2647+ if(MSVC_STHREADED_RT) # User wants to have old single-threaded static runtime libraries
2648+ set(LIB_RT_SUFFIX "ml")
2649+ set(LIB_RT_OPTION "/ML")
2650+ if(NOT ${MSVC_VERSION} LESS 1400)
2651+ message(FATAL_ERROR "Single-threaded static runtime libraries (/ML) only available until VS .NET 2003 (7.1).")
2652+ endif()
2653+ else()
2654+ set(LIB_RT_SUFFIX "mt")
2655+ set(LIB_RT_OPTION "/MT")
2656+ endif()
2657+
2658+ # correct linker options
2659+ foreach(flag_var yaml_c_flags yaml_cxx_flags)
2660+ foreach(config_name "" DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
2661+ set(var_name "${flag_var}")
2662+ if(NOT "${config_name}" STREQUAL "")
2663+ set(var_name "${var_name}_${config_name}")
2664+ endif()
2665+ string(REPLACE "/MD" "${LIB_RT_OPTION}" ${var_name} "${${var_name}}")
2666+ endforeach()
2667+ endforeach()
2668+ endif()
2669+ #
2670+ set(LABEL_SUFFIX "${LABEL_SUFFIX} ${LIB_RT_SUFFIX}")
2671+
2672+ # b) Change prefix for static libraries
2673+ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") # to distinguish static libraries from DLL import libs
2674+
2675+ # c) Correct suffixes for static libraries
2676+ if(NOT BUILD_SHARED_LIBS)
2677+ ### General stuff
2678+ set(LIB_TARGET_SUFFIX "${LIB_SUFFIX}${LIB_RT_SUFFIX}")
2679+ endif()
2680+
2681+ ### Project stuff
2682+ # /W3 = set warning level; see http://msdn.microsoft.com/en-us/library/thxezb7y.aspx
2683+ # /wd4127 = disable warning C4127 "conditional expression is constant"; see http://msdn.microsoft.com/en-us/library/6t66728h.aspx
2684+ # /wd4355 = disable warning C4355 "'this' : used in base member initializer list"; http://msdn.microsoft.com/en-us/library/3c594ae3.aspx
2685+ set(yaml_cxx_flags "/W3 /wd4127 /wd4355 ${yaml_cxx_flags}")
2686+endif()
2687+
2688+
2689+###
2690+### General install settings
2691+###
2692+if(WIN32)
2693+ set(_library_dir bin) # .dll are in PATH, like executables
2694+else()
2695+ set(_library_dir lib)
2696+endif()
2697+
2698+set(INCLUDE_INSTALL_ROOT_DIR include)
2699+
2700+set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp)
2701+set(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}")
2702+
2703+set(_INSTALL_DESTINATIONS
2704+ RUNTIME DESTINATION bin
2705+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
2706+ ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
2707+)
2708+
2709+
2710+###
2711+### Library
2712+###
2713+add_library(yaml-cpp ${library_sources})
2714+set_target_properties(yaml-cpp PROPERTIES
2715+ COMPILE_FLAGS "${yaml_c_flags} ${yaml_cxx_flags}"
2716+)
2717+
2718+set_target_properties(yaml-cpp PROPERTIES
2719+ VERSION "${YAML_CPP_VERSION}"
2720+ SOVERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}"
2721+ PROJECT_LABEL "yaml-cpp ${LABEL_SUFFIX}"
2722+)
2723+
2724+if(IPHONE)
2725+ set_target_properties(yaml-cpp PROPERTIES
2726+ XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "3.0"
2727+ )
2728+endif()
2729+
2730+if(MSVC)
2731+ if(NOT BUILD_SHARED_LIBS)
2732+ # correct library names
2733+ set_target_properties(yaml-cpp PROPERTIES
2734+ DEBUG_POSTFIX "${LIB_TARGET_SUFFIX}d"
2735+ RELEASE_POSTFIX "${LIB_TARGET_SUFFIX}"
2736+ MINSIZEREL_POSTFIX "${LIB_TARGET_SUFFIX}"
2737+ RELWITHDEBINFO_POSTFIX "${LIB_TARGET_SUFFIX}"
2738+ )
2739+ endif()
2740+endif()
2741+
2742+install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS})
2743+install(
2744+ DIRECTORY ${header_directory}
2745+ DESTINATION ${INCLUDE_INSTALL_DIR}
2746+ FILES_MATCHING PATTERN "*.h"
2747+)
2748+
2749+export(
2750+ TARGETS yaml-cpp
2751+ FILE "${PROJECT_BINARY_DIR}/yaml-cpp-targets.cmake")
2752+export(PACKAGE yaml-cpp)
2753+set(EXPORT_TARGETS yaml-cpp CACHE INTERNAL "export targets")
2754+
2755+set(CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR}/include")
2756+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
2757+ "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" @ONLY)
2758+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in
2759+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY)
2760+
2761+if(UNIX)
2762+ set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc)
2763+ configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)
2764+ install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
2765+endif()
2766+
2767+
2768+###
2769+### Extras
2770+###
2771+if(YAML_CPP_BUILD_TOOLS)
2772+ add_subdirectory(test)
2773+ add_subdirectory(util)
2774+endif()
2775+
2776+### Formatting
2777+get_property(all_sources GLOBAL PROPERTY SRCS_LIST)
2778+add_custom_target(format
2779+ COMMAND clang-format --style=file -i ${all_sources}
2780+ COMMENT "Running clang-format"
2781+ VERBATIM)
2782
2783=== added directory 'dist/yaml-cpp/.pc/pkgconfig.patch'
2784=== added file 'dist/yaml-cpp/.pc/pkgconfig.patch/yaml-cpp.pc.cmake'
2785--- dist/yaml-cpp/.pc/pkgconfig.patch/yaml-cpp.pc.cmake 1970-01-01 00:00:00 +0000
2786+++ dist/yaml-cpp/.pc/pkgconfig.patch/yaml-cpp.pc.cmake 2016-10-18 07:57:32 +0000
2787@@ -0,0 +1,11 @@
2788+prefix=@CMAKE_INSTALL_PREFIX@
2789+exec_prefix=@CMAKE_INSTALL_PREFIX@
2790+libdir=${prefix}/@LIB_INSTALL_DIR@
2791+includedir=${prefix}/@INCLUDE_INSTALL_ROOT_DIR@
2792+
2793+Name: Yaml-cpp
2794+Description: A YAML parser and emitter for C++
2795+Version: @YAML_CPP_VERSION@
2796+Requires:
2797+Libs: -L${libdir} -lyaml-cpp
2798+Cflags: -I${includedir}
2799
2800=== added file 'dist/yaml-cpp/CMakeLists.txt'
2801--- dist/yaml-cpp/CMakeLists.txt 1970-01-01 00:00:00 +0000
2802+++ dist/yaml-cpp/CMakeLists.txt 2016-10-18 07:57:32 +0000
2803@@ -0,0 +1,356 @@
2804+###
2805+### CMake settings
2806+###
2807+## Due to Mac OSX we need to keep compatibility with CMake 2.6
2808+# see http://www.cmake.org/Wiki/CMake_Policies
2809+cmake_minimum_required(VERSION 2.6)
2810+# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0012
2811+if(POLICY CMP0012)
2812+ cmake_policy(SET CMP0012 OLD)
2813+endif()
2814+# see http://www.cmake.org/cmake/help/cmake-2-8-docs.html#policy:CMP0015
2815+if(POLICY CMP0015)
2816+ cmake_policy(SET CMP0015 OLD)
2817+endif()
2818+
2819+include(CheckCXXCompilerFlag)
2820+
2821+
2822+###
2823+### Project settings
2824+###
2825+project(YAML_CPP)
2826+
2827+set(YAML_CPP_VERSION_MAJOR "0")
2828+set(YAML_CPP_VERSION_MINOR "5")
2829+set(YAML_CPP_VERSION_PATCH "2")
2830+set(YAML_CPP_VERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}.${YAML_CPP_VERSION_PATCH}")
2831+
2832+enable_testing()
2833+
2834+
2835+###
2836+### Project options
2837+###
2838+## Project stuff
2839+option(YAML_CPP_BUILD_TOOLS "Enable testing and parse tools" ON)
2840+option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON)
2841+
2842+## Build options
2843+# --> General
2844+# see http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:BUILD_SHARED_LIBS
2845+# http://www.cmake.org/cmake/help/cmake2.6docs.html#command:add_library
2846+option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
2847+
2848+# --> Apple
2849+option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF)
2850+
2851+# --> Microsoft Visual C++
2852+# see http://msdn.microsoft.com/en-us/library/aa278396(v=VS.60).aspx
2853+# http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=VS.71).aspx
2854+option(MSVC_SHARED_RT "MSVC: Build with shared runtime libs (/MD)" ON)
2855+option(MSVC_STHREADED_RT "MSVC: Build with single-threaded static runtime libs (/ML until VS .NET 2003)" OFF)
2856+
2857+###
2858+### Sources, headers, directories and libs
2859+###
2860+
2861+# From http://www.cmake.org/pipermail/cmake/2010-March/035992.html:
2862+# function to collect all the sources from sub-directories
2863+# into a single list
2864+function(add_sources)
2865+ get_property(is_defined GLOBAL PROPERTY SRCS_LIST DEFINED)
2866+ if(NOT is_defined)
2867+ define_property(GLOBAL PROPERTY SRCS_LIST
2868+ BRIEF_DOCS "List of source files"
2869+ FULL_DOCS "List of all source files in the entire project")
2870+ endif()
2871+ # make absolute paths
2872+ set(SRCS)
2873+ foreach(s IN LISTS ARGN)
2874+ if(NOT IS_ABSOLUTE "${s}")
2875+ get_filename_component(s "${s}" ABSOLUTE)
2876+ endif()
2877+ list(APPEND SRCS "${s}")
2878+ endforeach()
2879+ # append to global list
2880+ set_property(GLOBAL APPEND PROPERTY SRCS_LIST "${SRCS}")
2881+endfunction(add_sources)
2882+
2883+set(header_directory "include/yaml-cpp/")
2884+
2885+file(GLOB sources "src/[a-zA-Z]*.cpp")
2886+file(GLOB_RECURSE public_headers "include/yaml-cpp/[a-zA-Z]*.h")
2887+file(GLOB private_headers "src/[a-zA-Z]*.h")
2888+
2889+if(YAML_CPP_BUILD_CONTRIB)
2890+ file(GLOB contrib_sources "src/contrib/[a-zA-Z]*.cpp")
2891+ file(GLOB contrib_public_headers "include/yaml-cpp/contrib/[a-zA-Z]*.h")
2892+ file(GLOB contrib_private_headers "src/contrib/[a-zA-Z]*.h")
2893+else()
2894+ add_definitions(-DYAML_CPP_NO_CONTRIB)
2895+endif()
2896+
2897+set(library_sources
2898+ ${sources}
2899+ ${public_headers}
2900+ ${private_headers}
2901+ ${contrib_sources}
2902+ ${contrib_public_headers}
2903+ ${contrib_private_headers}
2904+)
2905+add_sources(${library_sources})
2906+
2907+if(VERBOSE)
2908+ message(STATUS "sources: ${sources}")
2909+ message(STATUS "public_headers: ${public_headers}")
2910+ message(STATUS "private_headers: ${private_headers}")
2911+ message(STATUS "contrib_sources: ${contrib_sources}")
2912+ message(STATUS "contrib_public_headers: ${contrib_public_headers}")
2913+ message(STATUS "contrib_private_headers: ${contrib_private_headers}")
2914+endif()
2915+
2916+include_directories(${YAML_CPP_SOURCE_DIR}/src)
2917+include_directories(${YAML_CPP_SOURCE_DIR}/include)
2918+
2919+find_package(Boost REQUIRED)
2920+include_directories(${Boost_INCLUDE_DIRS})
2921+
2922+
2923+###
2924+### General compilation settings
2925+###
2926+set(yaml_c_flags ${CMAKE_C_FLAGS})
2927+set(yaml_cxx_flags ${CMAKE_CXX_FLAGS})
2928+
2929+if(BUILD_SHARED_LIBS)
2930+ set(LABEL_SUFFIX "shared")
2931+else()
2932+ set(LABEL_SUFFIX "static")
2933+endif()
2934+
2935+if(APPLE)
2936+ if(APPLE_UNIVERSAL_BIN)
2937+ set(CMAKE_OSX_ARCHITECTURES ppc;i386)
2938+ endif()
2939+endif()
2940+
2941+if(IPHONE)
2942+ set(CMAKE_OSX_SYSROOT "iphoneos4.2")
2943+ set(CMAKE_OSX_ARCHITECTURES "armv6;armv7")
2944+endif()
2945+
2946+if(WIN32)
2947+ if(BUILD_SHARED_LIBS)
2948+ add_definitions(-D${PROJECT_NAME}_DLL) # use or build Windows DLL
2949+ endif()
2950+ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
2951+ set(CMAKE_INSTALL_PREFIX "C:/")
2952+ endif()
2953+endif()
2954+
2955+# GCC or Clang specialities
2956+if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
2957+ "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
2958+ ### General stuff
2959+ if(WIN32)
2960+ set(CMAKE_SHARED_LIBRARY_PREFIX "") # DLLs do not have a "lib" prefix
2961+ set(CMAKE_IMPORT_LIBRARY_PREFIX "") # same for DLL import libs
2962+ set(CMAKE_LINK_DEF_FILE_FLAG "") # CMake workaround (2.8.3)
2963+ endif()
2964+
2965+ ### Project stuff
2966+ if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
2967+ set(CMAKE_BUILD_TYPE Release)
2968+ endif()
2969+ #
2970+ set(CMAKE_CXX_FLAGS_RELEASE "-O2")
2971+ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
2972+ set(CMAKE_CXX_FLAGS_DEBUG "-g")
2973+ set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
2974+ #
2975+ set(GCC_EXTRA_OPTIONS "")
2976+ #
2977+ set(FLAG_TESTED "-Wextra")
2978+ check_cxx_compiler_flag(${FLAG_TESTED} FLAG_WEXTRA)
2979+ if(FLAG_WEXTRA)
2980+ set(GCC_EXTRA_OPTIONS "${GCC_EXTRA_OPTIONS} ${FLAG_TESTED}")
2981+ endif()
2982+ #
2983+ set(yaml_cxx_flags "-Wall ${GCC_EXTRA_OPTIONS} -pedantic -Wno-long-long ${yaml_cxx_flags}")
2984+
2985+ ### Make specific
2986+ if(${CMAKE_BUILD_TOOL} MATCHES make OR ${CMAKE_BUILD_TOOL} MATCHES gmake)
2987+ add_custom_target(debuggable $(MAKE) clean
2988+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
2989+ COMMENT "Adjusting settings for debug compilation"
2990+ VERBATIM)
2991+ add_custom_target(releasable $(MAKE) clean
2992+ COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
2993+ COMMENT "Adjusting settings for release compilation"
2994+ VERBATIM)
2995+ endif()
2996+endif()
2997+
2998+# Microsoft VisualC++ specialities
2999+if(MSVC)
3000+ ### General stuff
3001+ # a) Change MSVC runtime library settings (/MD[d], /MT[d], /ML[d] (single-threaded until VS 2003))
3002+ # plus set lib suffix for later use and project label accordingly
3003+ # see http://msdn.microsoft.com/en-us/library/aa278396(v=VS.60).aspx
3004+ # http://msdn.microsoft.com/en-us/library/2kzt1wy3(v=VS.71).aspx
3005+ set(LIB_RT_SUFFIX "md") # CMake defaults to /MD for MSVC
3006+ set(LIB_RT_OPTION "/MD")
3007+ #
3008+ if(NOT MSVC_SHARED_RT) # User wants to have static runtime libraries (/MT, /ML)
3009+ if(MSVC_STHREADED_RT) # User wants to have old single-threaded static runtime libraries
3010+ set(LIB_RT_SUFFIX "ml")
3011+ set(LIB_RT_OPTION "/ML")
3012+ if(NOT ${MSVC_VERSION} LESS 1400)
3013+ message(FATAL_ERROR "Single-threaded static runtime libraries (/ML) only available until VS .NET 2003 (7.1).")
3014+ endif()
3015+ else()
3016+ set(LIB_RT_SUFFIX "mt")
3017+ set(LIB_RT_OPTION "/MT")
3018+ endif()
3019+
3020+ # correct linker options
3021+ foreach(flag_var yaml_c_flags yaml_cxx_flags)
3022+ foreach(config_name "" DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
3023+ set(var_name "${flag_var}")
3024+ if(NOT "${config_name}" STREQUAL "")
3025+ set(var_name "${var_name}_${config_name}")
3026+ endif()
3027+ string(REPLACE "/MD" "${LIB_RT_OPTION}" ${var_name} "${${var_name}}")
3028+ endforeach()
3029+ endforeach()
3030+ endif()
3031+ #
3032+ set(LABEL_SUFFIX "${LABEL_SUFFIX} ${LIB_RT_SUFFIX}")
3033+
3034+ # b) Change prefix for static libraries
3035+ set(CMAKE_STATIC_LIBRARY_PREFIX "lib") # to distinguish static libraries from DLL import libs
3036+
3037+ # c) Correct suffixes for static libraries
3038+ if(NOT BUILD_SHARED_LIBS)
3039+ ### General stuff
3040+ set(LIB_TARGET_SUFFIX "${LIB_SUFFIX}${LIB_RT_SUFFIX}")
3041+ endif()
3042+
3043+ ### Project stuff
3044+ # /W3 = set warning level; see http://msdn.microsoft.com/en-us/library/thxezb7y.aspx
3045+ # /wd4127 = disable warning C4127 "conditional expression is constant"; see http://msdn.microsoft.com/en-us/library/6t66728h.aspx
3046+ # /wd4355 = disable warning C4355 "'this' : used in base member initializer list"; http://msdn.microsoft.com/en-us/library/3c594ae3.aspx
3047+ set(yaml_cxx_flags "/W3 /wd4127 /wd4355 ${yaml_cxx_flags}")
3048+endif()
3049+
3050+
3051+###
3052+### General install settings
3053+###
3054+if(WIN32)
3055+ set(_library_dir bin) # .dll are in PATH, like executables
3056+else()
3057+ set(_library_dir ${CMAKE_INSTALL_PREFIX}/lib)
3058+endif()
3059+
3060+set(INCLUDE_INSTALL_ROOT_DIR include)
3061+
3062+set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp)
3063+SET(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}" CACHE
3064+ "Directory relative to CMAKE_INSTALL_PREFIX in which to install libraries"
3065+ STRING)
3066+MARK_AS_ADVANCED(LIB_INSTALL_DIR)
3067+
3068+set(_INSTALL_DESTINATIONS
3069+ RUNTIME DESTINATION bin
3070+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
3071+ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
3072+)
3073+
3074+
3075+###
3076+### Library
3077+###
3078+add_library(yaml-cpp ${library_sources})
3079+set_target_properties(yaml-cpp PROPERTIES
3080+ COMPILE_FLAGS "${yaml_c_flags} ${yaml_cxx_flags}"
3081+)
3082+
3083+set_target_properties(yaml-cpp PROPERTIES
3084+ VERSION "${YAML_CPP_VERSION}"
3085+ SOVERSION "${YAML_CPP_VERSION_MAJOR}.${YAML_CPP_VERSION_MINOR}"
3086+ PROJECT_LABEL "yaml-cpp ${LABEL_SUFFIX}"
3087+)
3088+
3089+if(IPHONE)
3090+ set_target_properties(yaml-cpp PROPERTIES
3091+ XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "3.0"
3092+ )
3093+endif()
3094+
3095+if(MSVC)
3096+ if(NOT BUILD_SHARED_LIBS)
3097+ # correct library names
3098+ set_target_properties(yaml-cpp PROPERTIES
3099+ DEBUG_POSTFIX "${LIB_TARGET_SUFFIX}d"
3100+ RELEASE_POSTFIX "${LIB_TARGET_SUFFIX}"
3101+ MINSIZEREL_POSTFIX "${LIB_TARGET_SUFFIX}"
3102+ RELWITHDEBINFO_POSTFIX "${LIB_TARGET_SUFFIX}"
3103+ )
3104+ endif()
3105+endif()
3106+
3107+install(TARGETS yaml-cpp EXPORT yaml-cpp-targets ${_INSTALL_DESTINATIONS})
3108+install(
3109+ DIRECTORY ${header_directory}
3110+ DESTINATION ${INCLUDE_INSTALL_DIR}
3111+ FILES_MATCHING PATTERN "*.h"
3112+)
3113+
3114+export(
3115+ TARGETS yaml-cpp
3116+ FILE "${PROJECT_BINARY_DIR}/yaml-cpp-targets.cmake")
3117+export(PACKAGE yaml-cpp)
3118+set(EXPORT_TARGETS yaml-cpp CACHE INTERNAL "export targets")
3119+
3120+set(CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR}/include")
3121+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
3122+ "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" @ONLY)
3123+
3124+set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp)
3125+file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/include")
3126+set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
3127+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
3128+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)
3129+
3130+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in
3131+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY)
3132+
3133+install(FILES
3134+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake"
3135+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
3136+ DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
3137+install(EXPORT yaml-cpp-targets DESTINATION ${INSTALL_CMAKE_DIR})
3138+
3139+if(UNIX)
3140+ set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc)
3141+ configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)
3142+ install(FILES ${PC_FILE} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
3143+endif()
3144+
3145+
3146+###
3147+### Extras
3148+###
3149+if(YAML_CPP_BUILD_TOOLS)
3150+ add_subdirectory(test)
3151+ add_subdirectory(util)
3152+endif()
3153+
3154+### Formatting
3155+get_property(all_sources GLOBAL PROPERTY SRCS_LIST)
3156+add_custom_target(format
3157+ COMMAND clang-format --style=file -i ${all_sources}
3158+ COMMENT "Running clang-format"
3159+ VERBATIM)
3160
3161=== added directory 'dist/yaml-cpp/debian'
3162=== added file 'dist/yaml-cpp/debian/changelog'
3163--- dist/yaml-cpp/debian/changelog 1970-01-01 00:00:00 +0000
3164+++ dist/yaml-cpp/debian/changelog 2016-10-18 07:57:32 +0000
3165@@ -0,0 +1,56 @@
3166+yaml-cpp (0.5.2-3) unstable; urgency=medium
3167+
3168+ * Fix error in yaml-cpp-config.cmake
3169+ * Disable gtest's use of pthread on hurd and kfreebsd
3170+
3171+ -- Paul Novotny <paul@paulnovo.us> Mon, 30 Nov 2015 16:53:57 -0500
3172+
3173+yaml-cpp (0.5.2-2) unstable; urgency=medium
3174+
3175+ * Rename libyaml-cpp0.5 to libyaml-cpp0.5v5 for gcc5 transition
3176+ (Closes: #791317)
3177+
3178+ -- Paul Novotny <paul@paulnovo.us> Tue, 04 Aug 2015 18:03:35 -0400
3179+
3180+yaml-cpp (0.5.2-1) unstable; urgency=medium
3181+
3182+ * Update due to yaml-cpp from Google Code to GitHub
3183+ * Imported Upstream version 0.5.2
3184+ * Remove patches/fix-unit-test.patch, applied upstream
3185+ * Remove patches/remove-conflicting-google-libs.patch, applied upstream
3186+
3187+ -- Paul Novotny <paul@paulnovo.us> Thu, 23 Apr 2015 16:40:20 -0400
3188+
3189+yaml-cpp (0.5.1+hg20150210-1) experimental; urgency=medium
3190+
3191+ [ Andreas Tille ]
3192+ * Import latest upstream
3193+ * Fix failing unit tests
3194+ * Inject package into collab-maint to enable more people contributing
3195+ * cme fix dpkg-control
3196+ * debhelper 9
3197+
3198+ [ Paul Novotny ]
3199+ * Add myself as Uploader
3200+ * Import latest upstream VCS status
3201+ * Fix failing unit tests, update version number
3202+ * Install cmake development files
3203+
3204+ -- Andreas Tille <tille@debian.org> Mon, 09 Feb 2015 13:36:42 +0100
3205+
3206+yaml-cpp (0.5.1-1) unstable; urgency=low
3207+
3208+ * New upstream release. (Closes: #706708)
3209+ * Bump Standards-Version to 3.9.4.
3210+ * libyaml-cpp-dev: remove multiarch path in yaml-cpp.pc to make
3211+ lintian happy.
3212+ * debian/copyright: new Format URI.
3213+ * debian/control: remove Vcs-Svn field.
3214+
3215+ -- Lifeng Sun <lifongsun@gmail.com> Fri, 30 Aug 2013 18:29:05 +0800
3216+
3217+yaml-cpp (0.3.0-1) unstable; urgency=low
3218+
3219+ * Initial release (Closes: #636985)
3220+
3221+ -- Lifeng Sun <lifongsun@gmail.com> Sun, 03 Jun 2012 23:48:30 +0800
3222
3223=== added file 'dist/yaml-cpp/debian/compat'
3224--- dist/yaml-cpp/debian/compat 1970-01-01 00:00:00 +0000
3225+++ dist/yaml-cpp/debian/compat 2016-10-18 07:57:32 +0000
3226@@ -0,0 +1,1 @@
3227+9
3228
3229=== added file 'dist/yaml-cpp/debian/control'
3230--- dist/yaml-cpp/debian/control 1970-01-01 00:00:00 +0000
3231+++ dist/yaml-cpp/debian/control 2016-10-18 07:57:32 +0000
3232@@ -0,0 +1,39 @@
3233+Source: yaml-cpp
3234+Maintainer: Lifeng Sun <lifongsun@gmail.com>
3235+Uploaders: Andreas Tille <tille@debian.org>,
3236+ Paul Novotny <paul@paulnovo.us>
3237+Section: devel
3238+Priority: optional
3239+Build-Depends: debhelper (>= 9),
3240+ cmake,
3241+ libboost-dev
3242+Standards-Version: 3.9.6
3243+Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/yaml-cpp.git
3244+Vcs-Git: git://anonscm.debian.org/collab-maint/yaml-cpp.git
3245+Homepage: https://github.com/jbeder/yaml-cpp
3246+
3247+Package: libyaml-cpp0.5v5
3248+Architecture: any
3249+Multi-Arch: same
3250+Section: libs
3251+Depends: ${shlibs:Depends},
3252+ ${misc:Depends}
3253+Pre-Depends: ${misc:Pre-Depends}
3254+Conflicts: libyaml-cpp0.5
3255+Replaces: libyaml-cpp0.5
3256+Description: YAML parser and emitter for C++
3257+ yaml-cpp is a C++ library for parsing and emitting data in YAML 1.2, a
3258+ human-readable data serialization format.
3259+ .
3260+ This package provides run-time library of yaml-cpp.
3261+
3262+Package: libyaml-cpp-dev
3263+Architecture: any
3264+Section: libdevel
3265+Depends: libyaml-cpp0.5v5 (= ${binary:Version}),
3266+ ${misc:Depends}
3267+Description: YAML parser and emitter for C++ - development files
3268+ yaml-cpp is a C++ library for parsing and emitting data in YAML 1.2, a
3269+ human-readable data serialization format.
3270+ .
3271+ This package provides development files of yaml-cpp.
3272
3273=== added file 'dist/yaml-cpp/debian/copyright'
3274--- dist/yaml-cpp/debian/copyright 1970-01-01 00:00:00 +0000
3275+++ dist/yaml-cpp/debian/copyright 2016-10-18 07:57:32 +0000
3276@@ -0,0 +1,44 @@
3277+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
3278+Upstream-Name: yaml-cpp
3279+Source: https://github.com/jbeder/yaml-cpp
3280+
3281+Files: *
3282+Copyright: 2008 Jesse Beder <jbeder@gmail.com>
3283+License: X11
3284+ Permission is hereby granted, free of charge, to any person obtaining a
3285+ copy of this software and associated documentation files (the "Software"),
3286+ to deal in the Software without restriction, including without limitation
3287+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
3288+ and/or sell copies of the Software, and to permit persons to whom the
3289+ Software is furnished to do so, subject to the following conditions:
3290+ .
3291+ The above copyright notice and this permission notice shall be included
3292+ in all copies or substantial portions of the Software.
3293+ .
3294+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
3295+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
3296+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
3297+ IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
3298+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
3299+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
3300+ OTHER DEALINGS IN THE SOFTWARE.
3301+
3302+Files: debian/*
3303+Copyright: 2011-2013 Lifeng Sun <lifongsun@gmail.com>
3304+License: GPL-2.0+
3305+ This package is free software; you can redistribute it and/or modify
3306+ it under the terms of the GNU General Public License as published by
3307+ the Free Software Foundation; either version 2 of the License, or
3308+ (at your option) any later version.
3309+ .
3310+ This package is distributed in the hope that it will be useful,
3311+ but WITHOUT ANY WARRANTY; without even the implied warranty of
3312+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3313+ GNU General Public License for more details.
3314+ .
3315+ You should have received a copy of the GNU General Public License
3316+ along with this program. If not, see <http://www.gnu.org/licenses/>
3317+ .
3318+ On Debian systems, the complete text of the GNU General
3319+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
3320+
3321
3322=== added file 'dist/yaml-cpp/debian/libyaml-cpp-dev.install'
3323--- dist/yaml-cpp/debian/libyaml-cpp-dev.install 1970-01-01 00:00:00 +0000
3324+++ dist/yaml-cpp/debian/libyaml-cpp-dev.install 2016-10-18 07:57:32 +0000
3325@@ -0,0 +1,5 @@
3326+usr/include/
3327+usr/lib/*/*.a
3328+usr/lib/*/*.so
3329+usr/lib/*/pkgconfig/
3330+usr/lib/*/cmake/
3331
3332=== added file 'dist/yaml-cpp/debian/libyaml-cpp0.5v5.install'
3333--- dist/yaml-cpp/debian/libyaml-cpp0.5v5.install 1970-01-01 00:00:00 +0000
3334+++ dist/yaml-cpp/debian/libyaml-cpp0.5v5.install 2016-10-18 07:57:32 +0000
3335@@ -0,0 +1,1 @@
3336+usr/lib/*/libyaml-cpp.so.*
3337
3338=== added directory 'dist/yaml-cpp/debian/patches'
3339=== added file 'dist/yaml-cpp/debian/patches/install-cmake-dev-files.patch'
3340--- dist/yaml-cpp/debian/patches/install-cmake-dev-files.patch 1970-01-01 00:00:00 +0000
3341+++ dist/yaml-cpp/debian/patches/install-cmake-dev-files.patch 2016-10-18 07:57:32 +0000
3342@@ -0,0 +1,69 @@
3343+Description: Install libs and cmake files to the Debian location
3344+ Instead of moving the libs to the DEB_HOST_MULTIARCH lib directory during
3345+ packaging, have cmake install the libs directly. This is needed so the CMake
3346+ development files point to the correct location for the libs. Also, install
3347+ yaml-cpp-config.cmake, yaml-cpp-config-version.cmake, and
3348+ yaml-cpp-targets.cmake.
3349+Author: Paul Novotny <paul@paulnovo.us>
3350+Forwarded: not-needed
3351+Last-Update: 2015-11-29
3352+
3353+--- a/CMakeLists.txt
3354++++ b/CMakeLists.txt
3355+@@ -251,18 +251,21 @@
3356+ if(WIN32)
3357+ set(_library_dir bin) # .dll are in PATH, like executables
3358+ else()
3359+- set(_library_dir lib)
3360++ set(_library_dir ${CMAKE_INSTALL_PREFIX}/lib)
3361+ endif()
3362+
3363+ set(INCLUDE_INSTALL_ROOT_DIR include)
3364+
3365+ set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp)
3366+-set(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}")
3367++SET(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}" CACHE
3368++ "Directory relative to CMAKE_INSTALL_PREFIX in which to install libraries"
3369++ STRING)
3370++MARK_AS_ADVANCED(LIB_INSTALL_DIR)
3371+
3372+ set(_INSTALL_DESTINATIONS
3373+ RUNTIME DESTINATION bin
3374+ LIBRARY DESTINATION ${LIB_INSTALL_DIR}
3375+- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
3376++ ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
3377+ )
3378+
3379+
3380+@@ -298,7 +301,7 @@
3381+ endif()
3382+ endif()
3383+
3384+-install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS})
3385++install(TARGETS yaml-cpp EXPORT yaml-cpp-targets ${_INSTALL_DESTINATIONS})
3386+ install(
3387+ DIRECTORY ${header_directory}
3388+ DESTINATION ${INCLUDE_INSTALL_DIR}
3389+@@ -314,9 +317,22 @@
3390+ set(CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR}/include")
3391+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
3392+ "${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" @ONLY)
3393++
3394++set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp)
3395++file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${CMAKE_INSTALL_PREFIX}/include")
3396++set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
3397++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
3398++ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)
3399++
3400+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in
3401+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY)
3402+
3403++install(FILES
3404++ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake"
3405++ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
3406++ DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
3407++install(EXPORT yaml-cpp-targets DESTINATION ${INSTALL_CMAKE_DIR})
3408++
3409+ if(UNIX)
3410+ set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc)
3411+ configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)
3412
3413=== added file 'dist/yaml-cpp/debian/patches/pkgconfig.patch'
3414--- dist/yaml-cpp/debian/patches/pkgconfig.patch 1970-01-01 00:00:00 +0000
3415+++ dist/yaml-cpp/debian/patches/pkgconfig.patch 2016-10-18 07:57:32 +0000
3416@@ -0,0 +1,19 @@
3417+Author: Lifeng Sun <lifongsun@gmail.com>
3418+Last-Update: Fri, 30 Aug 2013 18:29:05 +0800
3419+Description: remove multiarch path in yaml-cpp.pc
3420+
3421+--- a/yaml-cpp.pc.cmake
3422++++ b/yaml-cpp.pc.cmake
3423+@@ -1,11 +1,10 @@
3424+ prefix=@CMAKE_INSTALL_PREFIX@
3425+ exec_prefix=@CMAKE_INSTALL_PREFIX@
3426+-libdir=${prefix}/@LIB_INSTALL_DIR@
3427+ includedir=${prefix}/@INCLUDE_INSTALL_ROOT_DIR@
3428+
3429+ Name: Yaml-cpp
3430+ Description: A YAML parser and emitter for C++
3431+ Version: @YAML_CPP_VERSION@
3432+ Requires:
3433+-Libs: -L${libdir} -lyaml-cpp
3434++Libs: -lyaml-cpp
3435+ Cflags: -I${includedir}
3436
3437=== added file 'dist/yaml-cpp/debian/patches/series'
3438--- dist/yaml-cpp/debian/patches/series 1970-01-01 00:00:00 +0000
3439+++ dist/yaml-cpp/debian/patches/series 2016-10-18 07:57:32 +0000
3440@@ -0,0 +1,2 @@
3441+pkgconfig.patch
3442+install-cmake-dev-files.patch
3443
3444=== added file 'dist/yaml-cpp/debian/rules'
3445--- dist/yaml-cpp/debian/rules 1970-01-01 00:00:00 +0000
3446+++ dist/yaml-cpp/debian/rules 2016-10-18 07:57:32 +0000
3447@@ -0,0 +1,64 @@
3448+#!/usr/bin/make -f
3449+
3450+# Uncomment this to turn on verbose mode.
3451+#export DH_VERBOSE=1
3452+
3453+# This has to be exported to make some magic below work.
3454+export DH_OPTIONS
3455+
3456+DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
3457+
3458+CPPFLAGS :=$(shell dpkg-buildflags --get CPPFLAGS)
3459+CFLAGS :=$(shell dpkg-buildflags --get CFLAGS)
3460+CXXFLAGS :=$(shell dpkg-buildflags --get CXXFLAGS)
3461+LDFLAGS :=$(shell dpkg-buildflags --get LDFLAGS)
3462+
3463+export DEB_HOST_MULTIARCH CPPFLAGS CFLAGS CXXFLAGS LDFLAGS
3464+
3465+ifeq (,$(filter $(DEB_BUILD_ARCH),kfreebsd-amd64 kfreebsd-i386 hurd-i386))
3466+ DISABLE_PTHREADS=OFF
3467+else
3468+ DISABLE_PTHREADS=ON
3469+endif
3470+
3471+override_dh_auto_configure:
3472+ dh_testdir
3473+ mkdir build-static; cd build-static; \
3474+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
3475+ -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
3476+ -DYAML_CPP_BUILD_TOOLS=ON \
3477+ -Dgtest_disable_pthreads=$(DISABLE_PTHREADS)
3478+ mkdir build-shared; cd build-shared; \
3479+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr \
3480+ -DLIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
3481+ -DBUILD_SHARED_LIBS=ON \
3482+ -DYAML_CPP_BUILD_TOOLS=ON \
3483+ -Dgtest_disable_pthreads=$(DISABLE_PTHREADS)
3484+
3485+override_dh_auto_build:
3486+ dh_testdir
3487+ $(MAKE) -C build-static
3488+ $(MAKE) -C build-shared
3489+ # It might make sense to also provide the utils in a separate package
3490+ # $(MAKE) -C build-shared util
3491+
3492+override_dh_auto_install:
3493+ dh_testdir
3494+ dh_prep
3495+ $(MAKE) -C build-static install DESTDIR=$(CURDIR)/debian/tmp
3496+ $(MAKE) -C build-shared install DESTDIR=$(CURDIR)/debian/tmp
3497+
3498+override_dh_auto_test:
3499+ $(MAKE) -C build-static test
3500+ $(MAKE) -C build-shared test
3501+
3502+clean:
3503+ dh_testdir
3504+ dh_auto_clean
3505+ dh_clean
3506+ rm -rf build-static build-shared
3507+
3508+%:
3509+ dh $@
3510+
3511+.PHONY: clean
3512
3513=== added directory 'dist/yaml-cpp/debian/source'
3514=== added file 'dist/yaml-cpp/debian/source/format'
3515--- dist/yaml-cpp/debian/source/format 1970-01-01 00:00:00 +0000
3516+++ dist/yaml-cpp/debian/source/format 2016-10-18 07:57:32 +0000
3517@@ -0,0 +1,1 @@
3518+3.0 (quilt)
3519
3520=== added file 'dist/yaml-cpp/debian/watch'
3521--- dist/yaml-cpp/debian/watch 1970-01-01 00:00:00 +0000
3522+++ dist/yaml-cpp/debian/watch 2016-10-18 07:57:32 +0000
3523@@ -0,0 +1,3 @@
3524+version=3
3525+opts=filenamemangle=s/.+\/release-?(\d\S*)\.tar\.gz/yaml-cpp-$1\.tar\.gz/ \
3526+ https://github.com/jbeder/yaml-cpp/releases .*/release-?(\d\S*)\.tar\.gz
3527
3528=== added directory 'dist/yaml-cpp/include'
3529=== added directory 'dist/yaml-cpp/include/yaml-cpp'
3530=== added file 'dist/yaml-cpp/include/yaml-cpp/anchor.h'
3531--- dist/yaml-cpp/include/yaml-cpp/anchor.h 1970-01-01 00:00:00 +0000
3532+++ dist/yaml-cpp/include/yaml-cpp/anchor.h 2016-10-18 07:57:32 +0000
3533@@ -0,0 +1,17 @@
3534+#ifndef ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3535+#define ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3536+
3537+#if defined(_MSC_VER) || \
3538+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3539+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3540+#pragma once
3541+#endif
3542+
3543+#include <cstddef>
3544+
3545+namespace YAML {
3546+typedef std::size_t anchor_t;
3547+const anchor_t NullAnchor = 0;
3548+}
3549+
3550+#endif // ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3551
3552=== added file 'dist/yaml-cpp/include/yaml-cpp/binary.h'
3553--- dist/yaml-cpp/include/yaml-cpp/binary.h 1970-01-01 00:00:00 +0000
3554+++ dist/yaml-cpp/include/yaml-cpp/binary.h 2016-10-18 07:57:32 +0000
3555@@ -0,0 +1,67 @@
3556+#ifndef BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3557+#define BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3558+
3559+#if defined(_MSC_VER) || \
3560+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3561+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3562+#pragma once
3563+#endif
3564+
3565+#include <string>
3566+#include <vector>
3567+
3568+#include "yaml-cpp/dll.h"
3569+
3570+namespace YAML {
3571+YAML_CPP_API std::string EncodeBase64(const unsigned char *data,
3572+ std::size_t size);
3573+YAML_CPP_API std::vector<unsigned char> DecodeBase64(const std::string &input);
3574+
3575+class YAML_CPP_API Binary {
3576+ public:
3577+ Binary() : m_unownedData(0), m_unownedSize(0) {}
3578+ Binary(const unsigned char *data_, std::size_t size_)
3579+ : m_unownedData(data_), m_unownedSize(size_) {}
3580+
3581+ bool owned() const { return !m_unownedData; }
3582+ std::size_t size() const { return owned() ? m_data.size() : m_unownedSize; }
3583+ const unsigned char *data() const {
3584+ return owned() ? &m_data[0] : m_unownedData;
3585+ }
3586+
3587+ void swap(std::vector<unsigned char> &rhs) {
3588+ if (m_unownedData) {
3589+ m_data.swap(rhs);
3590+ rhs.clear();
3591+ rhs.resize(m_unownedSize);
3592+ std::copy(m_unownedData, m_unownedData + m_unownedSize, rhs.begin());
3593+ m_unownedData = 0;
3594+ m_unownedSize = 0;
3595+ } else {
3596+ m_data.swap(rhs);
3597+ }
3598+ }
3599+
3600+ bool operator==(const Binary &rhs) const {
3601+ const std::size_t s = size();
3602+ if (s != rhs.size())
3603+ return false;
3604+ const unsigned char *d1 = data();
3605+ const unsigned char *d2 = rhs.data();
3606+ for (std::size_t i = 0; i < s; i++) {
3607+ if (*d1++ != *d2++)
3608+ return false;
3609+ }
3610+ return true;
3611+ }
3612+
3613+ bool operator!=(const Binary &rhs) const { return !(*this == rhs); }
3614+
3615+ private:
3616+ std::vector<unsigned char> m_data;
3617+ const unsigned char *m_unownedData;
3618+ std::size_t m_unownedSize;
3619+};
3620+}
3621+
3622+#endif // BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3623
3624=== added directory 'dist/yaml-cpp/include/yaml-cpp/contrib'
3625=== added file 'dist/yaml-cpp/include/yaml-cpp/contrib/anchordict.h'
3626--- dist/yaml-cpp/include/yaml-cpp/contrib/anchordict.h 1970-01-01 00:00:00 +0000
3627+++ dist/yaml-cpp/include/yaml-cpp/contrib/anchordict.h 2016-10-18 07:57:32 +0000
3628@@ -0,0 +1,37 @@
3629+#ifndef ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3630+#define ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3631+
3632+#if defined(_MSC_VER) || \
3633+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3634+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3635+#pragma once
3636+#endif
3637+
3638+#include <vector>
3639+
3640+#include "../anchor.h"
3641+
3642+namespace YAML {
3643+/// AnchorDict
3644+/// . An object that stores and retrieves values correlating to anchor_t
3645+/// values.
3646+/// . Efficient implementation that can make assumptions about how anchor_t
3647+/// values are assigned by the Parser class.
3648+template <class T>
3649+class AnchorDict {
3650+ public:
3651+ void Register(anchor_t anchor, T value) {
3652+ if (anchor > m_data.size()) {
3653+ m_data.resize(anchor);
3654+ }
3655+ m_data[anchor - 1] = value;
3656+ }
3657+
3658+ T Get(anchor_t anchor) const { return m_data[anchor - 1]; }
3659+
3660+ private:
3661+ std::vector<T> m_data;
3662+};
3663+}
3664+
3665+#endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3666
3667=== added file 'dist/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h'
3668--- dist/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h 1970-01-01 00:00:00 +0000
3669+++ dist/yaml-cpp/include/yaml-cpp/contrib/graphbuilder.h 2016-10-18 07:57:32 +0000
3670@@ -0,0 +1,147 @@
3671+#ifndef GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3672+#define GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3673+
3674+#if defined(_MSC_VER) || \
3675+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3676+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3677+#pragma once
3678+#endif
3679+
3680+#include "yaml-cpp/mark.h"
3681+#include <string>
3682+
3683+namespace YAML {
3684+class Parser;
3685+
3686+// GraphBuilderInterface
3687+// . Abstraction of node creation
3688+// . pParentNode is always NULL or the return value of one of the NewXXX()
3689+// functions.
3690+class GraphBuilderInterface {
3691+ public:
3692+ // Create and return a new node with a null value.
3693+ virtual void *NewNull(const Mark &mark, void *pParentNode) = 0;
3694+
3695+ // Create and return a new node with the given tag and value.
3696+ virtual void *NewScalar(const Mark &mark, const std::string &tag,
3697+ void *pParentNode, const std::string &value) = 0;
3698+
3699+ // Create and return a new sequence node
3700+ virtual void *NewSequence(const Mark &mark, const std::string &tag,
3701+ void *pParentNode) = 0;
3702+
3703+ // Add pNode to pSequence. pNode was created with one of the NewXxx()
3704+ // functions and pSequence with NewSequence().
3705+ virtual void AppendToSequence(void *pSequence, void *pNode) = 0;
3706+
3707+ // Note that no moew entries will be added to pSequence
3708+ virtual void SequenceComplete(void *pSequence) { (void)pSequence; }
3709+
3710+ // Create and return a new map node
3711+ virtual void *NewMap(const Mark &mark, const std::string &tag,
3712+ void *pParentNode) = 0;
3713+
3714+ // Add the pKeyNode => pValueNode mapping to pMap. pKeyNode and pValueNode
3715+ // were created with one of the NewXxx() methods and pMap with NewMap().
3716+ virtual void AssignInMap(void *pMap, void *pKeyNode, void *pValueNode) = 0;
3717+
3718+ // Note that no more assignments will be made in pMap
3719+ virtual void MapComplete(void *pMap) { (void)pMap; }
3720+
3721+ // Return the node that should be used in place of an alias referencing
3722+ // pNode (pNode by default)
3723+ virtual void *AnchorReference(const Mark &mark, void *pNode) {
3724+ (void)mark;
3725+ return pNode;
3726+ }
3727+};
3728+
3729+// Typesafe wrapper for GraphBuilderInterface. Assumes that Impl defines
3730+// Node, Sequence, and Map types. Sequence and Map must derive from Node
3731+// (unless Node is defined as void). Impl must also implement function with
3732+// all of the same names as the virtual functions in GraphBuilderInterface
3733+// -- including the ones with default implementations -- but with the
3734+// prototypes changed to accept an explicit Node*, Sequence*, or Map* where
3735+// appropriate.
3736+template <class Impl>
3737+class GraphBuilder : public GraphBuilderInterface {
3738+ public:
3739+ typedef typename Impl::Node Node;
3740+ typedef typename Impl::Sequence Sequence;
3741+ typedef typename Impl::Map Map;
3742+
3743+ GraphBuilder(Impl &impl) : m_impl(impl) {
3744+ Map *pMap = NULL;
3745+ Sequence *pSeq = NULL;
3746+ Node *pNode = NULL;
3747+
3748+ // Type consistency checks
3749+ pNode = pMap;
3750+ pNode = pSeq;
3751+ }
3752+
3753+ GraphBuilderInterface &AsBuilderInterface() { return *this; }
3754+
3755+ virtual void *NewNull(const Mark &mark, void *pParentNode) {
3756+ return CheckType<Node>(m_impl.NewNull(mark, AsNode(pParentNode)));
3757+ }
3758+
3759+ virtual void *NewScalar(const Mark &mark, const std::string &tag,
3760+ void *pParentNode, const std::string &value) {
3761+ return CheckType<Node>(
3762+ m_impl.NewScalar(mark, tag, AsNode(pParentNode), value));
3763+ }
3764+
3765+ virtual void *NewSequence(const Mark &mark, const std::string &tag,
3766+ void *pParentNode) {
3767+ return CheckType<Sequence>(
3768+ m_impl.NewSequence(mark, tag, AsNode(pParentNode)));
3769+ }
3770+ virtual void AppendToSequence(void *pSequence, void *pNode) {
3771+ m_impl.AppendToSequence(AsSequence(pSequence), AsNode(pNode));
3772+ }
3773+ virtual void SequenceComplete(void *pSequence) {
3774+ m_impl.SequenceComplete(AsSequence(pSequence));
3775+ }
3776+
3777+ virtual void *NewMap(const Mark &mark, const std::string &tag,
3778+ void *pParentNode) {
3779+ return CheckType<Map>(m_impl.NewMap(mark, tag, AsNode(pParentNode)));
3780+ }
3781+ virtual void AssignInMap(void *pMap, void *pKeyNode, void *pValueNode) {
3782+ m_impl.AssignInMap(AsMap(pMap), AsNode(pKeyNode), AsNode(pValueNode));
3783+ }
3784+ virtual void MapComplete(void *pMap) { m_impl.MapComplete(AsMap(pMap)); }
3785+
3786+ virtual void *AnchorReference(const Mark &mark, void *pNode) {
3787+ return CheckType<Node>(m_impl.AnchorReference(mark, AsNode(pNode)));
3788+ }
3789+
3790+ private:
3791+ Impl &m_impl;
3792+
3793+ // Static check for pointer to T
3794+ template <class T, class U>
3795+ static T *CheckType(U *p) {
3796+ return p;
3797+ }
3798+
3799+ static Node *AsNode(void *pNode) { return static_cast<Node *>(pNode); }
3800+ static Sequence *AsSequence(void *pSeq) {
3801+ return static_cast<Sequence *>(pSeq);
3802+ }
3803+ static Map *AsMap(void *pMap) { return static_cast<Map *>(pMap); }
3804+};
3805+
3806+void *BuildGraphOfNextDocument(Parser &parser,
3807+ GraphBuilderInterface &graphBuilder);
3808+
3809+template <class Impl>
3810+typename Impl::Node *BuildGraphOfNextDocument(Parser &parser, Impl &impl) {
3811+ GraphBuilder<Impl> graphBuilder(impl);
3812+ return static_cast<typename Impl::Node *>(
3813+ BuildGraphOfNextDocument(parser, graphBuilder));
3814+}
3815+}
3816+
3817+#endif // GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3818
3819=== added file 'dist/yaml-cpp/include/yaml-cpp/dll.h'
3820--- dist/yaml-cpp/include/yaml-cpp/dll.h 1970-01-01 00:00:00 +0000
3821+++ dist/yaml-cpp/include/yaml-cpp/dll.h 2016-10-18 07:57:32 +0000
3822@@ -0,0 +1,37 @@
3823+#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3824+#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3825+
3826+#if defined(_MSC_VER) || \
3827+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3828+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3829+#pragma once
3830+#endif
3831+
3832+// The following ifdef block is the standard way of creating macros which make
3833+// exporting
3834+// from a DLL simpler. All files within this DLL are compiled with the
3835+// yaml_cpp_EXPORTS
3836+// symbol defined on the command line. this symbol should not be defined on any
3837+// project
3838+// that uses this DLL. This way any other project whose source files include
3839+// this file see
3840+// YAML_CPP_API functions as being imported from a DLL, whereas this DLL sees
3841+// symbols
3842+// defined with this macro as being exported.
3843+#undef YAML_CPP_API
3844+
3845+#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined
3846+ // manually)
3847+#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake
3848+ // or defined manually)
3849+// #pragma message( "Defining YAML_CPP_API for DLL export" )
3850+#define YAML_CPP_API __declspec(dllexport)
3851+#else // yaml_cpp_EXPORTS
3852+// #pragma message( "Defining YAML_CPP_API for DLL import" )
3853+#define YAML_CPP_API __declspec(dllimport)
3854+#endif // yaml_cpp_EXPORTS
3855+#else // YAML_CPP_DLL
3856+#define YAML_CPP_API
3857+#endif // YAML_CPP_DLL
3858+
3859+#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3860
3861=== added file 'dist/yaml-cpp/include/yaml-cpp/emitfromevents.h'
3862--- dist/yaml-cpp/include/yaml-cpp/emitfromevents.h 1970-01-01 00:00:00 +0000
3863+++ dist/yaml-cpp/include/yaml-cpp/emitfromevents.h 2016-10-18 07:57:32 +0000
3864@@ -0,0 +1,57 @@
3865+#ifndef EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3866+#define EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3867+
3868+#if defined(_MSC_VER) || \
3869+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3870+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3871+#pragma once
3872+#endif
3873+
3874+#include <stack>
3875+
3876+#include "yaml-cpp/anchor.h"
3877+#include "yaml-cpp/emitterstyle.h"
3878+#include "yaml-cpp/eventhandler.h"
3879+
3880+namespace YAML {
3881+struct Mark;
3882+} // namespace YAML
3883+
3884+namespace YAML {
3885+class Emitter;
3886+
3887+class EmitFromEvents : public EventHandler {
3888+ public:
3889+ EmitFromEvents(Emitter& emitter);
3890+
3891+ virtual void OnDocumentStart(const Mark& mark);
3892+ virtual void OnDocumentEnd();
3893+
3894+ virtual void OnNull(const Mark& mark, anchor_t anchor);
3895+ virtual void OnAlias(const Mark& mark, anchor_t anchor);
3896+ virtual void OnScalar(const Mark& mark, const std::string& tag,
3897+ anchor_t anchor, const std::string& value);
3898+
3899+ virtual void OnSequenceStart(const Mark& mark, const std::string& tag,
3900+ anchor_t anchor, EmitterStyle::value style);
3901+ virtual void OnSequenceEnd();
3902+
3903+ virtual void OnMapStart(const Mark& mark, const std::string& tag,
3904+ anchor_t anchor, EmitterStyle::value style);
3905+ virtual void OnMapEnd();
3906+
3907+ private:
3908+ void BeginNode();
3909+ void EmitProps(const std::string& tag, anchor_t anchor);
3910+
3911+ private:
3912+ Emitter& m_emitter;
3913+
3914+ struct State {
3915+ enum value { WaitingForSequenceEntry, WaitingForKey, WaitingForValue };
3916+ };
3917+ std::stack<State::value> m_stateStack;
3918+};
3919+}
3920+
3921+#endif // EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3922
3923=== added file 'dist/yaml-cpp/include/yaml-cpp/emitter.h'
3924--- dist/yaml-cpp/include/yaml-cpp/emitter.h 1970-01-01 00:00:00 +0000
3925+++ dist/yaml-cpp/include/yaml-cpp/emitter.h 2016-10-18 07:57:32 +0000
3926@@ -0,0 +1,254 @@
3927+#ifndef EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3928+#define EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
3929+
3930+#if defined(_MSC_VER) || \
3931+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
3932+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
3933+#pragma once
3934+#endif
3935+
3936+#include <cstddef>
3937+#include <memory>
3938+#include <sstream>
3939+#include <string>
3940+
3941+#include "yaml-cpp/binary.h"
3942+#include "yaml-cpp/dll.h"
3943+#include "yaml-cpp/emitterdef.h"
3944+#include "yaml-cpp/emittermanip.h"
3945+#include "yaml-cpp/noncopyable.h"
3946+#include "yaml-cpp/null.h"
3947+#include "yaml-cpp/ostream_wrapper.h"
3948+
3949+namespace YAML {
3950+class Binary;
3951+struct _Null;
3952+} // namespace YAML
3953+
3954+namespace YAML {
3955+class EmitterState;
3956+
3957+class YAML_CPP_API Emitter : private noncopyable {
3958+ public:
3959+ Emitter();
3960+ explicit Emitter(std::ostream& stream);
3961+ ~Emitter();
3962+
3963+ // output
3964+ const char* c_str() const;
3965+ std::size_t size() const;
3966+
3967+ // state checking
3968+ bool good() const;
3969+ const std::string GetLastError() const;
3970+
3971+ // global setters
3972+ bool SetOutputCharset(EMITTER_MANIP value);
3973+ bool SetStringFormat(EMITTER_MANIP value);
3974+ bool SetBoolFormat(EMITTER_MANIP value);
3975+ bool SetIntBase(EMITTER_MANIP value);
3976+ bool SetSeqFormat(EMITTER_MANIP value);
3977+ bool SetMapFormat(EMITTER_MANIP value);
3978+ bool SetIndent(std::size_t n);
3979+ bool SetPreCommentIndent(std::size_t n);
3980+ bool SetPostCommentIndent(std::size_t n);
3981+ bool SetFloatPrecision(std::size_t n);
3982+ bool SetDoublePrecision(std::size_t n);
3983+
3984+ // local setters
3985+ Emitter& SetLocalValue(EMITTER_MANIP value);
3986+ Emitter& SetLocalIndent(const _Indent& indent);
3987+ Emitter& SetLocalPrecision(const _Precision& precision);
3988+
3989+ // overloads of write
3990+ Emitter& Write(const std::string& str);
3991+ Emitter& Write(bool b);
3992+ Emitter& Write(char ch);
3993+ Emitter& Write(const _Alias& alias);
3994+ Emitter& Write(const _Anchor& anchor);
3995+ Emitter& Write(const _Tag& tag);
3996+ Emitter& Write(const _Comment& comment);
3997+ Emitter& Write(const _Null& n);
3998+ Emitter& Write(const Binary& binary);
3999+
4000+ template <typename T>
4001+ Emitter& WriteIntegralType(T value);
4002+
4003+ template <typename T>
4004+ Emitter& WriteStreamable(T value);
4005+
4006+ private:
4007+ template <typename T>
4008+ void SetStreamablePrecision(std::stringstream&) {}
4009+ std::size_t GetFloatPrecision() const;
4010+ std::size_t GetDoublePrecision() const;
4011+
4012+ void PrepareIntegralStream(std::stringstream& stream) const;
4013+ void StartedScalar();
4014+
4015+ private:
4016+ void EmitBeginDoc();
4017+ void EmitEndDoc();
4018+ void EmitBeginSeq();
4019+ void EmitEndSeq();
4020+ void EmitBeginMap();
4021+ void EmitEndMap();
4022+ void EmitNewline();
4023+ void EmitKindTag();
4024+ void EmitTag(bool verbatim, const _Tag& tag);
4025+
4026+ void PrepareNode(EmitterNodeType::value child);
4027+ void PrepareTopNode(EmitterNodeType::value child);
4028+ void FlowSeqPrepareNode(EmitterNodeType::value child);
4029+ void BlockSeqPrepareNode(EmitterNodeType::value child);
4030+
4031+ void FlowMapPrepareNode(EmitterNodeType::value child);
4032+
4033+ void FlowMapPrepareLongKey(EmitterNodeType::value child);
4034+ void FlowMapPrepareLongKeyValue(EmitterNodeType::value child);
4035+ void FlowMapPrepareSimpleKey(EmitterNodeType::value child);
4036+ void FlowMapPrepareSimpleKeyValue(EmitterNodeType::value child);
4037+
4038+ void BlockMapPrepareNode(EmitterNodeType::value child);
4039+
4040+ void BlockMapPrepareLongKey(EmitterNodeType::value child);
4041+ void BlockMapPrepareLongKeyValue(EmitterNodeType::value child);
4042+ void BlockMapPrepareSimpleKey(EmitterNodeType::value child);
4043+ void BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child);
4044+
4045+ void SpaceOrIndentTo(bool requireSpace, std::size_t indent);
4046+
4047+ const char* ComputeFullBoolName(bool b) const;
4048+ bool CanEmitNewline() const;
4049+
4050+ private:
4051+ std::auto_ptr<EmitterState> m_pState;
4052+ ostream_wrapper m_stream;
4053+};
4054+
4055+template <typename T>
4056+inline Emitter& Emitter::WriteIntegralType(T value) {
4057+ if (!good())
4058+ return *this;
4059+
4060+ PrepareNode(EmitterNodeType::Scalar);
4061+
4062+ std::stringstream stream;
4063+ PrepareIntegralStream(stream);
4064+ stream << value;
4065+ m_stream << stream.str();
4066+
4067+ StartedScalar();
4068+
4069+ return *this;
4070+}
4071+
4072+template <typename T>
4073+inline Emitter& Emitter::WriteStreamable(T value) {
4074+ if (!good())
4075+ return *this;
4076+
4077+ PrepareNode(EmitterNodeType::Scalar);
4078+
4079+ std::stringstream stream;
4080+ SetStreamablePrecision<T>(stream);
4081+ stream << value;
4082+ m_stream << stream.str();
4083+
4084+ StartedScalar();
4085+
4086+ return *this;
4087+}
4088+
4089+template <>
4090+inline void Emitter::SetStreamablePrecision<float>(std::stringstream& stream) {
4091+ stream.precision(GetFloatPrecision());
4092+}
4093+
4094+template <>
4095+inline void Emitter::SetStreamablePrecision<double>(std::stringstream& stream) {
4096+ stream.precision(GetDoublePrecision());
4097+}
4098+
4099+// overloads of insertion
4100+inline Emitter& operator<<(Emitter& emitter, const std::string& v) {
4101+ return emitter.Write(v);
4102+}
4103+inline Emitter& operator<<(Emitter& emitter, bool v) {
4104+ return emitter.Write(v);
4105+}
4106+inline Emitter& operator<<(Emitter& emitter, char v) {
4107+ return emitter.Write(v);
4108+}
4109+inline Emitter& operator<<(Emitter& emitter, unsigned char v) {
4110+ return emitter.Write(static_cast<char>(v));
4111+}
4112+inline Emitter& operator<<(Emitter& emitter, const _Alias& v) {
4113+ return emitter.Write(v);
4114+}
4115+inline Emitter& operator<<(Emitter& emitter, const _Anchor& v) {
4116+ return emitter.Write(v);
4117+}
4118+inline Emitter& operator<<(Emitter& emitter, const _Tag& v) {
4119+ return emitter.Write(v);
4120+}
4121+inline Emitter& operator<<(Emitter& emitter, const _Comment& v) {
4122+ return emitter.Write(v);
4123+}
4124+inline Emitter& operator<<(Emitter& emitter, const _Null& v) {
4125+ return emitter.Write(v);
4126+}
4127+inline Emitter& operator<<(Emitter& emitter, const Binary& b) {
4128+ return emitter.Write(b);
4129+}
4130+
4131+inline Emitter& operator<<(Emitter& emitter, const char* v) {
4132+ return emitter.Write(std::string(v));
4133+}
4134+
4135+inline Emitter& operator<<(Emitter& emitter, int v) {
4136+ return emitter.WriteIntegralType(v);
4137+}
4138+inline Emitter& operator<<(Emitter& emitter, unsigned int v) {
4139+ return emitter.WriteIntegralType(v);
4140+}
4141+inline Emitter& operator<<(Emitter& emitter, short v) {
4142+ return emitter.WriteIntegralType(v);
4143+}
4144+inline Emitter& operator<<(Emitter& emitter, unsigned short v) {
4145+ return emitter.WriteIntegralType(v);
4146+}
4147+inline Emitter& operator<<(Emitter& emitter, long v) {
4148+ return emitter.WriteIntegralType(v);
4149+}
4150+inline Emitter& operator<<(Emitter& emitter, unsigned long v) {
4151+ return emitter.WriteIntegralType(v);
4152+}
4153+inline Emitter& operator<<(Emitter& emitter, long long v) {
4154+ return emitter.WriteIntegralType(v);
4155+}
4156+inline Emitter& operator<<(Emitter& emitter, unsigned long long v) {
4157+ return emitter.WriteIntegralType(v);
4158+}
4159+
4160+inline Emitter& operator<<(Emitter& emitter, float v) {
4161+ return emitter.WriteStreamable(v);
4162+}
4163+inline Emitter& operator<<(Emitter& emitter, double v) {
4164+ return emitter.WriteStreamable(v);
4165+}
4166+
4167+inline Emitter& operator<<(Emitter& emitter, EMITTER_MANIP value) {
4168+ return emitter.SetLocalValue(value);
4169+}
4170+
4171+inline Emitter& operator<<(Emitter& emitter, _Indent indent) {
4172+ return emitter.SetLocalIndent(indent);
4173+}
4174+
4175+inline Emitter& operator<<(Emitter& emitter, _Precision precision) {
4176+ return emitter.SetLocalPrecision(precision);
4177+}
4178+}
4179+
4180+#endif // EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4181
4182=== added file 'dist/yaml-cpp/include/yaml-cpp/emitterdef.h'
4183--- dist/yaml-cpp/include/yaml-cpp/emitterdef.h 1970-01-01 00:00:00 +0000
4184+++ dist/yaml-cpp/include/yaml-cpp/emitterdef.h 2016-10-18 07:57:32 +0000
4185@@ -0,0 +1,16 @@
4186+#ifndef EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4187+#define EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4188+
4189+#if defined(_MSC_VER) || \
4190+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4191+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4192+#pragma once
4193+#endif
4194+
4195+namespace YAML {
4196+struct EmitterNodeType {
4197+ enum value { NoType, Property, Scalar, FlowSeq, BlockSeq, FlowMap, BlockMap };
4198+};
4199+}
4200+
4201+#endif // EMITTERDEF_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4202
4203=== added file 'dist/yaml-cpp/include/yaml-cpp/emittermanip.h'
4204--- dist/yaml-cpp/include/yaml-cpp/emittermanip.h 1970-01-01 00:00:00 +0000
4205+++ dist/yaml-cpp/include/yaml-cpp/emittermanip.h 2016-10-18 07:57:32 +0000
4206@@ -0,0 +1,137 @@
4207+#ifndef EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4208+#define EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4209+
4210+#if defined(_MSC_VER) || \
4211+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4212+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4213+#pragma once
4214+#endif
4215+
4216+#include <string>
4217+
4218+namespace YAML {
4219+enum EMITTER_MANIP {
4220+ // general manipulators
4221+ Auto,
4222+ TagByKind,
4223+ Newline,
4224+
4225+ // output character set
4226+ EmitNonAscii,
4227+ EscapeNonAscii,
4228+
4229+ // string manipulators
4230+ // Auto, // duplicate
4231+ SingleQuoted,
4232+ DoubleQuoted,
4233+ Literal,
4234+
4235+ // bool manipulators
4236+ YesNoBool, // yes, no
4237+ TrueFalseBool, // true, false
4238+ OnOffBool, // on, off
4239+ UpperCase, // TRUE, N
4240+ LowerCase, // f, yes
4241+ CamelCase, // No, Off
4242+ LongBool, // yes, On
4243+ ShortBool, // y, t
4244+
4245+ // int manipulators
4246+ Dec,
4247+ Hex,
4248+ Oct,
4249+
4250+ // document manipulators
4251+ BeginDoc,
4252+ EndDoc,
4253+
4254+ // sequence manipulators
4255+ BeginSeq,
4256+ EndSeq,
4257+ Flow,
4258+ Block,
4259+
4260+ // map manipulators
4261+ BeginMap,
4262+ EndMap,
4263+ Key,
4264+ Value,
4265+ // Flow, // duplicate
4266+ // Block, // duplicate
4267+ // Auto, // duplicate
4268+ LongKey
4269+};
4270+
4271+struct _Indent {
4272+ _Indent(int value_) : value(value_) {}
4273+ int value;
4274+};
4275+
4276+inline _Indent Indent(int value) { return _Indent(value); }
4277+
4278+struct _Alias {
4279+ _Alias(const std::string& content_) : content(content_) {}
4280+ std::string content;
4281+};
4282+
4283+inline _Alias Alias(const std::string content) { return _Alias(content); }
4284+
4285+struct _Anchor {
4286+ _Anchor(const std::string& content_) : content(content_) {}
4287+ std::string content;
4288+};
4289+
4290+inline _Anchor Anchor(const std::string content) { return _Anchor(content); }
4291+
4292+struct _Tag {
4293+ struct Type {
4294+ enum value { Verbatim, PrimaryHandle, NamedHandle };
4295+ };
4296+
4297+ explicit _Tag(const std::string& prefix_, const std::string& content_,
4298+ Type::value type_)
4299+ : prefix(prefix_), content(content_), type(type_) {}
4300+ std::string prefix;
4301+ std::string content;
4302+ Type::value type;
4303+};
4304+
4305+inline _Tag VerbatimTag(const std::string content) {
4306+ return _Tag("", content, _Tag::Type::Verbatim);
4307+}
4308+
4309+inline _Tag LocalTag(const std::string content) {
4310+ return _Tag("", content, _Tag::Type::PrimaryHandle);
4311+}
4312+
4313+inline _Tag LocalTag(const std::string& prefix, const std::string content) {
4314+ return _Tag(prefix, content, _Tag::Type::NamedHandle);
4315+}
4316+
4317+inline _Tag SecondaryTag(const std::string content) {
4318+ return _Tag("", content, _Tag::Type::NamedHandle);
4319+}
4320+
4321+struct _Comment {
4322+ _Comment(const std::string& content_) : content(content_) {}
4323+ std::string content;
4324+};
4325+
4326+inline _Comment Comment(const std::string content) { return _Comment(content); }
4327+
4328+struct _Precision {
4329+ _Precision(int floatPrecision_, int doublePrecision_)
4330+ : floatPrecision(floatPrecision_), doublePrecision(doublePrecision_) {}
4331+
4332+ int floatPrecision;
4333+ int doublePrecision;
4334+};
4335+
4336+inline _Precision FloatPrecision(int n) { return _Precision(n, -1); }
4337+
4338+inline _Precision DoublePrecision(int n) { return _Precision(-1, n); }
4339+
4340+inline _Precision Precision(int n) { return _Precision(n, n); }
4341+}
4342+
4343+#endif // EMITTERMANIP_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4344
4345=== added file 'dist/yaml-cpp/include/yaml-cpp/emitterstyle.h'
4346--- dist/yaml-cpp/include/yaml-cpp/emitterstyle.h 1970-01-01 00:00:00 +0000
4347+++ dist/yaml-cpp/include/yaml-cpp/emitterstyle.h 2016-10-18 07:57:32 +0000
4348@@ -0,0 +1,16 @@
4349+#ifndef EMITTERSTYLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4350+#define EMITTERSTYLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4351+
4352+#if defined(_MSC_VER) || \
4353+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4354+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4355+#pragma once
4356+#endif
4357+
4358+namespace YAML {
4359+struct EmitterStyle {
4360+ enum value { Default, Block, Flow };
4361+};
4362+}
4363+
4364+#endif // EMITTERSTYLE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4365
4366=== added file 'dist/yaml-cpp/include/yaml-cpp/eventhandler.h'
4367--- dist/yaml-cpp/include/yaml-cpp/eventhandler.h 1970-01-01 00:00:00 +0000
4368+++ dist/yaml-cpp/include/yaml-cpp/eventhandler.h 2016-10-18 07:57:32 +0000
4369@@ -0,0 +1,40 @@
4370+#ifndef EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4371+#define EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4372+
4373+#if defined(_MSC_VER) || \
4374+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4375+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4376+#pragma once
4377+#endif
4378+
4379+#include <string>
4380+
4381+#include "yaml-cpp/anchor.h"
4382+#include "yaml-cpp/emitterstyle.h"
4383+
4384+namespace YAML {
4385+struct Mark;
4386+
4387+class EventHandler {
4388+ public:
4389+ virtual ~EventHandler() {}
4390+
4391+ virtual void OnDocumentStart(const Mark& mark) = 0;
4392+ virtual void OnDocumentEnd() = 0;
4393+
4394+ virtual void OnNull(const Mark& mark, anchor_t anchor) = 0;
4395+ virtual void OnAlias(const Mark& mark, anchor_t anchor) = 0;
4396+ virtual void OnScalar(const Mark& mark, const std::string& tag,
4397+ anchor_t anchor, const std::string& value) = 0;
4398+
4399+ virtual void OnSequenceStart(const Mark& mark, const std::string& tag,
4400+ anchor_t anchor, EmitterStyle::value style) = 0;
4401+ virtual void OnSequenceEnd() = 0;
4402+
4403+ virtual void OnMapStart(const Mark& mark, const std::string& tag,
4404+ anchor_t anchor, EmitterStyle::value style) = 0;
4405+ virtual void OnMapEnd() = 0;
4406+};
4407+}
4408+
4409+#endif // EVENTHANDLER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4410
4411=== added file 'dist/yaml-cpp/include/yaml-cpp/exceptions.h'
4412--- dist/yaml-cpp/include/yaml-cpp/exceptions.h 1970-01-01 00:00:00 +0000
4413+++ dist/yaml-cpp/include/yaml-cpp/exceptions.h 2016-10-18 07:57:32 +0000
4414@@ -0,0 +1,227 @@
4415+#ifndef EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4416+#define EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4417+
4418+#if defined(_MSC_VER) || \
4419+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4420+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4421+#pragma once
4422+#endif
4423+
4424+#include "yaml-cpp/mark.h"
4425+#include "yaml-cpp/traits.h"
4426+#include <stdexcept>
4427+#include <string>
4428+#include <sstream>
4429+
4430+namespace YAML {
4431+// error messages
4432+namespace ErrorMsg {
4433+const char* const YAML_DIRECTIVE_ARGS =
4434+ "YAML directives must have exactly one argument";
4435+const char* const YAML_VERSION = "bad YAML version: ";
4436+const char* const YAML_MAJOR_VERSION = "YAML major version too large";
4437+const char* const REPEATED_YAML_DIRECTIVE = "repeated YAML directive";
4438+const char* const TAG_DIRECTIVE_ARGS =
4439+ "TAG directives must have exactly two arguments";
4440+const char* const REPEATED_TAG_DIRECTIVE = "repeated TAG directive";
4441+const char* const CHAR_IN_TAG_HANDLE =
4442+ "illegal character found while scanning tag handle";
4443+const char* const TAG_WITH_NO_SUFFIX = "tag handle with no suffix";
4444+const char* const END_OF_VERBATIM_TAG = "end of verbatim tag not found";
4445+const char* const END_OF_MAP = "end of map not found";
4446+const char* const END_OF_MAP_FLOW = "end of map flow not found";
4447+const char* const END_OF_SEQ = "end of sequence not found";
4448+const char* const END_OF_SEQ_FLOW = "end of sequence flow not found";
4449+const char* const MULTIPLE_TAGS =
4450+ "cannot assign multiple tags to the same node";
4451+const char* const MULTIPLE_ANCHORS =
4452+ "cannot assign multiple anchors to the same node";
4453+const char* const MULTIPLE_ALIASES =
4454+ "cannot assign multiple aliases to the same node";
4455+const char* const ALIAS_CONTENT =
4456+ "aliases can't have any content, *including* tags";
4457+const char* const INVALID_HEX = "bad character found while scanning hex number";
4458+const char* const INVALID_UNICODE = "invalid unicode: ";
4459+const char* const INVALID_ESCAPE = "unknown escape character: ";
4460+const char* const UNKNOWN_TOKEN = "unknown token";
4461+const char* const DOC_IN_SCALAR = "illegal document indicator in scalar";
4462+const char* const EOF_IN_SCALAR = "illegal EOF in scalar";
4463+const char* const CHAR_IN_SCALAR = "illegal character in scalar";
4464+const char* const TAB_IN_INDENTATION =
4465+ "illegal tab when looking for indentation";
4466+const char* const FLOW_END = "illegal flow end";
4467+const char* const BLOCK_ENTRY = "illegal block entry";
4468+const char* const MAP_KEY = "illegal map key";
4469+const char* const MAP_VALUE = "illegal map value";
4470+const char* const ALIAS_NOT_FOUND = "alias not found after *";
4471+const char* const ANCHOR_NOT_FOUND = "anchor not found after &";
4472+const char* const CHAR_IN_ALIAS =
4473+ "illegal character found while scanning alias";
4474+const char* const CHAR_IN_ANCHOR =
4475+ "illegal character found while scanning anchor";
4476+const char* const ZERO_INDENT_IN_BLOCK =
4477+ "cannot set zero indentation for a block scalar";
4478+const char* const CHAR_IN_BLOCK = "unexpected character in block scalar";
4479+const char* const AMBIGUOUS_ANCHOR =
4480+ "cannot assign the same alias to multiple nodes";
4481+const char* const UNKNOWN_ANCHOR = "the referenced anchor is not defined";
4482+
4483+const char* const INVALID_NODE =
4484+ "invalid node; this may result from using a map iterator as a sequence "
4485+ "iterator, or vice-versa";
4486+const char* const INVALID_SCALAR = "invalid scalar";
4487+const char* const KEY_NOT_FOUND = "key not found";
4488+const char* const BAD_CONVERSION = "bad conversion";
4489+const char* const BAD_DEREFERENCE = "bad dereference";
4490+const char* const BAD_SUBSCRIPT = "operator[] call on a scalar";
4491+const char* const BAD_PUSHBACK = "appending to a non-sequence";
4492+const char* const BAD_INSERT = "inserting in a non-convertible-to-map";
4493+
4494+const char* const UNMATCHED_GROUP_TAG = "unmatched group tag";
4495+const char* const UNEXPECTED_END_SEQ = "unexpected end sequence token";
4496+const char* const UNEXPECTED_END_MAP = "unexpected end map token";
4497+const char* const SINGLE_QUOTED_CHAR =
4498+ "invalid character in single-quoted string";
4499+const char* const INVALID_ANCHOR = "invalid anchor";
4500+const char* const INVALID_ALIAS = "invalid alias";
4501+const char* const INVALID_TAG = "invalid tag";
4502+const char* const BAD_FILE = "bad file";
4503+
4504+template <typename T>
4505+inline const std::string KEY_NOT_FOUND_WITH_KEY(
4506+ const T&, typename disable_if<is_numeric<T> >::type* = 0) {
4507+ return KEY_NOT_FOUND;
4508+}
4509+
4510+inline const std::string KEY_NOT_FOUND_WITH_KEY(const std::string& key) {
4511+ std::stringstream stream;
4512+ stream << KEY_NOT_FOUND << ": " << key;
4513+ return stream.str();
4514+}
4515+
4516+template <typename T>
4517+inline const std::string KEY_NOT_FOUND_WITH_KEY(
4518+ const T& key, typename enable_if<is_numeric<T> >::type* = 0) {
4519+ std::stringstream stream;
4520+ stream << KEY_NOT_FOUND << ": " << key;
4521+ return stream.str();
4522+}
4523+}
4524+
4525+class Exception : public std::runtime_error {
4526+ public:
4527+ Exception(const Mark& mark_, const std::string& msg_)
4528+ : std::runtime_error(build_what(mark_, msg_)), mark(mark_), msg(msg_) {}
4529+ virtual ~Exception() throw() {}
4530+
4531+ Mark mark;
4532+ std::string msg;
4533+
4534+ private:
4535+ static const std::string build_what(const Mark& mark,
4536+ const std::string& msg) {
4537+ std::stringstream output;
4538+ output << "yaml-cpp: error at line " << mark.line + 1 << ", column "
4539+ << mark.column + 1 << ": " << msg;
4540+ return output.str();
4541+ }
4542+};
4543+
4544+class ParserException : public Exception {
4545+ public:
4546+ ParserException(const Mark& mark_, const std::string& msg_)
4547+ : Exception(mark_, msg_) {}
4548+};
4549+
4550+class RepresentationException : public Exception {
4551+ public:
4552+ RepresentationException(const Mark& mark_, const std::string& msg_)
4553+ : Exception(mark_, msg_) {}
4554+};
4555+
4556+// representation exceptions
4557+class InvalidScalar : public RepresentationException {
4558+ public:
4559+ InvalidScalar(const Mark& mark_)
4560+ : RepresentationException(mark_, ErrorMsg::INVALID_SCALAR) {}
4561+};
4562+
4563+class KeyNotFound : public RepresentationException {
4564+ public:
4565+ template <typename T>
4566+ KeyNotFound(const Mark& mark_, const T& key_)
4567+ : RepresentationException(mark_, ErrorMsg::KEY_NOT_FOUND_WITH_KEY(key_)) {
4568+ }
4569+};
4570+
4571+template <typename T>
4572+class TypedKeyNotFound : public KeyNotFound {
4573+ public:
4574+ TypedKeyNotFound(const Mark& mark_, const T& key_)
4575+ : KeyNotFound(mark_, key_), key(key_) {}
4576+ virtual ~TypedKeyNotFound() throw() {}
4577+
4578+ T key;
4579+};
4580+
4581+template <typename T>
4582+inline TypedKeyNotFound<T> MakeTypedKeyNotFound(const Mark& mark,
4583+ const T& key) {
4584+ return TypedKeyNotFound<T>(mark, key);
4585+}
4586+
4587+class InvalidNode : public RepresentationException {
4588+ public:
4589+ InvalidNode()
4590+ : RepresentationException(Mark::null_mark(), ErrorMsg::INVALID_NODE) {}
4591+};
4592+
4593+class BadConversion : public RepresentationException {
4594+ public:
4595+ BadConversion()
4596+ : RepresentationException(Mark::null_mark(), ErrorMsg::BAD_CONVERSION) {}
4597+};
4598+
4599+template <typename T>
4600+class TypedBadConversion : public BadConversion {
4601+ public:
4602+ TypedBadConversion() : BadConversion() {}
4603+};
4604+
4605+class BadDereference : public RepresentationException {
4606+ public:
4607+ BadDereference()
4608+ : RepresentationException(Mark::null_mark(), ErrorMsg::BAD_DEREFERENCE) {}
4609+};
4610+
4611+class BadSubscript : public RepresentationException {
4612+ public:
4613+ BadSubscript()
4614+ : RepresentationException(Mark::null_mark(), ErrorMsg::BAD_SUBSCRIPT) {}
4615+};
4616+
4617+class BadPushback : public RepresentationException {
4618+ public:
4619+ BadPushback()
4620+ : RepresentationException(Mark::null_mark(), ErrorMsg::BAD_PUSHBACK) {}
4621+};
4622+
4623+class BadInsert : public RepresentationException {
4624+ public:
4625+ BadInsert()
4626+ : RepresentationException(Mark::null_mark(), ErrorMsg::BAD_INSERT) {}
4627+};
4628+
4629+class EmitterException : public Exception {
4630+ public:
4631+ EmitterException(const std::string& msg_)
4632+ : Exception(Mark::null_mark(), msg_) {}
4633+};
4634+
4635+class BadFile : public Exception {
4636+ public:
4637+ BadFile() : Exception(Mark::null_mark(), ErrorMsg::BAD_FILE) {}
4638+};
4639+}
4640+
4641+#endif // EXCEPTIONS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4642
4643=== added file 'dist/yaml-cpp/include/yaml-cpp/mark.h'
4644--- dist/yaml-cpp/include/yaml-cpp/mark.h 1970-01-01 00:00:00 +0000
4645+++ dist/yaml-cpp/include/yaml-cpp/mark.h 2016-10-18 07:57:32 +0000
4646@@ -0,0 +1,27 @@
4647+#ifndef MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4648+#define MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4649+
4650+#if defined(_MSC_VER) || \
4651+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4652+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4653+#pragma once
4654+#endif
4655+
4656+#include "yaml-cpp/dll.h"
4657+
4658+namespace YAML {
4659+struct YAML_CPP_API Mark {
4660+ Mark() : pos(0), line(0), column(0) {}
4661+
4662+ static const Mark null_mark() { return Mark(-1, -1, -1); }
4663+
4664+ int pos;
4665+ int line, column;
4666+
4667+ private:
4668+ Mark(int pos_, int line_, int column_)
4669+ : pos(pos_), line(line_), column(column_) {}
4670+};
4671+}
4672+
4673+#endif // MARK_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4674
4675=== added directory 'dist/yaml-cpp/include/yaml-cpp/node'
4676=== added file 'dist/yaml-cpp/include/yaml-cpp/node/convert.h'
4677--- dist/yaml-cpp/include/yaml-cpp/node/convert.h 1970-01-01 00:00:00 +0000
4678+++ dist/yaml-cpp/include/yaml-cpp/node/convert.h 2016-10-18 07:57:32 +0000
4679@@ -0,0 +1,286 @@
4680+#ifndef NODE_CONVERT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4681+#define NODE_CONVERT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4682+
4683+#if defined(_MSC_VER) || \
4684+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4685+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4686+#pragma once
4687+#endif
4688+
4689+#include <limits>
4690+#include <list>
4691+#include <map>
4692+#include <sstream>
4693+#include <vector>
4694+
4695+#include "yaml-cpp/binary.h"
4696+#include "yaml-cpp/node/impl.h"
4697+#include "yaml-cpp/node/iterator.h"
4698+#include "yaml-cpp/node/node.h"
4699+#include "yaml-cpp/node/type.h"
4700+#include "yaml-cpp/null.h"
4701+
4702+namespace YAML {
4703+class Binary;
4704+struct _Null;
4705+template <typename T>
4706+struct convert;
4707+} // namespace YAML
4708+
4709+namespace YAML {
4710+namespace conversion {
4711+inline bool IsInfinity(const std::string& input) {
4712+ return input == ".inf" || input == ".Inf" || input == ".INF" ||
4713+ input == "+.inf" || input == "+.Inf" || input == "+.INF";
4714+}
4715+
4716+inline bool IsNegativeInfinity(const std::string& input) {
4717+ return input == "-.inf" || input == "-.Inf" || input == "-.INF";
4718+}
4719+
4720+inline bool IsNaN(const std::string& input) {
4721+ return input == ".nan" || input == ".NaN" || input == ".NAN";
4722+}
4723+}
4724+
4725+// std::string
4726+template <>
4727+struct convert<std::string> {
4728+ static Node encode(const std::string& rhs) { return Node(rhs); }
4729+
4730+ static bool decode(const Node& node, std::string& rhs) {
4731+ if (!node.IsScalar())
4732+ return false;
4733+ rhs = node.Scalar();
4734+ return true;
4735+ }
4736+};
4737+
4738+// C-strings can only be encoded
4739+template <>
4740+struct convert<const char*> {
4741+ static Node encode(const char*& rhs) { return Node(rhs); }
4742+};
4743+
4744+template <std::size_t N>
4745+struct convert<const char[N]> {
4746+ static Node encode(const char(&rhs)[N]) { return Node(rhs); }
4747+};
4748+
4749+template <>
4750+struct convert<_Null> {
4751+ static Node encode(const _Null& /* rhs */) { return Node(); }
4752+
4753+ static bool decode(const Node& node, _Null& /* rhs */) {
4754+ return node.IsNull();
4755+ }
4756+};
4757+
4758+#define YAML_DEFINE_CONVERT_STREAMABLE(type, negative_op) \
4759+ template <> \
4760+ struct convert<type> { \
4761+ static Node encode(const type& rhs) { \
4762+ std::stringstream stream; \
4763+ stream.precision(std::numeric_limits<type>::digits10 + 1); \
4764+ stream << rhs; \
4765+ return Node(stream.str()); \
4766+ } \
4767+ \
4768+ static bool decode(const Node& node, type& rhs) { \
4769+ if (node.Type() != NodeType::Scalar) \
4770+ return false; \
4771+ const std::string& input = node.Scalar(); \
4772+ std::stringstream stream(input); \
4773+ stream.unsetf(std::ios::dec); \
4774+ if ((stream >> std::noskipws >> rhs) && (stream >> std::ws).eof()) \
4775+ return true; \
4776+ if (std::numeric_limits<type>::has_infinity) { \
4777+ if (conversion::IsInfinity(input)) { \
4778+ rhs = std::numeric_limits<type>::infinity(); \
4779+ return true; \
4780+ } else if (conversion::IsNegativeInfinity(input)) { \
4781+ rhs = negative_op std::numeric_limits<type>::infinity(); \
4782+ return true; \
4783+ } \
4784+ } \
4785+ \
4786+ if (std::numeric_limits<type>::has_quiet_NaN && \
4787+ conversion::IsNaN(input)) { \
4788+ rhs = std::numeric_limits<type>::quiet_NaN(); \
4789+ return true; \
4790+ } \
4791+ \
4792+ return false; \
4793+ } \
4794+ }
4795+
4796+#define YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(type) \
4797+ YAML_DEFINE_CONVERT_STREAMABLE(type, -)
4798+
4799+#define YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(type) \
4800+ YAML_DEFINE_CONVERT_STREAMABLE(type, +)
4801+
4802+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(int);
4803+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(short);
4804+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(long);
4805+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(long long);
4806+YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned);
4807+YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned short);
4808+YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned long);
4809+YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned long long);
4810+
4811+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(char);
4812+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(signed char);
4813+YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED(unsigned char);
4814+
4815+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(float);
4816+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(double);
4817+YAML_DEFINE_CONVERT_STREAMABLE_SIGNED(long double);
4818+
4819+#undef YAML_DEFINE_CONVERT_STREAMABLE_SIGNED
4820+#undef YAML_DEFINE_CONVERT_STREAMABLE_UNSIGNED
4821+#undef YAML_DEFINE_CONVERT_STREAMABLE
4822+
4823+// bool
4824+template <>
4825+struct convert<bool> {
4826+ static Node encode(bool rhs) { return rhs ? Node("true") : Node("false"); }
4827+
4828+ YAML_CPP_API static bool decode(const Node& node, bool& rhs);
4829+};
4830+
4831+// std::map
4832+template <typename K, typename V>
4833+struct convert<std::map<K, V> > {
4834+ static Node encode(const std::map<K, V>& rhs) {
4835+ Node node(NodeType::Map);
4836+ for (typename std::map<K, V>::const_iterator it = rhs.begin();
4837+ it != rhs.end(); ++it)
4838+ node.force_insert(it->first, it->second);
4839+ return node;
4840+ }
4841+
4842+ static bool decode(const Node& node, std::map<K, V>& rhs) {
4843+ if (!node.IsMap())
4844+ return false;
4845+
4846+ rhs.clear();
4847+ for (const_iterator it = node.begin(); it != node.end(); ++it)
4848+#if defined(__GNUC__) && __GNUC__ < 4
4849+ // workaround for GCC 3:
4850+ rhs[it->first.template as<K>()] = it->second.template as<V>();
4851+#else
4852+ rhs[it->first.as<K>()] = it->second.as<V>();
4853+#endif
4854+ return true;
4855+ }
4856+};
4857+
4858+// std::vector
4859+template <typename T>
4860+struct convert<std::vector<T> > {
4861+ static Node encode(const std::vector<T>& rhs) {
4862+ Node node(NodeType::Sequence);
4863+ for (typename std::vector<T>::const_iterator it = rhs.begin();
4864+ it != rhs.end(); ++it)
4865+ node.push_back(*it);
4866+ return node;
4867+ }
4868+
4869+ static bool decode(const Node& node, std::vector<T>& rhs) {
4870+ if (!node.IsSequence())
4871+ return false;
4872+
4873+ rhs.clear();
4874+ for (const_iterator it = node.begin(); it != node.end(); ++it)
4875+#if defined(__GNUC__) && __GNUC__ < 4
4876+ // workaround for GCC 3:
4877+ rhs.push_back(it->template as<T>());
4878+#else
4879+ rhs.push_back(it->as<T>());
4880+#endif
4881+ return true;
4882+ }
4883+};
4884+
4885+// std::list
4886+template <typename T>
4887+struct convert<std::list<T> > {
4888+ static Node encode(const std::list<T>& rhs) {
4889+ Node node(NodeType::Sequence);
4890+ for (typename std::list<T>::const_iterator it = rhs.begin();
4891+ it != rhs.end(); ++it)
4892+ node.push_back(*it);
4893+ return node;
4894+ }
4895+
4896+ static bool decode(const Node& node, std::list<T>& rhs) {
4897+ if (!node.IsSequence())
4898+ return false;
4899+
4900+ rhs.clear();
4901+ for (const_iterator it = node.begin(); it != node.end(); ++it)
4902+#if defined(__GNUC__) && __GNUC__ < 4
4903+ // workaround for GCC 3:
4904+ rhs.push_back(it->template as<T>());
4905+#else
4906+ rhs.push_back(it->as<T>());
4907+#endif
4908+ return true;
4909+ }
4910+};
4911+
4912+// std::pair
4913+template <typename T, typename U>
4914+struct convert<std::pair<T, U> > {
4915+ static Node encode(const std::pair<T, U>& rhs) {
4916+ Node node(NodeType::Sequence);
4917+ node.push_back(rhs.first);
4918+ node.push_back(rhs.second);
4919+ return node;
4920+ }
4921+
4922+ static bool decode(const Node& node, std::pair<T, U>& rhs) {
4923+ if (!node.IsSequence())
4924+ return false;
4925+ if (node.size() != 2)
4926+ return false;
4927+
4928+#if defined(__GNUC__) && __GNUC__ < 4
4929+ // workaround for GCC 3:
4930+ rhs.first = node[0].template as<T>();
4931+#else
4932+ rhs.first = node[0].as<T>();
4933+#endif
4934+#if defined(__GNUC__) && __GNUC__ < 4
4935+ // workaround for GCC 3:
4936+ rhs.second = node[1].template as<U>();
4937+#else
4938+ rhs.second = node[1].as<U>();
4939+#endif
4940+ return true;
4941+ }
4942+};
4943+
4944+// binary
4945+template <>
4946+struct convert<Binary> {
4947+ static Node encode(const Binary& rhs) {
4948+ return Node(EncodeBase64(rhs.data(), rhs.size()));
4949+ }
4950+
4951+ static bool decode(const Node& node, Binary& rhs) {
4952+ if (!node.IsScalar())
4953+ return false;
4954+
4955+ std::vector<unsigned char> data = DecodeBase64(node.Scalar());
4956+ if (data.empty() && !node.Scalar().empty())
4957+ return false;
4958+
4959+ rhs.swap(data);
4960+ return true;
4961+ }
4962+};
4963+}
4964+
4965+#endif // NODE_CONVERT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4966
4967=== added directory 'dist/yaml-cpp/include/yaml-cpp/node/detail'
4968=== added file 'dist/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h'
4969--- dist/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h 1970-01-01 00:00:00 +0000
4970+++ dist/yaml-cpp/include/yaml-cpp/node/detail/bool_type.h 2016-10-18 07:57:32 +0000
4971@@ -0,0 +1,26 @@
4972+#ifndef NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4973+#define NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4974+
4975+#if defined(_MSC_VER) || \
4976+ (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
4977+ (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
4978+#pragma once
4979+#endif
4980+
4981+namespace YAML {
4982+namespace detail {
4983+struct unspecified_bool {
4984+ struct NOT_ALLOWED;
4985+ static void true_value(NOT_ALLOWED*) {}
4986+};
4987+typedef void (*unspecified_bool_type)(unspecified_bool::NOT_ALLOWED*);
4988+}
4989+}
4990+
4991+#define YAML_CPP_OPERATOR_BOOL() \
4992+ operator YAML::detail::unspecified_bool_type() const { \
4993+ return this->operator!() ? 0 \
4994+ : &YAML::detail::unspecified_bool::true_value; \
4995+ }
4996+
4997+#endif // NODE_DETAIL_BOOL_TYPE_H_62B23520_7C8E_11DE_8A39_0800200C9A66
4998
4999=== added file 'dist/yaml-cpp/include/yaml-cpp/node/detail/impl.h'
5000--- dist/yaml-cpp/include/yaml-cpp/node/detail/impl.h 1970-01-01 00:00:00 +0000
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches