You can always keep the source closed at first and then re-release it as libre software later. This is what ID did with Doom. You could also sell long-term support for your software (like Red Hat and SUSE do) but this works only for enterprise software. Or you can write just libre software because you want to help others.