As far as the GOP goes, the anti-Trump Republicans blew it, honestly. They should have united early, in favor of one candidate.
The anti-Trump Republicans were split between the moderates backing Kasich/Jeb etc. and the hardline movement conservatives backing Cruz. That's how Trump won: he happened upon a directionless, deeply split party and as an outsider was able to play the unifying candidate.
The only candidate who could have stopped Trump was Cruz, and like hell were the "establishment" going to throw their weight behind someone they hated even more.