Make an application as GUI and console mode