When clicking on .mq4, the EA builder generates the code and you can download it. When clicking on .ex4, the EA builder generates exactly the same MQL4 code, compiles it using original compiler (metaeditor.exe) and you can download the compiled file.
When something doesn't work as expected, take a look at the logs for error messages.