Skip to content

Commit

Permalink
Fixes and update to .NET FW 4.8.1
Browse files Browse the repository at this point in the history
- Better drive checks
- Language settings changes
- Replaced the update text delegate
- RequestedExecutionLevel is now set to "highestAvailable" (shouldn't be necessary but some people still don't have the permission to format as admin)
- Other fixes
  • Loading branch information
SvenGDK committed Apr 23, 2023
1 parent 593def3 commit 900b95e
Show file tree
Hide file tree
Showing 12 changed files with 306 additions and 367 deletions.
6 changes: 3 additions & 3 deletions Newest/XboxMediaUSB-N/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
</startup>
</configuration>
</configuration>
3 changes: 0 additions & 3 deletions Newest/XboxMediaUSB-N/Application.xaml.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Class Application

' Application-level events, such as Startup, Exit, and DispatcherUnhandledException
' can be handled in this file.

End Class
4 changes: 2 additions & 2 deletions Newest/XboxMediaUSB-N/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<TextBlock x:Name="PrepareNewTextBlock" HorizontalAlignment="Left" Margin="13,167,0,0" TextWrapping="Wrap" Text="Prepare new a USB drive" VerticalAlignment="Top" FontSize="16" Width="250" TextAlignment="Center"/>
<ComboBox x:Name="DriveList1" HorizontalAlignment="Left" Margin="13,228,0,0" VerticalAlignment="Top" Width="250"/>
<TextBlock x:Name="SelectUSBFromListTextBlock1" HorizontalAlignment="Left" Margin="13,207,0,0" TextWrapping="Wrap" Text="Select a removable USB drive from the list :" VerticalAlignment="Top" Width="250" TextAlignment="Center"/>
<TextBlock x:Name="WarningTextBlock" HorizontalAlignment="Left" Margin="13,255,0,0" TextWrapping="Wrap" Text="Warning: All Data on this drive will be erased!" VerticalAlignment="Top" FontWeight="Bold" FontSize="10" Width="250" TextAlignment="Center"/>
<TextBlock x:Name="WarningTextBlock" HorizontalAlignment="Left" Margin="13,255,0,0" TextWrapping="Wrap" Text="Warning: All Data on this drive will be erased!" VerticalAlignment="Top" FontWeight="Bold" FontSize="10" Width="250" TextAlignment="Center" FontStyle="Italic" Foreground="#FFC10000"/>
<Button x:Name="FormatUSBButton" Content="Format USB" HorizontalAlignment="Left" Margin="47,353,0,0" VerticalAlignment="Top" Width="173"/>
<TextBlock x:Name="OptionsTextBlock" HorizontalAlignment="Left" Margin="38,279,0,0" TextWrapping="Wrap" Text="Options :" VerticalAlignment="Top"/>
<TextBlock x:Name="OptionsTextBlock" HorizontalAlignment="Left" Margin="13,279,0,0" TextWrapping="Wrap" Text="Options :" VerticalAlignment="Top" Width="250" TextAlignment="Center" FontWeight="Bold"/>
<CheckBox x:Name="CreateDefaultFoldersCheckBox" Content="Create default folders" HorizontalAlignment="Left" Margin="65,303,0,0" VerticalAlignment="Top" IsChecked="True" Width="198"/>
<CheckBox x:Name="SetUSBIconCheckBox" Content="Set USB drive icon" HorizontalAlignment="Left" Margin="65,323,0,0" VerticalAlignment="Top" IsChecked="False" Width="198"/>
<Image HorizontalAlignment="Left" Height="64" Margin="382,98,0,0" VerticalAlignment="Top" Width="64" Source="/permissions.png"/>
Expand Down
443 changes: 276 additions & 167 deletions Newest/XboxMediaUSB-N/MainWindow.xaml.vb

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Newest/XboxMediaUSB-N/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Imports System.Windows
' Review the values of the assembly attributes

<Assembly: AssemblyTitle("XboxMediaUSB")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyDescription("Creates a new drive for Xbox consoles or adds missing permissions.")>
<Assembly: AssemblyCompany("SvenGDK")>
<Assembly: AssemblyProduct("XboxMediaUSB")>
<Assembly: AssemblyCopyright("Copyright © SvenGDK 2022-2023")>
<Assembly: AssemblyTrademark("")>
Expand Down Expand Up @@ -55,5 +55,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("2.0.0.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")>
<Assembly: AssemblyVersion("2.1.0.0")>
<Assembly: AssemblyFileVersion("2.1.0.0")>
67 changes: 2 additions & 65 deletions Newest/XboxMediaUSB-N/My Project/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,13 @@
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC Manifest Options
If you want to change the Windows User Account Control level replace the
requestedExecutionLevel node with one of the following.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
Specifying requestedExecutionLevel element will disable file and registry virtualization.
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- A list of the Windows versions that this application has been tested on
and is designed to work with. Uncomment the appropriate elements
and Windows will automatically select the most compatible environment. -->

<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->

<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->

<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->

<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->

<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->

</application>
<application/>
</compatibility>

<!-- Indicates that the application is DPI-aware and will not be automatically scaled by Windows at higher
DPIs. Windows Presentation Foundation (WPF) applications are automatically DPI-aware and do not need
to opt in. Windows Forms applications targeting .NET Framework 4.6 that opt into this setting, should
also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config.
Makes the application long-path aware. See https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->

<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->

</assembly>
24 changes: 19 additions & 5 deletions Newest/XboxMediaUSB-N/XboxMediaUSB-N.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<OutputType>WinExe</OutputType>
<RootNamespace>XboxMediaUSB</RootNamespace>
<AssemblyName>XboxMediaUSB</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<MyType>Custom</MyType>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -23,8 +24,10 @@
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<NoWarn>
</NoWarn>
<Prefer32Bit>true</Prefer32Bit>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -37,7 +40,9 @@
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>
</DocumentationFile>
<NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314</NoWarn>
<NoWarn>
</NoWarn>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
Expand All @@ -46,7 +51,7 @@
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
<OptionStrict>On</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
Expand All @@ -59,30 +64,37 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x64|AnyCPU'">
<OutputPath>bin\x64\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Debug\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\Release\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x64|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>bin\x64\x64\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<OutputPath>bin\ARM64\Release\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x64|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<OutputPath>bin\ARM64\x64\</OutputPath>
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Core" />
Expand Down Expand Up @@ -170,7 +182,9 @@
</ItemGroup>
<ItemGroup>
<Resource Include="permissions.png" />
<EmbeddedResource Include="xbox.ico" />
<EmbeddedResource Include="xbox.ico">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<Resource Include="xboxusb.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
Expand Down
2 changes: 0 additions & 2 deletions Newest/XboxMediaUSB-N/bin/Debug/config.ini

This file was deleted.

30 changes: 0 additions & 30 deletions Newest/XboxMediaUSB-N/bin/Debug/languages/DE.ini

This file was deleted.

30 changes: 0 additions & 30 deletions Newest/XboxMediaUSB-N/bin/Debug/languages/EN.ini

This file was deleted.

26 changes: 0 additions & 26 deletions Newest/XboxMediaUSB-N/bin/Debug/languages/ES.ini

This file was deleted.

30 changes: 0 additions & 30 deletions Newest/XboxMediaUSB-N/bin/Debug/languages/FR.ini

This file was deleted.

0 comments on commit 900b95e

Please sign in to comment.