# PlexExtras - Installation & Deployment Guide

Welcome to the **PlexExtras** component suite for CA Plex (WinC). This package contains all necessary assets, header files, libraries, runtime binaries, and group model repository files required to integrate and run PlexExtras components.

---

## 1. Directory Structure Overview

* **`CA_Plex_Developer_Kit\GroupModel\PlexExtras\`:** CA Plex Group Model files (`object.dat`, `prop.dat`, `PlexExtras.gmi`, etc.) ready to attach or extract within CA Plex.
* **`CA_Plex_Developer_Kit\Include\`:** C++ header files required for compiling generated WinC code (`PlexComponents.h` master header and the `PlexComponents\` subfolder).
* **`CA_Plex_Developer_Kit\Lib\`:** Static import library (`PlexComponents.lib` unified wrapper library).
* **`XML-import\`:** Contains `PlexExtras.xml` for 1-Click import via CA Plex *Tools -> Import Model*.
* **`bmp3\`:** Custom PoC pushbutton/toolbar bitmaps (`.bmp`) and `install_bitmaps.bat` to copy them into your CA Plex `BMP3\` folder before compiling panels.
* **`LiveDemos\`:** Standalone Win32 sample host applications (`sample_host_*.exe`), all 22 native runtime DLLs, third-party runtime files (`WebView2Loader.dll`, `pdfium.dll`), and the `.ico` icons used by the PoC `MainMenu`.
* **`LaunchLiveDemos.bat`:** Interactive launcher menu to test all 22 components immediately without CA Plex installed.

---

## 2. For the CA Plex Developer (Building & Generating in CA Plex)

### Step 1: Install PoC Button Bitmaps
1. Open the `bmp3\` directory.
2. Right-click **`install_bitmaps.bat`** and choose **Run as administrator** (or double-click if your user account has write access to `C:\ProgramData\CA\Plex\`).
3. The script automatically detects installed CA Plex versions under `%ProgramData%\CA\Plex\*\BMP3\` (or creates `7.3\BMP3\` if needed) and copies the custom PoC `.bmp` files so `rc.exe` resolves all panel button bitmaps during compilation.

### Step 2: Attach Group Model or Import XML into CA Plex
Choose one of the two integration workflows:
1. **Group Model Inheritance:** Attach `CA_Plex_Developer_Kit\GroupModel\PlexExtras\` in your CA Plex model hierarchy.
2. **1-Click XML Model Import:** Run *Tools -> Import Model* in CA Plex and select `XML-import\PlexExtras.xml`.

### Step 3: Configure CA Plex WinC Build Environment
In CA Plex (or in your WinC build configuration / custom build script):
1. **Include Directories:** Add the path to `CA_Plex_Developer_Kit\Include\`:
   ```text
   <Path_To_PlexExtras>\CA_Plex_Developer_Kit\Include
   ```
2. **Library Directories:** Add the path to `CA_Plex_Developer_Kit\Lib\`:
   ```text
   <Path_To_PlexExtras>\CA_Plex_Developer_Kit\Lib
   ```
3. Automatic linking of `PlexComponents.lib` is handled directly by `#pragma comment(lib, "PlexComponents.lib")` inside the master header `PlexComponents.h`.

---

## 3. For the End-User & Deployment Environment (Application Runtime)

When running the compiled CA Plex application (e.g. `MyApp.exe`) on client workstations, test servers, or production environments:

### Files to deploy into the Application Directory (same folder as `.exe` or in system `PATH`):
Deploy all component DLLs from **`LiveDemos\`**:
* **All 22 Native Component DLLs:**
  * `calendar_component.dll`
  * `commondialogs_component.dll`
  * `dragdrop_component.dll`
  * `excelengine_component.dll`
  * `fileopen_component.dll`
  * `html_component.dll`
  * `httpclient_component.dll`
  * `image_viewer_component.dll`
  * `listview_component.dll`
  * `navrail_component.dll`
  * `progressbar_component.dll`
  * `richedit_component.dll`
  * `sizegrip_component.dll`
  * `slider_component.dll`
  * `spinner_component.dll`
  * `statusbar_component.dll`
  * `tabstrip_component.dll`
  * `timer_component.dll`
  * `toast_component.dll`
  * `toolbar_component.dll`
  * `treeview_component.dll`
  * `wordengine_component.dll`
* **Third-Party Engines:**
  * `WebView2Loader.dll` (Chromium WebView2 runtime loader)
  * `pdfium.dll` (Google PDFium standalone PDF rendering engine)
* **License File:**
  * `plexcomponents.lic` (Must reside in the same directory as the component DLLs and application executable for full production license verification. **Not required for evaluation/demo mode:** if omitted, all 22 components automatically run in full evaluation mode with all features unlocked. Commercial license keys are provided upon purchase via sales@caplexextras.com).
* **Asset & Icon Files:**
  * Copy `*.ico` from **`LiveDemos\`** alongside your `.exe` when running the PoC `MainMenu` (`calendar.ico`, `excel.ico`, `fileopen.ico`, `htmlviewer.ico`, `httpclient.ico`, `imageviewer.ico`, `msgbox.ico`, `progressbar.ico`, `slider.ico`, `spinner.ico`, `tabstrip.ico`, `treeview.ico`, `word.ico`, `RichEdit.ico`, `navigationrail.ico`, `plex_dragdrop.ico`, `plex_toast.ico`).
  * `corporate_logo.tif` (Optional high-resolution logo asset for WordEngine document generation).


---

## 4. System Prerequisites on Client Machines

1. **Operating System:** Windows 10, Windows 11, or Windows Server 2016+.
2. **Visual C++ Redistributable (VCRedist):** **NOT REQUIRED.**  
   All 22 component DLLs are statically compiled (`/MT`) against the C Runtime. They have zero external dependencies on `VCRUNTIME140.dll` or `MSVCP140.dll` and run directly on a clean Windows installation.
3. **Microsoft Edge WebView2 Runtime:**
   * Required only for `PlexHTMLViewer`. (`PlexCalendar` is 100% pure native Win32/GDI+ with zero WebView2 dependency.)
   * Pre-installed by default on modern Windows 10 and Windows 11 editions via Windows Update.
   * On locked-down Windows Server or Citrix environments, the free Microsoft Evergreen WebView2 Runtime installer may be installed once if not already present.
4. **Microsoft Office (Word/Excel):** **NOT REQUIRED.**  
   Both `ExcelEngine` and `WordEngine` produce and manipulate OpenXML files (`.xlsx` and `.docx`) directly without COM automation or Office dependencies.
5. **PDF Reader (Adobe Acrobat):** **NOT REQUIRED.**  
   `ImageViewer` renders PDF documents natively using `pdfium.dll`.
