How to contribute?

Question and answers on how to build Synfig. We encourage you to document your findings on the build instructions page of the website
Sylvain Leroux
Posts: 20
Joined: Fri Aug 19, 2016 8:09 am

How to contribute?

Postby Sylvain Leroux » Sat Feb 25, 2017 5:21 pm

As of 2017, how to compile/contribute to SynfigStudio?


I really like that software and use it a lot for titling and animation in my YouTube channel (https://yesik.it/youtube). Kind of a replacement for AfterEffects if you want. But there are things I would like to try, maybe add some composition mode and/or layers.


Obviously, the question has already been asked and answered -- but things are not clear to me.

For example, I've seen some move toward CMake. Is this the preferred way to build synfig? Or should I stay with build.sh?

FWIW, I'm running Debian Strech/Sid.
Synfig Studio 1.0.2 on Linux Debian Stretch/Sid

Advertisement

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: How to contribute?

Postby caryoscelus » Sun Feb 26, 2017 11:50 am

Personally, i consider autotools system deprecated and only add compatibility with it for minor changes (e.g. there is no autotools support for https://github.com/caryoscelus/synfig-playground). On the other hand, CMake system currently lacks some features such as translation and some configuration options and that is unlikely to change until someone actually cares about it.

Anyway, for small changes it doesn't matter much which system you use. If you are going to add new files, you'll have to add them both to CMakeLists.txt and autotools files if you want to maintain compatibility. If you are going to add new dependencies, then i'm not so sure it's worth it unless you are good enough with autotools.

Also, you should note that autotools and cmake installs are not quite compatible - you won't be able to install core with autotools and studio with cmake without additional headache.

Sylvain Leroux
Posts: 20
Joined: Fri Aug 19, 2016 8:09 am

Re: How to contribute?

Postby Sylvain Leroux » Sun Feb 26, 2017 12:42 pm

Thank you for your reply caryoscelus,

As you noticed I've managed to compile synfig using autobuild-linux.
FWIW, I remember having hard time doing that with CMake last time I tried it -- but that was current 2016 and with an older Debian version. Maybe that was issues related with outdated tools?


Anyway, what is your recommended workflow to compile & test synfig after a code change? I assume running `autobuild-linux` after each change is not the most efficient way of doing. Or is it?
Synfig Studio 1.0.2 on Linux Debian Stretch/Sid

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: How to contribute?

Postby caryoscelus » Sun Feb 26, 2017 5:06 pm

Well, since i'm using Debain Sid myself, there should be no problem with CMake on it. And if you have any, feel free to ask - it would be nice to put cmake build to some multi-platform testing.

I don't use autotools build and even when i did i haven't used .sh scripts, but running automake, configure and make myself. But i suppose scripts should create some build directories and if you just change code you can run make (possibly with -jX option to use multithreading, e.g. -j4) from there. If you add new files, you'll have to also edit appropriate configuration files and run automake and ./configure.

Also you may want to use ccache to somewhat reduce compile times.

Sylvain Leroux
Posts: 20
Joined: Fri Aug 19, 2016 8:09 am

Re: How to contribute?

Postby Sylvain Leroux » Sun Feb 26, 2017 5:30 pm

Thank you for your support!

For now, I run "make" from the synfig-core directory -- but it seems to recompile way too many files.
I will give a try a CMake tonight -- or tomorow.
Synfig Studio 1.0.2 on Linux Debian Stretch/Sid

User avatar
caryoscelus
Posts: 80
Joined: Wed Nov 11, 2015 9:10 am
Contact:

Re: How to contribute?

Postby caryoscelus » Sun Feb 26, 2017 5:38 pm

If you're changing header (.h/.hpp) files, it will lead to recompiling every file that includes header directly or indirectly. For some .h files, that would mean virtually everything. Using ccache can minimize this problem somewhat (e.g. if you make change, recompile, then revert change, next time you build it will use cache), but the problem of cascade compilation lies in c++ compilation model and sometimes poor design and coding with superfluous includes and lack of separation.

Sylvain Leroux
Posts: 20
Joined: Fri Aug 19, 2016 8:09 am

Re: How to contribute?

Postby Sylvain Leroux » Sun Feb 26, 2017 6:18 pm

Yes your right: I didn't notice in my editor pane, but color functions are actually defined in .h files -- hence each time I made a change there that triggers a lot of compilations.
Synfig Studio 1.0.2 on Linux Debian Stretch/Sid


Return to “Building synfig”

Who is online

Users browsing this forum: No registered users and 4 guests