I had success last week building and submitting an, ironically, old Xojo application. It installed directly from an InnoSetup installer EXE! I had to cancel it since it asks for a serial number.
I have almost had the same success (after much blood, sweat and tears over three weeks), but the side-loaded app using the latest Xojo Release 3.1 gives an error that a DLL is missing. It installs and runs fine using the InnoSetup version, so it must be a Centennial issue. The nice MS man suggested removing the Windows Runtime DLLs since they’re unnecessary (didn’t fix it). My next step is to try it as a 64-bit application. Below are some of the lessons I learnt.
Setting up a Windows PC for WAS Submission
Ensure containers are switched on in Windows:
1. Right clicking on the Start menu in Windows 10
2. Choosing Programs and Features
3. Choosing Turn Windows Features on or off on the left panel
4. In the list of options, enable Containers, wait for the installation to be completed and, eventually, reboot the computer if asked before trying the conversion again.
Install the complete Windows 10 SDK:
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Install the Desktop Converter and Base Image from (note that BaseImage-14393.wim is about 3.5 GB!):
https://www.microsoft.com/en-us/download/details.aspx?id=53428
Run Desktop Converter as Admin then run:
PS C:\> Set-ExecutionPolicy bypass
Change the location of the base image on the next line then run:
PS C:\> DesktopAppConverter.exe -Setup -BaseImage “C:\Users\Dad\Documents\HMS Inno Setup files\BaseImage-14393.wim” -Verbose
Download and install the proper v14.0 VCLibs package using one the links (based on the VCLibs version) posted in the following blog: https://blogs.msdn.microsoft.com/vcblog/2016/07/07/using-visual-c-runtime-in-centennial-project/. Be careful that the installer wont actually install the dependencies, but it will just copy them into the following folder:
C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop\14.0\Appx\Retail
Inside this folder youll find a subfolder for each architecture (ARM, x86 and x64), with inside an appx that youll have to install on your machine. After that, the converted installer should work just fine.
For each WAS Submission
Build the Xojo app:
1. Build Windows 32-bit version
2. Remove the Windows Runtime files
3. Copy to Windows and build InnoSetup installer .exe
4. Run Desktop App Converter as Administrator with command:
cd “C:\myFolder with InnoSetupExe
”
DesktopAppConverter.exe -Installer “myNewAppName.exe” -Destination “My Build Folder” -PackageName “myNewAppName” -Publisher “CN=My Company Name” -Version 1.0.0.0 -MakeAppx -Verbose -Sign -InstallerArguments “/verysilent”
Note:
If you’re going to edit the XML and logo pictures then leave off the -MakeAppx command and run MakeAppx.
If you’re not going to side-load the application then leave off the -Sign command.
Drop the 3 versions of the logo (44x44, 50x50, 150x150) and replace the current pictures in the Assets folder.
Edit AppxManifest.xml in NotePad and:
set the Identity Name with the Dev Centre identity:
<Identity Name=“12345MyCompanyName. myNewAppName”
remove the ‘CD=’ text from My Company Name
if there is a space in the application name, add it to:
my New App Name
<uap:VisualElements DisplayName=“my New App Name” Description=“my New App Name” BackgroundColor="#777777" Square150x150Logo=“Assets\SampleAppx.150x150.png” Square44x44Logo=“Assets\SampleAppx.44x44.png” />
Run an Admin Terminal session and MAKEAPPX the application with the new XML and pictures using:
cd “C:\
My Build Folder\ myNewAppName”
“C:\Program Files (x86)\Windows Kits\10\bin\x86\makeappx” pack -d “PackageFiles” -p “myNewAppName.appx”
To re-sign the APPX certificate in an Admin Terminal use:
“C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool” sign /a /v /fd SHA256 /f “C:\
My Build Folder\ myNewAppName\auto-generated.pfx” /p “123456” “C:\
My Build Folder\ myNewAppName\ myNewAppName.appx”
To install the new APPX application locally:
Attempting to install the application will fail as we are side-loading and don’t have the correct certificate!
Open the Package and double-click then ‘auto-generated.cer’ certificate. Choose Install certificate and, when youre prompted where to install it, choose Local machine and then the option Place all certificates in the following store click the Browse button and choose choose Trusted Root Certification Authorities. Complete the installation.
Try to install the application again.
Simple, no?!!!