Skip to content

NilanjanaLodh/PrintDialog_Backend

Repository files navigation

PrintDialog_Backend

Contains the project I'm pursuing as a part of GSOC'17.
This project basically has two major components

  • implementation of the CUPS and IPP Backends for the Common Printing Dialog Project(/CUPS_src)
  • the frontend and backend CPD interface libraries (/src).

This README just contains information on building and running the project. For more details see [Project Wiki](https://github.com/NilanjanaLodh/PrintDialog_Backend/wiki "Project Wiki")

Note on cloning this repo:

First time:
use git clone --recursive to clone this repository.
For pulling changes, use git pull --recurse-submodules && git submodule update --recursive. Otherwise, the interface/ folder would not get updated.

Build and installation

The following command will compile and install libraries, followed by the cups backend.
sudo make super
That's it! It will set up everything for you.

However, if you wish to compile and install each component separately, please follow these steps:
You first need to compile and install the CPD Library; This is one of the dependencies of the backends and the frotend client.

  • make lib (Compiles the libraries)
  • sudo make install-lib (Installs the libraries)

Then, you can build the rest of the project:

  • make (Compiles the cups backend and the sample frontend client)
  • sudo make install (Installs the backends)

Also, the (make release) command places all the library files into a separate /release folder.

Running

The backend is auto activated on running the frontend, and automatically exits when no frontend is running. Simply run the frontend: $ ./print_frontend

The list of printers discovered should start appearing automatically.

type help to get a list of available commands at the backend.

To run multiple frontends simultaneously, supply an extra argument denoting the instance number. For example:

  • ./print_frontend 1

In another terminal:

  • ./print_frontend 2

NOTE :

  • Make sure you exit all the frontends using the stop command only; otherwise the backend doesn't get notified and keeps running in the background, hogging resources.
  • Apart from the autoactivating method, you can also run the backend first in one terminal and then run the frontend in another. Doing this will allow you to see the debug statements at the backend.

Using the frontend and backend libraries

To develop a frontend client you need to use the CPDFrontend library.
It has pkg-config support: pkg-config --cflags --libs CPDFrontend Include CPDFrontend.h in your code.

Similarly, to develop a backend you need to use the CPDBackend library.
It has pkg-config support: pkg-config --cflags --libs CPDBackend Include CPDBackend.h in your code.

About

Please note that this repository is no longer actively maintained. It has now been split into https://github.com/NilanjanaLodh/OpenPrinting_CUPS_Backend and https://github.com/NilanjanaLodh/OpenPrinting_CPD_Libraries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published