Skip to content

Commit

Permalink
Merge branch 'release/v-0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
svelderrainruiz committed Dec 3, 2024
2 parents 708e565 + c3eaba8 commit 70ede4f
Show file tree
Hide file tree
Showing 27 changed files with 725 additions and 224 deletions.
97 changes: 54 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,65 @@
# Icon Editor for LabVIEW
This repo contains the source files and build tools for the LabVIEW icon editor.
# Icon Editor for LabVIEW #

This repo contains the source files and automated build tools for the LabVIEW icon editor.
You can use this code as a starting point for creating a custom icon editor. Refer to the [CONTRIBUTING](CONTRIBUTING.md) document for information about submitting changes for inclusion with future versions of LabVIEW.

## Minimum Compatible LabVIEW Version
LabVIEW source is saved in 21.0 (__LabVIEW 2021__) format.
## Compatible LabVIEW Versions

LabVIEW source is saved in 21.0 (__LabVIEW 2021__) format. Either LabVIEW 2021 or LabVIEW 2024 can be used to do development work.

To build using the automated build process, ensure you have LabVIEW 2021 *both 32 and 64 bits* installed, latest VIPM, and apply the dependencies located on *Tooling\deployment\Dependencies.vipc* to both LabVIEW versions.

## Editing Guide

Because the icon editor is part of the LabVIEW development environment, you need to make changes to installed files before editing this project. There is an manual process, and an automated process made following it for ease of use.

### Automated process

The packed project library has to be built on __LabVIEW 2021__, the VI Package can be be built for any version using the packed project library built on __LabVIEW 2021__
Before following this process, create a backup of the following files and folder:
- \<LabVIEW\>\\resource\\plugins\\lv_icon.lvlibp
- \<LabVIEW\>\\vi.lib\\LabVIEW Icon API\\*

After cloning the repo into a development location, and applying the dependencies located on *Tooling\deployment\Dependencies.vipc* to LabVIEW 2021 32 and 64 bits, follow this process to use the automation layer.

1. Open Powershell in *Admin* mode and navigate to *.pipeline\scripts* from your github repo.
2. Modify the following command to point to your github repo and run it: *.\DevelopmentMode.ps1 -RelativePath "C:\labview-icon-editor"*
3. Open lv_icon_editor.lvproj in LabVIEW.
4. The top-level VI is in the Project Explorer at __My Computer &#x00BB; resource/plugins &#x00BB; lv_icon.lvlib &#x00BB; lv_icon.vi__.

## Editing Guide ##
Because the icon editor is part of the LabVIEW development environment, you need to make changes to installed files before editing this project.
### Manual process

Complete the following steps to edit this project:
1. Clone this repo into a development location (e.g., C:\dev).
2. Run __Tooling\Prepare LV to Use Icon Editor Source.vi__.
This will perform the following steps, which you can alternatively perform manually:
* Delete \<LabVIEW\>\\resource\\plugins\\lv_icon.lvlipb
* Delete \<LabVIEW\>\\vi.lib\\LabVIEW Icon API
* Set LocalHost.LibraryPaths in your labview.ini file to the location of this project. For example:
* LocalHost.LibraryPaths="C:\\dev\\labview-icon-editor"
* Set LocalHost.LibraryPaths in your labview.ini file to the location of this project. For example:*
* LocalHost.LibraryPaths="C:\\dev\\labview-icon-editor"
3. Open lv_icon_editor.lvproj in LabVIEW.
4. The top-level VI is in the Project Explorer at __My Computer &#x00BB; resource/plugins &#x00BB; lv_icon.lvlib &#x00BB; lv_icon.vi__.

## Distribution Guide

## Distribution Guide ##
Complete the following steps to distribute your custom icon editor to another machine.

### Automated process

This automated build process will follow these steps:

1. Apply the dependencies
2. Run the unit test,
build the icon editor packed project library

1. Open powershell in *Admin* mode and navigate to *.pipeline\scripts* from your github repo.
2. Modify the following command to point to your github repo and run it: *.\build.ps1 -RelativePath "C:\labview-icon-editor"*
3. A VI package named *ni_icon_editor-x.x.x.x* will be built on *builds\VI Package*.
4. You can now install this VI package on any LabVIEW version after 2020.

*NOTE: The VI package makes no backup of your current lv_icon.lvlibp because the VI Package itself contains a zip file with all combinations of lv_icon.lvlibp for all LabVIEW versions and bitnesses, which gets deployed to your LabVIEW application files on uninstall. This ensures that a user doesnt get locked out of his icon editor and having to copy it from another LabVIEW installation if somehow he deletes the backup he did manually.*

### Manual process

First, build the __Editor Packed Library__ build specification in the project to create __lv_icon.lvlibp__.

Then, on the machine where you want to install your custom icon editor:
Expand All @@ -33,37 +68,13 @@ Then, on the machine where you want to install your custom icon editor:
3. Copy the packed library and support files that you developed with this project into the \<LabVIEW\> directory:
- \<LabVIEW\>\\resource\\plugins\\lv_icon.lvlibp
- \<LabVIEW\>\\vi.lib\\LabVIEW Icon API\\*

## Creating a VI Package ##
A .bat file located on *\Tooling\deployment\Build.bat* automates the process described by the *Editing Guide* and *Distribution guide*.

azure_pipeline.yml can also automate the process.

Running the .bat file will run the unit tests contained on tooling\unit tests

__LabVIEW 2021__ and __LabVIEW 2022__ : *lv_icon.lvlibp* will replace *lv_icon.lvlibp* from *resources/plugin* (normal process).
__LabVIEW > 2022__ : *lv_icon.lvlibp* will be installed on *C:\Program Files\NI\LVAddons\niiconeditor(bitness)*

**Prerequisites:**

* LabVIEW 2021
* Latest *VI Package Builder*
* Latest *VIPM*
* Manually Applying dependencies located on *Tooling\deployment\Dependencies.vipc*
* (Other *LabVIEW* versions you want to build the package on, *LabVIEW 2021* is mandatory since the PPL gets built on 2021)

**Process:**

1. Edit variables on .bat file *\Tooling\deployment\Build.bat*.

Example: Batch file variables for *lv_icon.lvlibp* built on *LabVIEW 2021 x64*, on a VI Package for *LabVIEW 2024 x64*

*set "MinimumSupportedLVVersion=2021"*

*set "VIP_LVVersion=2024"*

*set "SupportedBitness=64"*

3. Run *\Tooling\deployment\Build.bat* with admin rights.
4. A VI package named *ni_icon_editor-x.x.x.x* will be built on *builds\VI Package*.

## CI using an Azure DevOps pipeline

An Azure Devops pipeline is used as an additional check to approve pull requests from *feature* to *development* branches. This pipeline runs the unit tests, builds the packed project libraries for both 32 and 64 bit LabVIEW, and builds the VI Package.

## CI using github actions

An example of a github action that can manually trigger a CI/CD workflow is located at "C:\labview-icon-editor\.github\workflows\Build VI packages.yml"


Loading

0 comments on commit 70ede4f

Please sign in to comment.