I'm delighted you asked. I think it's self-evident that there can be no free will at all in a universe ruled by a deity who already knows the future. To such a deity, we're like characters in a movie, and he knows how the movie ends. So if there's going to be any free will at all, either it's in a universe without such a deity, or the deity isn't what many people imagine it is.
The rest of your question is the classic philosophical "is/ought" problem. How can we get from what is to how we ought to behave? Ayn Rand has an excellent solution to this problem. The philosophy of Objectivism.
The Calvinists would agree with you, but I don't. Foreknowledge is not causation. I know the sun will set tonight. Does my knowledge of this cause the sun to set? Of course, the very concept of 'foreknowledge' implies a deity who is within time, something which most theists deny. Further, the anthropomorphized deity of human religion is at best a model of a metaphysical reality, not the reality itself. Unless you agree with those who read scripture literally, which I know you don't.
or the deity isn't what many people imagine it is.
Exactly.
Ayn Rand has an excellent solution to this problem. The philosophy of Objectivism.
I'm not an expert on objectivism, but I have studied it. Ultimately, I don't think it holds up any better than the philosophies of Comte or Feuerbach to the postmodern critique.