Development · Krita · Others · planet

How is User Support in Krita organized?

Current situation

Some of our users seem to don’t really know how Krita (as a project) functions or not understand how User Support is done (User Support: helping users, solving their problems with Krita, hardware, use-cases, limitations of tools, misunderstanding on how some features work). That’s natural – nobody knows details before they get inside and can see for themselves.

 I did get inside and I’m tempted to write that the answer to the question in the title is “Not at all”, but that’s not actually true – often you’ll get the first answer on reddit.com/r/krita within a few hours. On the other hand, the person answering you will most probably be me

When I first came to reddit.com/r/krita, a lot of questions were left unanswered, and most of the others had an answer from Boudewijn Rempt: the lead developer. I thought that I’d prefer Krita’s main developer to develop, not answer user questions. I knew that helping Krita on the code side would be difficult because of the complexity of the code and me having little time between uni and writing my thesis, so I decided to help with user support which I could easily do in small chunks of free time. A year later, when I was hired to actually hack on Krita, I realized that now there is, again, a full-time Krita developer doing user support…

Now from all the places I am on (KDE forum, reddit, irc, krita-artists.org), reddit gets the highest number of questions. It’s hard to estimate how many help posts we get there, but let’s say it’s 5 per day. Some of them are quite easy and requires only a link from my links set and the user answer is “Thank you, it’s solved!”, but some of them requires a long investigation into what the user is doing exactly and why the feature that is supposed to be working isn’t working on their system.

On reddit, most posts are answered by me (full-time Krita developer), Snudl (volunteer) and le_becc (volunteer). Recently there is also yotzi – another full-time Krita developer, and Tusooa – ex-GSOC student, volunteer.

On the KDE forum, people helping are mostly Wolthera (full-time Krita developer), Boud (full-time developer and Krita project lead/maintainer) and Ahab (volunteer). Ahab is also great in bug triaging, does a huge amount of work in our bug reporting system. Wolthera is helping on tumblr as well.

On IRC, the helping person is nearly always a full-time developer – either me, Wolthera or Boud, sometimes someone else. On the Krita-Artists forum we don’t get that many help requests yet, so it’s hard to judge. But I did see Wolthera, Snudl and Ahab helping there already. We get quite a few questions on Steam app forum as well, and they are dealt with by Emmet or redirected to other support channels.

So to sum it up (I hope I didn’t miss anyone, if I did, I’m sorry):

  • full-time developers: me, Wolthera, Boud, Yotzi (Ivan Yossi)
  • volunteers: Snudl, Ahab, le_becc, Tusooa, Emmet

The thing is, our full-time developers are hired to develop Krita. I can’t say for others, but I do user support outside of my working hours. And it takes quite a lot of mental energy to be constantly available. Volunteers have a lot on their plate too – it’s just… Krita is used on 1.5 millions computers with Windows 10 alone, there is no way 8 people are going to manage all the user support that it’s needed.

I know there are also Facebook groups and Discord and other places, but there is a bit of disconnect between the core Krita developers team and people there. I think Snudl is from Discord though.

So, what about it

I believe some new people are needed in the system. I would really like to see someone who would be willing to take the burden of checking every post on reddit, making sure they get the support they need – that every post is either solved, unsolvable or waiting for user response (sometimes indefinitely, which happens much more often than you’d imagine). If there was more than one person, let’s say three of them, then every one of them would have much less to do. If there were a few other users who just check in from time to time and answer some of the questions, even just the easiest ones (basically how to use Krita, or questions solved by one of my links), that would create a situation where no one’s job is too heavy or too time-consuming.

I do believe that the existence of someone who feels responsible for the whole platform is, at least now on reddit, forum etc., quite important – because otherwise some questions might get missed, some difficult ones might not get the attention they need since there is a question just next to it that seems much easier. But “helpers-visitors” are important as well, to keep the user support maintainer sane 🙂

If any of you, dear readers, want to help in any way, or maybe even waited to engage in open source project, even specifically Krita, for a long time but never had the courage to step in, please contact me on IRC (on freenode, or https://krita.org/irc/): tiar or tiar-[any two letters], on http://reddit.com/r/krita: /u/-tiar- , or on https://krita-artists.org: tiar.

Learn more

Some tips for user supporters: https://docs.krita.org/en/contributors_manual/user_support.html

My powerful list of links:

Mac crash log instructionhttps://www.reddit.com/r/krita/comments/ck6alb/krita_crashes_when_saving/
reset configurationhttps://docs.krita.org/en/KritaFAQ.html#resetting-krita-configuration
tablet:https://docs.krita.org/en/contributors_manual/user_support.html#quick-solutions
crash:https://docs.krita.org/en/reference_manual/dr_minw_debugger.html
onion skin:https://www.deviantart.com/tiarevlyn/art/Krita-onion-skin-issues-chart-788623742
render issues;https://www.deviantart.com/tiarevlyn/art/T-Krita-4-1-7-rendering-issues-manual-783473428
what to do with printing: https://www.reddit.com/r/krita/comments/bv6g6o/rgba_conversion_to_cmyka/epo7zxg?utm_source=share&utm_medium=web2x
xp pens tabletshttps://www.reddit.com/r/krita/comments/btzh72/xppen_artist_12s_issue_with_krita_how_to_fix_it/
krita vs gimphttps://www.reddit.com/r/linux/comments/bu34p1/krita_42_released/ep8zno3?utm_source=share&utm_medium=web2x
why tablets doesn’t workhttps://www.reddit.com/r/krita/comments/c1drjb/cursor_freezes_when_i_try_to_draw/erciuhv?utm_source=share&utm_medium=web2x
how to use Krita Plus flatpakhttps://www.reddit.com/r/krita/comments/ctsfai/krita_plus_flatpak_builds/
krita vs corel painterhttps://www.reddit.com/r/krita/comments/cu164l/first_pic_since_transitioning_to_krita_cant/exrkviv?utm_source=share&utm_medium=web2x
painting in CMYK https://krita-artists.org/t/is-working-in-cmyk-worth-it/129
tips & tricks:https://www.reddit.com/r/krita/comments/dorjwf/any_advanced_krita_tutorials_tips_you_can_share/f5ps599?utm_source=share&utm_medium=web2x

Bez kategorii · Development · Krita

Set up Linux Mint 19.2 on Yoga c940

As always, when the hardware is fresh new, it’s hard to set up an LTS release Linux.

When you intall Linux Mint, you’ll see that nothing works: touchpad doesn’t work and the pen either (make sure you have a standard HID mouse handy!), the display is 4K and there is no UI scaling at all, and while Bluetooth is happily working, there is no sign of WiFi. Last time I had the same problem with other fresh new Yoga I just used Ethernet cable to update my system and change the kernel, but since Yoga c940 has no Ethernet socket, I had to figure out something else.

To fix your system, you need to do two things. (I did a lot more, since I obviously didn’t know which one would work).

New kernel

I user kernel 4.3.7, because that’s what was reported to be working here: so I downloaded it from here: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3.7/

Note: you need four files: linux-headers-XXX_all.deb, linux-headers-XXX-generic-XXX_amd64.deb, linux-image-XXX-generic-XXX_amd64.deb, linux-modules-XXX-generic-XXX_amd64.deb.

Start Linux. Open the console. Use sudo dpkg -i filename.deb to install every file. Order: linux-headers-all, linux-headers-generic, linux-modules, linux-image. Otherwise it will complain about dependencies.

Since it’s a newer version than the one shipped with Mint, it will be automatically picked as default kernel, so you don’t need to do anything special to start Linux Mint with this one next time you boot.

Disable Secure Boot

If you checked “install 3rdparty drivers” during installation, you’d have heard about SecureBoot already and you’d think you already disabled it. But no. Go to the UEFI settings and make sure SecureBoot is really disabled. (If you did install Linux Mint, you should get System Setup option in GRUB. I’m not sure what if you installed something else, but I guess it’s more like an EFI thing instead of Mint’s).

Next time you boot, you should see nice UI scaling, your touchpad should work, your pen should work, and you should be able to connect to your WiFi.

After some settings

Fix Qt Creator on Cinnamon

I use this little script to start Qt Creator so it doesn’t have scaling issues:

#!/bin/bash
export QT_SCALE_FACTOR=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCREEN_SCALE_FACTORS=2
/usr/bin/qtcreator "$@"

Lower the temperature while compiling

It looks like there is a feature that is disabled by default on the setup I described above. Without it, the average temperature is around 95°C, with it enabled, it jumps between 80°C and 95°C. I’m not sure what I can do to disallow 95°C at all… I guess I shouldn’t compile with all of my cores? And close Firefox just in case?…

The feature is called intel_powerclamp. First you need to check which device it is.

ls /sys/class/thermal/

And then for all folders called cooling_deviceX you need to check what type of the device it is:

cat /sys/class/thermal/cooling_deviceX/type

You need to find the cooling device that reports their type is intel_powerclamp. You can see that the feature is disabled when you run this command:

cat /sys/class/thermal/cooling_deviceX/cur_state

-1 means disabled. You can want it to be somewhere between 1 and the max_state (it’s 50 on my system). To do this, just run the following command:

sudo sh -c "echo Y > /sys/class/thermal/cooling_deviceX/cur_state"

where X is the id of the intel_powerclamp cooling device, and Y is the % of the idle that you force your processor to be.

Art · Development · Events · Food · Krita · Others · Painting · planet

Krita MiniSprint 2019

Day 1

I had to wake up really early and since I went to sleep very late the previous evening… and couldn’t sleep… I got like 1.5h of sleep. Fortunately, I didn’t have any unfortunate events because of that, everything went fine. I ate my nutella sandwich and took two ham sandwiches to eat later. Got through the luggage control, then other luggage control – weighing and checking boarding passes. The flight was delightful and beautiful – I’ve taken so many photos!

The flight started in a very clear, sunny air over Warsaw, but ended in a cloudy Amsterdam. The layer of clouds was so thick that before the plane started landing, buildings were still super small beneath us; and then the plane started to lower its altitude and flied into the clouds, and when the clouds started clearing up, the ground was so close – I’m sure there was less than 100 meters or something. We were basically just over the landing strip – not a minute later we touched the ground. (I remember I was curious about our altitude earlier because the plane started braking (slowing down using its wings) in the middle of the thick white milk soup we were in, and there is no reason to brake in the air unless you are preparing to get onto a landing strip, right?).

Amsterdam airport is huge. Fortunately since I was there earlier with my boyfriend, I knew the exact path – I could even recall the stores that I was passing by. I got to the Plaza, where the train platforms were located. I bought an apple juice – it’s so weird, Dutch people don’t really have 0.5l bottles of juice, it’s either water or soft/soda drinks or some “sports” drinks (there are some but not a huge variety like in Poland) (well, except for this dreg-filled “healthy” varieties that were available in a fridge next to the eating-ready sandwiches). Even weirder was the cash desk: there was a display for the customers, but the cash desk wasn’t self-service at all – there was a terribly bored and uninterested in anything that was going on around her lady standing on the other side of the desk. Also the credit card reader wanted me to do some stuff, not just take my money – I think I was supposed to tell it whether I want a receipt or not. The bored lady finally helped me with that, though.

I found the correct train and Boud fetched me from the Deventer station. I am always terribly shy the first day, so the whole journey from the station to his house was completely dead silent. My brain wasn’t silent, but I usually don’t see a good reason to voice anything when I’m at that state.

When we entered the house, Irina and Wolthera were already there, waiting for us.

Fast-forward, because the rest was probably boring since I don’t remember anything. I got a new laptop. It’s pretty – all shiny and metallish – quite powerful, has HDR and a stylus to draw on the screen. Which means I have everything I need to develop Krita. I can check how well Windows Ink is doing. Also Windows put all the HDR on its head in some recent updates and everything I learned about Windows settings and their relationships to HDR in Krita is reversed now. It made sense before, but I guess Windows guys wanted to make it smarter and bind the standard brightness slider to the SDR brightness, and they did it… by binding it to the reported maximum number of nits… which obviously causes trouble in Krita if you use any brightness setting except for the lowest one. I still need to test it on my home HDR setup since Dmitry claims that it’s all caused by brightness buttons on the keyboard. I strongly disagree, but without the facts, I cannot say for sure.

Windows sneakily forced me to use the Microsoft account – I am so used to Linux Mint LiveUSB installers needing network to download everything that I didn’t think twice before I put the WiFi password in the textbox in Windows installer, and then it wouldn’t allow me to make a local account no matter what we did – turn off the WiFi, hard reboot the laptop, try to undo…

Somewhere at that point everyone was eating lunch: not sure what everyone had, but I remember Wolthera eating those weird things with liquid minced meat. A Dutch special, no doubt. No idea how they make it liquid; it looks a bit as if they were making some kind of bechamel sauce with minced meat and using it as stuffing for various foods. I just ate my boring ham sandwich I had made the previous day for myself.

Then Dmitry arrived. He brought gingerbread cookies for comparison, so naturally Irina and I took our cookies out as well. My cookies were very dark, thin and crunchy, cut into normal cookie cutter shapes (cats, pigs and hearts bought in OpenLucht Museum in Netherlands, spaceships that haters say are Christmas bells, snowmen, and some little humanoids) (recipe here: Gingerbread cookies); Dmitry’s were the most beautiful, cut into various shapes relevant to painting and Krita: pens, pencils, styli, Linux’s penguins and Kiki’s faces with her famous ears (same recipe, but he mixed his spices himself and he made them thicker and with more baking soda). Irina had made ginger cookies, not gingerbread ones, cut into circles (recipe here: Irina’s Ginger cookies).

There was lasagna for dinner. I don’t think I’ve seen any layers in it and the meat was in liquid form again (although different! not bechamel this time), but it was tasty, so I won’t complain 😉

To finish off the culinary stuff, the whole evening I was exploring Dutch “lemonades” that have nothing to do with lemons. There was anis seed lemonade and pear lemonade, both which I tried, there was also citron something and mint ones, which I haven’t. There was also Irina’s handmade lemon lemonade, very sweet and sour at the same time, very tasty. All the other “lemonades” were more like a syrup that you need to dilute with water. We have something like that in Poland too, but it’s usually raspberry or briar (wild rose) which basically looks like coke, but it’s incredibly more healthy (although they still have a lot of sugar inside).

Dmitry “fixed” two bugs that day. The first bug was mentioned by Wolthera, about a brush delay – she showed the same brushes in Krita and SAI and how much slower those in Krita are. It turned out that of course there was a stabilizer turned on…

The second one was mine, about HDR. I turned it on on my laptop and some time later, my laptop went to sleep and when it woke up, it was all white – every bright color became white, every not bright color became brighter. It had still constrained nits according to what SDR should show, but the colors were all wrong. And here, too, Dmitry figured it out – it turns out my laptop turned off HDR when unplugged, and since it’s all new etc., it went crazy during sleep. I unchecked the “disable HDR while unplugged” and put my laptop to sleep again and it all fixed itself.

Another terribly important and incredibly nice thing that happened to me that day was that I got two duvets to sleep under. Of course I had my hot water bottle in the suitcase as a last resort, but it’s always better not to need it. The room was also nice – the bed was higher up under the ceiling, with a ladder, and the view outside the window was quite surreal. There was a big flat roof of a tenant with grass on it, and around it there were triangular rooves of other tenants, one floor higher than the flat roof tenant. On the right there was additionally a big tree, a bit higher than all the tenants.

Unfortunately I forgot to make a proper photo of it when it wasn’t way too dark or raining. That’s a shame – considering the next Krita Sprint will be in Rennes, I’m not sure if I’ll be able to fix that terrible mistake. Oh well, that’s what painting is for – recreating all untaken photos.

Day 2

Next day I woke up quite early just to run head-first into another cultural shock. It turns out that the typical Dutch breakfast is… sweet. Which means their typical breakfast sandwich is a piece of bread, butter and chocolate sprinkles (btw chocolate sprinkles were different from the Polish ones, too: ours are smaller and more crunchy, theirs were, I think, actually made out of chocolate and they melted in my mouth instantly). There was also weird Nutella-like cream, quite light in color but with darker cookie bits mixed in. I don’t remember all the choices, but I know there was also honey and some other weird sweet paste. All of it was to be put on Irina’s hand baked bread.

(Me having Nutella sandwiches the previous day is not being a hypocrite, but a very notable exception caused by both a lack of sleep and early getting up – it’s hard to eat anything at that hour. Also I’m talking about general trends in society, in Poland, the general trend in society is to eat ham sandwiches or fried eggs, or something similar, definitely savory, not sweet).

We went for a walk and, since the lunch time started to creep in, we bought some lunch items in the Tea Room. Other people took pastries with cheese or this weird liquid minced meat inside, I chose a bread roll with some vegetables and cheese on it. The bread roll was phenomenal, if they had only fixed the ratio between a very intense tasting vegetables/bacon topping and the bread roll, it would have been perfect – but since there was more topping than bread, it was a bit too intense for me.

Dinner was simple but fashionable – halves of peppers with minced meat inside (the solid one, not liquid, fortunately). It was tasty, and the bread roll that was served alongside it was quite interesting – a huge flat surface, surprisingly soft, especially if someone saw this kind of shape only in Georgian bread.

I got a cup of hot chocolate. This is remarkable because I’d got a promise to get a hot chocolate from Boud long time ago, in April or March, and from now on, we’re even. (At least for hot chocolate. Someone promised me pancakes from cast iron pan for breakfast… 😉 ). The hot chocolate was nice, although it kind of seemed more similar to just a standard cocoa drink (milk + cocoa powder + sugar) both in taste and consistency than I expected. It did have however this cozy feeling to it that proper hot chocolate should.

I found another bug that Dmitry later “fixed” just as easily as all the previous ones. So as I said about Windows, it messed up all the HDR settings, or at least they were different from before. After some time, I noticed artifacts in my Small Color Selector (the only HDR-enabled color selector). I also noticed that Dmitry’s color selector looked different for the same nits and hue values – but I brushed it off. The artifacts were important though. It turned out that Windows reports different maximum nits values for different brightness levels, which messes up Krita completely (and is contrary to/not mentioned in specification). To fix the artifacts, one just needs to lower the brightness to minimum… (Dmitry says it’s probably a bug in IntelHD drivers that was exposed by Windows doing weird things).

Later in the evening we had a very nice discussion with Dmitry about Russian and Polish translations of various books and movies – Alice in Wonderland, The Jungle Book, Winnie the Pooh etc., especially the translations of names and gender. In the meantime, Boud, Irina and Wolthera were mysteriously whispering in Dutch behind a closed door… gossiping about us, no doubt 😉

Day 3

I haven’t eaten anything for breakfast that day. As soon as I went downstairs, there were new people in the living room – they were expected, of course, but I didn’t expect them so early. I tried to both follow the conversation and do my own things. But as soon as Wolthera came downstairs, we went for lunch.

We went to that really nice Dutch restaurant where my favourite-Dutch-person-that-I-don’t-know-a-name-of was a waitress. (I’m not sure what I like about her, but I think it’s her wide smile and a generally expressive manner). I ordered three eggs with cheese and ham. It was two slices of bread put together on the plate so that they made a circle, then on top of that slices of ham, then three eggs, then slices of cheese, all fried together on a small frying pan so it was shaped into a circle, too. Unfortunately, this amount of ham and cheese took all of the flavour of eggs away and the dish was overall a bit too greasy for my taste. The bread was delicious, though.

I left all of the talking to talking professionals. (My boyfriend said I can’t write “I left talking to professionals” because that would be diminishing myself, as if I wasn’t a professional. In Polish the phrase is used so frequently, often as a half-joke, that it wouldn’t be considered dismissive towards one, I think). I was listening to the bits about neural networks, but that’s all. Fortunately Dmitry is much more interested than me in using special super powerful CPU instructions to make Krita even better in terms of performance.

Dinner was in an Indian restaurant. I ordered my most beloved chicken biryani and made sure that garlic naans were ordered (ok, Wolthera made sure. Her memory is not terrifying, it’s useful). Naans were delicious, different from most of those I’ve eaten (they are usually less soft and have less sugar – I could clearly taste sugar in those), but great. Biryani, however, was… mediocre. They put peas and carrots in it. I’m not against vegetables in general, but those peas tasted as if they weren’t fried or anything, so their raw taste didn’t match the rest of the biryani at all. If they wanted to make it more healthy, they could have made vegetables go into a side dish… but I got a side dish too, with eggplant in some sauce. I will never understand what cooks see in eggplants. Every time you want to use an eggplant, you should take courgette (zucchini) instead – it has a milder, sweeter taste and doesn’t have this bitterness to it.

People that we met were really, really nice. One of them constantly tried to hire me to paint a family portrait for them. I have a job and since art industry is very competitive, I guess it would be better if I wasn’t stealing their jobs all the time 😉 And the next day the plot twist happened, it turned out that we had been talking about oil or acrylic painting. Well, I’m definitely not the right person to go to, then.

Day 4

For breakfast I ate a slice of bread that Irina baked with butter. It was too early for real breakfast and way too early for a Dutch one (we had to be outside of Boud’s house at 7:15 am – I had full 4h of deep sleep, which is enough for me to be operational). On the train I found a sweet bread roll in my backpack that I had forgot about. I had been given it on the airplane – a real traditional Polish sweet bread roll with sweet pudding filling. I love them. There was unfortunately only one, quite small and squeezed from being in my backpack, so I couldn’t share and show my companions they should love them, too.

There was catering for lunch. Quite different from what I’ve seen in Poland – there was Indian food, for example. I took some chicken in sauce with rice. It was great and the chicken was softer that I thought possible (the exact opposite of what we can get from the Indian restaurant next to my house – it’s all tasty, but the chicken is always bone-dry). It looks like Indian cuisine that doesn’t include spiciness is always delicious. I also liked the way it was served – there were those little bowls, I could take rice and chicken in all the proportions I wanted, and since the bowl was small, when I took only a bit to taste it, I looked stylish and fashionable, not picky 😉

After lunch I noticed Wolthera holding a cup with some yogurt and stuff. It turns out that dessert was being given out by a mysterious magical lady walking around. She’d appeared out of nowhere, had given Wolthera the cup and disappeared just as quickly. Fortunately some time later I found the magical lady on the other end of the corridor, caught her and took my prey. I think it might’ve been a frozen yogurt with a meringue on top, or maybe just yogurt with meringue, hard to tell, but it was yogurt (forest fruit flavour) and it was cold. And tasty.

Around 3 pm Boud decided to come back home. Dmitry wanted to stay to attend one more talk, Wolthera was as tired as Boud if not more, and I started to feel bored next to our booth and not rested enough to try to keep up with talks. It was a bit unfortunate because I didn’t find time to talk with The Smiliest Dev – well, she calls herself The Littlest, but I usually just assume I’m littler than others, so I think she might be wrong in her assessment. Or I am wrong. I should’ve asked her what height she is. My description is based more on my own perception, and what I was seeing was mostly her wide smile and beautiful hair. Ehh, well. Maybe another time.

When we were coming back from the conference, me leading two zombies or, alternatively, me being led by two zombies – how did we arrive safely that day, honestly – I was bravely fending off accusations of not having anything to eat. My backpack is nearly as magical as that lady, it always has something to eat. Wolthera was merciless, though. It turned out a package of M&M’s is not food. Cookies type 1 are not food, muesli bar is not food, chocolate bar is not food, cookies type 2 aren’t food, and basically I didn’t have any food, according to her. I wonder if my sweet roll would be considered food. Since Wolthera is Dutch, I don’t take her judgement in that department too seriously – I mean, they have liquid meat after all. (When Indians rant about mild food, I can smile and tell them I just prefer when my delicious food doesn’t cause pain; for Dutch I can only have some kind of ethnographic curiosity).

For dinner I had another Indian rice and chicken in sauce. Irina’s home made though, not catering. A different kind, still tasty, and I could put some crunchy stuff on top so it had a bit of a different texture. There were also slices of raw cucumber. It isn’t a combination I would make – see, Dutch are weird in terms of food – but it wasn’t bad at all. And at least it wasn’t inside the rice meal as they did in the Indian restaurant with peas and my biryani.

I got some Dutch waffles to take home. Those round flat waffles with caramel inside. They are quite nice; moister than the regular ones that my mom sometimes makes.

Day 5

As sprint days go, this one was very quiet. Boud was meant to talk with me about my TODO list, but looked super busy with his keyboard, and at 11 am he and Irina went out not to come back until after I went to the airport. Dmitry was quietly working with his new laptop at first as well, although later he convinced me that using Ninja would be a great idea, which it wasn’t. So I volunteerily broke my build (well, technically, install. It was complaining about some missing libraries). Wolthera woke up (or at least went downstairs) after, I think, Boud and Irina went out, not a problem since she was staying there anyway, and was – as you can guess – quietly doing something on her laptop as well.

Painting of a desert I've made that day
Painting of a desert I’ve made that day

Dmitry went home around 1 pm, that left only me and Wolthera in the house. She offered to bring some lunch for us. And coffee beans (I think it was beans), because the express run out of coffee and there is no way for Wolthera to start a day properly without coffee. Lunch was nice, two different kinds of pastries.We wanted to heat it up in the oven, but all of our attempts to turn the oven on failed miserably (it’s worth noting that my participation was mostly looking at the oven with an understanding smile and “oh, yeah, so that piece of technology, that’s the oven, that’s how you call it, okay, I see it has some buttons and knobs, oh yes, just as ovens should”). The pastries were good even cold, though. One of them was a thing that looked like a hotdog, but it was minced meat inside a thin, but layered multiple times, weird dough that looked like it was fried (and the minced meat wasn’t liquid!); and a pizza-like dough with pizza-like tomato based stuffing.

Much more interesting is what Wolthera brought for dessert. She said those are cookies that are made or sold around this time of the year, typical for Dutch and seasonal. Of course I had to try them – little chance I will be in the same country around the same time of the year, unless Krita employment really requires a yearly EU flights ticket.

They were delicious. I’m including a photo of the package just in case you have a chance to be in Netherlands in autumn. Those are very little, perfectly round and rounded cookies with some spices (Wolthera said later that you can buy the spices mix in Netherlands, but I didn’t know at that time and didn’t buy it). Tastes a bit like gingerbread cookies, but differently. Hard to tell, because those cookies were additionally covered in white chocolate and a generous amount of cocoa powder. Spices in the cookies, sweetness of the white chocolate and bitterness of the cocoa powder create a unique and incredibly good taste. (Of course I decided to steal the idea and try to make them at home, I already bought white chocolate).

Truffel kruidnoten package

On the airport I went to the same Albert Heijn store I had been to on Monday. I looked through all the sweets shelves (they have 1kg M&M’s packages!) and finally found one with something similar to the cookies Wolthera had showed me, I had no idea you could buy them without chocolate and cocoa powder… It turned out you can. There were other kinds, too: just cookies; cookies with white chocolate; cookies with milk chocolate; and then, finally, at the very end of the shelf (I had to reach deep inside) I found the white chocolate + cocoa powder (“Truffel”) ones. I was already worried about the weight of my luggage, but 250g more wouldn’t hurt, would it?

After a quick and very unhealthy dinner I went to the check-in. I was pleasantly surprised when they told me not to unpack my stuff – neither electronics nor liquids. I was much less pleasantly surprised when it turned out that every luggage with a laptop is stopped to be manually checked. Not unpacking didn’t save me any time after all… After I dealt with check-in, I only had 10 minutes until the gate was supposed to be opened.

Supposed to, because planes aren’t the most punctual in the world. I had to wait 40 minutes more. And the plane was different from what it supposed to be, so I didn’t get the seat next to the window. I wasn’t that disappointed because it was already dark outside. Landing in Warsaw was beautiful though – very thick fog with lights and industrial structures looked really amazing, mysterious – just like this indie game called “Inside”.

It looked interesting

On the plane I was mostly drawing on my new laptop – I noticed one flaw of our HDR demos, basically there was nothing that would show both super bright and super dark colors so that the dark areas still had details in them. I decided to fix it immediately. Some kind of an intermediate result below (the tree is way too big for the little river I started painting in the valley, but it is bad in more ways than one so it’s gonna be deleted as soon as I open this image to continue painting):

Unfinished painting of a sunset, made ion the airplane
Unfinished painting of a sunset, made ion the airplane (HDR, squashed to SDR afterwards)
Development · Krita · planet

Windows Krita Development

Prerequisities

I needed to patch Qt on Windows, so I had to leave my comfortable Tusooa’s script development environment based on pre-built dependencies taken from the KDE Build Factory and make an actual proper Windows Krita development environment. Since I’m gonna need to make another one very soon and very quickly, I decided to write down my experiences before I forget it all.

List of things to download and install (for details go to https://phabricator.kde.org/source/krita/browse/master/3rdparty/README.md, which is also a place I took versions information and some sentences from):

I created a new directory: C:/qtdev (kritadev was taken). Inside I have two directories: krita and env-dev. I cloned Krita’s code repository into krita directory:

git clone git@invent.kde.org:kde/krita.git krita

Scripts

In env-dev I made a few scripts that helped me with build.cmd script without having to fight with cmd too much. This file is called env.bat:

set OLDPATH=%PATH%
set PATH=%PATH:C:\Perl64\bin\;=%
set PATH=%PATH:C:\Strawberry\c\bin;=%
set PATH=%PATH:C:\Strawberry\perl\site\bin;=%
set PATH=%PATH:C:\Strawberry\perl\bin;=%
set PATH=%PATH%;C:\mingw64\mingw64\bin;C:\%ProgramFiles%\Python36

set BUILDROOT=c:\qtdev\env-dev
set PATH=%BUILDROOT%\i\bin\;%BUILDROOT%\i\lib;%PATH%
set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
set "WindowsSdkVerBinPath=%ProgramFiles(x86)%\Windows Kits\10\bin\10.0.18362.0"

Next one is buildall.bat:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd  --no-interactive --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Then buildkrita.bat:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd --no-interactive --skip-deps --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Last one, justcmd.bat, actually untested yet in time of writing, but should be working just fine:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd --no-interactive --cmd --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Notes about all of those scripts:

  • env.bat
    • Usage: once for every new cmd.exe window, before any attempt in building Krita or dependencies.
    • It is just used to make sue I don’t have anything misleading in my PATH (I installed Strawberry Perl, which of course installed a bunch of c++ compilers – and yes, this werid stuff actually does what I think it does and does remove those paths from PATH; if you want to adjust it to your needs, make sure earlier that t does remove everything you want it to remove! If you just use set, you won’t break your system, so you can play with setting PATH how much you want) and to actually put there stuff that I didn’t have in PATH before (Mingw and Python).
    • You need to adjust it to your needs, especially the Windows SDK version/location and unwanted paths.
  • buildall.bat
    • Usage: it will download source code for all dependencies to download directory, put it in /b/ext_X/s/ directories, then run cmake, make and make install on it. It will take a few hours. Also note that if you want to hack on Qt, it will replace your code and your git repository you made in /b/ext_X/s/ with a clean version of Qt, so be careful to not lose your changes.
    • Options:
      • –no-interactive – don’t ask about anything
      • –download-dir – location to put .zip archives with dependencies source code
      • –deps-build-dir – directory to build dependencies in
      • –deps-install-dir – directory to install dependencies into – to make it easier, keep it the same as Krita’s install directory!
      • –krita-build-dir – directory to build Krita in
      • –krita-install-dir – directory to install Krita into – later you’d need to go there and then ./bin/krita.exe will be your executable to run
  • buildkrita.bat
    • Usage: it will run cmake and then make and make install on just Krita.
  • justcmd.bat, my new baby, will run build.cmd in –cmd mode, which is a very hacky way get access to commands that make those scripts above practically obsolete.
    • cmake-deps – run cmake on dependencies (see warning in buildall.bat section!).
    • make-deps – run make and make install on dependencies.
    • cmake-krita – run cmake on Krita.
    • make-krita – run make and make install on Krita.

Ordered list of things to do

To sum up, here is the list of things to do in order:

  1. Install all things on the list.
  2. Clone Krita’s repository.
  3. Create directory c:/qtdev/env-dev/ (the rest should be created by build.cmd).
  4. Adjust env.bat to your needs. Save all scripts to c:/qtdev/env-dev/.
  5. Open cmd.exe – unfortunately, since build.cmd script is in cmd, you can’t escape it…
  6. Go to c:/qtdev/env-dev/. Yes, that is important, very important. You want to run build.cmd script from inside your build directory and *not* from inside your source code directory. (Even if you were running build.cmd directly, without my script that clearly uses “./”, the suggested paths would be in source code, and providing custom path is so tedious without a bash completion…)
  7. Run env.bat. You only need to run it once per cmd.exe window.
  8. If you didn’t build anything yet, just run buildall.bat. It will take care of everything. Go for a walk, watch a movie, call your grandma – it will take some time…
  9. For any subsequent build, just run justcmd.bat and later use command make-krita to build Krita.

Making patches to Qt

If you want to hack on Qt, there is some more things you’d want to remember:

  1. Just after you built Krita with Qt for the first time, but before changing the code, initialize a git repository in Qt’s source code directory (it will be located in c:/qtdev/env-dev/b_deps/ext_qt/s/). Create a .gitignore file (just copy something from the internet) and make an initial commit. It can take several minutes on NTFS, so don’t get worried if it doesn’t seem to be willing to end after a moment. Just be patient and go get a snack.
  2. DON’T run cmake on Qt. Or, be super careful about it. I just commented out the section that should download and extract the source files to make sure it doesn’t do that.
  3. Make extra sure you saved your patch outside of Qt’s source code directory (outside of your new fresh git) when you want to finally introduce the Qt patch to Krita’s ext_qt code. As I said, cmake will replace Qt with a clean version and later add your patch (that you of course already put in ext_qt/CMakeList.txt and ext_qt/ directory, right?) on top of the Qt’s source code.

Common pitfalls

  1. “Directory is not empty” (during any kind of ext_XXX building or extracting)
    • just run the script again.
  2. “File or directory doesn’t exist”
    • regarding ext_qt/s/.
    • If you check it, there is one directory inside, “qtbase” in my case – the same you changed.
    • You can’t remove/delete this directory (even with admin rights) and build will fail every time.
    • Solution: just restart your PC. Windows doesn’t have a proper root account, so things like that can happen, but fortunately it gets sane after rebooting.
    • Another possibility (thanks to Dmitry, of course): some executable is running, using those files or libraries. It might be Krita or Qt Creator. Make sure you closed them before trying to compile Qt.
  3. “Can’t find file to patch at input line X”, “Perhaps you used the wrong -p or –strip option?”
    • It’s probably because you copied the instruction for the patch from the line above and you didn’t notice the -d qtbase option.
    • Either remove it, or change the patch that it doesn’t contain qtbase part of the path.
  4. “patching file [path] Reversed (or previously applied) patch detected! Assume -R? [n]”
    • delete everything in b_deps and start again… I’m still not sure where exactly it’s written that cmake don’t need to extract the files (overwrite them) anymore.
    • -R would be wrong, and choosing “n” will break the running script.
  5. “Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354”
    • Convert LF to CRLF endings in the patch.
  6. “cc1plus.exe: error: one or more PCH files were found, but they were invalid”
    • Run env.bat script for this commandline, please.

Tests

In time of writing, if you want to have tests on Windows, you need to change build.cmd or call make directly. Build.cmd script has no option to turn those on.

If you turn it on in build.cmd, those tests will be located in c:/qtdev/env-dev/b/bin/ instead of respective folders like on Linux. Additional complication is that they often use some .dlls that are not there (since dependencies are built in b_deps). To fix that, I just copy the binary file from b/bin/ to i/bin/. Below there is a handly script that does it for me (and ensures that the test is freshly built):

#!/bin/bash

NAME=$1
MAKELOC=$2

MAKE=/c/mingw64/mingw64/bin/mingw32-make.exe

if [ ! -z "$MAKELOC" ]
then
	CURR=`pwd`
	echo "Current dictionary: ${CURR}, changing to ${MAKELOC}..."
	cd ${MAKELOC}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
	${MAKE} -j8 ${NAME}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
	echo "${MAKE} ${NAME}"
	cd ${CURR}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
fi

cp b/bin/${NAME} i/bin/
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
i/bin/${NAME}
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

Qt Creator

(Before you start to set up Qt Creator, make sure you can build Krita from console).

First you need to create a new Kit. You need to set up at least Compiler (make sure the path is correct!), Debugger, Qt version and CMake Tool. In the Kit settings remove all the properties that are passed to cmake. Make sure CMake Configuration field is empty, and CMake Generator should point to CodeBlocks-Mingw Makefiles.

Then you can set up the project. Make sure the configuration points to “Release with Debug Information”. Debug build is still broken: https://bugs.kde.org/show_bug.cgi?id=369303. Set up building directory to some random folder; configuration will fail, but that’s ok, because then you’ll get access to environment settings.

In Building Environment make sure you make the same surgery on PATH as you do in your version of env.bat script. Add a new argument to Building Steps: --j8 or --j4 or something else, depending on how many cores you want to use to build Krita. You can add a custom step after that: mingw32-make -j1 install/fast. Make sure all Key/Value pairs are correct. Then there is this risky step: put C:\qtdev\env-dev\b as “Version Directory” or however it is called in English Qt Creator (the first textbox on top).

Try to build Krita inside Qt Creator (do it only after you have all dependencies built). If it works, make sure you can still build Krita from console, too.

Tip: if everything seems correct except Qt Creator complains about some FindECM and you have no idea where you should be looking for it, that means you wanted to cheat the system and put something else as building directory.