09-10-2022 10:05 AM
09-10-2022 10:14 AM
Share your results!
09-10-2022 10:22 AM
Your IT department seems to be a misguided lot; that is so sad. I'm sorry that all I can offer is condolences.
09-15-2022 02:17 AM
@blessedk wrote:
Would it be possible at all to combine the run time engine into the same executable?
@rolfk wrote:
You still could copy the whole runtime folder into the executable folder and unless your exe didn't use to exotic drivers and features all was well.
Yes, this is still possible even with latest LabVIEW 2022Q3, but needed a little bit more than single lvrt.dll, of course.
If we talking about latest Windows 11, then very "Minimal Valuable Application" shall include 8 files - 5 DLLs and 3 resources.
They are: lvrt.dll, mesa.dll, nicont.dll, niCPULib.dll, nierInterace.dll (last one from System32 or SysWOW64 folder) and tdtable.tdt as well as lvapp.rsc and vidialogs.rsc. lvapp.rsc and vidialogs.rsc shall be placed in "English" SubFolder. That is.
I would like to recommend to take Virtual Machine (VirtualBox or VMWare are OK), then install your empty target OS "out of the box", then copy Run-Time and supplied DLLs into same folder, then you can check if your application is functional, then remove all unnecessary DLLs step by step and check every time that everything is OK.
Also I would like to recommend to take two helpful tools from SysInternals Suite - Process Explorer and Process Monitor.
With Process Explorer you will see all DLLs loaded together with your App (you can check this on your development PC, just select DLLs list for lower pane):
with Process Monitor you will see how application loaded and which files are found and which - not:
This is how it looks on empty Windows 11 without preinstalled Run-Time:
Obviously, if you will use, for example, Mean.vi from math palette you will need lvanlys.dll and all nested libraries. If you will use Vision, then you will need nivis*.dll and other things like PlugInControls folder from Run-Time plus dealing with license and so on.
I will not recommend to go in production with this, as mentioned above, because this may stop working in any time - after Windows update, or may be if some NI Run-Times will be deployed and installed separately, also in previous and future LabVIEWs the list of the "minimal necessary files" could be different. It is acceptable use for internal use (sometimes I creating small internal tools for my colleagues and put all DLLs together, because I know exactly which OS version they using). And also I have seen some "side-effects" (like application may take lot of time to load etc). In additional, I've read somewhere in license agreement that you are not eligible to deploy NIs DLLs separately other than bundled into official installer.
But anyway this is a good exercise to understand the dependencies of your app.
If you prefer to have "really single executable", then the only way is to pack everything above into self-extracted archive, drop on execute to temporary folder and run from it. Embedding of the DLLs into executable will require rebasing, which is not working for LVRT, in additional, you will get some troubles with resources.
with best regards,
Andrey.
09-15-2022 06:56 AM
Just one more thing, when I've forgot:
If you would like to decrease the size of this minimal app (which is currently 30MB), then you can compress DLLs with UPX packer:
This will reduce the size approx by half:
But of course, it is not guaranteed that your particular app will be still functional after that, and in addition, some antivirus scanners may recognize such packed executables and libraries as vulnerabilities. But then absolute minimal "runtime pack" for 2022Q3x64 is approx 15 MB, which is really not so bad nowadays.
10-09-2022 09:37 AM
@Andrey_Dmitriev wrote:
Yes, this is still possible even with latest LabVIEW 2022Q3, but needed a little bit more than single lvrt.dll, of course.
If we talking about latest Windows 11, then very "Minimal Valuable Application" shall include 8 files - 5 DLLs and 3 resources.
They are: lvrt.dll, mesa.dll, nicont.dll, niCPULib.dll, nierInterace.dll (last one from System32 or SysWOW64 folder) and tdtable.tdt as well as lvapp.rsc and vidialogs.rsc. lvapp.rsc and vidialogs.rsc shall be placed in "English" SubFolder. That is.
A couple of additional comments, based on extremely limited testing:
10-09-2022 09:52 AM
@tst wrote:
- Some of the UI elements in LV come from the models folder, so you might need that folder too if you want to see those.
Pretty much all of the 3D controls, aka Modern controls are based on definitions defined in these files inside the models folder. NXG style controls may or may not use elements of these too.
Without these files the controls or parts of the controls that use these models definitions are not rendered at all.
10-18-2022 10:05 AM
10-19-2022 03:21 PM
@blessedk wrote:
Wont be the first time for me that keeping an open-mind
Enough head banging and you have a plausible answer.... even after all the nay-saying 😁
Way to keep an open mind! 👍