Calling for coders!


#1

Synfig needs your contributions to help refine and update the code. There are some important features that are missing.

If you’re a synfig enthusiast, know C++ and want to send a patch or fix something in synfig, please ask here any question of the synfig team and we’ll do our best to help you. Your contributions are always welcome.

If you have found something new to help with understanding the code and want to share with all of us, please write here your background and/or add it to the wiki development page

Our final intention is create a knowledge database to help new coders to improve synfig and remove as many bugs as possible and implement the needed features to make synfig a great program.

Welcome!


#2

Hello! I’ve been looking into coding Synfig some more.

I extracted the project from the Git repository and I’ve been looking at the code. I am planning to use the Netbeans IDE to code in C++. I have everything set up, except for the project.

In order to the project up for coding, do I simply need to bring in the source files from synfig-core and synfig-studio? Or am I missing a lot of details? I feel like I’m almost ready to code, but I might need just a little more help to get there.

I looked for a good tutorial on how to prepare Synfig for coding, but couldn’t find one. Maybe I can write one in the forum once I learn how, so that other people can find it easier to contribute code!

Thanks in advance!


#3

In order to develop Synfig you need to set up a proper building environment. To do that you need first to learn to build Synfig in your computer.
wiki.synfig.org/wiki/Developer_Documentation

Once you achieve to bulls Synfig, then choose a text editor modify the code and re build.
It wood be great if you keep track of your changes if you fork Synfig in github.
Good luck!
-G


#4

tried following the instructions for building in Windows on

wiki.synfig.org/wiki/Dev:Building_on_Windows

and found out I needed to find all kinds of dependent software, like ImageMagick and NSIS, in addition to the svn version control applilcation. Would I be better off trying to build in Linux? The instructions seem simpler.

Also, I was able to create a forked repository in github to my hard drive. Do I simply need to clone from my forked repository to have it on my hard drive? I tried it, and it seemed to work, but I don’t know if committing changes will update that forked repository.


#5

Yellowdee - if you want to try to recreate the Window build environment, I’d be happy to help. As far as I know, I have the only system of being able to rebuild it, and I don’t want to be the point of failure if anything should happen to the system (or me).
Yes, it’s complicated, but if you have all the pieces, it can work (at least under Windows XP). We need more eyes on it to update it, refresh it, future proof it.

Chris


#6

Thank you for your help! I am also running Windows XP

It seems like the Windows Build directions were written back when Subversion was used instead of Git. I am concerned that the instructions use Subversion instead of Git, but I did the best I could to follow them. (I ended up copying the ETL, synfig-core, and synfig-studio folders from the current Git repository to the folder detailed in the instructions)

I made it to the configuration section of the Windows build instructions, wiki.synfig.org/wiki/Dev:Buildin … figuration

I found that I needed the three “auxillary packages,” ImageMagick, Subversion, and NSIS. I am assuming I want Git instead of Subversion. I had trouble understanding if I had properly installed ImageMagick, and I haven’t tried NSIS.

I skipped installing ImageMagick and NSIS and moved to the BuildOrder section (wiki.synfig.org/wiki/Dev:Buildin … uild_Order) to give the OpenEXR script a shot, and as expected, I was told that I was missing ImageMagick, whose directory was depicted in the synbuild.conf file. I have tried to install ImageMagick in the past, and I remember the headache it gave me back then :laughing:

It was at that time that I decided to call it a day, mainly because those build instructions were meant to be used with Subversion.

I guess if I were to ask for tips, they would be:

  1. Is there a trick to install ImageMagick on Windows?

  2. Is there an issue with how the Synfig source files are organized in Git that makes them incompatible with these instructions?

  3. Is #2 easily fixed by modifying the .source, .sh, and .pat files?

I hope I’m not being overwhelming by dropping all this information here. Sorry in advance if I am.


#7

Yes, the build instructions are old. I basically used them when I started ~4 years ago.
For NSIS and ImageMagick, you can just install them as binaries like you would any other program. They’re in my c:\Program Files dir. I’m using ImageMagick-6.3.4-0-Q16-windows-dll.exe and nsis-2.42-setup.exe.

I think I have svn installed - it’s referenced by Synfig, as a method of version control for project files during runtime (although I don’t know of anyone that uses that feature or if it even works).

I don’t think there is any trick to how the files are laid out. I seem to recall that there was a change in the structure a while back that meant everything moved up a dir, but for Git it all works quite nicely with the current layout. (unless there was change in the scripts that I don’t recall).
For Git, I just pull down the relevant branch and copy them into the _src directory. Once they’re there, you can use git to update it. Git GUI works quite nicely.

OpenEXR only needs to be built once, as long as you don’t delete the resulting files from the \synfig\build dir. The only trouble I had with that was with b44ExpLogTable.cpp and it looks like that workaround is documented in the script.

Let me know the issues as you run in to them, and we’ll figure out what’s going on and update the documentation.

Chris


#8

I’ve worked some more on building on Windows. I installed ImageMagick and NSIS successfully, and so there’s no more trouble with them. I guess I just didn’t look hard enough for the installation files, as I’m used to these things falling into my lap :blush:

When I ran the make_openexr shell, I got stuck at the point where I unzip the tarballs (file not found). The directory the script was looking for was C:\Documents and Settings\Paul\synfig_src, and not C:\MinGW\msys\1.0\home\Paul\synfig_src like I would have expected.

I modified the directories in the scripts, but still had the same problem. I looked on the internet for answers on the “file not found” error, and the tar xzvf command doesn’t really like the Windows directory format.

Next I tried unzipping the tar files with 7zip and putting them in the build directory. (I took out the unzipping scripts in the shell file, and had to remove the ‘cleanup directory’ scripts to prevent deletion of the newly extracted folders) When I ran the shell, I was told that there was a malformed patch (see attachment)

I think I’m pretty much stuck again. I’ll try starting over if it seems too difficult to fix what I have.
malformed patch.JPG


#9

If I had to hazard a guess, I’d say that the patch file problem is Windows linefeed/carriage return v. Linux biting you.
What editor did you use to save the patch file? I recommend Textpad rather than notepad, as it handles Unix style linefeeds correctly.

Running tar xzvf from the msys prompt should work ok.

It sounds like the synbuild.conf isn’t setting up the SYN_SOURCE_DIR correctly? You have msys installed in c:\msys rather than c:\Documents and Settings\Paul…?

Hmm… looking at your screen shot, I see you msys installed under MinGW. I have it in parallel - c:\msys\1.0\home\cnorman\synfig_src yada yada yada. I don’t know if that’s significant.


#10

Nevermind the above statement!

I did not realize that you had to open an MSYS session for the builds to work: I was using the Windows Command prompt! :blush: Surprisingly enough, though, Command Prompt let me unzip a tarball if I moved to the directory manually first.

I also found out that for the patch files and shell files to work, the encoding format needed to be UNIX, so Textpad helped out there.

Looks like it’s genuinely trying to compile OpenExr, but it appears that OpenExr needs zlib to properly install. I have tried to get zlib to work, which is a DLL file, but I don’t understand how to point to it properly.
untitled.JPG


#11

Looks like I downloaded zlib-1.2.3-mingwPORT-1.tar.bz2, expanded it and ran mingwPORT.sh

There may be a later version available… YMMV
Chris


#12

I can’t really find that tar file, or later versions supporting mingwPORT. I read online that mingwPORT is currently needing a bit of an overhaul. I did find and install zlib using the mingw-get installer, but I ended up with the same results when I tried running the make_openexr shell. I don’t really know what that message at the end is talking about where I need to set a library directory, but I’m guessing I need to play with the libtool utility. I have no idea what I’m doing there, though, so I guess I’ll just have to look up some more stuff.

In the end, I just tried installing ilmbase and openexr manually, but I ran into a recursive error when I tried compiling ilmbase.

On another note, I was able to get a Fedora Linux distro installed for dual-boot on my laptop, and got Synfig built in no time, but I am still interested in building on Windows if you’d still like to offer input. You’ve been very helpful so far!


#13

File attached.

I’d like to say I know what’s going on, but a lot of my current progress is from the occasional inputs of other developers and trial and error.
Having someone that can relate and understand the problems would be invaluable to bounce ideas off of.

Do you do much compilation with MS tools? If we could shift to those, that would open up a whole new avenue of debug capabilities.
zlib-1.2.3-mingwPORT-1.tar.bz2 (3.58 KB)


#14

Well, it looks like the download link that the shell file goes for is outdated, but on top of that there are patch file and directory problems as well. It looks for a /usr/scr/zlib1.3.3… directory, which I created in my username directory in msys, but it’s still giving me issues.

As for whether I do much compilation using MS tools, I actually didn’t even work with C++, let alone compile with Microsoft tools. All the programming I’ve done was in Java, using Netbeans. I became interested in coding in Synfig mainly because I realized its power and its potential to become even more so, and I wanted to contribute a feature or two that I’d like to see. I looked at the code, though, and it doesn’t seem too different from what I know of Java.

I don’t know If I completely understand your question, but If I do, then I’m assuming you might like to find a way to code in an IDE?


#15

Another thought. I’m guessing you don’t have the GTK & GTKmm dev tools installed yet? Looking in my c:\GTK\bin I have a zlib1.dll - I’m wondering if that’s the one that’s being used…

I know I had that installed before I ever tried to compile OpenEXR.

Yes, I think if we can use the MS tools, it would allow us to actually debug in an IDE on Windows, and make it possible to actually find multi-threading issues so we can enable that and speed up rendering.


#16

I actually have them installed just as you described. A little while ago I tried putting that zlib1.dll in all the bins in the MSYS and MinGW directories, but that didn’t help. I’ve lately directed my efforts to manually installing openexr, but that seems to be a dead end as well. Oh well :astonished:


#17

I intend to send in patches whenever I can simplify a part of the Synfig code. ValueBase looks particularly interesting, because it seems to behave similarly to a C union.

Also, ETL has wrapper classes for the standard C++ cos, sin, and tan functions. I’d love to remove those.

-Charlie


#18

Would it be worthwhile to refactor the program? It seems bulky and bug-ridden right now. I can’t edit layer params on the newest version.

-Charlie


#19

Sure! Any patch would be welcome.
-G