Actually, the best solution (avoiding the courts’ reluctance to deal with questions that belong to the political sphere) would be for Cruz to get a Congressional resolution similar to that unanimously voted for McCain. Since Congress is ultimately the authority in charge of accepting the Electoral College vote, that should settle matters.
McConnell has already nixed that idea: Link