Skip to content

Commit

Permalink
Fix for PRI263 Warnings
Browse files Browse the repository at this point in the history
Somehow "BG" folder name is treated as language resource, thus the "PRI263: 0xdef01051 - No default or neutral resource given for 'Files/Assets/*'. The application may throw an exception for certain user configurations when retrieving the resources." warnings.
This commit tries to fix it by renaming the "BG" assets folder to "Images" and adjusting everything necessary for it.

Reference: https://developercommunity.visualstudio.com/t/uwp-resource-handling-fails-when-baseintermediateo/82838#T-N91468

Related to #211
  • Loading branch information
bagusnl committed Jul 28, 2023
1 parent 14d0c15 commit 46befc9
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 24 deletions.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
31 changes: 23 additions & 8 deletions CollapseLauncher/CollapseLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<DefineConstants>DISABLE_XAML_GENERATED_MAIN;PREVIEW;DISABLETRANSPARENT;DISABLEMOVEMIGRATE</DefineConstants>
<Optimize>False</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DefineConstants>DISABLE_XAML_GENERATED_MAIN;PREVIEW;DISABLETRANSPARENT;DISABLEMOVEMIGRATE</DefineConstants>
Expand Down Expand Up @@ -59,49 +58,65 @@
<Content Include="CollapseLauncher.Hi3CacheUpdater.cmd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Include="icon.ico">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Include="Misc\InstallMediaPack.cmd">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<None Include="..\.editorconfig" Link=".editorconfig" />
<Content Update="Assets\BG\AiHappy.png">

<Content Update="Assets\Images\AiHappy.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\AponiaFly.png">

<Content Update="Assets\Images\AponiaFly.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\default.png">

<Content Update="Assets\Images\default.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\PaimonSleep.png">

<Content Update="Assets\Images\PaimonSleep.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\PaimonWhat.png">

<Content Update="Assets\Images\PaimonWhat.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\StartUpBG.png">

<Content Update="Assets\Images\StartUpBG.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BG\StartUpBG2.png">

<Content Update="Assets\Images\StartUpBG2.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\CollapseLauncherLogo.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\Fonts\FontAwesomeBrand6.otf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\Fonts\FontAwesomeRegular6.otf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\Fonts\FontAwesomeSolid6.otf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\Presets\CommunityTools.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

<Content Update="Assets\Presets\Honkai\PersonalGraphicsSettingV2.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down
2 changes: 1 addition & 1 deletion CollapseLauncher/XAMLs/MainApp/DisconnectedPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<Run Text="{x:Bind helper:Locale.Lang._DisconnectedPage.Footer3}"/>
</TextBlock>
</Grid>
<Image Source="ms-appx:///Assets/BG/PaimonSleep.png" Width="467" Height="496"
<Image Source="ms-appx:///Assets/Images/PaimonSleep.png" Width="467" Height="496"
HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,32,32" PointerPressed="PaimonClicked"/>
</Grid>
</Page>
10 changes: 5 additions & 5 deletions CollapseLauncher/XAMLs/MainApp/MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
</Page.Resources>
<Grid x:Name="MainPageGrid">
<Grid x:Name="Background" Visibility="Collapsed">
<Image x:Name="BackgroundBack" Source="ms-appx:///Assets/BG/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
<Image x:Name="BackgroundBackBuffer" Source="ms-appx:///Assets/BG/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
<Image x:Name="BackgroundBack" Source="ms-appx:///Assets/Images/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
<Image x:Name="BackgroundBackBuffer" Source="ms-appx:///Assets/Images/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
</Grid>
<Grid x:Name="BackgroundAcrylicMask" Background="{ThemeResource BackgroundMaskAcrylicBrush}" Visibility="Collapsed"/>
<NavigationView x:Name="NavigationViewControl"
Expand All @@ -28,8 +28,8 @@
ItemInvoked="NavView_ItemInvoked"
Loaded="NavView_Loaded">
<Grid>
<Image x:Name="BackgroundFront" Margin="0,47,0,0" Source="ms-appx:///Assets/BG/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="1"/>
<Image x:Name="BackgroundFrontBuffer" Margin="0,47,0,0" Source="ms-appx:///Assets/BG/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
<Image x:Name="BackgroundFront" Margin="0,47,0,0" Source="ms-appx:///Assets/Images/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="1"/>
<Image x:Name="BackgroundFrontBuffer" Margin="0,47,0,0" Source="ms-appx:///Assets/Images/default.png" Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0"/>
<Frame x:Name="LauncherFrame">
<Frame.ContentTransitions>
<NavigationThemeTransition/>
Expand Down Expand Up @@ -193,7 +193,7 @@
<StackPanel.OpacityTransition>
<ScalarTransition/>
</StackPanel.OpacityTransition>
<Image Margin="0,0,0,16" Source="ms-appx:///Assets/BG/PaimonSleep.png" Width="200" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.5"/>
<Image Margin="0,0,0,16" Source="ms-appx:///Assets/Images/PaimonSleep.png" Width="200" HorizontalAlignment="Center" VerticalAlignment="Center" Opacity="0.5"/>
<TextBlock Text="{x:Bind helper: Locale.Lang._MainPage.NotifNoNewNotifs}" FontSize="20" FontWeight="Medium" TextAlignment="Center" Opacity="0.3"/>
</StackPanel>
<StackPanel x:Name="NotificationContainer" Margin="0,0,0,7">
Expand Down
8 changes: 4 additions & 4 deletions CollapseLauncher/XAMLs/MainApp/Pages/HomePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
PointerExited="CarouselRestartScroll">
<FlipView.ItemTemplate>
<DataTemplate>
<c:ImageEx IsCacheEnabled="True" EnableLazyLoading="True" PlaceholderSource="ms-appx:///Assets/BG/default.png" Source="{Binding Icon}" Tag="{Binding URL}" ToolTipService.ToolTip="{Binding Description}" PointerPressed="OpenImageLinkFromTag"/>
<c:ImageEx IsCacheEnabled="True" EnableLazyLoading="True" PlaceholderSource="ms-appx:///Assets/Images/default.png" Source="{Binding Icon}" Tag="{Binding URL}" ToolTipService.ToolTip="{Binding Description}" PointerPressed="OpenImageLinkFromTag"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
Expand Down Expand Up @@ -361,7 +361,7 @@
</ScrollViewer>
<StackPanel Visibility="{x:Bind IsPostEventPanelEmpty}" Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonMargin}">
<Grid>
<Image Source="ms-appx:///Assets/BG/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
<Image Source="ms-appx:///Assets/Images/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonInnerMargin}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind helper:Locale.Lang._HomePage.PostPanel_NoNews}"
HorizontalAlignment="Right" VerticalAlignment="Center"
Expand Down Expand Up @@ -404,7 +404,7 @@
</ScrollViewer>
<StackPanel Visibility="{x:Bind IsPostNoticePanelEmpty}" Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonMargin}">
<Grid>
<Image Source="ms-appx:///Assets/BG/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
<Image Source="ms-appx:///Assets/Images/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonInnerMargin}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind helper:Locale.Lang._HomePage.PostPanel_NoNews}"
HorizontalAlignment="Right" VerticalAlignment="Center"
Expand Down Expand Up @@ -447,7 +447,7 @@
</ScrollViewer>
<StackPanel Visibility="{x:Bind IsPostInfoPanelEmpty}" Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonMargin}">
<Grid>
<Image Source="ms-appx:///Assets/BG/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
<Image Source="ms-appx:///Assets/Images/PaimonWhat.png" Height="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonHeight}"
Margin="{x:Bind localWindowSize:WindowSize.CurrentWindowSize.PostPanelPaimonInnerMargin}" HorizontalAlignment="Right" VerticalAlignment="Center"/>
<TextBlock Text="{x:Bind helper:Locale.Lang._HomePage.PostPanel_NoNews}"
HorizontalAlignment="Right" VerticalAlignment="Center"
Expand Down
2 changes: 1 addition & 1 deletion CollapseLauncher/XAMLs/MainApp/Pages/StartupPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
mc:Ignorable="d"
Background="{ThemeResource PagesSolidAcrylicBrush}">
<Grid>
<Image Grid.Column="0" Grid.ColumnSpan="2" Source="ms-appx:///Assets/BG/StartUpBG2.png" Stretch="UniformToFill" VerticalAlignment="Center" Opacity="0.50"/>
<Image Grid.Column="0" Grid.ColumnSpan="2" Source="ms-appx:///Assets/Images/StartUpBG2.png" Stretch="UniformToFill" VerticalAlignment="Center" Opacity="0.50"/>
<Grid x:Name="Bg" Margin="32">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<s:AttachedDropShadow x:Key="DetailsTextShadowController" BlurRadius="8" Opacity="1" CastTo="{x:Bind GameDetailsTextShadow}"/>
</Page.Resources>
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<Image Source="ms-appx:///Assets/BG/StartUpBG2.png" Stretch="UniformToFill" VerticalAlignment="Center" Opacity="0.50"/>
<Image Source="ms-appx:///Assets/Images/StartUpBG2.png" Stretch="UniformToFill" VerticalAlignment="Center" Opacity="0.50"/>
<Grid x:Name="GameDetails">
<Image x:Name="GameDetailsPoster"
VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
Expand Down Expand Up @@ -49,7 +49,7 @@
HorizontalAlignment="Right"
Margin="0,0,96,0"
Visibility="Collapsed">
<Image Source="ms-appx:///Assets/BG/AponiaFly.png"
<Image Source="ms-appx:///Assets/Images/AponiaFly.png"
Width="400" Height="400"/>
</Grid>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion CollapseLauncher/XAMLs/MainApp/Pages/UpdatePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ColumnDefinition Width="280"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Source="ms-appx:///Assets/BG/AiHappy.png"
<Image Source="ms-appx:///Assets/Images/AiHappy.png"
VerticalAlignment="Bottom" Margin="-32"
HorizontalAlignment="Left" Opacity="0.30"
Width="480" Grid.ColumnSpan="2"/>
Expand Down
2 changes: 1 addition & 1 deletion CollapseLauncher/XAMLs/StartUp/StartupLanguageSelect.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Grid.ColumnSpan="2" Source="ms-appx:///Assets/BG/StartUpBG.png" Stretch="UniformToFill" VerticalAlignment="Center" Margin="-16,-32,-16,-16"/>
<Image Grid.Column="0" Grid.ColumnSpan="2" Source="ms-appx:///Assets/Images/StartUpBG.png" Stretch="UniformToFill" VerticalAlignment="Center" Margin="-16,-32,-16,-16"/>
<StackPanel Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center">
<StackPanel.Transitions>
<EntranceThemeTransition/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static bool IsShowRegionChangeWarning

public static Dictionary<string, IniValue> AppSettingsTemplate = new Dictionary<string, IniValue>
{
{ "CurrentBackground", "ms-appx:///Assets/BG/default.png" },
{ "CurrentBackground", "ms-appx:///Assets/Images/default.png" },
{ "DownloadThread", 4 },
{ "ExtractionThread", 0 },
{ "GameFolder", Path.Combine(AppDataFolder, "GameFolder") },
Expand Down

0 comments on commit 46befc9

Please sign in to comment.