diff --git a/README.md b/README.md index 6e5a5a09..372dacde 100644 --- a/README.md +++ b/README.md @@ -5,63 +5,46 @@ You can use this code as a starting point for creating a custom icon editor. Ref ## 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. +LabVIEW source is saved in (__LabVIEW 2021 SP1__) format. Either LabVIEW 2021 or LabVIEW 2024 can be used to do development work, as long as the source remains saved on LabVIEW 2021 -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 (Manual) -## 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 - -Before following this process, create a backup of the following files and folder: - - \\\resource\\plugins\\lv_icon.lvlibp - - \\\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 » resource/plugins » lv_icon.lvlib » lv_icon.vi__. - -### Manual process +Because the icon editor is part of the LabVIEW development environment, you need to make changes to installed files before editing this project. 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 \\\resource\\plugins\\lv_icon.lvlipb + * Delete \\\resource\\plugins\\lv_icon.lvlibp * Delete \\\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" + * LocalHost.LibraryPaths="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 » resource/plugins » lv_icon.lvlib » lv_icon.vi__. -## Distribution Guide +### Editing Guide (Powershell) -Complete the following steps to distribute your custom icon editor to another machine. +This process accomplishes the same as the manual process, but it only uses a powershell command to set labview 32 and 64 bits into editing mode. -### Automated process +Before following this process, create a backup of the following files and folder: + - \\\resource\\plugins\\lv_icon.lvlibp + - \\\vi.lib\\LabVIEW Icon API\\* -This automated build process will follow these steps: +Clone the repo into C:\, and apply the dependencies located on *Tooling\deployment\Dependencies.vipc* to LabVIEW 2021 32 and 64 bits, follow this process to use the automation layer. -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: -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: ```bach - .\build.ps1 -RelativePath "C:\labview-icon-editor"* +.\DevelopmentMode.ps1 -RelativePath "C:\labview-icon-editor" ``` -4. A VI package named *ni_icon_editor-x.x.x.x* will be built on *builds\VI Package*. -5. You can now install this VI package on any LabVIEW version after 2020. + +3. Open lv_icon_editor.lvproj in LabVIEW. +4. The top-level VI is in the Project Explorer at __My Computer » resource/plugins » lv_icon.lvlib » lv_icon.vi__. -*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.* +## Distribution Guide (Manual) -### Manual process +Complete the following steps to distribute your custom icon editor to another machine. First, build the __Editor Packed Library__ build specification in the project to create __lv_icon.lvlibp__. @@ -71,3 +54,31 @@ 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 \ directory: - \\\resource\\plugins\\lv_icon.lvlibp - \\\vi.lib\\LabVIEW Icon API\\* + +## Use Powershell to create VI Package + +Process below will set the system into editing mode, run unit tests, build the packed library, and the VI package. + +Step 1: Apply dependencies (This process takes approx 40 mins) + +- Open VIPM, switch to 2021 32-bit and apply \Tooling\deployment\dependencies.vipc +- Switch VIPM to LabVIEW 2021 64-bit and apply the VIPC again + +Step 2: Disable security warnings for "Run When Opened" VIs + +In order to disable the warning, enable the following option on both 32 and 64-bit LV2021: + +Tools/Options/Security/Run VI without warning + +Step 3: Open latest pwsh (Powershell), and navigate to + +\labview-icon-editor\pipeline\scripts\ + +Step 4: Copy the following command + + ```bach +.\Build.ps1 -RelativePath "C:\labview-icon-editor" -AbsolutePathScripts "C:\labview-icon-editor\pipeline\scripts" + ``` + +A VI package named *ni_icon_editor-x.x.x.x* will be built on *builds\VI Package*. +You can now install this VI package on any LabVIEW version after 2020. \ No newline at end of file diff --git a/Tooling/deployment/Dependencies.vipc b/Tooling/deployment/Dependencies.vipc index e00ef392..97bc0fae 100644 Binary files a/Tooling/deployment/Dependencies.vipc and b/Tooling/deployment/Dependencies.vipc differ diff --git a/pipeline/scripts/Build.ps1 b/pipeline/scripts/Build.ps1 index d07b7519..b9579ec0 100644 --- a/pipeline/scripts/Build.ps1 +++ b/pipeline/scripts/Build.ps1 @@ -62,7 +62,15 @@ try { # Apply dependencies for LV 2021 Execute-Script "$($AbsolutePathScripts)\Applyvipc.ps1" ` - "-MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath `"$RelativePath`" -VIPCPath `"Tooling\deployment\Dependencies.vipc`" -VIP_LVVersion 2021" + "-MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath `"$RelativePath`" -VIPCPath `"Tooling\deployment\dependencies.vipc`" -VIP_LVVersion 2021" + + # Apply dependencies for LV 2021 x64 + Execute-Script "$($AbsolutePathScripts)\Applyvipc.ps1" ` + "-MinimumSupportedLVVersion 2021 -SupportedBitness 64 -RelativePath `"$RelativePath`" -VIPCPath `"Tooling\deployment\dependencies.vipc`" -VIP_LVVersion 2021" + + # Set development mode + Execute-Script "$($AbsolutePathScripts)\Set_Development_Mode.ps1" ` + "-RelativePath `"$RelativePath`"" # Run Unit Tests Execute-Script "$($AbsolutePathScripts)\RunUnitTests.ps1" ` @@ -72,7 +80,6 @@ try { Execute-Script "$($AbsolutePathScripts)\Build_lvlibp.ps1" ` "-MinimumSupportedLVVersion 2021 -SupportedBitness 32 -RelativePath `"$RelativePath`"" - # Close LabVIEW Execute-Script "$($AbsolutePathScripts)\Close_LabVIEW.ps1" ` "-MinimumSupportedLVVersion 2021 -SupportedBitness 32" @@ -80,10 +87,6 @@ try { # Rename the file after build Execute-Script "$($AbsolutePathScripts)\Rename-File.ps1" ` "-CurrentFilename `"$RelativePath\resource\plugins\lv_icon.lvlibp`" -NewFilename 'lv_icon_x86.lvlibp'" - - # Apply dependencies for LV 2021 - Execute-Script "$($AbsolutePathScripts)\Applyvipc.ps1" ` - "-MinimumSupportedLVVersion 2021 -SupportedBitness 64 -RelativePath `"$RelativePath`" -VIPCPath `"Tooling\deployment\Dependencies.vipc`" -VIP_LVVersion 2021" # Run Unit Tests Execute-Script "$($AbsolutePathScripts)\RunUnitTests.ps1" `