Jump to content

Running exe on system without labview


Recommended Posts

Hi,

I was wondering weather it is possible to run exe built with labview on system without labview.I know we need labview run time to run the exe which can be included by building installer but I dont want to build a installer I just want to create a exe with run time in it so that user has to just run exe directly and not install the application on his sytem so is it possible to do it :unsure: .Thanks in advance...

  • Like 1
Link to comment

Just don't build an installer.

There's an option in the Application Builder which enables/disables building of the installer.

I can't tell you where you exactly find it, that depends on your LabVIEW version.

But remember you still have to install the appropriate version of RunTime-Engine separately.

Link to comment

QUOTE (manojba @ Apr 27 2009, 01:48 AM)

Hi,

I was wondering weather it is possible to run exe built with labview on system without labview.I know we need labview run time to run the exe which can be included by building installer but I dont want to build a installer I just want to create a exe with run time in it so that user has to just run exe directly and not install the application on his sytem so is it possible to do it :unsure: .Thanks in advance...

If the runtime engine is already installed on the system you can usually just copy the build directory from the application builder step to that machine. But you will need to install the runtime engine no matter what. Up to version 5.1 it was very easy to just copy everything to another machine, drop in the lvrt.dll file from the runtime engine directory alongside the exe et voila. But LabVIEW has since evolved and added a lot of features that depend on additional components being installed on a machine. Those components get installed together with the runtime engine.

With LabVIEW 6 and 7 it was still possible to do such a distribution to some extend but it was a lot more trial and error which files you needed to copy from the runtime engine directory into your application directory to make it self contained. lvrt.dll alone definitly is not enough anymore and things like Advanced Analysis functions won't work since LabVIEW 7.1, since they make almost all use of the Intel Math Kernel Library from that version on and that is an external component that needs to be installed on a system in order for the LabVIEW system to find it.

With LabVIEW 8.x I have not attempted to do self contained applications so far and do not intend to spend any time in doing so. The whole LabVIEW runtime universe got in the meantime so complicated and interconnected that I see no point in spending time to figure out everything just to avoid having to run an installer application.

Rolf Kalbermatter

Link to comment

QUOTE (rolfk @ Apr 27 2009, 12:48 PM)

If the runtime engine is already installed on the system you can usually just copy the build directory from the application builder step to that machine. But you will need to install the runtime engine no matter what. Up to version 5.1 it was very easy to just copy everything to another machine, drop in the lvrt.dll file from the runtime engine directory alongside the exe et voila. But LabVIEW has since evolved and added a lot of features that depend on additional components being installed on a machine. Those components get installed together with the runtime engine.

With LabVIEW 6 and 7 it was still possible to do such a distribution to some extend but it was a lot more trial and error which files you needed to copy from the runtime engine directory into your application directory to make it self contained. lvrt.dll alone definitly is not enough anymore and things like Advanced Analysis functions won't work since LabVIEW 7.1, since they make almost all use of the Intel Math Kernel Library from that version on and that is an external component that needs to be installed on a system in order for the LabVIEW system to find it.

With LabVIEW 8.x I have not attempted to do self contained applications so far and do not intend to spend any time in doing so. The whole LabVIEW runtime universe got in the meantime so complicated and interconnected that I see no point in spending time to figure out everything just to avoid having to run an installer application.

Rolf Kalbermatter

Thanks Rolf I think I will build a installer application but still if anybody has a solution to accomplish this easily it will be of great help I am using TCP/IP communication in my application :question: ...

Link to comment
  • 1 month later...

QUOTE (manojba @ Apr 27 2009, 01:50 PM)

Thanks Rolf I think I will build a installer application but still if anybody has a solution to accomplish this easily it will be of great help I am using TCP/IP communication in my application :question: ...

Hi my application is 850KB when I make a installer its size becomes 62MB I dont have any issues in making installer but the problem is with its size so please can anyone tell me how to make a exe with lv runtime in it so that my application size is less and can be shared easily over internet with others as I am not using any serial communication there is no need to install visa, I know I only need lvrt and I have seen many post they have achieved the using trial and error method so please can anyone explain me it in detail...

Link to comment

I think you're confused, at least I think so based on this statement.

QUOTE

so please can anyone tell me how to make a exe with LabVIEW runtime in it so that my application size is less

Part of the reason that your installer is 62MB in size is because the LabVIEW runtime is in the installer, and the runtime is kinda big, I would say like 40MB.

I don't know what version of LabVIEW you have built your application in, but what you can do is host your small exe (850KB) on your website, and then tell people that to run it they will need to download and install the LabVIEW run time for that version of LabVIEW. You can just link to the file at NI's site. Here is the link to the 8.5 run time. ftp://ftp.ni.com/support/labview/windows/...VRunTimeEng.exe

Or as rolfk said you could try to save the VIs in 7.1, then include the files needed to make a runtimeless executable work. But the download for your website would still be around 11MB for a exe. I think that posting these those files here may be illegal so here is a text file which lists the files I've been using for a 7.1 runtime less setup.

Link to comment
  • 2 weeks later...

QUOTE (hooovahh @ May 27 2009, 09:50 AM)

Or as rolfk said you could try to save the VIs in 7.1, then include the files needed to make a runtimeless executable work. But the download for your website would still be around 11MB for a exe. I think that posting these those files here may be illegal so here is a text file which lists the files I've been using for a 7.1 runtime less setup.

Your list is certainly extensive and not really required by many applications. For LabVIEW 7.1 what I have found absolutely necessary in order to get a simple executable running are following files:

lvapp.rsc

vidialogs.rsc

lvrt.dll

if you use any of the 3D controls you also will need mesa.dll and some or all of the models subdirectory. If you only use simple 3D controls such as buttons you can get away with only including one or two ptc files in the models directory.

Other DLLs may be required from the runtime directory depending on what functionality you are using in an executable.

If you use various dialogs, lvdialog.rsc and lvstring.rsc may be quite necessary.

The scripts directory is only necessary if you use one of the script nodes and then only the one dll in there you use the script interface for.

visarc will be for the VISA interface object hierarchy descrptions and is only requiring startup time to build up the internal object tree if you are not using VISA at all.

Link to comment

QUOTE (rolfk @ Jun 8 2009, 04:42 AM)

Your list is certainly extensive and not really required by many applications. For LabVIEW 7.1 what I have found absolutely necessary in order to get a simple executable running are following files:

lvapp.rsc

vidialogs.rsc

lvrt.dll

That's good information to have. I remember reading an article some where (I was sent a pdf of it) which explained how to create a runtime-less setup for 7.1. It said what files and directories to copy so I did, then I archived those file some where so I wouldn't need to get those files together again. I'd love to do some testing and see exactly what files my executables actually need.

Link to comment
  • 5 months later...
I remember reading an article some where (I was sent a pdf of it) which explained how to create a runtime-less setup for 7.1...

Here's the text from that pdf:

Although manual distribution of the RTE is possible, it can be automated when distributing your built software, using an installer as detailed below. In some cases, the installation of the RTE is not necessary[1]. If an executable is a simple one, it may not need the RTE to be installed on the target machine at all - all one needs to do is include some of the engine's files with the exe for it to work. To test if this method will work with a particular built executable, copy the following files & folders into the folder containing the exe:

..\National Instruments\shared\nicontdt.dll

..\National Instruments\shared\nicont.dll

..\National Instruments\shared\LabVIEW Run-Time\ver\* (including all sub-directories)

Using the LabVIEW 6.1 development system as an example, the exe's directory would look something like:

..\AppDirectory\MyApp.exe

..\AppDirectory\MyApp.ini

..\AppDirectory\My_Apps_DLLs (if_any)

..\AppDirectory\nicontdt.dll

..\AppDirectory\nicont.dll

..\AppDirectory\lvapp.rsc

..\AppDirectory\lvjpeg.dll

..\AppDirectory\lvpng.dll

..\AppDirectory\lvrt.dll

..\AppDirectory\mesa.dll

..\AppDirectory\serpdrv

..\AppDirectory\models\*

..\AppDirectory\errors\*

..\AppDirectory\script\*

When the executable is launched on a PC without the RTE installed, it should find all of the RTE files it requires in the application’s root directory, and execute normally. This method can be particularly useful when distributing autorun presentations on CD-ROMs.

[1] This method is not authorised or supported by NI and does not support several functions.

Link to comment

thanks ,

sure, it can works.but it still big:(

Trial and error, what you can throw away! It very much depends on your application so there is no right for all list. If this is to cumbersome then let it be and use installers!

Also watch out when testing such setups. Most of these components are optional and LabVIEW does make a lot of effort to run without those optional methods. This means that you can start up your application fine with most of them missing, until you do exercise one of those components. For instance not having mesa.dll or some of the models files in the modesl directory will not cause your application not to startup. But as soon as you show a window using one of those elements you will see a crossed rectangle instead of the control. This is the same with many other things. Until exercised you won't notice anything. So make sure to exercise all code paths in your application when testing if it still works with runtime files removed, to avoid bad experiences for your users.

As a guide-line you can go with this:

- all *rsc files should be always added, also the lvrt.dll file

- lvjpeg.dll is only needed if you use any jpeg functions in your app, same for lvpng.dll for png files.

- serpdrv doesn't apply for LabVIEW 7 and higher anymore

- mesa.dll and the models directory are only required if you use the new style (3D) controls

- scripts directory is only needed if you are using one of the script nodes, but they got mostly obsoleted by Mathscript in newer versions

The advanced analysis library requires from LabVIEw 7.1 on for most functions the Intel Math Kernel Library to be installed. And it will look for that library in the system registry so you basically can't avoid an installer for that.

LabVIEW 8.x adds many new features such as Mathscript that are separate components and need to be installed in order to work properly and allowing LabVIEW to find them,

Once you do things like LabVIEW RT targets, FPGA, DAQ(mx), VISA etc, you can simply forget to get these things on your machine without installer.

Link to comment

Also, to add to the testing "gotcha's", make sure you test on a completely clean computer that's never had any NI software installed. You may think you don't need a file because you didn't load it on yourself, but it may already be there from some previous testing.

I was testing an exe on what I thought was a clean computer a while back and everything worked fine. Luckily, for once, the group I wrote it for actually ran it before it went out into the field. It didn't work. It was missing NI-VISA. Turns out someone else had installed NI-VISA on the laptop I used for testing. (I now have my own clean test master disk)

Good luck with this! I remember back in the Good Old Days when the RTE took up one 3.5" floppy...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.