Commit Graph

618 Commits

Author SHA1 Message Date
rbalsleyMSFT 1fb42bffdc Implement code changes to enhance functionality and improve performance 2025-06-10 19:04:25 -07:00
rbalsleyMSFT 9d7d0a0ec9 Remove debug logging statements from UI initialization for cleaner code 2025-06-09 20:32:54 -07:00
rbalsleyMSFT c5730230f6 Refactor functions to utilize a centralized state object for improved consistency and maintainability
Refactor functions to use a centralized state object

Modifies various functions to accept and utilize a `$State` parameter, replacing direct access to `$script:uiState` and module-scoped variables.

This change centralizes state management, improving code consistency and maintainability by passing necessary UI elements, data, and default configurations explicitly.
2025-06-09 20:30:57 -07:00
rbalsleyMSFT 19867cbcd9 Remove verbose flag from BuildFFUVM script execution for cleaner output 2025-06-07 20:21:44 -07:00
rbalsleyMSFT 131bd63a5b Refactor MainThreadLogPath to use script:uiState.LogFilePath for consistency 2025-06-07 19:07:05 -07:00
rbalsleyMSFT 562529a26b Refactor Get-ModelsForMake and Update-CopyButtonState to use State parameter
- Updated functions to accept a State parameter for improved scope management.
- Replaced direct window control access with State object references for better encapsulation and consistency.
- Ensured proper handling of UI elements within the context of the State object.

Refactors UI functions to use a State parameter

Improves scope management and encapsulation by passing a `State` object to UI-interacting functions.

This change modifies several functions, including `Get-ModelsForMake` and `Update-CopyButtonState`, to accept a `State` parameter.
It replaces direct access to UI controls via `$window.FindName` with references from the `State` object, leading to more consistent and maintainable code.
2025-06-07 18:47:15 -07:00
rbalsleyMSFT 6eae7226be Refactor UpdateInstallApps logic to use state object
- Moved the UpdateInstallAppsBasedOnUpdates function to the Controls section of the uiState object for better encapsulation.
- Updated the function to accept a state parameter, reducing reliance on the script scope.
- Adjusted event handlers to pass the state object, ensuring consistent access to UI state.
- Removed the previous definition of the function from the script scope to streamline the code.
2025-06-07 18:12:12 -07:00
rbalsleyMSFT 0091a4da92 Docs: Correct comment for Windows SKU combo population
The comment explaining how the Windows SKU combo box's ItemsSource is populated was outdated. It incorrectly stated that the `Update-WindowsSkuCombo` function was called via `RefreshWindowsSettingsCombos`.

This change removes the inaccurate reference, clarifying that `Update-WindowsSkuCombo` is now called directly.
2025-06-07 17:57:24 -07:00
rbalsleyMSFT 95ac89c5ec remove file 2025-06-07 17:51:49 -07:00
rbalsleyMSFT 11084f6689 Added new $state object and refactored code to use the $state reference instead.
- Moved Get-UIConfig from BuildFFUVM_UI.ps1 to FFUUI.Core.psm1 to enhance separation of concerns.
- Updated Get-UIConfig to accept a central $State object, removing direct dependencies on global UI variables.
- Modified internal logic to access UI control values from the $State.Controls hashtable.
- Updated calls in BuildFFUVM_UI.ps1 to pass the $script:uiState object to the refactored function.
- Exported Get-UIConfig from FFUUI.Core.psm1 for accessibility in the main UI script.
2025-06-07 17:36:30 -07:00
rbalsleyMSFT 1b5fa5129c Updated formatting 2025-06-05 16:31:44 -07:00
rbalsleyMSFT 00a27fc4a8 Enhance MSRT handling for Windows installations by differentiating between client and LTSB/LTSC types 2025-05-29 20:09:22 -07:00
rbalsleyMSFT e1b1dfafac Reorder script execution list to ensure Install-Office.ps1 runs after Update-Defender.ps1 and remove unnecessary pause 2025-05-29 19:33:11 -07:00
rbalsleyMSFT 4ffdba8e41 Refactor Windows SKU handling to derive values internally and update mappings for LTSB/LTSC releases
- Updated Update-WindowsSkuCombo function to derive selected release value and display name from the ComboBox, removing the need for parameters.
- Enhanced logging to include display names for better traceability.
- Corrected SKU values for Windows 10 LTSB 2016 and LTSC 2019 in the release mappings.
- Adjusted Get-AvailableSkusForRelease function to handle specific cases for LTSB 2016 and LTSC 2019, ensuring accurate SKU retrieval.
2025-05-29 17:19:22 -07:00
rbalsleyMSFT 092ae26257 Add dynamic SKU handling for Windows releases and update UI integration
- Introduced a new function `Get-AvailableSkusForRelease` to retrieve available SKUs based on the selected Windows release value.
- Added a new function `Update-WindowsSkuCombo` to refresh the SKU ComboBox in the UI when the release changes.
- Updated the SKU lists for various Windows versions, including client and server SKUs, as well as LTSC editions.
- Modified the `RefreshWindowsSettingsCombos` function to call the new SKU update function.
- Ensured that the SKU ComboBox is populated dynamically based on the selected release, improving user experience and accuracy.
2025-05-29 16:59:45 -07:00
rbalsleyMSFT 11c3eeb9b8 Add Windows 10 LTSB 2016 and LTSC 2019 to release options and update version mapping 2025-05-29 16:22:17 -07:00
rbalsleyMSFT ae656932ba Refactor SKU list formatting for improved readability and maintainability 2025-05-29 15:45:49 -07:00
rbalsleyMSFT 7d4e8ba27c Add additional Windows SKU and release options to core logic
- Expanded the list of allowed SKUs to include 'Enterprise 2016 LTSB', 'Enterprise N 2016 LTSB', 'Enterprise LTSC', 'Enterprise N LTSC', 'IoT Enterprise LTSC', and 'IoT Enterprise N LTSC'.
- Updated the list of all Windows releases to include 'Windows 10 LTSC 2021' and 'Windows 10 LTSC 2024'.
- Modified the Windows version map to include version mappings for LTSC 2021 and LTSC 2024.
2025-05-29 15:38:27 -07:00
rbalsleyMSFT fd3d45a21a Improve initial directory handling for Drivers.json SaveFileDialog
- Enhanced logic to determine the initial directory for the SaveFileDialog based on the parent directory of the path in the txtDriversJsonPath TextBox.
- Added error handling and logging for cases where the path is invalid or empty, ensuring the dialog defaults to its standard behavior when necessary.
- Improved user feedback by logging actions related to the selection or cancellation of the SaveFileDialog.
2025-05-29 14:02:40 -07:00
rbalsleyMSFT c8042c6a75 Add Drivers.json path configuration to UI and core logic
- Introduced a new TextBox and Button in the UI for specifying the Drivers.json file path.
- Updated the UI layout to accommodate the new Drivers.json path input.
- Enhanced the core logic to set a default path for Drivers.json based on the Drivers folder.
- Implemented functionality to browse and select the Drivers.json file, allowing users to create or select an existing file.
2025-05-29 13:26:03 -07:00
rbalsleyMSFT 421fb76320 Add 'Update Latest Microcode' checkbox to UI and update related logic for handling microcode updates 2025-05-29 12:54:15 -07:00
rbalsleyMSFT 6f336970db Add 'Update ADK' checkbox to UI and update related logic for handling ADK installation 2025-05-29 10:39:19 -07:00
rbalsleyMSFT 985285963c Add 'Remove Downloaded Update Files' checkbox to UI and update related logic for handling updates 2025-05-28 18:01:59 -07:00
rbalsleyMSFT 43223ad1cc Add 'Remove Apps Folder Content' checkbox to UI and update related logic
- Introduced a new checkbox in the UI for removing application content in the Apps folder after FFU capture.
- Updated the Get-UIConfig function to retrieve the state of the new checkbox.
- Added default value for the new 'RemoveApps' parameter in the general defaults.
2025-05-28 17:43:59 -07:00
rbalsleyMSFT f6c8172676 Implement Apps Script Variables data list and enhance ListView sorting functionality
- Introduced a script-scoped list for managing Apps Script Variables data.
- Updated the ListView to bind its ItemsSource to the new data list.
- Enabled sorting for Key and Value columns in the Apps Script Variables ListView.
- Improved item addition and removal logic to interact with the data list directly.
- Ensured header checkbox state updates correctly after modifications to the data list.
2025-05-28 16:50:45 -07:00
rbalsleyMSFT 05466f96c0 Add selectable "Select All" checkbox functionality to ListView columns and update button naming for clarity
- Implemented Add-SelectableGridViewColumn function to allow adding a header checkbox for selecting all items in ListViews.
- Updated the ListView setup in BuildFFUVM_UI.ps1 to utilize the new selectable column feature for driver models and winget results.
- Added IsSelected property to items in Apps Script Variables ListView for better selection management.
- Renamed button from "Remove Apps Script Variable" to "Remove Selected" for improved clarity on functionality.
2025-05-28 15:33:24 -07:00
rbalsleyMSFT 08b1df79f2 Refactor Apps Script Variables UI for improved layout and usability
- Simplified the input layout for defining Apps Script Variables by removing the grid structure.
- Added clear labels for "Key" and "Value" inputs to enhance user understanding.
- Adjusted the "Add Variable" button for better alignment and padding, improving the overall user experience.
2025-05-27 19:30:34 -07:00
rbalsleyMSFT 3ec53548a9 Add AppsScriptVariables functionality to UI for defining key-value pairs
- Introduced a new checkbox to enable defining Apps Script Variables.
- Added a panel for inputting key-value pairs with validation for duplicates.
- Implemented event handlers for adding, removing, and clearing Apps Script Variables.
- Updated LoadConfig logic to handle loading of Apps Script Variables from configuration.
2025-05-27 19:12:48 -07:00
rbalsleyMSFT 93108817de Remove InstallAppsandSysprep.cmd script to streamline application installation process and eliminate deprecated logic. 2025-05-27 18:38:04 -07:00
rbalsleyMSFT 4b19b7199b Update example usage in Invoke-AppsScript.ps1 and modify Orchestrator.ps1 to include AppsScript execution logic
- Changed example variable checks in Invoke-AppsScript.ps1 to reflect accurate usage of the AppsScriptVariables hashtable.
- Removed Invoke-AppsScript.ps1 from the script list in Orchestrator.ps1 and added logic to invoke it conditionally based on the presence of AppsScriptVariables.json.
- Enhanced output messages for clarity during script execution.
- Updated AppsScriptVariables parameter description in BuildFFUVM.ps1 to clarify its purpose and usage.
2025-05-27 18:30:14 -07:00
rbalsleyMSFT e8d1be6aa6 Rename "Build Config File" button to "Save Config File" for improved clarity in the UI, reflecting its functionality more accurately. 2025-05-27 10:00:33 -07:00
rbalsleyMSFT bde3cdd09f Update LoadConfig logic to manage Optional Features checkboxes based on loaded configuration. Added functionality to check/uncheck feature checkboxes according to the loaded features string, enhancing user interface responsiveness and clarity. 2025-05-26 18:12:32 -07:00
rbalsleyMSFT d05f9aa267 Enhance USB drive selection logic in LoadConfig process
- Added functionality to automatically check "Select Specific USB Drives" if USBDriveList is present and not empty in the configuration.
- Implemented checks for both PSCustomObject and hashtable types for backward compatibility.
- Included logging for the auto-check condition to improve traceability during configuration loading.
2025-05-26 17:59:28 -07:00
rbalsleyMSFT d253a88daa Add Set-UIValue function for improved UI property handling and configuration loading
- Introduced a new helper function `Set-UIValue` to streamline the process of setting UI properties from configuration objects, enhancing error handling and logging.
- Updated the `Get-UIConfig` function to utilize `Set-UIValue` for loading various UI elements from the configuration file, improving code readability and maintainability.
- Enhanced logic for handling driver model selection based on user input and added robust checks for configuration keys.
- Improved logging for configuration loading process, including error handling for missing keys and exceptions.
2025-05-26 17:08:08 -07:00
rbalsleyMSFT 6db5a93598 Refactor Get-UIConfig function to enhance parameter handling and improve clarity. Added new parameters from Sample_default.json, renamed existing parameters for consistency, and removed unnecessary comments. Updated logic to derive paths for UserAppList.json and Orchestration based on user input. 2025-05-26 15:35:32 -07:00
rbalsleyMSFT d4a4c6878d Added BuildFFUVM.ps1 parameters to Sample_default.json 2025-05-26 14:52:44 -07:00
rbalsleyMSFT 550e45a5c0 Updated UI Config parameters 2025-05-26 13:04:49 -07:00
rbalsleyMSFT 266fcbf58b Fix version numbering 2025-05-26 12:23:16 -07:00
rbalsleyMSFT f162de89be - Added Apps\Orchestration folder with new orchestration workflow to replace InstallAppsAndSysprep.cmd file.
- Updated BuildFFUUnattend files to point to the new Orchestrator.ps1 file.
- Added new common and FFUUI.Core directories that house common/shared files between the UI and PS1 script. This breaks up each of the PS1 scripts to keep things smaller and more organized. Still a lot of work to do here to pull some stuff out of the PS1 scripts.
- Modified the CaptureFFU.ps1 file to include more info during the capture process to help with troubleshooting
- Too many functional changes to list here.
2025-05-26 11:54:14 -07:00
rbalsleyMSFT 2efb9fb2a1 Added common winget functions 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 1156373f0c Add Save, Load, and Clear functionality for BYO applications with JSON support 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 5f9bf37617 Add functionality to manage applications - implement Add and Remove buttons with priority handling in the UI 2025-05-26 11:40:06 -07:00
rbalsleyMSFT c0fdd102e3 Add application information section for 'Bring Your Own Applications' feature - added code for modern folder browser and added the code behind for the browse folder buttons 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 9f3ee8d963 Add 'Bring Your Own Applications' checkbox and update visibility logic based on installation options 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 802865c1a6 Add Clear List button to Save/Import functionality and fixed sorting issues with winget app list. 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 02835579c1 Add Winget search panel with results list and save/import functionality 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 81b3be894e Refactor margins for application installation options and Winget status panel in UI 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 3875181d89 Enhance UI for application installation options and add Winget status panel 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 0669c64da1 Refactor USB drive configuration options and improve UI handling for related checkboxes 2025-05-26 11:40:06 -07:00
rbalsleyMSFT 931e9d13f7 Fixed USBDriveList json formatting 2025-05-26 11:40:06 -07:00