From c2be437624d8c63e6218e23f1e2a72de9e352047 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 21 Feb 2024 16:26:03 -0600 Subject: [PATCH] Move features and tweaks to static compile --- Compile.ps1 | 4 ++ scripts/main.ps1 | 10 +++-- xaml/inputFeatures.xaml | 43 +++++++++++++++++++ xaml/inputTweaks.xaml | 94 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 xaml/inputFeatures.xaml create mode 100644 xaml/inputTweaks.xaml diff --git a/Compile.ps1 b/Compile.ps1 index c04c600b..4e5cc278 100644 --- a/Compile.ps1 +++ b/Compile.ps1 @@ -39,5 +39,9 @@ Get-ChildItem .\config | Where-Object {$psitem.extension -eq ".json"} | ForEach- ## Xaml Manipulation $tabColumns = Get-TabXaml "applications" 5 $tabColumns | Out-File -FilePath ".\xaml\inputApp.xaml" -Encoding ascii +$tabColumns = Get-TabXaml "tweaks" +$tabColumns | Out-File -FilePath ".\xaml\inputTweaks.xaml" -Encoding ascii +$tabColumns = Get-TabXaml "feature" +$tabColumns | Out-File -FilePath ".\xaml\inputFeatures.xaml" -Encoding ascii Get-Content .\scripts\main.ps1 | Out-File ./$scriptname -Append -Encoding ascii \ No newline at end of file diff --git a/scripts/main.ps1 b/scripts/main.ps1 index fc9d9493..16151242 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -54,17 +54,19 @@ $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -repla # Assuming inputApp.xaml is in the same directory as main.ps1 $appXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputApp.xaml" +$tweaksXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputTweaks.xaml" +$featuresXamlPath = Join-Path -Path $PSScriptRoot -ChildPath "xaml/inputFeatures.xaml" # Load the XAML content from inputApp.xaml $appXamlContent = Get-Content -Path $appXamlPath -Raw +$tweaksXamlContent = Get-Content -Path $tweaksXamlPath -Raw +$featuresXamlContent = Get-Content -Path $featuresXamlPath -Raw # Replace the placeholder in $inputXML with the content of inputApp.xaml $inputXML = $inputXML -replace "{{InstallPanel_applications}}", $appXamlContent +$inputXML = $inputXML -replace "{{InstallPanel_tweaks}}", $tweaksXamlContent +$inputXML = $inputXML -replace "{{InstallPanel_features}}", $featuresXamlContent -$tabcolums=Get-TabXaml "tweaks" -$inputXML = $inputXML -replace "{{InstallPanel_tweaks}}", ($tabcolums) -$tabcolums=Get-TabXaml "feature" -$inputXML = $inputXML -replace "{{InstallPanel_features}}", ($tabcolums) if ((Get-WinUtilToggleStatus WPFToggleDarkMode) -eq $True) { $ctttheme = 'Matrix' diff --git a/xaml/inputFeatures.xaml b/xaml/inputFeatures.xaml new file mode 100644 index 00000000..c57704c6 --- /dev/null +++ b/xaml/inputFeatures.xaml @@ -0,0 +1,43 @@ + + + + + + +