Distributing Win32 App

Hi,

We’ve just published our app out for Windows as a Win32 app via Corona.

It works well and we’re ready to distribute it. I’ve trawled the forums and found bits and pieces of info, but it would be really helpful to hear from anyone who has already been through this process as to how best to proceed from here, specifically…

  1. We signed up for a Windows developer account (dev.windows.com) which I originally assumed would let us release for Windows desktop. They request a .appx, .appxbundle or .xap file. Our published app is a .exe file and a bunch of assets. Am I right in thinking there is no way to convert an old style win32 app into a new “universal” Windows app? Project Centennial has been mentioned (https://dev.windows.com/en-us/bridges) but no release date seems available and I’m not even sure it would simply allow you to convert a Corona-created .exe file to a .appx file anyway would it?

  2. Digitally signing our app for distribution seems like it should be simple - purchase a certificate and then use this to sign the app but every tutorial I’ve found seems horribly complicated compared to what we have to do for Apple or Android builds. Am I missing something or is it just a very convoluted process?

  3. If the Windows app store isn’t the right place for distributing Windows desktop apps, is there somewhere else that would be better suited (category is an educational app, not a “game” as such) or is our best option to create an .msi installer file and sell it ourselves via our website?

Apologies for all the questions. Just doesn’t seem very clear and we’ve never done any Windows development so have no knowledge of the processes involved.

Thanks,

Ian

Microsoft’s Windows app store currently only supports distributing WinRT universal apps (aka: metro apps).  As you’ve noted, these are apps having an *.appx extension and are built completely differently.

Corona currently only supports building classic Win32 desktop apps.  These are *.exe apps.  These are MUCH more popular by PC users and can be ran on Windows XP (Service Pack 3) and newer operating systems.  *.appx files cannot be ran on Windows OS versions older than Windows 8.1, which is a problem since Windows 7 is still the most popular OS last I looked.  And currently, *.exe application cannot be distributed by Microsoft’s Windows app store, although most PC users won’t mind this since that app store isn’t popular yet.

Regarding *.exe apps, there are many ways to distribute them.  Most developers distributing their Windows desktop apps by making it downloadable from their own website.  This is the traditional software distribution model.  And if it’s a game, then can be distributed via Steam or GOG, provided that you qualify to be on those stores.  There may be other options too.

And as far as packaging your app, there is no single solution either.  You can choose to zip it up and distribute via a zip file.  Or perhaps package it up via an install program such as an *.msi or *.exe installer (MSI files are the Microsoft Windows standard method of installing).  If you distribute your app via Steam or GOG, then you would have to use their app packaging system.  Again, there is no 1 way to do it on Windows.

Regarding digitally signing your app, you can easily do this at the command line once you’ve acquire the “signtool.exe” from Microsoft.  We’ve documented a quick how-to here…

   https://docs.coronalabs.com/daily/guide/distribution/win32Build/index.html#app-signing

Hi Joshua,

Thanks for the comprehensive reply - much appreciated.

I’ll look into the .msi route I think - if that’s the standard then it makes sense.

All the best,

Ian

Okay I think I’ve got my head round this and have managed to create an msi installer file and it’s all working okay.

I used http://www.advancedinstaller.com/download.html - pretty simple software that seems to do what I needed.

But - I wonder if anyone has any thoughts on how to ensure people can’t easily redistribute our Win32 app when it’s something we’re selling ourself and not via an app store. Previously we’ve relied on the built in licensing for Amazon and Apple or Google Play’s licensing API for our apps but this is obviously different if we’re selling via a 3rd party marketplace.

I saw Gumroad offer license keys which we could then query using cURL but I wasn’t sure if anyone knew of a simpler option for copy protecting msi files.

Thanks in advance.

As I’m sure you’ve noticed, if you distribute the app yourself, then it’s up to you to authorize/license the software.  There are 3rd party commercial software tools to do this.  Or you can implement your own licensing scheme.

I’ve noticed that one of the Corona developers here, Glitch Games, uses “itch.io” to handle purchases and app distribution.  I have no experience with it, but it might be worth a look.

   https://itch.io/developers

   https://glitchgames.itch.io/forever-lost-episode-1

If you plan on implementing your own authorization/licensing scheme, then our Lua system.getInfo(“deviceId”) function might help you out.  It returns the Windows SID in encrypted form.  The SID is the unique ID assigned to the PC by Microsoft when installing Windows.  This is the simplest means of identifying a PC since you can’t assume a PC has a serial number because they can be custom built by the user, where each PC component comes from different manufacturers and each have their own serial number, if readable.  So, this is the simplest solution for shareware apps.  It’s only shortcoming is that re-installing Windows means that a new SID will be generated for the PC.

On more thing regarding your MSI install program.  Remember that install programs are “programs” and need to be tested.  This includes testing upgrades (installing over an older version) and uninstalls.  The last thing you want to do is screw up your customer’s PC.  :slight_smile:

​I prefer to test install programs on a separate clean test machine.  This is where VMWare virtual machines are a big help.

Thanks for the info.

I’ve started integrating with Gumroad - they support license keys so any purchase that goes via their web store gets a license key assigned and you can then tap into their API to check the key is valid. Seems to work really nicely - I’ll post some code once I have it finished.

See this link for a guide to selling online using Gumroad. Hope it helps somebody.

https://forums.coronalabs.com/topic/62507-how-to-distribute-win32-builds-with-license-keys-via-gumroad/

Cheers,

Ian

Microsoft’s Windows app store currently only supports distributing WinRT universal apps (aka: metro apps).  As you’ve noted, these are apps having an *.appx extension and are built completely differently.

Corona currently only supports building classic Win32 desktop apps.  These are *.exe apps.  These are MUCH more popular by PC users and can be ran on Windows XP (Service Pack 3) and newer operating systems.  *.appx files cannot be ran on Windows OS versions older than Windows 8.1, which is a problem since Windows 7 is still the most popular OS last I looked.  And currently, *.exe application cannot be distributed by Microsoft’s Windows app store, although most PC users won’t mind this since that app store isn’t popular yet.

Regarding *.exe apps, there are many ways to distribute them.  Most developers distributing their Windows desktop apps by making it downloadable from their own website.  This is the traditional software distribution model.  And if it’s a game, then can be distributed via Steam or GOG, provided that you qualify to be on those stores.  There may be other options too.

And as far as packaging your app, there is no single solution either.  You can choose to zip it up and distribute via a zip file.  Or perhaps package it up via an install program such as an *.msi or *.exe installer (MSI files are the Microsoft Windows standard method of installing).  If you distribute your app via Steam or GOG, then you would have to use their app packaging system.  Again, there is no 1 way to do it on Windows.

Regarding digitally signing your app, you can easily do this at the command line once you’ve acquire the “signtool.exe” from Microsoft.  We’ve documented a quick how-to here…

   https://docs.coronalabs.com/daily/guide/distribution/win32Build/index.html#app-signing

Hi Joshua,

Thanks for the comprehensive reply - much appreciated.

I’ll look into the .msi route I think - if that’s the standard then it makes sense.

All the best,

Ian

Okay I think I’ve got my head round this and have managed to create an msi installer file and it’s all working okay.

I used http://www.advancedinstaller.com/download.html - pretty simple software that seems to do what I needed.

But - I wonder if anyone has any thoughts on how to ensure people can’t easily redistribute our Win32 app when it’s something we’re selling ourself and not via an app store. Previously we’ve relied on the built in licensing for Amazon and Apple or Google Play’s licensing API for our apps but this is obviously different if we’re selling via a 3rd party marketplace.

I saw Gumroad offer license keys which we could then query using cURL but I wasn’t sure if anyone knew of a simpler option for copy protecting msi files.

Thanks in advance.

As I’m sure you’ve noticed, if you distribute the app yourself, then it’s up to you to authorize/license the software.  There are 3rd party commercial software tools to do this.  Or you can implement your own licensing scheme.

I’ve noticed that one of the Corona developers here, Glitch Games, uses “itch.io” to handle purchases and app distribution.  I have no experience with it, but it might be worth a look.

   https://itch.io/developers

   https://glitchgames.itch.io/forever-lost-episode-1

If you plan on implementing your own authorization/licensing scheme, then our Lua system.getInfo(“deviceId”) function might help you out.  It returns the Windows SID in encrypted form.  The SID is the unique ID assigned to the PC by Microsoft when installing Windows.  This is the simplest means of identifying a PC since you can’t assume a PC has a serial number because they can be custom built by the user, where each PC component comes from different manufacturers and each have their own serial number, if readable.  So, this is the simplest solution for shareware apps.  It’s only shortcoming is that re-installing Windows means that a new SID will be generated for the PC.

On more thing regarding your MSI install program.  Remember that install programs are “programs” and need to be tested.  This includes testing upgrades (installing over an older version) and uninstalls.  The last thing you want to do is screw up your customer’s PC.  :slight_smile:

​I prefer to test install programs on a separate clean test machine.  This is where VMWare virtual machines are a big help.

Thanks for the info.

I’ve started integrating with Gumroad - they support license keys so any purchase that goes via their web store gets a license key assigned and you can then tap into their API to check the key is valid. Seems to work really nicely - I’ll post some code once I have it finished.

See this link for a guide to selling online using Gumroad. Hope it helps somebody.

https://forums.coronalabs.com/topic/62507-how-to-distribute-win32-builds-with-license-keys-via-gumroad/

Cheers,

Ian