One of the strengths of Xojo is that it creates a no requirements executable package. For Mac OS X it puts all required libraries and resources in the application bundle and for Windows and Linux it puts all the necessary files into the Libs and Resources folders. This makes installing your apps on Windows and Linux pretty easy because you did not need an installer (however it’s highly recommended you use installers!).
Xojo 2016 Release 1, however, has a new requirement that is biting some users fairly hard. Some Windows 7 and 8 users get an error staying that it can’t start because it’s missing the api-ms-win-crt-runtime-l1-1-0.dll. This error is because Xojo Windows framework was updated to use the latest Microsoft tools which means the “Universal C Runtime”.
This new runtime is shipped with Windows 10 and should be part of a fully updated Windows 7 and Windows 8 installation and because of this Xojo is not distributing the DLL when they build an application. The past few months have shown us that many people do not automatically update their systems. It’s pretty easy to replicate this behavior in a VM environment. Simply do the base install of Windows 7 or 8 (doesn’t matter if it’s 32 bit or 64 bit) and without doing the hundreds of updates required to bring that version of Windows up to date, run a Xojo application.
There are three solutions to this problem. First, have the user do all of the available Windows Updates which should install the runtime. The second, is to have the user download the runtime installer from Microsoft. The third option, is to add it to your installer.
We use InnoSetup for creating our Windows installers. Xojo has conveniently added the redistributable to the Xojo download package so we can use it. Look in the Extras/Windows Runtime/Installers/ directory to find these installers. Adding this into your installer is relatively painless.
In the [Files] section of your Innosetup script, add the following line:
Source: “VC_redist.x86.exe”; DestDir: {tmp}
Then, in the [Run] section, add this line to have it installed automatically:
Filename: {tmp}\VC_redist.x86.exe; Parameters: “/install /quiet /norestart”; StatusMsg: “Installing 32-bit runtime…”; Flags: waituntilterminated
This is a no fuss way to add it to your installer. It only adds about 14 MB to your installer. Most users will never see it because they’re up to date.
I highly recommend that you peruse the PDF provided by Xojo on this topic at Documentation/WindowsUniversalRuntime.pdf.
In our testing installing the new runtime has not caused any issues. The clients that have had this added for them have reported no issues either so I think it’s pretty safe. Some Xojo forum users, however, have reported that their Windows installation will hang when trying to install the Runtime. Have you experienced any issues with the runtime?