Xathrya Sabertooth |
- Installing GraphicsMagick on Linux
- Installing libHaru from Source
- Installing Boost Library for Linux
- Installation of CMake
- Wt C++ Web Toolkit Introduction
Installing GraphicsMagick on Linux Posted: 29 Jun 2013 02:34 AM PDT GraphicsMagick is self-claimed as swiss army knife of image processing. It provides a robust and efficient collection of tools and libraries which support reading, writing, and manipulating an image in over 88 major formats including DPX, GIF, JPEG, JPEG-2000, PNG, PDF, PNM, and TIFF. The image processing is multithreaded using OpenMP. In this article we will discuss about installing ImageMagick in Linux. For this purpose I use:
Obtain the MaterialsGraphicsMagick can be obtain using two ways: download from sourceforge or clone using Mercurial. To download the tarball, go to this link. Then, extract the content and change to its directory. If you want to clone the repository, do this command: hg clone http://hg.code.sf.net/p/graphicsmagick/code GM cd GM At this point, for any method you choose, we are now at GraphicsMagick’s root directory. InstallationBuilding ImagesMagick can be done by using following commands (assuming we are at GraphicsMagick’s root directory): ./configure make make install Note that to do installation, you should have enough privilege. At this point, we have installed GraphicsMagick standard installation. |
Installing libHaru from Source Posted: 29 Jun 2013 01:32 AM PDT LibHaru is a free, cross platform, open source library for generating PDF files. libHaru can be used to produce PDF files, however it still lack at support for reading and editing existing PDF files. The feature supported by libHaru:
In this article we will discuss about installing libHaru in Linux. For this purpose I use:
Obtain the MaterialslibHaru use github to host the codes. To download source codes there are two methods: download as tar ball, or clone the repository. To download the tarball, go to this link. Then, extract the content and change to its directory. If you want to clone the repository, do this command: git clone https://github.com/libharu/libharu.git cd libharu At this point, for any method you choose, we are now at libharu root directory. InstallationlibHaru can use cmake for building. To build libHaru, do following cmake . make make install Note that to do installation, you should have enough privilege. |
Installing Boost Library for Linux Posted: 28 Jun 2013 11:50 PM PDT Boost is portable C++ source libraries and work well with the C++ Standard Library. It is intended to be widely useful and usable across a broad spectrum of applications. In this article, we will discuss about how to install Boost Library within Linux. The method we use here is generic way, which means, it can be applied to any Linux distribution. However, for demonstration I will use following:
PreparationAt least you have privileges for installing the files later. Obtain the MaterialsBoost Library has official site here. The latest version of Boost library is version 1.53.0 which can be downloaded from sourceforge (here). While there is also Boost 1.54.0 beta available, we will use the stable version at this time. Compile & InstallAssuming the archive is boost_1_53_0.tar.bz2 and on path ~/Downloads or /home/user/Downloads. First we have to extract the library from the archive. cd ~/Downloads tar -xjf boost_1_53_0.bz2 cd boost_1_53_0.bz2 Next, build bjam binary and also set some options on what to compile and where to. Boost is a collection of libraries / modules. The whole Boost libraries will cost some time and computation for compilation. We can skip some libraries we don’t want or won’t use. To see the list of libraries need compiling, run following: ./bootstrap.sh --show-libraries For example, following is the result / the list of libraries on Boost 1.53.0:
Pick any modules you want to include in Boost, for example: filesystem,program_options, and system. In this case, we can use argument –with-library=filesystem,program_options,system to bootstrap.sh. However you can also pick all / compile all the libraries, just invoke ./bootstrap.sh without –with-library switch. Next, choose where the library will be installed. By default, the header files will be installed to /usr/local/include and the libraries (.so, .a) will be installed to /usr/local/lib. If other path is preferred, we can use –libdir switch for specifying where library will be stored and –includedir switch for specifying where header will be stored. Now bring all of the info and invoke like this: ./bootstrap.sh --libdir=/usr/local/lib64 --includedir=/usr/local/include And you could see I will build all the libraries and store the library to /usr/local/include. Now let’s build the library ./bjam Then install by (make sure you have privileges to do) ./bjam install At this point we have successfully installed Boost library |
Posted: 28 Jun 2013 10:45 PM PDT CMake is a cross platform, open-source build system consists of tools designed to build, test, and packaging software. It used to control the software compilation process using simple platform and compiler independent configuration files. In general, CMake generates native makefiles and workspaces that can be used in the chosen compiler environment. In this article, we will discuss about how to install CMake, either binary or from sources. The method we use here is generic way, which means, it can be applied to any Operating System. However, for demonstration I will use following machine:
PreparationAt least you have privileges for installing the files later. Obtain the MaterialsA binary and source code can be obtained here. The latest version per June 29th, 2013 is 2.8.11. Both binaries and source codes can be downloaded from here. As I use Linux I would download source code (http://www.cmake.org/files/v2.8/cmake-2.8.11.1.tar.gz) and unfortunately no binary for Linux x64 so we download this binary (http://www.cmake.org/files/v2.8/cmake-2.8.11.1-Linux-i386.sh). If you want to download for Windows version, go grab source code (http://www.cmake.org/files/v2.8/cmake-2.8.11.1.zip) and binary (http://www.cmake.org/files/v2.8/cmake-2.8.11.1-win32-x86.exe) Binary InstallationAssuming we download shell archive cmake-2.8.11.1-Linux-i386.sh. Make sure the file is executable (having +x permission). Do following if you want to set the permission: chmod +x cmake-2.8.11.1-Linux-i386.sh Then execute it from terminal ./cmake-2.8.11.1-Linux-i386.sh Make sure you have privileges to do installation. Binary installation for Windows system is similar. Just execute the application to initiated installation. Source Code Compilation & InstallationThere are two case for compilation, whether you have CMake or not installed in your system. If you have CMake, we can use CMake to build CMake. However, we can also build it from scratch. Either way we should extract the sourcecode from. A simple way is using command: tar -xf cmake-2.8.11.1-Linux-i386.tar.gz cd cmake-2.8.11.1 From ScratchThis case will describe compilation from scratch and suitable for us who either don’t have CMake installed before or just want to compile it from scratch. We need a compiler and a make utility and running UNIX/Mac OSX/MinGW/MSYS/Cygwin. Run the bootstrap script in the source directory of CMake. If CMake is going to be installed on particular path, use –prefix. For this example I use /usr/local as my base path. ./bootstrap --prefix=/usr/local make make install Unfortunately for Windows user who didn’t use Cygwin, you can’t do this method. Instead, you should download the binary version of CMake. Build With CMakeBuilding CMake with CMake is like building any CMake-based project. Run CMake to the root of cmake directory (e.x: ~/cmake-2.8.11.1). cd ~/cmake-2.8.11.1 cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr/local . make make install Notice the “.” (dot) in the trail, that’s part of command. At this point, we have successfully install CMake |
Wt C++ Web Toolkit Introduction Posted: 28 Jun 2013 07:16 PM PDT Wt (pronounces as witty) is a C++ library for developing web application. Wt offers abstraction of web-specific implementation details including client-server protocols, event handling, graphics support, graceful degradation (or progressive enhancement), and URL handling. The API is widget-centric, like Qt and other toolkits. Unlike many page-base frameworks, Wt was designed for creating stateful application that are at the same time highly interactive (leveraging techniques such as WebSockets, and Ajax) and accessible (supporting plain HTML browsers), using automatic graceful degradation or progressive enhancement. Things that are natural and simple with Wt would require an impractical amount of effort otherwise: switching widgets using animations, while being perfectly indexed by search robots with clean URLs, or having a persistent chat widget open throughout, that even works in legacy browsers like Microsoft Internet Explorer 6. Wt can acts as a stand alone Http(s)/WebSocket server or integrates through FastCGI with other web servers. Why WtPage-based web frameworks (Django, Ruby on Rails, PHP, etc …) do not attempt to abstract underlying technologies (HTML/XHTML, JavaScript, CSS, Ajax, WebSockets, Comet, Forms, DHTML, SVG/VML/Canvas). As a consequence, a web developer needs to be familiar with all of these evolving technologies and is also responsible for graceful degradation when browser support is lacking. The structure of many web applications still follows mostly the page-centric paradigm of early day HTML. This means that not only will you need to implement a controller to indicate how a user moves from page to page, but when using advanced Ajax or WebSockets, you will need to design and maintain your client-server communication. Pure Ajax frameworks on the other hand require tedious JavaScript programming to deal with browser quirks, and client-server programming to interact securely with server resources. These applications usually are not compliant with accessibility guidelines and cannot be indexed by a search robot. Generating HTML code or filling HTML templates is prone to security problems such as XSS (Cross-Site-Scripting) by unwillingly allowing JavaScript to be inserted in the page, and CSRF (Cross-Site Request Forgery) by trusting cookies for authentication. These security problems are hard to avoid in traditional frameworks when as a developer you need to implement JavaScript functionality and thus the framework cannot filter it out. In contrast, a web application developed with Wt is developed against a C++ API, and the library provides the necessary HTML, CSS, Javascript, CGI, SVG/VML/Canvas and Ajax code. The responsibility of writing secure and browser-portable web applications is carried by Wt. For example, if available, Wt will maximally use JavaScript, Ajax and even WebSockets, but applications developed using Wt will also function correctly when JavaScript is not available. Wt will start with a plain HTML/CGI application and progressively enhance to a rich Ajax application if possible. With Wt, security is built-in and by default. Typical Use Scenario
Other Benefits
FeaturesCore Library
Event Handling
Native Painting Support
GUI ComponentGUI component is composed of various widgets. For comprehensive examples, you can visit this link. Built-in Security
Object Relational Mapping LibraryWt comes with Wt::Dbo, a self-contained library which implements Object-Relational mapping, and thus a convenient way to interact with SQL databases from C++. Although features like optimistic concurrency control make this an ideal technology for a database driven web application (and it provides good integration with Wt’s MVC classes), the library can also be used for other applications, and does not depend on Wt. The ORM library has the following features:
Deploymenta |
You are subscribed to email updates from Xathrya Sabertooth To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
Tidak ada komentar:
Posting Komentar