4 ms·
Great article. I know that the topic here is C, but I think it's interesting to point out that Delphi (Object Pascal) has always produced executables that work
by TimJYoung 11y ago
Great article.
I know that the topic here is C, but I think it's interesting to point out that Delphi (Object Pascal) has always produced executables that work like this (since 1996). With one of our database server products written using Delphi, executables are about 3MB in size and have zero external dependencies. You can literally copy the executable on to any Windows machine, run it (or install it as a service to be run), and it will work.
It's kind of a whole different mindset compared to other approaches that involve many more non-OS runtime dependencies. It certainly makes installation/configuration support a non-issue.
- padobson 11y ago.Net 3.5 has shipped with every Windows since Vista, so you can basically do the same thing with C# or VB if you target those OSes. With reflection[1], you can even include third party libraries directly in the executable and access them at runtime, no installation required. [1]https://msdn.microsoft.com/en-us/library/ms173183.aspx https://msdn.microsoft.com/en-us/library/ms173183.aspx
- Someone1234 11y agoBut the topic is specifically freestanding executables, not compatibility in general. If it utilises an external DLL, or library then it isn't freestanding, as a .Net 3.5 program typically isn't (although I think Microsoft has a .Net native compiler now, but I don't know if that can be configured to push external dependencies into the executable package). Don't misunderstand, I like .Net, I just think you've misunderstood what is being discussed.
- padobson 11y agoFrom the Windows 7 user's perpsective, there's no difference. It's understood that this article is meant to discuss zero-install applications that require nothing more than the standard C library. That said, if you're making and marketing software (as I would expect a few visitors of this thread might) and looking to accomplish something functionally similar with your C# or VBScript dev team, my comment can be helpful - which is why I wrote it. I've shipped a number of sub-5MB applications this way.
- Someone1234 11y ago> It's understood that this article is meant to discuss zero-install applications that require nothing more than the standard C library. No, they are zero install, including NOT requiring a C library. No libraries at all. They're communicating directly with kernel32 from userland. On Windows that's as "bare metal" as a non-driver can really get.
- JohnTHaller 11y ago.NET 2, 3.5 and 4+ are distinct and updated differently. Vista shipped with .NET 3.0 and automatically updated to .NET 3.5. .NET 4.x is not an automatic update on Windows Vista, it has to be manually selected and added with admin rights .NET 2 and 3.5 are disabled by default on Windows 8/8.1/10 and require admin rights to enable them. So, there's no version of .NET in and of itself that will work on Windows Vista, 7, 8, 8.1 and 10. The one exception is if you specifically build a .NET 2 or 3 app and list compatibility with .NET 3/4.5 in the packaging manifest, then it will work with all the bundled versions of .NET on Windows Vista and later releases.
- dpcan 11y agoI loved this about Delphi! Around 2003 I needed a desktop app that essentially saved data to the registry, loaded a web-view, along with a few dialog windows for entering some data. Then I needed to put it on a LAN shared folder for everyone across the office to run, and it worked amazing. A single EXE, no install, no libraries. Unfortunately, I can't seem to get my old copy of Delphi 5 to run properly on my computer anymore :(