Giter Site home page Giter Site logo

nilanjanalodh / printdialog_backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 2.0 1.05 MB

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.

License: MIT License

Makefile 3.83% C 96.17%

printdialog_backend's Introduction

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.

printdialog_backend's People

Contributors

nilanjanalodh avatar yashsriv avatar

Stargazers

Abhishek katara avatar

Watchers

James Cloos avatar Anshul Gupta avatar  avatar Abhishek katara avatar

Forkers

yashsriv mohitmo

printdialog_backend's Issues

Fix memory leaks

Fix memory leaks where possible
make all data types and argument names uniform

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.