Can ionic build to .exe file?

Hello guys,
I’m a newbie, i’m using ionic2 with typescript. I successfully build my app with android and windows 10 x64.
But, Can ionic2 build my app to .exe file, so I can deploy it to my friends PC ?
If It can, please give me some help to do.
Thank you

Hey Newbie,

Not on its own. Cordova doesn’t support that type of native build.

I’ve never done this but you might want to take a look at Electron - lots of major apps use this including VSCode / GitKraken / Spotify (citation??)

Still use Ionic for your graphics and business logic.

Or alternatively create a winform app with a webkit full screen browser…

https://www.codeproject.com/Tips/1058700/Embedding-Chrome-in-your-Csharp-App-using-CefSharp

Let me know how you get on - I’m not going to do this myself but I appreciate the approach.

:slight_smile:

Dear friend Judgewest,
Thank you for your help, I’ll try on your tips, and show you the result. If
we can do it, that’ll be great huh :slight_smile:
Thank you again

1 Like

Before following @Judgewest2000’s great advice, maybe take a step back and think about if you really need that .exe file as such or if you just want to be able to use the app from a desktop computer. If it’s the second case, it might be easier to just build the app with ionic build --prod and upload the contents of the www folder to some server (e.g. using free Firebase hosting).
Then when you have opened the site in Chrome, you can go to “More Tools” > “Add to Desktop”, check “Open as window” and press “Add” and you will also get some standalone app feeling when opening that shortcut (you can even make it work offline if you enable the service worker).

If you don’t want to make the app public, or if it’s just for testing, you can also just send the www folder to your friend and have him open the index.html file in Chrome.

1 Like

Dear pwespi,
Thank you for your really good help with chrome.
My target is a real cross platform, include native win form .exe , but
chrome is good.
One more new experience
It’s very kind of you guys :slight_smile:
Thank you