Cleanup and Verbose output for copy

This commit is contained in:
Chris Titus
2026-02-25 11:27:20 -06:00
parent 773ea3a950
commit 64ea075727
2 changed files with 45 additions and 21 deletions

View File

@@ -200,23 +200,24 @@ exit
New-Item -ItemType Directory -Path (Split-Path $splitDest) -Force | Out-Null New-Item -ItemType Directory -Path (Split-Path $splitDest) -Force | Out-Null
Split-WindowsImage -ImagePath $installWim ` Split-WindowsImage -ImagePath $installWim `
-SplitImagePath $splitDest ` -SplitImagePath $splitDest `
-FileSize 3800 -CheckIntegrity | Out-Null -FileSize 3800 -CheckIntegrity
Log "install.wim split complete." Log "install.wim split complete."
# Copy everything else (exclude install.wim) # Copy everything else (exclude install.wim)
Log "Copying remaining files to USB..."
$robocopyArgs = @($contentsDir, $usbDrive, "/E", "/XF", "install.wim", "/NFL", "/NDL", "/NJH", "/NJS") $robocopyArgs = @($contentsDir, $usbDrive, "/E", "/XF", "install.wim", "/NFL", "/NDL", "/NJH", "/NJS")
& robocopy @robocopyArgs | Out-Null & robocopy @robocopyArgs
} else { } else {
& robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS | Out-Null & robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS
} }
} else { } else {
& robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS | Out-Null & robocopy $contentsDir $usbDrive /E /NFL /NDL /NJH /NJS
} }
SetProgress "Finalising USB drive..." 90 SetProgress "Finalising USB drive..." 90
Log "Files copied to USB." Log "Files copied to USB."
SetProgress "USB write complete" 100 SetProgress "USB write complete" 100
Log "USB drive is ready for use." Log "USB drive is ready for use."
$sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{ $sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{

View File

@@ -273,22 +273,46 @@
<Style TargetType="ComboBox"> <Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundColor}" /> <Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundColor}" />
<Setter Property="Background" Value="{DynamicResource ComboBoxBackgroundColor}" /> <Setter Property="Background" Value="{DynamicResource ComboBoxBackgroundColor}" />
<Setter Property="MinWidth" Value="{DynamicResource ButtonWidth}" />
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ComboBox"> <ControlTemplate TargetType="ComboBox">
<Grid> <Grid>
<ToggleButton x:Name="ToggleButton" <!-- Outer border gives the combo a visible box -->
Background="{TemplateBinding Background}" <Border x:Name="OuterBorder"
BorderBrush="{TemplateBinding Background}" BorderBrush="{DynamicResource BorderColor}"
BorderThickness="0" BorderThickness="1"
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="{DynamicResource ButtonCornerRadius}"
ClickMode="Press"> Background="{TemplateBinding Background}">
<TextBlock Text="{TemplateBinding SelectionBoxItem}" <ToggleButton x:Name="ToggleButton"
Foreground="{TemplateBinding Foreground}" Background="Transparent"
Background="Transparent" BorderThickness="0"
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
/> ClickMode="Press">
</ToggleButton> <!-- Text + arrow laid out in a two-column Grid -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
Text="{TemplateBinding SelectionBoxItem}"
Foreground="{TemplateBinding Foreground}"
Background="Transparent"
HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="6,3,2,3"/>
<!-- Scalable vector chevron -->
<Path Grid.Column="1"
Data="M 0,0 L 8,0 L 4,5 Z"
Fill="{TemplateBinding Foreground}"
Width="8" Height="5"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Stretch="Uniform"
Margin="4,0,6,0"/>
</Grid>
</ToggleButton>
</Border>
<Popup x:Name="Popup" <Popup x:Name="Popup"
IsOpen="{TemplateBinding IsDropDownOpen}" IsOpen="{TemplateBinding IsDropDownOpen}"
Placement="Bottom" Placement="Bottom"
@@ -297,11 +321,11 @@
PopupAnimation="Slide"> PopupAnimation="Slide">
<Border x:Name="DropDownBorder" <Border x:Name="DropDownBorder"
Background="{TemplateBinding Background}" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding Foreground}" BorderBrush="{DynamicResource BorderColor}"
BorderThickness="1" BorderThickness="1"
CornerRadius="4"> CornerRadius="4">
<ScrollViewer> <ScrollViewer>
<ItemsPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2"/> <ItemsPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,2"/>
</ScrollViewer> </ScrollViewer>
</Border> </Border>
</Popup> </Popup>
@@ -1501,8 +1525,7 @@
FontSize="{DynamicResource FontSize}" FontSize="{DynamicResource FontSize}"
Foreground="{DynamicResource MainForegroundColor}" Foreground="{DynamicResource MainForegroundColor}"
Background="{DynamicResource MainBackgroundColor}" Background="{DynamicResource MainBackgroundColor}"
BorderBrush="{DynamicResource BorderColor}" HorizontalAlignment="Left"
HorizontalAlignment="Stretch"
Margin="0,0,0,0"/> Margin="0,0,0,0"/>
</StackPanel> </StackPanel>
</Border> </Border>