Building Synfig on Windows (Konstantin's report)


#1

I decided to start my own topic about my journey of building Synfig for Windows. :slight_smile:

DISCLAIMER: I’m not promise to be perfectly clear and answer all the questions in the thread - this is just a report to give you a picture what’s going on.

After playing with Fedora cross-compile environment I have managed to get first Windows builds of Synfig. But unfortunately they suffer some nasty glitches and I am not ready to fix them without trying other build methods.

So, my idea is to try build natively on Windows and see if I will have similar glitches. For the past 2 days I have discovered that there are dozen approaches to build Linux software on Windows - it’s MinGW/MSYS, MinGW-w64 (mxe.cc/), Yypkg, mgwport…

OMG, choosing a toolchain/environment is a challenge, especially when your time is limited (I need fresh binaries by June 29th). All those different approaches are mixed together and it really takes time to dig into all this.

I decided to go with Cygwin environment, as it looks very solid and well established (and have a lot of pre-compiled packages, compared to plain MinGW). But here choices as well! You can:

  1. compile directly in cygwin (then your build depend on cygwin.dll, which is not desirable)
  2. compile with MinGW on cywin toolchain
  3. compile with MinGW-w64 on cywin toolchain (it’s not the same as above!)

Since (3) is the same as I was already tried on Fedora, I would like to go with (2). There are already many dependencies precompiled and I can get more of them from sourceware.org/cygwinports/. But still some dependencies (like libxml++) are missing and I need to get compile them by myself.

Probably the best approach here is to use cygport. I.e. write my own *.cygport files and cleanly package all missing dependencies and synfig itself. (See gitorious.org/mgwport/mgwport/b … ORT.README).

Luckily I have a lot of .cygport examples here - cygwin-ports.git.sourceforge.net … -index.cgi
And, yes, a bit of googling gives me this - github.com/fd00/yacp/tree/master/synfig

Now I’m back to the fight. :slight_smile:


#2

Errr… Good luck!! :open_mouth: :open_mouth:
-G


#3

Fingers crossed! Good luck, indeed. :wink:
Greetz!


#4

Will you be documenting your process aka once it is done will there be a guide on synfig wiki on how to port Synfig to windows?


#5

Hi, everyone!
Here’s the result of my work:
[attachment=0]synfigstudio-0.64.0-20130623.png[/attachment]
Download: https://dl.dropboxusercontent.com/u/15516795/synfigstudio-0.64.0-20130623.exe

This build have following fixes comparing to previous:

  • Plugins should work fine now, independently of the install path
  • Gtk theme delivers native Windows look

Also, with this build I haven’t managed to reproduce the “resize bug” and the “non-clickable buttons issue”. Please test and post your feedback on this.

Pending issues:

  • Uninstall procedure is still brutal (removes the Synfig directory with all contents, even if there are extra user files inside)
  • Gamma tab is not rendered correctly (low priority)
  • Cleanup extra files from the bundle (too much crap there, low priority)
  • Enable interface localization

All building steps I wrote into script to let others reproduce the build procedure. Though, I need some time to bring the script into the order and put some notes inside.


#6

Hi!
Native windows look is crisp and clean, but I still have the resize bug. :frowning: Using Windows 7 Home Premium. Intel Core i5, 4gb.

Greetz!


#7

Hi!

If I maximize my canvas window first by double clicking the top and then get it back to the original position by double clicking the top again, then I can resize the canvas window the way I want it by dragging the corner(s) without hanging the program caused by the resize bug. Did not counter any other problems so far. Cairo render works like a charm. Speed up is at least more than double and it almost feels as if I am working on another computer. :smiley:

Greetz!


#8

Hi, darkspace65! Thank you for feedback.
Let me guess… Do you have “Use only single thread” option enabled in your preferences? :slight_smile:

The bad news: Today I’ve hit “non-clickable buttons issue” again. Looks like it’s happening only on my Lenovo laptop, which have integrated graphics tablet. I think all users who have graphics tablets connected will have the same issue (buttons and checkboxes are often not clickable, especially happens in the Preferences/Setup dialogue). Sometimes restarting Synfig a few times helps, but I don’t have a clue what’s going on here yet.


#9

I think it’s time to bring some conclusions on my investigation.

Generally, Fedora’s MinGW-W64 cross-compile environment and Cygwin’s MinGW produce almost the same binaries with the same issues. Almost, because there are some minor differences in behaviour still. So, I can safely compile everything right in Fedora, without leaving my linux box. Also, that would allow us to have development snapshots for Windows in the same way as we have for Mac and Linux now.

There is just one problem here for me - when I trying to launch synfigstudio in Wine it refuses to start giving the following message:

[code]]$ wine ~/.wine/drive_c/Program\ Files/Synfig/bin/synfigstudio.exe
Fontconfig warning: “/etc/fonts/conf.d/50-user.conf”, line 9: reading configurations from ~/.fonts.conf is deprecated.
Fontconfig warning: “/etc/fonts/conf.d/50-user.conf”, line 9: reading configurations from ~/.fonts.conf is deprecated.
Fontconfig warning: “/etc/fonts/conf.d/50-user.conf”, line 9: reading configurations from ~/.fonts.conf is deprecated.
Fontconfig warning: “/etc/fonts/conf.d/50-user.conf”, line 9: reading configurations from ~/.fonts.conf is deprecated.
p11-kit: couldn’t load module: /usr/lib/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/pkcs11/gnome-keyring-pkcs11.so: cannot open shared object file: No such file or directory

synfig studio is already running

the existing process will be used

[/code]

That means I cannot debug windows buuild of Synfig on Fedora and that makes hard to resolve issues. I believe it could be resolved, but for now I am forced to build natively on Windows in Cygwin.

BTW, does anyone able to run synfigstudio.exe on Wine?


#10

Windows XP 32 bits.

  • Plugins work fine
  • Native look and feel is fine.
  • Still have the resize issue on each time a new canvas window is displayed. CTRL-tab to move to other application is a workaround.
  • Angle value is badly rendered (the º symbol is not well displayed)
  • Gamma tab issue still confirmed
  • Still having the Pango warnings at start up. (“Invalid UTF-8 string passed to pango_layout_set_text()”)
  • Cairo render displays aliased texts when inserting a Text layer: “PANGO-warning**: Couldn’t load font “San Serif Not-Rotated 64.21243px”, falling back to “Serif Not-Rotated 64.21243px”, expect ugly output”

Good work!
-G


#11

Hi, Genete! Thank you for testing.

Did you disabled “Use single thread” mode?


#12

Yes, single thread is enabled, but the resize bug also occurs when single thread is not enabled. Workaround by moving to another app usually works, though.

Greetz!


#13

My apologies, but are you sure? Please check this twice. I have enabled “Single thread mode” and now I can reproduce the problem. With this option disabled I have no resize bug. (Tested on Win 7 64bit Home Premium and Win XP Pro 32 bit).


#14

Disabling single threaded rendering makes the resize (resize to big size) bug disappear. Unfortunately it delivers the well known issues of multi-threaded render in Windows. :frowning:

Windows XP 32 bits.
-G


#15

Can you please specify which issues you are referencing to?


#16

It is difficult to say. Sometimes it just hangs when scrub the timeline, sometimes it crashes when zoom in or out… it is not predictable. Normally the result is a crash or hang.

-G


#17

Hi!
Ooooook… My mistake. I got a bit confused because nobody ever asked me to use Synfig under windows with Single thread option disabled, because that used to cause random crashes every two seconds. You were right though. The resize bug did not occur anymore after I disabled the single thread option. The good news is that I have been working with four threads for more then 30 minutes now without a crash.

Greetz!


#18

Hi!

You are correct! Still no resize bug after disabling single thread mode, but I did get about 10 random crashes the last 15 minutes. Mulit threading still does not seem to digest very well on windows. I presume you made a 64bit build? I kind of hoped that would have solved the mulit thread issues.

Greetz!


#19

Something is wrong in the forums database. I can’t see my own post.
-G


#20

One more issue:
Synfig_icon.ico looks darker and ugly.
-G