How to build Applications (EXE) and installers using LabVIEW (installer)

Source: Internet
Author: User
Tags versions
Http://digital.ni.com/public.nsf/allkb/71E3E59409E3433386257AEC003EA34D

Questions:

Use LabVIEW under the Windows platform to build a standalone executable program and installer.


Answer: why EXE and installer are generated

The last thing you need to do with LabVIEW is to get the program to the target computer and how to port the program from the development computer to the target computer.  There are two ways to do this: 1. Install LabVIEW and related drivers and toolkits on the target computer, and then copy VI or the entire project to the target computer. However, the installation of LabVIEW and a variety of toolkits will be time-consuming, and VI can be arbitrarily modified, easy to cause misoperation, if only to run the program, it is not recommended this method. 2. The program written by LabVIEW compiles a standalone executable program (EXE) on the development computer and then port the executable program to the target computer, where there are two ways to migrate: A. By copying the generated EXE to the target PC, and then installing the LabVIEW run engine (Run-time engine) and the required drivers and toolkits on the target PC, it takes more time to install the drivers and kits in this method, and B is not recommended. Package the generated EXE and some of the components used to build installer, the installer, and then run the installer on the target computer, so that when the installation is complete, the previously generated EXE, LabVIEW run engine, and other used toolkits are automatically installed on the target computer. This method is relatively simple and is the most common method.


about LabVIEW Run engine

Any computer, as long as you want to run it on top the standalone executable program generated by LabVIEW (Exe), you need to install the LabVIEW run engine on the target computer. The LabVIEW Run engine contains: 1.  The libraries and files required to run the executable program generated by LabVIEW 2.  Browser plug-in required for remote access to the front panel using a browser 3.  Some of the components required to generate LabVIEW reports in the application 4. Some support for 3D charts, such as the running engine itself, is multi-lingual and does not require the installation of a language-specific version of the running engine. It is also necessary to ensure that the version of the running engine installed on the target computer is consistent with the version of LabVIEW used to develop the application. If you want to run multiple versions of LabVIEW-generated executable programs on a single computer, your PC must have multiple versions of the runtime engine installed that correspond to these LabVIEW version one by one. Different versions of the LabVIEW runtime engine can be downloaded to the official NI website for free.

About hardware Drivers

If your program uses NI hardware drivers, you will need to install the corresponding version of the driver on the target computer. Take daqmx, for example, when you implement a data acquisition task with a version of the DAQMX driver, you will need to install the corresponding version of the DAQMX driver on the target computer in the future. In summary, it is necessary to install the LabVIEW running engine on the target computer, and the hardware-driven installation depends on whether or not your program is using the hardware driver.

preparatory work

The application Builder is required to build standalone executable programs and installers, and LabVIEW Professional development includes the Application Builder, and the basic and full development editions need to be purchased separately. There are some checks that need to be done before building a standalone executable application, and a checklist is listed in the LabVIEW Help document: http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/ build_checklist/

easy steps to build your application

1. Create a new LabVIEW project, or open an already-built project that contains your VI to ensure that VI is functioning properly.  Some of the code through the file path to use the file to be translated into EXE after the file can not find errors, for such errors, you can refer to kb:5sd4ce7k, 3hkek93u, 2T6GI6BH, 18rdj60o New 

2.  Right-click New Application (EXE)

3.in the project browser's program generation specification. Set the target file name and destination directory. The target file name is the EXE file name that you generate in the future, which is located in the destination directory, and the default destination directory creates a new builds folder in the directory that contains the project, and the generated EXE files are saved to this directory. 

4.  Select the source file, select the top level VI click the "Add Item" arrow to add the top level VI to the Launch VI column, the other used sub vi and files can be added to the always include column.

5. You can use the LabVIEW default icon as the application icon, or you can choose to design an icon: Use the Icon Editor to edit and save your own design icon, remove the "Use default LabVIEW icon file" before the check, in the Pop-up dialog box select Add just saved icon file, note "  The icon image type is the same as the type selected when you edit the icon.

6.  Select Preview to generate a preview, and then you can see which files will be generated in the future, including our standalone executable application, and now we do not see our custom icons, do not worry, the final generation can be seen later, as shown in Figure 7. Finally select "Generate", LabVIEW will pop up the build status window, when the build end will be prompted to build the path of the application, you can click Browse to open the directory of the application, then you can see the application with the custom icon, if you click Finish, the Build Status window will be closed, as shown here, We have completed the operation of building a standalone executable application, and if the LabVIEW run engine and other required components are already installed on the target computer, the resulting EXE file can be copied to the target computer and run directly. The following pages describe how to generate installer on the basis of the build EXE, which is the operation to generate the installation files.

Build Installer Easy Steps

1. In the same project, right-click the program Generation specification, select New Setup.
2.  Set your product name and Setup build directory in product information, the product name affects the path name of the installer, and corresponds to the name of the application in the Windows Add Remove Programs list.

3.  Select target to modify the target name, which determines which folder the executable file will be released to in the future when the Setup program finishes running。

4.  Select source files, click in the project files view to select the application build specification that you created earlier, and then click the add arrow to add the application to the destination folder, and the right target view to see the added results.

5. Select shortcuts to modify the shortcut name and subdirectory name on the right.  The shortcut name corresponds to the name of the shortcut icon that you will see in the Start menu in the future, and the subdirectory corresponds to the folder name where the shortcut is located in the Start menu.

6. Select "Attach Installer", tick the appropriate LabVIEW run engine and the necessary drivers and toolkits, etc., then these drivers and toolkits will be included in the generated installer. LabVIEW will automatically check for some of the necessary NI installers here, but it may not include all the programs that need to be installed, which drivers and toolkits are used in your program, and which toolkits to check when configured here. For some specific toolkits, such as NI OPC Servers, DSC run engine, etc. does not support direct packaging deployment (KB:5SS56RMQ 56P8BSJT), so here will not be checked or unchecked, these kits need to be installed on the target computer, if you are not sure the tool Whether the package supports package deployment, please contact NI Technical support. 

7. Click the "Build" button to start building the installer, the same will bring up a build status window, after the completion of the build process, click Browse to open the path of the installation files, you will see a Setup.exe file, this file is the final installation file. Click the Finish button to close the status window. As pictured now, you can copy the package generated installer to the target computer to run, it is important to note that when copying the entire folder to the target computer and then run Setup.exe, the installation process is not different from the normal Windows application, After the installation, you can run your own application on the target PC.

Extended

There are a lot of places to build applications and installers, but here are just some of the most basic settings, other settings you can refer to in the LabVIEW Help documentation for a description, here are two links: http://zone.ni.com/reference/en-XX/ help/371361j-01/lvhowto/building_a_stand_alone_app/<a href= "http://zone.ni.com/reference/en-XX/help/ 371361j-01/lvhowto/build_installer/h%c2%a0%3cbr%3e%3cbr%3e%3cstrong%3e%e7%9b%b8%e5%85%b3%e9%93%be%e6%8e%a5:%3c /strong%3e%20%20%20%3cdiv%20align= "Left" = "style=" font-family:arial, Helvetica, Sans-serif; Color:rgb (136, 68, 136); Text-decoration:none; " >using the LabVIEW run-time Engine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.