Skip to content

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets. This fork includes modifications to make this easier to use as a lecturing tool.

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
MIT
COPYING.cursors

Old55/mypaint

 
 

Repository files navigation

MyPaint

Build Status

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets. Its main features are a highly configurable brush engine, speed, and a fullscreen mode which allows artists to fully immerse themselves in their work.

MyPaint is written in Python, C++, and C. It makes use of the GTK toolkit, version 3.x. The source is maintained using git, primarily on Github.

Getting started

MyPaint has an associated library, libmypaint, which is distributed as a sister project on Github. If you fetch the application's source with git, this dependency will be fetched automatically by the commands below as a relative submodule. There are several third-party dependencies too:

  • scons (>= 2.1.0)
  • pygobject
  • gtk3
  • python (= 2.7) (OSX: python >= 2.7.4)
  • swig
  • numpy
  • pycairo (>= 1.4)
  • libpng
  • lcms2
  • libjson-c (>= 0.11, but the older "libjson" name at ~0.10 will work too)
  • librsvg

Recommended: a pressure sensitive input device (graphic tablet)

Build & Install (Linux)

  • Install dependencies: if you run Debian GNU/Linux or one of its derivatives like Linux Mint or Ubuntu, you can fetch the dependencies by running:

    $ sudo apt-get install g++ python-dev python-numpy \
      libgtk-3-dev python-gi-dev gir1.2-gtk-3.0 python-gi-cairo \ 
      swig scons gettext libpng12-dev liblcms2-dev libjson0-dev
  • Fetch the source: start by cloning the source repository. This will create a directory named "mypaint". You should only need to do this initial step once.

    $ git clone https://github.com/mypaint/mypaint.git
  • Update submodules: change into your cloned repository folder, and then update the "brushlib" submodule so that it contains libmypaint at the correct version:

    $ cd mypaint
    $ git submodule update --init --force
  • Build & test: starting from your cloned repository folder, run scons to compile the C++ and C parts.

    $ scons
  • Testing (interactive): if the build was successful, run the generated script with a clean temporary configuration area in order to test that the program works.

    $ rm -fr /tmp/mypaint_testconfig
    $ ./mypaint -c /tmp/mypaint_testconfig
  • Unit tests: These are purely optional for most users, but they're useful for developers and people reporting bugs. Please run the unit tests before committing new code, and implement doctests for important new Python code.

    $ sudo apt-get install python-nose
    $ nosetests --with-doctest
    • If testing outside a graphical environment (anywhere Gdk refuses to initialize), limit the doctests to just lib/ and brushlib/.
    • There are several interactive GUI tests in the tests/ folder which nosetests does not run - quite intentionally - because their executable bit is set.
  • Updating to the latest source at a later date is trivial, but doing this often means that you have to update the submodule or rebuild the compiled parts of the app:

    $ cd path/to/mypaint
    $ scons --clean
    $ git pull
    $ git submodule update --init --force
    $ scons
    $ [... other commands as necessary ...]
  • To install MyPaint into the traditional /usr/local area so that it can be run from your desktop environment:

    $ cd path/to/mypaint
    $ sudo scons prefix=/usr/local install
    • This usually results in entries in menus, launchers, Dashes and other desktop environment frippery.
  • To uninstall the program from a given prefix, add the --clean option:

    $ sudo scons prefix=/usr/local install --clean

Build & Install (Windows)

TBD. Please help us write this section.

Starting point for up-to-date information: http://wiki.mypaint.info/Development/Packaging#Windows

Build & Install (Mac)

IN PROGRESS: Please help us improve this section. The wiki's OS X notes are somewhat outdated and could do with improving too, but have possibly interesting notes about Quartz vs X11 builds: http://wiki.mypaint.info/Development/Packaging#OSX. Feedback welcome.

Most users will want to grab MyPaint-devel from macports or stick with the stable MyPaint portfile already there.

For the adventurous,the following is reported to work on OS X 10.9:

  • Environment setup: to use Frameworks Python (currently 2.7.8) while satisfying the other dependencies from Macports, use

    $ export PKG_CONFIG_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/pkgconfig/
    $ export CFLAGS="-I/opt/local/include"
  • Install dependencies:

    $ sudo port install gtk3
    $ sudo port install json-c
    $ sudo port install py27-numpy
    $ sudo port install py27-scipy
    $ sudo port install lcms2
    $ sudo port install py27-gobject3
    $ sudo port install hicolor-icon-theme
  • Fetch source and update submodules just as for Linux:

    $ git clone https://github.com/mypaint/mypaint.git
    $ cd mypaint
    $ git submodule update --init --force
  • Build and test. The sudo -E should not be necessary - let us know if it isn't, or if it's unhelpful when running the build in test mode.

    $ sudo -E scons
    $ ./mypaint -c /tmp/mypaint_cfgtmp_$$

Post-install: Linux

  • (Advanced) people creating packages for Linux distributions can install as if the prefix were /usr, but install the tree somewhere else. This can be done as an ordinary user.

    $ scons prefix=/usr --install-sandbox=`pwd`/path/to/sandbox

    NOTE: the sandbox location must be located under the current working directory, and be specified as an absolute path. You can use pwd or your build system's absolute "path-to-here" variable to achieve that. The command above installs the main launch script (for example) as ./path/to/sandbox/usr/bin/mypaint. Use a symlink if that's too limiting.

  • (Troubleshooting) runtime linker: you may need to update the runtime linker's caches and links after installation on some systems.

    $ sudo ldconfig

    Do this if you get any messages about MyPaint not being able to load mypaintlib.so when run on the command line.

    If you installed to a prefix other than the trusted locations, which are typically /usr/lib and /lib, you may need to add a line for your prefix into /etc/ld.so.conf or ld.so.conf.d before running ldconfig.

    Scons currently won't do this for you because the need to perform the action varies by distribution, and package distributors need to be able to defer it to post-installation scripting.

  • (Troubleshooting) icon theme caches: take care to update the icon theme cache for your prefix if you're installing mypaint to a location which has one of these files already. If you install new icons, any existing icon cache must be updated too, otherwise MyPaint won't be able to find its icons even if it looks in the right place.

    For example for an install into /usr, which has an icon cache on most systems, you should run:

    $ sudo gtk-update-icon-cache /usr/share/icons/hicolor
    $ sudo chmod a+r /usr/share/icons/hicolor/icon-theme.cache

    after installation to ensure that the cache is up to date. Scons currently won't do this for you because the cache file is optional.

    If you install to /usr/local, you may need to run this instead:

    $ gtk-update-icon-cache --ignore-theme-index /usr/local/share/icons/hicolor

Legal info

The licenses for various files are described in the LICENSE file. Documentation can be found within the program and on the homepage: http://mypaint.info/

A list of contributors can be found in the about dialog.

About

MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets. This fork includes modifications to make this easier to use as a lecturing tool.

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
GPL-2.0
COPYING
MIT
COPYING.cursors

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.6%
  • C++ 7.9%
  • Other 0.5%