Skip to content

Commit

Permalink
Refactor README and Arch Linux Install Instructions [2] (#643)
Browse files Browse the repository at this point in the history
* Added emacs and vim artifacts to gitignore

* Modified Arch Linux build instructions for custom tested config.pri

* Removed unneccesary instructions for gitignore and added source comments

* Added template Arch Linux build instructions

* Added mention of template archlinux config in install instructions
  • Loading branch information
Songtech-0912 authored Jul 1, 2021
1 parent cf38f48 commit c4c06b6
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 44 deletions.
20 changes: 17 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# List of git-untracked files
# ---------------------------

# General build artifacts

*.h.cpp
*.com
*.DS_Store
*_moc.cpp
*_resource.rc
moc*.cpp
*moc

# Build directories

build
build32
build64
Expand All @@ -31,10 +39,17 @@ Info.plist
*Win32
qrc_*.cpp
*GeneratedFiles
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# Emacs/Vim

*.temp
*.swp

# Ignore Visual Studio temporary files, build results, and
# files generated by popular Visual Studio add-ons.

# User-specific files

*.suo
*.user
*.sln.docstates
Expand Down Expand Up @@ -221,7 +236,6 @@ bigtosmall.txt
#Documentation/source/_group*
#Documentation/source/_prefs.rst
#Documentation/source/plugins
Documentation/source/_build
.qmake.stash
App/Natron
BreakpadClient.xcodeproj/
Expand Down
105 changes: 81 additions & 24 deletions INSTALL_LINUX.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Instructions for installing Natron from sources on GNU/Linux
============================================================

This file is supposed to guide you step by step to have working (compiling) version of
Natron on GNU/Linux.
This file is supposed to guide you step by step to have working (compiling) version of Natron on GNU/Linux. Here's the gist of what you need to know:

* It's recommended to use Docker for the easiest hands-off installation method - see [here](#using-docker) for more details
* If you are on Arch Linux or Manjaro, see [this](#arch-linux) for relevant details
* If you are on Centos, Fedora or RHEL, see [here](#centos7) for specific instructions
* If you are on a Debian-based Linux (such as Ubuntu, KDE Plasma, ElementaryOS etc.) see [here](#debian-based) for details
* If you are willing to try the complete installation process, the instructions are below

0. [Using Docker](#using-docker)
1. [Dependencies](#dependencies)
- [Installing the full Natron SDK](#installing-the-full-natron-sdk)
- [Environment to use the Natron SDK](#environment-to-use-the-natron-sdk)
Expand All @@ -26,6 +32,15 @@ Natron on GNU/Linux.
- [CentOS7/Fedora](#centos7)
5. [Generating Python bindings](#generating-python-bindings)

# Using Docker

If you have `docker` installed, the installation procedure is very simple. Simply create a directory called `builds`, and then run the following command:

```bash
docker run -it --rm --mount src="$(pwd)/builds",target=/home/builds_archive,type=bind natrongithub/natron-sdk:latest
```

Docker will automatically do the rest for you, and you should have a complete Natron binary in `./builds` (as a tgz archive).

# Dependencies

Expand Down Expand Up @@ -220,45 +235,73 @@ global.pri file. To enable an option just add `CONFIG+=<option>` in the qmake ca

## Arch Linux

On Arch Linux you can do the following:
On Arch Linux, there are two tested methods of compiling Natron: using the AUR or via manual compiling.

### If using AUR

Simply run the command below:

```
sudo pacman -S expat boost
yay -S natron-compositor
```
Install the following packages from AUR:

### If compiling manually

First, install build dependencies. You can install GCC, Expat and Boost directly from the Arch Linux official repositories, like so:

```
qt4 python2-pyside python2-shiboken
sudo pacman -S expat boost gcc
```

Cairo has to be build from source, because Arch Linux does not provide a static version (as far as we know). It is fairly easy to do:
You will also need additional Boost libraries, cairo, and Qt4 (provided by PySide). They can be installed with the following command:

```
git clone git://anongit.freedesktop.org/git/cairo
cd cairo
./autogen.sh
make
sudo make install
yay -S boost-libs cairo glfw-x11 python2-pyside
```

It should be installed in `/usr/local/lib`
Then, clone Natron's repo:

For the config.pri, use the following:
```
git clone https://github.com/NatronGitHub/Natron && cd Natron
```

```pri
boost-serialization-lib: LIBS += -lboost_serialization
boost: LIBS += -lboost_thread -lboost_system
Update submodules:

```
git submodule init
git submodule update -i --recursive
```

And make a build folder:

```
mkdir build && cd build
```

At this point, you need a special configuration file called a `config.pri`. On every operating system and distro this will be different, including for Arch Linux. First, make it by running this command:

```
touch ../config.pri
```

Now, open `../config.pri` with Vim or Emacs (or whatever editor you prefer), and paste in these lines to the empty file. **A template `config.pri` is available [here](./build-configs/arch-linux/config.pri)**. Here are some recommended instructions to do so:

```
# These are the lines you should paste into your empty `config.pri`
boost: LIBS += -lboost_serialization
expat: LIBS += -lexpat
expat: PKGCONFIG -= expat
cairo {
# Building cairo from source (git clone, make, make install) is installed in /usr/local/lib
PKGCONFIG -= cairo
PKGCONFIG += cairo
LIBS -= $$system(pkg-config --variable=libdir cairo)/libcairo.a
LIBS += /usr/local/lib/libcairo.a
}
pyside {
PYSIDE_PKG_CONFIG_PATH = $$system($$PYTHON_CONFIG --prefix)/lib/pkgconfig:$$(PKG_CONFIG_PATH)
PKGCONFIG += pyside
INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtCore
INCLUDEPATH += $$system(env PKG_CONFIG_PATH=$$PYSIDE_PKG_CONFIG_PATH pkg-config --variable=includedir pyside)/QtGui
PKGCONFIG -= pyside
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui)
LIBS += -lpyside-python2.7
}
shiboken {
PKGCONFIG -= shiboken
Expand All @@ -267,6 +310,20 @@ shiboken {
}
```

You're now all set to compile. Use `qmake` to generate a Makefile for final compiling, like this:

```
qmake-qt4 -r ../Project.pro PREFIX=/usr BUILD_USER_NAME="Arch_Linux" CONFIG+=custombuild CONFIG+=openmp DEFINES+=QT_NO_DEBUG_OUTPUT QMAKE_CFLAGS_RELEASE="${CFLAGS}" QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" QMAKE_LFLAGS_RELEASE="${LDFLAGS}"
```

Last, compile with `make`:

```
make
```

Compiling should take approximately 10 minutes. The binaries will be found in the `build/App` folder. In order to launch Natron after compiling, simply do `./App/Natron`, and you can then start using Natron!


## Debian-based

Expand Down
22 changes: 5 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Natron

[![GPL2 License](http://img.shields.io/:license-gpl2-blue.svg?)](https://github.com/NatronGitHub/Natron/blob/master/LICENSE.txt) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) [![Build Status](https://api.travis-ci.org/NatronGitHub/Natron.svg?branch=RB-2.4)](https://travis-ci.org/NatronGitHub/Natron) [![Coverage Status](https://coveralls.io/repos/NatronGitHub/Natron/badge.svg?branch=master)](https://coveralls.io/r/NatronGitHub/Natron?branch=master) [![Documentation Status](https://readthedocs.org/projects/natron/badge/?version=rb-2.4)](http://natron.readthedocs.io/en/rb-2.4/) [![Packaging status](https://repology.org/badge/tiny-repos/natron.svg)](https://repology.org/project/natron/badges) [![BountySource Status](https://api.bountysource.com/badge/team?team_id=271309)](https://www.bountysource.com/teams/natrongithub/issues?utm_source=Mozilla&utm_medium=shield&utm_campaign=bounties_received) [![OpenHub](https://www.openhub.net/p/natron/widgets/project_thin_badge?format=gif&ref=Thin+badge)](https://www.openhub.net/p/Natron)

---
Expand All @@ -20,7 +21,7 @@ Natron is looking for developers and maintainers! You can help develop and maint
- [Design patterns](https://en.wikipedia.org/wiki/Software_design_pattern)
- [Qt](https://www.qt.io/) (Natron still uses Qt4 because of the lack of [PySide support in Qt5](https://wiki.qt.io/Qt_for_Python_Development_Notes), which should be integrated shortly after [Qt 5.12](https://wiki.qt.io/Qt_5.12_Release) is released)
- Basic knowledge of [OpenGL](https://en.wikipedia.org/wiki/OpenGL)
- Basic knowledge of [Python](https://en.wikipedia.org/wiki/Python_(programming_language))
- Basic knowledge of [Python](<https://en.wikipedia.org/wiki/Python_(programming_language)>)

For more information, see the "Contributing" section below.

Expand All @@ -29,11 +30,8 @@ If you are willing to help, please contact the development team on the [pixls.us
## Features

- 32-bit floating-point linear color processing pipeline.

- Color management handled by [OpenColorIO](https://opencolorio.org/).

- Dozens of file formats supported: EXR, DPX, TIFF, JPG, PNG through [OpenImageIO](https://github.com/OpenImageIO/oiio) and [FFmpeg](https://ffmpeg.org/).

- Support for many free, open-source, and commercial OpenFX plugins—currently almost all features of OpenFX v1.4 are supported.
- [TuttleOFX](https://sites.google.com/site/tuttleofx/)
- [OpenFX-IO](https://github.com/NatronGitHub/openfx-io) to read anything else than standard 8-bits images
Expand All @@ -45,30 +43,19 @@ If you are willing to help, please contact the development team on the [pixls.us
- [GenArts Sapphire](http://www.genarts.com/software/sapphire/overview)
- [Other GenArts products](http://www.genarts.com/software/other-vfx-products)
- ...And many more! Please tell us if you successfully tested other commercial plugins.

- Intuitive user interface: Natron aims not to break habits by providing an intuitive and familiar user interface. It is possible to customize and separate the graphical user interface on any number of screens. You can re-use your layouts and share your layout files (.nl).

- Performance: In Natron, anything you do produces real-time feedback in the viewer thanks to the optimized multi-threaded rendering pipeline and support for proxy rendering (computing at a lower resolution to speed up rendering).

- Multi-task: Natron can render multiple graphs at the same time. It can also be used as a background process in headless mode.

- Recover easily from bugs: Natron's auto-save system detects inactivity and saves your work for yourself. Natron is also able to render frames in a separate process, meaning that any crash in the main application would not crash the ongoing render (and the other way around).

- Project files saved in XML and easily editable by humans.

- Fast & interactive viewer - Smooth & accurate zooming/panning even for very large image sizes (tested on 27k x 30k images).

- Real-time playback: Natron offers real-time playback with excellent performance thanks to its RAM/Disk cache. Once a frame is rendered it can be reproduced instantly afterward, even for large image sizes.

- Animate your visual effects: Natron offers a simple and efficient way to deal with keyframes with a very accurate and intuitive Curve Editor as well as a Dope Sheet to quickly edit your motion graphics.

- Command-line rendering: Natron is capable of running without a GUI for batch rendering with scripts or on a render farm.

- Rotoscoping, rotopainting, and tracking support

- Multi-view workflow: Natron saves time by keeping all the views in the same stream. You can separate the views at any time with the OneView node.

- Python 2 scripting integration:

- Parameters expressions
- User-defined parameters
- Nodes groups as Python scripts
Expand Down Expand Up @@ -100,12 +87,12 @@ The following graphics cards are supported for hardware-accelerated rendering:

On Windows and Linux you can enable software rendering. On Linux, enable the environment variable LIBGL_ALWAYS_SOFTWARE=1 before running Natron. On Windows, enable the legacy hardware package in the installer.


## Installing

### Binary distribution

Standalone binary distributions of Natron are available for GNU/Linux, Windows, and macOS on [GitHub](https://github.com/NatronGitHub/Natron/releases), or from [the Natron web site](https://natrongithub.github.io/#download). These distributions contain Natron and four included sets of OpenFX plugins:

- [openfx-io](https://github.com/NatronGitHub/openfx-io/)
- [openfx-misc](https://github.com/NatronGitHub/openfx-misc)
- [openfx-arena](https://github.com/NatronGitHub/openfx-arena)
Expand All @@ -116,6 +103,7 @@ For each architecture / operating system, you can either download a stable relea
### Building and installing from source

There are instructions for building Natron and the basic plugins from source is this directory on various architectures / operating systems:

- [GNU/Linux](INSTALL_LINUX.md)
- [macOS](INSTALL_MACOS.md)
- [FreeBSD](INSTALL_FREEBSD.md)
Expand Down
25 changes: 25 additions & 0 deletions build-configs/arch-linux/config.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file should be used when building
# on an Arch-based Linux distro such as
# Manjaro, Arch, ArcoLinux, Hyperbola GNU/Linux, etc.
# Detailed instructions can be found in INSTALL_LINUX.md

boost: LIBS += -lboost_serialization
expat: LIBS += -lexpat
expat: PKGCONFIG -= expat
cairo {
PKGCONFIG += cairo
LIBS -= $$system(pkg-config --variable=libdir cairo)/libcairo.a
}
pyside {
PKGCONFIG -= pyside
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtCore
INCLUDEPATH += $$system(pkg-config --variable=includedir pyside-py2)/QtGui
INCLUDEPATH += $$system(pkg-config --variable=includedir QtGui)
LIBS += -lpyside-python2.7
}
shiboken {
PKGCONFIG -= shiboken
INCLUDEPATH += $$system(pkg-config --variable=includedir shiboken-py2)
LIBS += -lshiboken-python2.7
}

0 comments on commit c4c06b6

Please sign in to comment.