Xojo-built Win App Deployment Issues

I just started using Xojo after using REAL2011r3 for 8 years. I’m a little confused on Windows deployment of my 64-bit apps.

This is the definitive Xojo page on it: https://documentation.xojo.com/topics/application_deployment/desktop/desktop_app_deployment.html

Some questions:

First, I understand that XojoGUIFramework64.dll is always a requirement. But, why when I compile a Windows .EXE (with Libs and Resources) on Mac, sometimes/all-the-time a bunch of DLL’s (like msvcr120.dll) get written? I have “Write Runtimes” off. Nowhere does it say I need to include these in deployment, and THE PAGE seems to discourage it. Why do they get written? What are they for?

Second, on THE PAGE it talks about the Universal Runtime, and that seems easy enough, but again that argues against including those fore-mentioned DLL’s. (Again why?) So… I’ve included that Universal Runtime in my installer. Yet, I"m already received complaints from users getting a Fatal Error: cannot load msvcr120.dll. One “fixed” the problem by getting that file off the Internet and putting it in my app folder. That can’t be an adequate solution.

So, whats going on? Is there something I’m missing?

The Universal C runtime ideally should not be included in your installer. It should have been installed with MS updates and will be updated by MS if it has. Including it with your application will bypass the MS security updates process - so not recommended.

64 bit applications are linked by LLVM which requires those other DLL’s to be in the same folder as the runtime - you need to include these in your installer. You’ll also need the Resources & Libs folders (and contents).

[quote=466900:@Wayne Golding]The Universal C runtime ideally should not be included in your installer. It should have been installed with MS updates and will be updated by MS if it has. Including it with your application will bypass the MS security updates process - so not recommended.

64 bit applications are linked by LLVM which requires those other DLL’s to be in the same folder as the runtime - you need to include these in your installer. You’ll also need the Resources & Libs folders (and contents).[/quote]

Thanks for your answer (sincerely), but with what authority do you give it? First, your statement “ideally should not be included in your installer” completely goes AGAINST what the Xojo page recommends, which says "Your installer should include the necessary redistributable in order for you app to work properly. " You say should not, Xojo says should.

Second, your statement “you need to include these [Microsoft DLL’s] in your installer” - where does Xojo say that? Deployment is a serious matter and DLL HELL is the modern equivalent of the Black Plague of the Middle Ages. I can’t be installing Microsoft DLL’s on thousands of users computers willy nilly.

The best Xojo says is “If your app has other support files or folders, such as a Resources folder, then make sure that your installer includes them as well” - which says nothing about Microsoft DLL’s - which they address further down on THE PAGE.

I have found no other Xojo documentation page other than THE PAGE I listed above, besides this https://documentation.xojo.com/topics/windows/information_about_the_windows_universal_runtime.html Is this not documented? If it’s not, man, that’s a SERIOUS omission. So forgive me if I ask for “what authority you have” - how do we know this?

Maybe the authority of reading that page correctly?. Runtime FILES (DLLs) are not the same as a RUNTIME INSTALLER (redistributable)

You just said “Xojo says should” in the previous paragraph and here “where does Xojo say that?” … What?

Also, the answer for the “DLL HELL” is in the second link you posted

If you want an aswer from someone with authority, maybe you should go to ask microsoft.

I have aswered this a couple times, maybe if you are interested in an answer without any authority you can use the SEARCH function of the forum…

Booo… =)

And how do you know that? =)

I mean, seriously, none of that is common knowledge. When I see a file called msvcr120.dll, it’s obviously not a Xojo file, it’s not my file. The Xojo page says nothing about including extra files that appear out of nowhere - and I’m going on my 20th year with REAL/Xojo and never before has the company required including Microsoft files as dependencies with their apps.

Runtime “files” and a Runtime “installer” is an extremely arbitrary distinction, if there are any. And see this article by William Yu of Xojo, which calls the msvcr120.dll a redistributable https://blog.xojo.com/2014/08/15/the-libs-folder/ Of course this was written 5 years ago, and it’s an article, not official documentation.

DLL HELL is a very serious thing, and what I’m saying is that I’m not going to include DLL’s that I’m not supposed to, or should not, distribute. THE PAGE says NOTHING about including Microsoft DLL’s, or if Xojo requires extra Microsoft DLL’s. It ONLY says it requires the Universal Runtime.

To make it MORE confusing, the switch in Xojo “Include Runtime DLL’s” - it’s off by default, and I leave it off, yet those DLL’s get written anyway.

(And, yes, i did search for an answer to this question before I posted. I found old posts from 2014, and an article from Bob Keeney in 2016, which only talked about the Universal Runtime, just like THE PAGE only talks about the Universal Runtime.)

At this point I’m blending 33% whining, 33% legitimate complaint, and 34% asking why this isn’t clearer in the Xojo documentation, when it’s a very serious thing. I’m not being nit-picky, I’m trying to be responsible.

I thank both you guys for your answers, and I “might” go ahead and include these written DLL’s in my installers, but really I’m waiting for someone at Xojo to clarify this. William Yu’s article says those files are included in the Redistributable. After all, its’ the Xojo-created app that has the dependency, they should say what is the case or not, not Microsoft.

@Garth Hjelte: In 2016R3 up to 2018R3, Xojo included a file called WindowsUniversalRuntime.pdf in the Documentation folder. They have removed it, possibly because it is out of date. However, it is authoritative, and it elaborates on when to use the installer vs using the .dll files themselves.

Grab a copy of one of those versions to get the document.

I MUST BE way more subservient than the rest of you. I’m using Xojo 2019r1.1. If Xojo Corp removed it (they did) because it was out of date, there’s a reason why they removed it - it means it doesn’t apply, it’s not worth reading, it is inaccurate. So why read it at all, and why should I think it’s accurate or authoritative?

AGAIN - DLL HELL starts with developers just doing their own thing and doing things to get things “just to work”, while ignoring the larger picture. As far as I am concerned right now, the VC Redistributable is supposed to deal with all these DLL’s - including these mystery ones like msvcr120.dll - so we don’t have to. And that’s why Xojo removed the document.

AGAIN: there is nothing in the Xojo documentation that says I need to include these mystery files with my application. There is nothing in the Xojo documentation about these files. The only thing in the CURRENT - I said CURRENT - Xojo documentation is that it MIGHT - I said MIGHT - be a good idea to include the VC Redistributable in our installers, and they even provide a script line (which, BTW, they have to fix, there’s a CRLF in there that screws up the syntax) to facilitate that.

Convince me otherwise.

But I’ll install Xojo 2018 anyway, and read the PDF just for the readings-sake.

When you build you application package up EVERYTHING xojo puts next to the build exactly as it is laid out and distribute that
Personally I would also make sure that you include the VC Redistributables as that way you can be sure they ARE present
Only when you are distributing to Windows 8 and newer can you skip those as they are preinstalled
All the rest are REQUIRED and in the correct locations for your Xojo app to work

No, I think I’ll just bow out here before I get banned.

[quote=466899:@Garth Hjelte]This is the definitive Xojo page on it: https://documentation.xojo.com/topics/application_deployment/desktop/desktop_app_deployment.html

Some questions:

First, I understand that XojoGUIFramework64.dll is always a requirement. But, why when I compile a Windows .EXE (with Libs and Resources) on Mac, sometimes/all-the-time a bunch of DLL’s (like msvcr120.dll) get written? I have “Write Runtimes” off. Nowhere does it say I need to include these in deployment, and THE PAGE seems to discourage it. Why do they get written? What are they for?[/quote]

In the linked page, under Windows > Installers, it says:

[i]When you create your installer, you need to tell it to include all the files necessary to run the app. At a minimum, this includes the EXE file and the contents of its associated Libs and Resources folders.

For example, an app called Sliders would create a file called “Sliders.exe” and a folders called “Sliders Libs” and “Sliders Resources”. The Libs folder contains DLLs for libraries, plugins and other associated files needed by your app.

If your app has other support files or folders, such as a Resources folder, then make sure that your installer includes them as well.[/i]

As well, if you read https://documentation.xojo.com/topics/application_structure/coding_guidelines_for_64-bit_apps.html, under Windows > Build Files, it says:

For 64-bit builds, the compiler places some framework DLLs next to the executable and not into the “MyApplication Libs” (or just “Libs”) folder like it did for 32-bit builds.

Plus this page also has lots of other interesting information about how convoluted Microsoft has made the installer process less than intuitive.

You know, simply searching the forum on some of these *.dll names can be a wonderful thing. Have a great day, eh!

WRONG. It literally says:

“Microsoft recommends that when you distribute your build that you create an installer which installs these redistributable run-time components

Again, a redistributable is NOT dll files. It is an INSTALLER.

wrong again, xojo offers 2 alternatives (both covered in the documentation) and none of them causes DLL hell, nor are “developers just doing their own thing”

wrong again, you already have posted 2 links to the documentation where they say what to do and also a link to a blog with more information

That sounds like a waste of time

No mystery, msvcr120.dll and msvcp120.dll are the VC Redistributable components.
Anything built with MS Visual C++ needs these files to work. They are the libraries that VC uses to access Windows elements.

What you have are 2 choices regarding those dll’s:
Install them with your program (the directory where Xojo puts them)
-or-
As a courtesy, your installer can include the vc_redist exe’s and offer to install them in a central location.

My installer works yours doesn’t.

I’m obviously talking about two separate things, but they are related.

  1. How Xojo Windows apps should be deployed
  2. I’m evaluating Xojo’s documentation.

These things are tied together because Xojo should be clear about how to deploy Windows apps, and I am trying to do what Xojo says. I’m not trying to get into an argument with anyone, I’m just very precise about it (and as programmers, aren’t we all?)

All through this thread (with one exception), people are adding facts to the Xojo documentation (whether that turns out to be right or wrong) - point is, the Xojo documentation doesn’t just come out and say what needs to be said. THE PAGE where you would expect the full explain on how to deploy a Xojo-created Windows app doesn’t have all the information.

And so, Scott Cadillac makes the best point; but he threads 3 different pages to piece it all together. And I would not expect to find the deployment information on the 64-bit guidelines page.

So my question 1) is answered; so 2) is I would hope Xojo does some editing on the documentation to put that information in one place.

Thanks Scott, I appreciate you being clear.

You’re welcome Garth, I always try my best :slight_smile:

Good luck!