SlideShare une entreprise Scribd logo
1  sur  44
Télécharger pour lire hors ligne
Dependencies in C++ 
using std::cpp oct-2014 
@diegorlosada 
Why there is no SerialPort in C/C++?
I just wanted a SerialPort! 
$ pip install pyserial 
>>> import serial 
>>> ser = serial.Serial(0) 
>>> print ser.name 
>>> ser.write("hello") 
>>> ser.close()
Serial Port in MRPT 
>5K files, 70 Mb 
First class robotics SW. 
CSerializable, CObject…
Serial Port in Boost/Asio
DONT MAKE ME USE YOUR DESIGN 
•Let me use your functionality without using your design 
–Functionality, core value should be independent, easily isolated: 
•Easily testable, mockable 
•Easily understandable 
•Easily reusable 
SerialPort 
CStream<SerialPort> 
Cserializable<T> 
Matrix 
Algorithm 
MyApp 
CStream<T>
RELATED PATTERNS 
•Functional programming 
•Low coupling, separation of concerns, single responsibility
LOW COUPLING (GRASP) & KISS
DECOUPLE FUNCTIONALITY
GENERIC FUNCTIONALITY
POLYMORPHIC
THE PROBLEM: NO DEP MANAGER 
•That wouldnt happen with a dep manager: 
–Install and manage deps per project 
–Portable: the same in all plaforms 
–Simple and fast to upload/share
EXISTING DEP MANAGERS
THE PROBLEM: NO DEP MANAGER
•OS based (package managers) 
–Apt-get, brew, MSI, vagrant 
•Dev system based 
–make, nuget, cmake 
DEP TOOLS FOR C/C++
Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software 
•Install: 
–Applications 
–Libraries –dev 
–Debug –dbg 
•apt-get install opencv-dev 
APT
Package: biicode 
Priority: optional 
Section: devel 
Maintainer: Julia S.Simon <julia.simon@biicode.com> 
Architecture: %ARCHITECTURE% 
Version: %VERSION% 
Depends: zlib1g, libc-bin 
Recommends: build-essential, cmake | python2.7 
Suggests: nodejs | default-jdk 
Homepage: http://www.biicode.com 
Description: Biicode is cool 
#!/bin/bash 
chmod -R a+rx /usr/lib/biicode/ 
ln -s -f /usr/lib/biicode/bii /usr/bin/bi 
#!/bin/bash 
rm /usr/bin/bii 
control 
postinst 
prerm 
APT FILES
dpkg-deb 
chmod 755 ${POSTINST_FILE} 
chmod 755 ${PRERM_FILE} 
chmod 755 ${TMPDIR}/DEBIAN 
chmod 755 ${TMPDIR}/DEBIAN/control 
find ${TMPDIR}/usr -type d -exec chmod 755 {} + 
echo "cd ${TMPDIR}" 
cd ${TMPDIR} 
echo "Calculating md5sums" 
find . -type f ! -regex '.*?biicode*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums 
chmod 644 DEBIAN/md5sums 
echo "cd ${HOLDER}" 
cd ${HOLDER} 
fakeroot dpkg-deb -z8 -Zgzip --build biicode 
echo "cp biicode.deb ~/biicode.deb" 
cp biicode.deb ~/biicode.deb 
#(cd; alien -r -c -v biicode.deb) 
#(cd; alien -t -c -v biicode.deb) 
APT FILES (2)
•pkgconfig (*nix) 
prefix=/usr/local 
exec_prefix=${prefix} 
libdir=${exec_prefix}/lib 
includedir=${prefix}/include 
Name: libzmq 
Description: 0MQ c++ library 
Version: 4.0.4 
Libs: -L${libdir} -lzmq 
Cflags: -I${includedir} 
$ > pkg-config --cflags --libs libzmq -I/usr/local/include -L/usr/local/lib -lzmq 
libzmq.pc 
MANIFEST APT-GET
Apt-get pros & cons 
•Pros 
–Mature 
–Transitive dependencies, conflict detection 
–GUIs 
•Cons 
–Linux only 
–Difficult to publish to debian/ubuntu repos, certain policies to be followed. Being part of such organizations non trivial. 
–Possible to run an apt repo (add to /etc/apt/sources.list) with reprepro, but manage infraestructure 
–May be slow (e.g. Ubuntu 12.04LTS cmake 2.8.7) 
APT Pros & Cons
MAC 
•Handles all above problems with one command. For OS X: 
–MacPorts 
–Fink 
–Homebrew 
–pkgsrc: binary packages for Mac OS X (more info) 
–etc. 
•In general, they: 
–take a single command as input, defining which package is to be installed 
–download source code (Fink downloads a pre-built application) 
–figures out dependencies 
–download missing dependencies 
–builds and install dependencies 
–builds and install the requested package 
–Usage example: brew install imagemagick 
MAC OS
category 
Rudix 
MacPorts 
Fink 
Homebrew 
pkgsrc / pkgin Homepage rudix.org MacPorts.org fink.thetis.ig42.org brew.sh pkgsrc.org andpkgin.net Year project started 2005 2002 2001 2009 Support for Darwin in 2001 
Number of packages 
488 (but `rudix available | wc - l` says 351) 
17,680 (but `port list | wc -l` says 17,686) 
7,951. `apt- cache search . | wc -l` says 209 stable binary .deps) 
2,498. `brew search | wc -l` says 2,591. This is not counting various extra "taps" 
8,884 binaries for OS X (according to `pkgin available | wc -l`) Source/binary/ both? Binary only Traditionally only source Option for both Source, but also binaries through "bottles" Both. 
Language written in 
Python 
Tcl 
Perl (front- end) 
Ruby 
C License BSD BSD GPL :( BSD BSD Default prefix Directly to /usr/local /opt/local /sw /usr/local/Cellar. Programs symlink to /usr/local/bin /usr/pkg Lastest GCC available Not available 4.8.1 4.8 4.9 No binary available but pkgsrc has 4.8 Installation of packages Extremely easy Slow, since it builds from source The source builds are understandably slow, but the binaries are quick Source compilation is obviously slow. I've had some linking issues sometimes. Trivially easy 
Uninstallation of packages 
Easy and painless 
Easy 
Easy and fast 
Very easy 
Trivially easy 
MAC PKG MANAGERS
•macports 
oPortfile (tcl script) 
oEl código puede estar en un CVS 
oTe tienen que aprobar el nuevo port (proceso manual) 
obrew 
oen el cual es necesario que tus paquetes sean open source para ser aceptados, pero es un proceso relativamente rápido tener una biblioteca en brew. 
SHARING PACKAGES
msi: Windows Installer, software component used for the installation, maintenance, and removal of software on modern Microsoft Windows systems 
Build a msi package with Visual Studio 
Video: https://www.youtube.com/watch?v=HpiZ_o5EgCo 
WINDOWS: MSI
•Support for every Windows release since 2000 
•Extensive support for installation of 64-bit applications 
•Supports creation of a single EXE to install your program for easy online distribution. 
•Standard Windows 2000/XP-style wizard interface. 
•Customizable setup types. 
•Complete uninstall capabilities. 
•Installation of files 
•Includes integrated support for "deflate", bzip2, and 7-Zip LZMA/LZMA2 file compression. 
•Creation of shortcuts anywhere, including in the Start Menu and on the desktop. 
•Creation of registry and .INI entries. 
•Support for passworded and encrypted installs. 
•Support for digitally signed installs and uninstalls. 
•Unicode installs. 
•Full source code is available (Borland Delphi 2.0-5.0 and 2009). 
; -- Example.iss -- 
; Creates its icon in the Programs folder of the start Menu instead of in a subfolder, and also creates a desktop icon. 
[Setup] 
AppName=My Program 
AppVersion=1.5 
DefaultDirName={pf}My Program 
; Since no icons will be created in "{group}", we don't need the wizard to ask for a Start Menu folder name: 
DisableProgramGroupPage=yes 
UninstallDisplayIcon={app}MyProg.exe 
OutputDir=userdocs:Inno Setup Examples Output 
[Files] 
Source: "MyProg.exe"; DestDir: "{app}" 
Source: "MyProg.chm"; DestDir: "{app}" 
Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme 
[Icons] 
Name: "{commonprograms}My Program"; Filename: "{app}MyProg.exe" 
Name: "{commondesktop}My Program"; Filename: "{app}MyProg.exe" 
INNO SETUP
If we run the *.iss with Inno, a SetUp Wizard is opened and 
INNO SETUP
chocolatey 
•Motor global de ejecución de PowerShell utilizando la infraestructura de empaquetado NuGet. 
•Como apt-get, pero construido para Windows . PowerShell. Se puede desarrollar herramientas y aplicaciones con NuGet y liberarlos con Chocolatey. 
$> cist vim 
$> cup all 
A la hora de subir tus paquetes: 
•Fácil de usar con aplicación sin dependencias. 
•Ficheros de configuración muy extensos y complejos cuando se tienen dependencias de otros paquetes. 
CHOCOLATEY
Empaquetar .msi / .exe 
.msi 
$packageName = 'Package Name' $installerType = 'msi' $url = 'http://path/to/download/installer_x86.msi' $url64 = 'http://path/to/download/installer_x64.msi' $silentArgs = '/quiet' $validExitCodes = @(0,3010) Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes 
.exe 
$name = 'Package Name' $url = 'http://path/to/download/installer.exe' Install-ChocolateyPackage $name 'EXE' '/VERYSILENT' $url 
CHOCOLATEY: Wraps around MSI EXE
PROVISIONERS: bash, puppet, chef, docker... 
Empty VM 
$ mkdir vm_dev 
$ VAGRANT INIT 
DEV VM 
$ VAGRANT UP 
$ VAGRANT DESTROY 
Make based 
CONTAINERS AND VIRTUALIZATION
•OS based (package managers) 
–Apt-get, brew, MSI, vagrant 
•Dev system based 
–make, nuget, cmake 
DEP TOOLS FOR C/C++
Make based 
myapp: ${SRC_CPP} ${LIB_DIR}other_team.lib ... ${LIB_DIR}other_team.lib: /shared_folder/latest/other_team.lib 
cp /shared_folder/latest/other_team.lib ${LIB_DIR}other_team.lib 
MAKE BASED
•git submodule 
–git submodule add git://github.com/chneukirchen/rack.git rack 
•git subtree 
–git subtree add --prefix .vim/bundle/tpope-vim- surround https://bitbucket.org/vim-plugins- mirror/vim-surround.git master --squash 
•As usual, with all things git, there is a learning curve to make the most of the feature. 
•The user responsible for commits to subprojects 
•Contributing back might be complex 
GIT Based
CYGWIN
MINGW
•http://www.nuget.org/ 
NuGET for C++
find_package(FOO): no download packages, only find “my_lib” library in your system if exists. 
It would need a file named foo-config.cmake to set all the variables where the files are saved (include and lib folder) 
CMAKE and FindPackage
# (compute PREFIX relative to file location) 
set(foo_INCLUDE_DIRS ${PREFIX}/include/foo-1.2) 
set(foo_LIBRARY ${PREFIX}/lib/foo-1.2/libfoo.a) 
find_package(Foo REQUIRED) 
include_directories(${foo_INCLUDE_DIRS}) 
add_executable(myexe myexe.c) 
target_link_libraries(myexe ${foo_LIBRARY}) 
Foo-config.cmake 
CMakeLists.txt 
CMAKE and FindPackage
# - Try to find LibXml2 
# Once done this will define 
# LIBXML2_FOUND - System has LibXml2 
# LIBXML2_INCLUDE_DIRS - The LibXml2 include directories 
# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 
# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 
find_package(PkgConfig) 
pkg_check_modules(PC_LIBXML QUIET libxml-2.0) 
set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) 
find_path(LIBXML2_INCLUDE_DIR libxml/xpath.h 
HINTS ${PC_LIBXML_INCLUDEDIR} ${PC_LIBXML_INCLUDE_DIRS} 
PATH_SUFFIXES libxml2 ) 
find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 
HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} ) 
set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} ) 
set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ) 
CMAKE and FindPackage
CPM CPP 
•CMake + Git 
# ++ MODULE: OpenGL platform 
CPM_AddModule("gl_platform" 
GIT_REPOSITORY "https://github.com/iauns/cpm-gl-platform" GIT_TAG "1.3.5")
WHAT IS BIICODE?
BIICODE 
HWClient.h 
HWClient.cpp 
HWServer.h 
HWServer.cpp 
Person.h 
Person.cpp 
ZMQ 
PROTOBUF 
SQLITE 
ClientApp.cpp 
ServerApp.cpp 
TCP
OPEN SOURCE QUEST
FRIENDS
GRACIAS! 
@biicode 
www.biicode.com 
using std::cpp oct-2014 
@diegorlosada

Contenu connexe

Tendances

CMake Talk 2008
CMake Talk 2008CMake Talk 2008
CMake Talk 2008cynapses
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is DockerNick Belhomme
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Puppet
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package developmentTihomir Opačić
 
Puppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabPuppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabAlessandro Franceschi
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90minsLarry Cai
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshopNick Belhomme
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaPantheon
 
Dependency Management with Composer
Dependency Management with ComposerDependency Management with Composer
Dependency Management with ComposerJordi Boggiano
 
Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Kirill Chebunin
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE WorkshopPuppet
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMakeICS
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Rafael Dohms
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSPuppet
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersChang W. Doh
 

Tendances (20)

Cmake kitware
Cmake kitwareCmake kitware
Cmake kitware
 
CMake Talk 2008
CMake Talk 2008CMake Talk 2008
CMake Talk 2008
 
Vagrant move over, here is Docker
Vagrant move over, here is DockerVagrant move over, here is Docker
Vagrant move over, here is Docker
 
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
Scalable Cloud-Native Masterless Puppet, with PuppetDB and Bolt, Craig Watson...
 
Laravel 4 package development
Laravel 4 package developmentLaravel 4 package development
Laravel 4 package development
 
Puppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLabPuppet Continuous Integration with PE and GitLab
Puppet Continuous Integration with PE and GitLab
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90mins
 
Zend Framework 1.8 workshop
Zend Framework 1.8 workshopZend Framework 1.8 workshop
Zend Framework 1.8 workshop
 
Automate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon ViennaAutomate Your Automation | DrupalCon Vienna
Automate Your Automation | DrupalCon Vienna
 
Dependency Management with Composer
Dependency Management with ComposerDependency Management with Composer
Dependency Management with Composer
 
Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?Composer - Package Management for PHP. Silver Bullet?
Composer - Package Management for PHP. Silver Bullet?
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE Workshop
 
An Introduction to CMake
An Introduction to CMakeAn Introduction to CMake
An Introduction to CMake
 
Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13Composer for Busy Developers - php|tek13
Composer for Busy Developers - php|tek13
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWSConfiguring Highly Scalable Compile Masters, Vasco Cardoso, AWS
Configuring Highly Scalable Compile Masters, Vasco Cardoso, AWS
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
 
はじめてのSymfony2
はじめてのSymfony2はじめてのSymfony2
はじめてのSymfony2
 
Maven 3.0 at Øredev
Maven 3.0 at ØredevMaven 3.0 at Øredev
Maven 3.0 at Øredev
 

Similaire à Dependencies Managers in C/C++. Using stdcpp 2014

DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabricandymccurdy
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerJürgen Gutsch
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionBen Hall
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrindermarekgoldmann
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Ontico
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsSander van der Burg
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudSalesforce Developers
 
Package Management via Spack on SJTU π Supercomputer
Package Management via Spack on SJTU π SupercomputerPackage Management via Spack on SJTU π Supercomputer
Package Management via Spack on SJTU π SupercomputerJianwen Wei
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructureSergiy Kukunin
 

Similaire à Dependencies Managers in C/C++. Using stdcpp 2014 (20)

DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Python Deployment with Fabric
Python Deployment with FabricPython Deployment with Fabric
Python Deployment with Fabric
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinder
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)Использование Docker в CI / Александр Акбашев (HERE Technologies)
Использование Docker в CI / Александр Акбашев (HERE Technologies)
 
Using Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutionsUsing Nix and Docker as automated deployment solutions
Using Nix and Docker as automated deployment solutions
 
Composer
ComposerComposer
Composer
 
PHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the CloudPHP on Heroku: Deploying and Scaling Apps in the Cloud
PHP on Heroku: Deploying and Scaling Apps in the Cloud
 
Package Management via Spack on SJTU π Supercomputer
Package Management via Spack on SJTU π SupercomputerPackage Management via Spack on SJTU π Supercomputer
Package Management via Spack on SJTU π Supercomputer
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
Start tracking your ruby infrastructure
Start tracking your ruby infrastructureStart tracking your ruby infrastructure
Start tracking your ruby infrastructure
 

Dernier

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 

Dernier (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 

Dependencies Managers in C/C++. Using stdcpp 2014

  • 1. Dependencies in C++ using std::cpp oct-2014 @diegorlosada Why there is no SerialPort in C/C++?
  • 2. I just wanted a SerialPort! $ pip install pyserial >>> import serial >>> ser = serial.Serial(0) >>> print ser.name >>> ser.write("hello") >>> ser.close()
  • 3. Serial Port in MRPT >5K files, 70 Mb First class robotics SW. CSerializable, CObject…
  • 4. Serial Port in Boost/Asio
  • 5. DONT MAKE ME USE YOUR DESIGN •Let me use your functionality without using your design –Functionality, core value should be independent, easily isolated: •Easily testable, mockable •Easily understandable •Easily reusable SerialPort CStream<SerialPort> Cserializable<T> Matrix Algorithm MyApp CStream<T>
  • 6. RELATED PATTERNS •Functional programming •Low coupling, separation of concerns, single responsibility
  • 9.
  • 12. THE PROBLEM: NO DEP MANAGER •That wouldnt happen with a dep manager: –Install and manage deps per project –Portable: the same in all plaforms –Simple and fast to upload/share
  • 14. THE PROBLEM: NO DEP MANAGER
  • 15. •OS based (package managers) –Apt-get, brew, MSI, vagrant •Dev system based –make, nuget, cmake DEP TOOLS FOR C/C++
  • 16. Advanced Packaging Tool, or APT, is a free user interface that works with core libraries to handle the installation and removal of software •Install: –Applications –Libraries –dev –Debug –dbg •apt-get install opencv-dev APT
  • 17. Package: biicode Priority: optional Section: devel Maintainer: Julia S.Simon <julia.simon@biicode.com> Architecture: %ARCHITECTURE% Version: %VERSION% Depends: zlib1g, libc-bin Recommends: build-essential, cmake | python2.7 Suggests: nodejs | default-jdk Homepage: http://www.biicode.com Description: Biicode is cool #!/bin/bash chmod -R a+rx /usr/lib/biicode/ ln -s -f /usr/lib/biicode/bii /usr/bin/bi #!/bin/bash rm /usr/bin/bii control postinst prerm APT FILES
  • 18. dpkg-deb chmod 755 ${POSTINST_FILE} chmod 755 ${PRERM_FILE} chmod 755 ${TMPDIR}/DEBIAN chmod 755 ${TMPDIR}/DEBIAN/control find ${TMPDIR}/usr -type d -exec chmod 755 {} + echo "cd ${TMPDIR}" cd ${TMPDIR} echo "Calculating md5sums" find . -type f ! -regex '.*?biicode*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums chmod 644 DEBIAN/md5sums echo "cd ${HOLDER}" cd ${HOLDER} fakeroot dpkg-deb -z8 -Zgzip --build biicode echo "cp biicode.deb ~/biicode.deb" cp biicode.deb ~/biicode.deb #(cd; alien -r -c -v biicode.deb) #(cd; alien -t -c -v biicode.deb) APT FILES (2)
  • 19. •pkgconfig (*nix) prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libzmq Description: 0MQ c++ library Version: 4.0.4 Libs: -L${libdir} -lzmq Cflags: -I${includedir} $ > pkg-config --cflags --libs libzmq -I/usr/local/include -L/usr/local/lib -lzmq libzmq.pc MANIFEST APT-GET
  • 20. Apt-get pros & cons •Pros –Mature –Transitive dependencies, conflict detection –GUIs •Cons –Linux only –Difficult to publish to debian/ubuntu repos, certain policies to be followed. Being part of such organizations non trivial. –Possible to run an apt repo (add to /etc/apt/sources.list) with reprepro, but manage infraestructure –May be slow (e.g. Ubuntu 12.04LTS cmake 2.8.7) APT Pros & Cons
  • 21. MAC •Handles all above problems with one command. For OS X: –MacPorts –Fink –Homebrew –pkgsrc: binary packages for Mac OS X (more info) –etc. •In general, they: –take a single command as input, defining which package is to be installed –download source code (Fink downloads a pre-built application) –figures out dependencies –download missing dependencies –builds and install dependencies –builds and install the requested package –Usage example: brew install imagemagick MAC OS
  • 22. category Rudix MacPorts Fink Homebrew pkgsrc / pkgin Homepage rudix.org MacPorts.org fink.thetis.ig42.org brew.sh pkgsrc.org andpkgin.net Year project started 2005 2002 2001 2009 Support for Darwin in 2001 Number of packages 488 (but `rudix available | wc - l` says 351) 17,680 (but `port list | wc -l` says 17,686) 7,951. `apt- cache search . | wc -l` says 209 stable binary .deps) 2,498. `brew search | wc -l` says 2,591. This is not counting various extra "taps" 8,884 binaries for OS X (according to `pkgin available | wc -l`) Source/binary/ both? Binary only Traditionally only source Option for both Source, but also binaries through "bottles" Both. Language written in Python Tcl Perl (front- end) Ruby C License BSD BSD GPL :( BSD BSD Default prefix Directly to /usr/local /opt/local /sw /usr/local/Cellar. Programs symlink to /usr/local/bin /usr/pkg Lastest GCC available Not available 4.8.1 4.8 4.9 No binary available but pkgsrc has 4.8 Installation of packages Extremely easy Slow, since it builds from source The source builds are understandably slow, but the binaries are quick Source compilation is obviously slow. I've had some linking issues sometimes. Trivially easy Uninstallation of packages Easy and painless Easy Easy and fast Very easy Trivially easy MAC PKG MANAGERS
  • 23. •macports oPortfile (tcl script) oEl código puede estar en un CVS oTe tienen que aprobar el nuevo port (proceso manual) obrew oen el cual es necesario que tus paquetes sean open source para ser aceptados, pero es un proceso relativamente rápido tener una biblioteca en brew. SHARING PACKAGES
  • 24. msi: Windows Installer, software component used for the installation, maintenance, and removal of software on modern Microsoft Windows systems Build a msi package with Visual Studio Video: https://www.youtube.com/watch?v=HpiZ_o5EgCo WINDOWS: MSI
  • 25. •Support for every Windows release since 2000 •Extensive support for installation of 64-bit applications •Supports creation of a single EXE to install your program for easy online distribution. •Standard Windows 2000/XP-style wizard interface. •Customizable setup types. •Complete uninstall capabilities. •Installation of files •Includes integrated support for "deflate", bzip2, and 7-Zip LZMA/LZMA2 file compression. •Creation of shortcuts anywhere, including in the Start Menu and on the desktop. •Creation of registry and .INI entries. •Support for passworded and encrypted installs. •Support for digitally signed installs and uninstalls. •Unicode installs. •Full source code is available (Borland Delphi 2.0-5.0 and 2009). ; -- Example.iss -- ; Creates its icon in the Programs folder of the start Menu instead of in a subfolder, and also creates a desktop icon. [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}My Program ; Since no icons will be created in "{group}", we don't need the wizard to ask for a Start Menu folder name: DisableProgramGroupPage=yes UninstallDisplayIcon={app}MyProg.exe OutputDir=userdocs:Inno Setup Examples Output [Files] Source: "MyProg.exe"; DestDir: "{app}" Source: "MyProg.chm"; DestDir: "{app}" Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme [Icons] Name: "{commonprograms}My Program"; Filename: "{app}MyProg.exe" Name: "{commondesktop}My Program"; Filename: "{app}MyProg.exe" INNO SETUP
  • 26. If we run the *.iss with Inno, a SetUp Wizard is opened and INNO SETUP
  • 27. chocolatey •Motor global de ejecución de PowerShell utilizando la infraestructura de empaquetado NuGet. •Como apt-get, pero construido para Windows . PowerShell. Se puede desarrollar herramientas y aplicaciones con NuGet y liberarlos con Chocolatey. $> cist vim $> cup all A la hora de subir tus paquetes: •Fácil de usar con aplicación sin dependencias. •Ficheros de configuración muy extensos y complejos cuando se tienen dependencias de otros paquetes. CHOCOLATEY
  • 28. Empaquetar .msi / .exe .msi $packageName = 'Package Name' $installerType = 'msi' $url = 'http://path/to/download/installer_x86.msi' $url64 = 'http://path/to/download/installer_x64.msi' $silentArgs = '/quiet' $validExitCodes = @(0,3010) Install-ChocolateyPackage "$packageName" "$installerType" "$silentArgs" "$url" "$url64" -validExitCodes $validExitCodes .exe $name = 'Package Name' $url = 'http://path/to/download/installer.exe' Install-ChocolateyPackage $name 'EXE' '/VERYSILENT' $url CHOCOLATEY: Wraps around MSI EXE
  • 29. PROVISIONERS: bash, puppet, chef, docker... Empty VM $ mkdir vm_dev $ VAGRANT INIT DEV VM $ VAGRANT UP $ VAGRANT DESTROY Make based CONTAINERS AND VIRTUALIZATION
  • 30. •OS based (package managers) –Apt-get, brew, MSI, vagrant •Dev system based –make, nuget, cmake DEP TOOLS FOR C/C++
  • 31. Make based myapp: ${SRC_CPP} ${LIB_DIR}other_team.lib ... ${LIB_DIR}other_team.lib: /shared_folder/latest/other_team.lib cp /shared_folder/latest/other_team.lib ${LIB_DIR}other_team.lib MAKE BASED
  • 32. •git submodule –git submodule add git://github.com/chneukirchen/rack.git rack •git subtree –git subtree add --prefix .vim/bundle/tpope-vim- surround https://bitbucket.org/vim-plugins- mirror/vim-surround.git master --squash •As usual, with all things git, there is a learning curve to make the most of the feature. •The user responsible for commits to subprojects •Contributing back might be complex GIT Based
  • 34. MINGW
  • 36. find_package(FOO): no download packages, only find “my_lib” library in your system if exists. It would need a file named foo-config.cmake to set all the variables where the files are saved (include and lib folder) CMAKE and FindPackage
  • 37. # (compute PREFIX relative to file location) set(foo_INCLUDE_DIRS ${PREFIX}/include/foo-1.2) set(foo_LIBRARY ${PREFIX}/lib/foo-1.2/libfoo.a) find_package(Foo REQUIRED) include_directories(${foo_INCLUDE_DIRS}) add_executable(myexe myexe.c) target_link_libraries(myexe ${foo_LIBRARY}) Foo-config.cmake CMakeLists.txt CMAKE and FindPackage
  • 38. # - Try to find LibXml2 # Once done this will define # LIBXML2_FOUND - System has LibXml2 # LIBXML2_INCLUDE_DIRS - The LibXml2 include directories # LIBXML2_LIBRARIES - The libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 find_package(PkgConfig) pkg_check_modules(PC_LIBXML QUIET libxml-2.0) set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) find_path(LIBXML2_INCLUDE_DIR libxml/xpath.h HINTS ${PC_LIBXML_INCLUDEDIR} ${PC_LIBXML_INCLUDE_DIRS} PATH_SUFFIXES libxml2 ) find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} ) set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} ) set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ) CMAKE and FindPackage
  • 39. CPM CPP •CMake + Git # ++ MODULE: OpenGL platform CPM_AddModule("gl_platform" GIT_REPOSITORY "https://github.com/iauns/cpm-gl-platform" GIT_TAG "1.3.5")
  • 41. BIICODE HWClient.h HWClient.cpp HWServer.h HWServer.cpp Person.h Person.cpp ZMQ PROTOBUF SQLITE ClientApp.cpp ServerApp.cpp TCP
  • 44. GRACIAS! @biicode www.biicode.com using std::cpp oct-2014 @diegorlosada