- A payload (In this case is an executable)
- Dependencies, which we will have two types:
- NI Software (LabVIEW Run-Time Engine)
- Third-party Software (A custom shared library (dll) that we are going to create a NIPM package to distribute)
-
Create a new blank project
-
Right-click My Computer in the Project Explorer and select New » VI
-
Create a VI that displays a dialog box containing the contents of a string input and outputs the string afterwards
-
Connect the front panel controls and indicators to the connector pane
-
Save the VI as
displayDialog.vi
-
Right-click on Build Specifications and select New » Shared Library to generate a dynamic link library (
.dll
) -
Define the Packed Library Properties:
- Build Specification name: SimpleDLL
- Target filename: SimpleLib.dll
- Destination directory:
C:\Users\<user>\Documents\NIPM Package Tutorial\builds\SharedLibrary\My DLL
-
Under Source Files select the
displayDialog
and press arrow directing towards Exported VIs -
A window will pop-up called Define VI Prototype, but if does not, press the Define Prototype button. It should all be the default values below:
-
Select OK
-
Select Build. You should now be able to find your packed library in the builds folder
-
In Windows Explorer, create a folder in
C:\Program Files(x86)
calledSimpleLibrary
-
Move
SimpleLib.dll
toC:\Program Files(x86)\SimpleLibrary
-
Create a new blank project and save it as
mainApplication.lvproj
-
For this example we are going to create a UI that takes in a text input, then displays it in a dialog box when we press the okay button. We will also have an exit button that stops the application. Save the vi as
main.vi
-
Add a Call Library Function Node to the VI
-
Double-click the node and add the Library Path and Function Name
-
Fill in the parameters to match the VI Prototype from the previous section
-
Create the block diagram as shown below.
-
Here is the Exit event case
-
Test the VI and save
-
Right-Click Build Specifications and select New » Application (EXE)
-
In the My Application Properties fill out the following information:
- Build Specification Name: NIPM test
- Target filename: NIPMtest.exe
- Destination directory:
C:\Users\<user>\Documents\NIPM Package Tutorial\builds\mainApplication\NIPM test
-
Under Source Files set the main.vi as the Startup VI.
-
Under Additional Exclusions check Exclude dependent shared libraries. This will prevent the dll from being added to executable.
-
Select build, then test the output to ensure that it works.
-
Move the executable to another location on the computer and test that it works again.