This document describes how to build, test, and distribute the LabVIEW Icon Editor VI Package using PowerShell. You can run these scripts locally on your development or self-hosted runner, or within GitHub Actions. By making this process open source, we enable community collaboration, easier troubleshooting, and a more transparent build pipeline for the Icon Editor that ships with LabVIEW.
- Overview & Prerequisites
- Editing Guide (PowerShell)
- Distribution Guide (VI Package via PowerShell)
- Integrating with GitHub Actions
- How
Build.ps1Works - Local vs. CI Usage
- Example Developer Workflow
-
Purpose: Provide a PowerShell-centric approach to build, test, and package the Icon Editor—either locally or via GitHub Actions.
-
Why PowerShell?
- Simplifies applying VIPCs, building
.lvlibp, and producing a.vipartifact. - Lets you debug locally using the exact same scripts used in CI, ensuring consistent results between local and automated environments.
- Simplifies applying VIPCs, building
-
Prerequisites:
- LabVIEW 2021 SP1 (both 32-bit & 64-bit).
- PowerShell 7+ and Git.
- Apply
tooling\deployment\runner_dependencies.vipcto both 32-bit & 64-bit LabVIEW.
-
Back Up (highly recommended):
<LabVIEW>\resource\plugins\lv_icon.lvlibp<LabVIEW>\vi.lib\LabVIEW Icon API
-
Clone the Icon Editor to your development location.
-
Apply dependencies:
Tooling\deployment\runner_dependencies.vipcto LabVIEW 2021 (32-bit) & LabVIEW 2021 (64-bit).
-
Open PowerShell (Admin), navigate to your working directory:
pipeline\scripts -
Enable Dev Mode:
.\Set_Development_Mode.ps1 -RelativePath "C:\labview-icon-editor"
Removes the default
lv_icon.lvlibpand points LabVIEW to your local Icon Editor code. -
Open the project:
lv_icon_editor.lvprojEdit the Icon Editor source as needed.
When distributing your own fork or build of the Icon Editor, you may want to uniquely brand your .vip package with your organization and repository information (or any other metadata). This ensures:
- Unique identification if multiple organizations produce their own variants of the Editor.
- Easier troubleshooting by embedding your org/repo directly in the final VI Package metadata.
You can do so by passing metadata fields (like -CompanyName and -AuthorName) to the Build.ps1 script. These are then injected into the final DisplayInformationJSON (see Section How Build.ps1 Works).
-
Apply Dependencies in VIPM:
- Set LabVIEW to 2021 (32-bit), apply
Tooling\deployment\runner_dependencies.vipc. - Repeat for 64-bit if necessary.
- Set LabVIEW to 2021 (32-bit), apply
-
Disable LabVIEW Security Warnings (to prevent popups from "run when opened" VIs):
- Tools → Options → Security → Run VI Without Warnings.
-
Open PowerShell (Admin), navigate to:
pipeline\scripts -
Run
Build.ps1(with optional brand info):.\Build.ps1 ` -RelativePath "C:\labview-icon-editor" ` -AbsolutePathScripts "C:\labview-icon-editor\pipeline\scripts" ` -Major 1 -Minor 2 -Patch 3 -Build 45 ` -Commit "my-commit-sha" ` -LabVIEWMinorRevision 3 ` -CompanyName "Acme Inc." ` -AuthorName "acme-inc/lv-icon-editor" ` -Verbose
This generates a
.vipinbuilds\VI Package. Your organization and repo details appear in the final package, helping brand your build uniquely. -
Revert Dev Mode (optional):
.\RevertDevelopmentMode.ps1 -RelativePath "C:\labview-icon-editor"
-
Install the
.vipin VIPM (as Admin), validate your custom Icon Editor changes.
We provide GitHub Actions that wrap these same PowerShell scripts for building the Icon Editor. You can also pass metadata (e.g., repository or organization) directly via environment variables or YAML inputs:
name: Build LabVIEW Icon Editor
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PowerShell
uses: actions/setup-powershell@v2
- name: Build Script
run: |
pwsh .\Build.ps1 `
-RelativePath "$env:GITHUB_WORKSPACE" `
-AbsolutePathScripts "$env:GITHUB_WORKSPACE\pipeline\scripts" `
-Major 1 -Minor 2 -Patch 3 -Build 45 `
-Commit "${{ github.sha }}" `
-LabVIEWMinorRevision 3 `
-CompanyName "${{ github.repository_owner }}" `
-AuthorName "${{ github.repository }}" `
-VerboseKey Points:
-CompanyName "${{ github.repository_owner }}"ensures the package shows your org/user name.-AuthorName "${{ github.repository }}"can embed the “repo” portion, e.g.my-org/lv-icon-editor.- The rest of the steps (applying VIPC, building the libraries) run identically to local usage, ensuring consistency.
Build.ps1 orchestrates the entire build:
- Clean: Removes old
.lvlibpfiles inresource\plugins. - Apply VIPC: For 32-bit & 64-bit LabVIEW, ensuring all dependencies are set.
- Build: Invokes
Build_lvlibp.ps1to produce.lvlibpfiles for both bitnesses, injecting version info (-Major -Minor -Patch -Build) and a-Commit. - Rename: Moves them to
lv_icon_x86.lvlibpandlv_icon_x64.lvlibp. - Construct DisplayInformationJSON:
- Merges any metadata fields you pass in (e.g.,
-CompanyName,-AuthorName) so that the final.vipis branded. - Also includes your version data in
"Package Version".
- Merges any metadata fields you pass in (e.g.,
- Call
build_vip.ps1:- This script reads the JSON, modifies the
.vipb, and builds the final VI Package withg-cli. - The optional
-LabVIEWMinorRevisionparam can override default minor version logic (e.g., 21.3).
- This script reads the JSON, modifies the
- Close LabVIEW (64-bit) after the build is done.
Result: A .vip file containing your version, commit, and brand/metadata in the Display Information fields.
-
Local:
- You can pass custom
-CompanyNameand-AuthorNamedirectly on the PowerShell command line. - For example, to brand the build “AcmeCorp” from “AcmeCorp/lv-icon-editor.”
- You can pass custom
-
CI (GitHub Actions):
- Exactly the same script runs. The difference is that environment variables (like
${{ github.repository_owner }}) feed into-CompanyName, etc. - This way, each fork or org can produce a uniquely identified package.
- Exactly the same script runs. The difference is that environment variables (like
- Enable Dev Mode
.\Set_Development_Mode.ps1 -RelativePath "C:\labview-icon-editor"
- Develop & Test
- You can open
lv_icon_editor.lvproj, make changes, and runRun_Unit_Tests.ps1.
- You can open
- Open PR
- Mark your PR with semver changes (major/minor/patch).
- GitHub Actions picks it up, calls
Build.ps1.
- Build
- The resulting
.vipis attached to releases or stored as an artifact, showing your version and branding (company/repo).
- The resulting
- Disable Dev Mode (optional)
.\RevertDevelopmentMode.ps1 -RelativePath "C:\labview-icon-editor"
- Install
- Use VIPM to install the final
.vipand confirm changes.
- Use VIPM to install the final
All scripts are fully open source—collaborators can debug or extend them locally with minimal friction.