This document describes how to build, test, and distribute the LabVIEW Icon Editor 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 and 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. - Debug locally the same steps used in CI, ensuring consistent results.
- Simplifies applying VIPCs, building
-
Prerequisites:
- LabVIEW 2020 (20.0), both 32-bit and 64-bit.
- PowerShell 7+ and Git.
- Apply
.github\actions\apply-vipc\runner_dependencies.vipcto LabVIEW 2020 (20.0), 32-bit & 64-bit—matching theapply-depsmatrix in../.github/workflows/ci-composite.yml.
-
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:
.github\actions\apply-vipc\runner_dependencies.vipcto LabVIEW 2020 (20.0), 32-bit & 64-bit. -
Open PowerShell (Admin): Navigate to
.github\actions\set-development-mode -
Enable Dev Mode:
.\Set_Development_Mode.ps1 -LabVIEWVersion 2021
Removes the default
lv_icon.lvlibpand points LabVIEW to your local Icon Editor code. -
Open the project:
lv_icon_editor.lvproj
Edit the Icon Editor source as needed.
-
Apply Dependencies in VIPM:
- Set LabVIEW to 2021 (32-bit) and apply
.github\actions\apply-vipc\runner_dependencies.vipc. - Repeat for 2021 (64-bit) so both bitnesses are covered.
- Set LabVIEW to 2021 (32-bit) and apply
-
Disable LabVIEW Security Warnings (to prevent popups from "run when opened" VIs):
- Tools → Options → Security → Run VI Without Warnings.
-
Open PowerShell (Admin), go to:
cd .github\actions\build
-
Run
Build.ps1:.\Build.ps1 ` -RepoRoot "C:\labview-icon-editor" ` -Major 1 -Minor 2 -Patch 3 -Build 45 ` -Commit "my-commit-sha" ` -LabVIEWMinorRevision 0 ` -Verbose
This generates a
.vipinbuilds\VI Package.Branding tip: Add optional metadata fields such as
-CompanyNameand-AuthorNameto the command above to embed your organization or repository name in the package. These values appear in the final VI Package metadata, helping identify builds from different forks. -
Revert Dev Mode (optional):
..\revert-development-mode\RevertDevelopmentMode.ps1 -LabVIEWVersion 2021
-
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:
- Development Mode Toggle: Uses
Set_Development_Mode.ps1orRevertDevelopmentMode.ps1. - Build VI Package: Internally calls
Build.ps1to produce a.vipartifact (and can draft a release if configured).
Unit tests run within the test job of the composite CI workflow defined in .github/workflows/ci-composite.yml.
In many workflows, you may want the organization or repository name injected into the VI Package to brand the build uniquely. For instance, if you have a GitHub Actions workflow, you can pass environment variables like ${{ github.repository_owner }} (the org or user) and ${{ github.repository }} (e.g. myorg/myfork) to Build.ps1. This is useful when:
- Maintaining multiple forks that each produce their own Icon Editor package.
- Distinguishing who built the editor if multiple variants circulate internally.
An example step in a GitHub Actions file might look like:
- name: Build Icon Editor
run: |
pwsh .\.github\actions\build\Build.ps1 `
-RepoRoot "$env:GITHUB_WORKSPACE" `
-Major 1 -Minor 2 -Patch 0 -Build 10 `
-Commit "${{ github.sha }}" `
# You can pass metadata fields to brand the package:
-CompanyName "${{ github.repository_owner }}" `
-AuthorName "${{ github.event.repository.name }}" `
-VerbosePassing these metadata fields ensures the final .vip clearly identifies which fork built it, and under which organization.
Key Points:
- The scripts you run locally are exactly what the GitHub Actions will call.
- Makes debugging/troubleshooting simpler since you can mirror CI steps locally.
- The build process is open-source, letting contributors collaborate on the same scripts that ship the official LabVIEW Icon Editor.
Build.ps1 orchestrates the entire build pipeline for the Icon Editor:
-
Cleans up old
.lvlibpfiles inresource\plugins. -
Applies VIPC for both 32-bit and 64-bit LabVIEW.
-
Builds each bitness of the library (passing version info:
-Major,-Minor,-Patch,-Build,-Commit). -
Renames results (
lv_icon_x86.lvlibp,lv_icon_x64.lvlibp). -
Constructs JSON data (including optional fields for organization, repo name, etc.).
-
Builds the final
.vip(64-bit) withbuild_vip.ps1:- The metadata you pass (like
CompanyNameandAuthorName) gets placed into the Display Information section of the.vipbfile to brand the package. - The optional
-LabVIEWMinorRevisionparameter can override default minor version logic.
- The metadata you pass (like
-
Closes LabVIEW sessions in between steps.
- Unique Identification: If multiple teams or forks produce an Icon Editor build, the
.vipcan identify who built it. - Traceability: Makes it easy to see the GitHub org/repo of the build in VIPM or LabVIEW’s “About” screen.
- No Manual Edits: The script automatically merges your provided fields, so you don’t have to manually edit JSON or
.vipbeach time.
-
Local:
- Enable dev mode → Edit code → Run
Build.ps1→ (Optionally) revert dev mode. - You can pass additional metadata arguments to brand your
.viplocally, too.
- Enable dev mode → Edit code → Run
-
CI (GitHub Actions):
- Same scripts run automatically or on demand.
- Pull requests can increment version (major/minor/patch) and produce
.vip. - Optionally inject the organization and repository name to brand each build.
- Enable Dev Mode
Set_Development_Mode.ps1or a “Development Mode Toggle” workflow run.
- Develop and Test
- Run tests locally or through the composite CI workflow's
testjob to confirm changes.
- Run tests locally or through the composite CI workflow's
- Open PR
- Label (
major,minor,patch) for semver bump. - Actions use
Build.ps1to produce.vipon merges.
- Label (
- Merge
- The
.github/workflows/ci-composite.ymlworkflow uploads the built.vipas an artifact in its "Upload VI Package" step. - It does not automatically create a GitHub Release; draft one manually and attach the artifact if desired.
- The
- Disable Dev Mode
- Revert environment.
- Install
- Use VIPM to install the
.vipand confirm final functionality.
- Use VIPM to install the
All scripts are fully open-source—collaborators can debug or extend them locally with minimal friction. By passing organization/repo data in either local builds or GitHub Actions, you ensure your unique version of the Icon Editor is clearly labeled and easily traced to its source.