Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add sub-palette file for Client Generator wrapper VI and Update Generator build spec #633

Merged
merged 14 commits into from
Feb 20, 2025

Conversation

varshini-senthil
Copy link
Contributor

@varshini-senthil varshini-senthil commented Feb 12, 2025

  • This contribution adheres to CONTRIBUTING.md. (Required)
  • Automatically post PR comments with images for G code changes? (Recommended for small changes)

What does this Pull Request accomplish?

  • Adds the new sub-palette file Client Generator.mnu to the NI Measurement V2 Client Generator Runtime.lvlib library. This sub-palette file will hold the Generate Client.vi wrapper VI
  • Updates the existing parent palette file Measurement Plug-In SDK.mnu to create a place holder for the new sub-palette file.
  • Updates the NI Measurement V2 Client Generator Runtime.lvlib library to set the Client Generator.mnu file as the default palette file for the library.
  • Adds custom post install and pre uninstall action VIs required for the Measurement Plug-In SDK Generator build spec. These action VIs are essential for the deployment of the Client Generator.mnu sub-palette menu file in the expected location.
  • Updates the Measurement Plug-In SDK Generator.vipb to align with latest changes made to the source code.

Why should this Pull Request be merged?

  • To add the new sub-palette menu file and to update the existing parent palette file Measurement Plug-In SDK.mnu file.
  • To update the Measurement Plug-In SDK Generator.vipb to align with latest changes made to the source code and to add the custom action VIs required for the Generator package build.

What testing has been done?

Built the Service and Generator package with the changes and tested the packages to ensure the palette files are deployed and work as expected.

@Prem-MysteryPro
Copy link
Contributor

@varshini-senthil
I hope we are planning to raise another PR to enable the separate compiled code from source option for the existing build or install action VI's.

@varshini-senthil
Copy link
Contributor Author

@varshini-senthil I hope we are planning to raise another PR to enable the separate compiled code from source option for the existing build or install action VI's.

Yes @Prem-MysteryPro, I have raised the changes as a separate PR.

@Prem-MysteryPro
Copy link
Contributor

In the testing I hope we covered the scenario of installing the service package alone and made sure that plugins are working, and service-related palette are loading appropriately. Similarly, what will happen if I install older version of service package already and install latest version of generator package.

@varshini-senthil
Copy link
Contributor Author

In the testing I hope we covered the scenario of installing the service package alone and made sure that plugins are working, and service-related palette are loading appropriately. Similarly, what will happen if I install older version of service package already and install latest version of generator package.

Yes, I tried with certain combinations of installation of the Service and Generator packages to see how the palette files will be affected. In the cases you have mentioned where we will install:

  1. Only the service package - The Measurement Plug-In SDK palette will be visible along with its sub-palettes and the Service-related APIs as it is now (i.e., will be unaffected).
    Note: The place holder created in the Measurement Plug-In SDK palette for the Client Generator sub-palette will not be visible from the Block diagram as the question mark for the missing palette will be hidden by the readonly.txt file. But, the question mark will become visible in the palette editing mode.

  2. Older version of Service and latest version of Generator - In this case, the Measurement Plug-In SDK palette will not have the placeholder created for the Client Generator sub-palette file, as the palette file is not updated. So, the installation of latest Generator package will deploy the APIs and the Client Generator sub-palette file. But the sub-palette will not become available under LabVIEW's Functions palette.

@varshini-senthil
Copy link
Contributor Author

Image of the updated Measurement Plug-In SDK palette with the new Client Generator sub-palette:

image

Palette documentation:

image

image

@Prem-MysteryPro
Copy link
Contributor

In the testing I hope we covered the scenario of installing the service package alone and made sure that plugins are working, and service-related palette are loading appropriately. Similarly, what will happen if I install older version of service package already and install latest version of generator package.

Yes, I tried with certain combinations of installation of the Service and Generator packages to see how the palette files will be affected. In the cases you have mentioned where we will install:

  1. Only the service package - The Measurement Plug-In SDK palette will be visible along with its sub-palettes and the Service-related APIs as it is now (i.e., will be unaffected).
    Note: The place holder created in the Measurement Plug-In SDK palette for the Client Generator sub-palette will not be visible from the Block diagram as the question mark for the missing palette will be hidden by the readonly.txt file. But, the question mark will become visible in the palette editing mode.
  2. Older version of Service and latest version of Generator - In this case, the Measurement Plug-In SDK palette will not have the placeholder created for the Client Generator sub-palette file, as the palette file is not updated. So, the installation of latest Generator package will deploy the APIs and the Client Generator sub-palette file. But the sub-palette will not become available under LabVIEW's Functions palette.

Then I think we might need to update the service dependency version to be latest. Related comment.
Let us request suggestion from Jason.

@varshini-senthil varshini-senthil marked this pull request as ready for review February 13, 2025 15:26
Copy link
Contributor

@jasonmreding jasonmreding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting to see next round of changes before approving.

@varshini-senthil
Copy link
Contributor Author

I have updated the approach for deploying the Generator package menu files to follow the method used by the Service package. In this approach, the menu files are single-sourced before the package build through a custom pre-build action and then deployed to the respective location during installation. As part of this change, I have made the following updates:

  • Removed the Pre-Uninstall Custom Action.vi, as it is no longer required for the new approach.
  • Updated the Post-Install Custom Action.vi to remove the logic for deploying copies of the Generator package palette files. Only the logic essential for relinking the palette files to the libraries has been retained.
  • Updated the Pre-Build Custom Action.vi to identify the package based on the Product Name obtained from the variant input provided by VIPM. The corresponding package's palette files are then copied to the Source\Runtime\Palette Files\Measurement\_Measurement Plug-In SDK folder to single-source the files.
  • Updated the Generator build specification to deploy the palette files copied to the Source\Runtime\Palette Files\Measurement\_Measurement Plug-In SDK folder to the <LabVIEW>\menus\Categories\Measurement\_Measurement Plug-In SDK folder.

Note: This change in approach is to avoid the programmatic creation of the _Measurement Plug-In SDK folder and the copying of the palette files as post-install actions. This was necessary because, in some cases, the <LabVIEW>\menus\Categories\Measurement\_Measurement Plug-In SDK folder, created programmatically by the Generator package during installation, was retained on disk even after uninstalling both the Generator and Service packages.

@varshini-senthil varshini-senthil merged commit 00b615d into main Feb 20, 2025
5 checks passed
@varshini-senthil varshini-senthil deleted the users/varshini/palette-file-for-generate-client branch February 20, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants