What to do about piracy in a Qt Application?
So i am developing a Windows application and i would like to sell it for 1$ for example.. Is there anything i can do about piracy?
To prevent it completely? Probably not much, once it is out there it is pretty much out of your hands. To prevent your average person from sharing it with their friends though, you can probably create a registry key that you check at startup or a small file in a standard system path to do the same thing. There are probably more advanced ways to do it, but I think these might be the easiest (this post is not out of experience, but I have been asking myself the same question and so far this is the best I have :) )
Short of implementing some sort of user login or registration/authorization/unlocking feature and some sort of server or key-based authorization system, I don't know of anything you can do. While Qt gives you the basic building blocks to create these types of things, there's not native Qt system built in to handle it.
I would say go with some form of easy serialnumber just keep the registration/serial system very simple. The ones that actually buy your software are your customers not the pirate that is trying to crack it. So make it simple for the former to work with your software and all but ignore the latter. A good example of this would be a online activation. Yes, it would stop some pirates but it would also anger a whole lot of your customers because your servers where down or they dont have a internet connection.
But most of all accept that fact that they will pirate you software no matter what you do. Try to see it as advertising. Hopefully a pirate can add something else to your software or be a customer for another of your products in the future. At least they are now aware of your software and might mention it to their friends that it turn buys it.
As long as your software is not very popular it is not likely for someone to invest great efforts in cracking it, so a basic encrypted serial number scheme will suffice.
The most secure forms of protection involve hardware keys/dongles which are required to operate the software, but this is a solution for very expensive enterprise grade software.
Overall, there aren't many programs which offer 100% protection against piracy, but I suspect this is mostly because some of the larger software companies actually want for their applications to be "pirate-able". Many pirates end up purchasing the software they pirated, learned and managed to make a living with it. Software that is not well protected gets much popular.
IMO piracy is bad only when the one who pirates can actually afford the purchase. If not - he wouldn't be able to buy it anyway, so no income is lost.
For a 1$ app will be a shame to get pirated. The only reason I can think of for someone to pirate a 1$ app is if he has no means of paying digitally/online in order to save the inconvenience it would be to wire 1$ the traditional way, which will end up costing significantly more. From my bank it would cost about 15-20$ do send 1$ abroad.
Ignore the pirates and make it very easy to pay you. Offer manny possibilities to transfer money to you: flattr, paypal, bank transfer, cash in an envelope, pay by calling a certain telephone number (there are services for that kind of thing), credit cards (if you're ready for the associated fees). Especially at those low prices below, say, 15€. Paying you has to be easier than googling for a crack and virus-scanning it. If the user still wants to use the software without paying, he will anyway, no matter how much of your time you've spent (a.k.a. wasted) implementing an anti-piracy scheme.
(in short: don't repeat the mistakes the music, film and software industry has made for almost decades now.)