Restructure assets into their own dedicated folders

This commit is contained in:
Gustave Monce
2025-11-01 11:06:33 +01:00
parent b3b037a3c8
commit ad92ecdab3
23 changed files with 30 additions and 30 deletions
+2 -2
View File
@@ -77,14 +77,14 @@ namespace WPinternals
Registration.CheckExpiration(); Registration.CheckExpiration();
string PatchDefintionsXml; string PatchDefintionsXml;
string PatchDefintionsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "PatchDefintions.xml"); string PatchDefintionsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets", "PatchDefintions.xml");
if (File.Exists(PatchDefintionsPath)) if (File.Exists(PatchDefintionsPath))
{ {
PatchDefintionsXml = File.ReadAllText(PatchDefintionsPath); PatchDefintionsXml = File.ReadAllText(PatchDefintionsPath);
} }
else else
{ {
using Stream stream = System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("WPinternals.PatchDefinitions.xml"); using Stream stream = System.Reflection.Assembly.GetEntryAssembly().GetManifestResourceStream("WPinternals.Assets.PatchDefinitions.xml");
using StreamReader sr = new(stream); using StreamReader sr = new(stream);
PatchDefintionsXml = sr.ReadToEnd(); PatchDefintionsXml = sr.ReadToEnd();
} }

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

@@ -2108,7 +2108,7 @@ namespace WPinternals
Part = new FlashPart(); Part = new FlashPart();
Partition TargetPartition = GPT.GetPartition("UEFI_BS_NV"); Partition TargetPartition = GPT.GetPartition("UEFI_BS_NV");
Part.StartSector = (UInt32)TargetPartition.FirstSector; // GPT is prepared for 64-bit sector-offset, but flash app isn't. Part.StartSector = (UInt32)TargetPartition.FirstSector; // GPT is prepared for 64-bit sector-offset, but flash app isn't.
string SBRes = IsSpecB ? "WPinternals.SB" : "WPinternals.SBA"; string SBRes = IsSpecB ? "WPinternals.Assets.SB" : "WPinternals.Assets.SBA";
Part.Stream = new SeekableStream(() => Part.Stream = new SeekableStream(() =>
{ {
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
@@ -197,7 +197,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB"); Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
return new DecompressedStream(stream); return new DecompressedStream(stream);
}); });
@@ -2293,7 +2293,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB"); Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
return new DecompressedStream(stream); return new DecompressedStream(stream);
}); });
@@ -2652,7 +2652,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
Stream stream = assembly.GetManifestResourceStream("WPinternals.SB"); Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SB");
return new DecompressedStream(stream); return new DecompressedStream(stream);
}); });
@@ -1013,7 +1013,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM")) using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
{ {
using DecompressedStream dec = new(stream); using DecompressedStream dec = new(stream);
using MemoryStream SB = new(); // Must be a seekable stream! using MemoryStream SB = new(); // Must be a seekable stream!
@@ -1240,7 +1240,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM")) using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
{ {
using DecompressedStream dec = new(stream); using DecompressedStream dec = new(stream);
using MemoryStream SB = new(); // Must be a seekable stream! using MemoryStream SB = new(); // Must be a seekable stream!
@@ -1441,7 +1441,7 @@ namespace WPinternals
// It overwrites the variable in a different NV-partition than where this variable is stored usually. // It overwrites the variable in a different NV-partition than where this variable is stored usually.
// This normally leads to endless-loops when the NV-variables are enumerated. // This normally leads to endless-loops when the NV-variables are enumerated.
// But the partition contains an extra hack to break out the endless loops. // But the partition contains an extra hack to break out the endless loops.
using (Stream stream = assembly.GetManifestResourceStream("WPinternals.SBMSM")) using (Stream stream = assembly.GetManifestResourceStream("WPinternals.Assets.SBMSM"))
{ {
using DecompressedStream dec = new(stream); using DecompressedStream dec = new(stream);
using MemoryStream SB = new(); // Must be a seekable stream! using MemoryStream SB = new(); // Must be a seekable stream!
+1 -1
View File
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="700"> d:DesignWidth="700">
<UserControl.Resources> <UserControl.Resources>
<BitmapImage x:Key="LogoImageSource" UriSource="..\Logo.png" /> <BitmapImage x:Key="LogoImageSource" UriSource="..\Assets\Logo.png" />
</UserControl.Resources> </UserControl.Resources>
<Border BorderThickness="1" BorderBrush="#FFD4D4D4" HorizontalAlignment="Stretch" VerticalAlignment="Center" Padding="25"> <Border BorderThickness="1" BorderBrush="#FFD4D4D4" HorizontalAlignment="Stretch" VerticalAlignment="Center" Padding="25">
<Grid> <Grid>
+1 -1
View File
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="700"> d:DesignWidth="700">
<UserControl.Resources> <UserControl.Resources>
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" /> <BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
<helpers:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" /> <helpers:ObjectToVisibilityConverter x:Key="ObjectToVisibilityConverter" />
<helpers:InverseObjectToVisibilityConverter x:Key="InverseObjectToVisibilityConverter" /> <helpers:InverseObjectToVisibilityConverter x:Key="InverseObjectToVisibilityConverter" />
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/> <helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
+1 -1
View File
@@ -32,7 +32,7 @@ namespace WPinternals
InitializeComponent(); InitializeComponent();
// Setting these properties in XAML results in an error. Why? // Setting these properties in XAML results in an error. Why?
GifImage.GifSource = "/aerobusy.gif"; GifImage.GifSource = "/Assets/aerobusy.gif";
GifImage.AutoStart = true; GifImage.AutoStart = true;
} }
} }
+1 -1
View File
@@ -31,7 +31,7 @@ DEALINGS IN THE SOFTWARE.
d:DesignWidth="700" d:DesignWidth="700"
> >
<UserControl.Resources> <UserControl.Resources>
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" /> <BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/> <helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" /> <helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
</UserControl.Resources> </UserControl.Resources>
+1 -1
View File
@@ -46,7 +46,7 @@ namespace WPinternals
UIContext = SynchronizationContext.Current; UIContext = SynchronizationContext.Current;
// Setting these properties in XAML results in an error. Why? // Setting these properties in XAML results in an error. Why?
GifImage.GifSource = "/aerobusy.gif"; GifImage.GifSource = "/Assets/aerobusy.gif";
GifImage.AutoStart = true; GifImage.AutoStart = true;
Loaded += Empty_Loaded; Loaded += Empty_Loaded;
+3 -3
View File
@@ -23,7 +23,7 @@ DEALINGS IN THE SOFTWARE.
<Window x:Class="WPinternals.MainWindow" <Window x:Class="WPinternals.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPinternals" Height="760" Width="1150" Icon="..\WPinternals.ico" Closed="Window_Closed"> xmlns:local="clr-namespace:WPinternals" Height="760" Width="1150" Icon="..\Assets\WPinternals.ico" Closed="Window_Closed">
<Window.Resources> <Window.Resources>
<DataTemplate DataType="{x:Type local:BootUnlockResourcesViewModel}"> <DataTemplate DataType="{x:Type local:BootUnlockResourcesViewModel}">
<local:FlashResourcesView /> <local:FlashResourcesView />
@@ -115,8 +115,8 @@ DEALINGS IN THE SOFTWARE.
<DataTemplate DataType="{x:Type local:ContextViewModel}"> <DataTemplate DataType="{x:Type local:ContextViewModel}">
<local:ContextView /> <local:ContextView />
</DataTemplate> </DataTemplate>
<BitmapImage x:Key="LogoImageSource" UriSource="..\Logo.png" /> <BitmapImage x:Key="LogoImageSource" UriSource="..\Assets\Logo.png" />
<BitmapImage x:Key="LogoSmallImageSource" UriSource="..\Logo-Small.png" /> <BitmapImage x:Key="LogoSmallImageSource" UriSource="..\Assets\Logo-Small.png" />
<Style x:Key="MenuButtonStyle" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}"> <Style x:Key="MenuButtonStyle" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" TargetType="{x:Type Button}">
<Setter Property="Template"> <Setter Property="Template">
<Setter.Value> <Setter.Value>
+1 -1
View File
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="700"> d:DesignWidth="700">
<UserControl.Resources> <UserControl.Resources>
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" /> <BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
<helpers:HexConverter x:Key="HexConverter" /> <helpers:HexConverter x:Key="HexConverter" />
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/> <helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" /> <helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
@@ -45,7 +45,7 @@ namespace WPinternals
UIContext = SynchronizationContext.Current; UIContext = SynchronizationContext.Current;
// Setting these properties in XAML results in an error. Why? // Setting these properties in XAML results in an error. Why?
GifImage.GifSource = "/aerobusy.gif"; GifImage.GifSource = "/Assets/aerobusy.gif";
GifImage.AutoStart = true; GifImage.AutoStart = true;
Loaded += NokiaBootloaderView_Loaded; Loaded += NokiaBootloaderView_Loaded;
+1 -1
View File
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
mc:Ignorable="d" mc:Ignorable="d"
d:DesignWidth="700"> d:DesignWidth="700">
<UserControl.Resources> <UserControl.Resources>
<BitmapImage x:Key="Busy" UriSource="..\aerobusy.gif" /> <BitmapImage x:Key="Busy" UriSource="..\Assets\aerobusy.gif" />
<helpers:HexConverter x:Key="HexConverter" /> <helpers:HexConverter x:Key="HexConverter" />
<helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/> <helpers:BooleanConverter x:Key="VisibilityConverter" OnTrue="Visible" OnFalse="Collapsed" OnNull="Collapsed"/>
<helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" /> <helpers:BooleanConverter x:Key="InverseVisibilityConverter" OnTrue="Collapsed" OnFalse="Visible" OnNull="Collapsed" />
+10 -10
View File
@@ -33,7 +33,7 @@
<NoWarn>1701;1702;CA1416;RCS1090;RCS1163</NoWarn> <NoWarn>1701;1702;CA1416;RCS1090;RCS1163</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>WPinternals.ico</ApplicationIcon> <ApplicationIcon>Assets\WPinternals.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<StartupObject>WPinternals.App</StartupObject> <StartupObject>WPinternals.App</StartupObject>
@@ -306,27 +306,27 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</None> </None>
<AppDesigner Include="Properties\" /> <AppDesigner Include="Properties\" />
<EmbeddedResource Include="SB" /> <EmbeddedResource Include="Assets\SB" />
<EmbeddedResource Include="SBA" /> <EmbeddedResource Include="Assets\SBA" />
<EmbeddedResource Include="SBMSM" /> <EmbeddedResource Include="Assets\SBMSM" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Logo.png" /> <Resource Include="Assets\Logo.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="WPinternals.ico" /> <Resource Include="Assets\WPinternals.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="aerobusy.gif" /> <Resource Include="Assets\aerobusy.gif" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="PhoneReboot.png" /> <Resource Include="Assets\PhoneReboot.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Logo-Small.png" /> <Resource Include="Assets\Logo-Small.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="PatchDefinitions.xml"> <EmbeddedResource Include="Assets\PatchDefinitions.xml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>