Skip to content

Commit

Permalink
Drop support for UWP
Browse files Browse the repository at this point in the history
  • Loading branch information
Jklawreszuk committed Sep 26, 2024
1 parent e4d7e80 commit 5dc95fa
Show file tree
Hide file tree
Showing 130 changed files with 31 additions and 4,960 deletions.
2 changes: 1 addition & 1 deletion build/Stride.AllPlatforms.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
set StridePlatforms=Windows;UWP;Android;iOS;Linux
set StridePlatforms=Windows;Android;iOS;Linux
Stride.sln
2 changes: 0 additions & 2 deletions build/Stride.UWP.bat

This file was deleted.

11 changes: 1 addition & 10 deletions build/Stride.build
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Example of use:
</Target>

<!--
Build Stride: Windows, Android, iOS, Windows 10 (UWP)
Build Stride: Windows, Android, iOS
-->
<Target Name="Clean">
<Exec Command="RMDIR /Q /S $(StrideRoot)\Bin"/>
Expand Down Expand Up @@ -191,15 +191,6 @@ Example of use:
<MSBuild Targets="Build" Projects="$(StrideSolution).iOS.sln" Properties="$(BuildProperties);StridePlatforms=iOS;StrideSkipAutoPack=true;StrideSkipUnitTests=true"/>
</Target>

<Target Name="BuildUWP">
<PropertyGroup>
<StrideSolution>$(StrideSolution).Runtime</StrideSolution>
<StridePlatforms>UWP</StridePlatforms>
</PropertyGroup>
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StridePlatforms=$(StridePlatforms);StrideSolution=$(StrideSolution)"/>
<MSBuild Targets="Build" Projects="$(StrideSolution).sln" Properties="$(BuildProperties);StridePlatforms=$(StridePlatforms);StrideSkipAutoPack=true;StrideSkipUnitTests=true"/>
</Target>

<Target Name="BuildWindowsVulkan">
<MSBuild Targets="Restore" Projects="$(MSBuildThisFileFullPath)" Properties="StridePlatforms=$(StridePlatforms);StrideSolution=$(StrideSolution).Runtime;StrideGraphicsApis=Vulkan"/>
<MSBuild Targets="Build" Projects="$(StrideSolution).Runtime.sln" Properties="$(BuildProperties);StrideGraphicsApis=Vulkan;StrideSkipAutoPack=true;StrideSkipUnitTests=true"/>
Expand Down
3 changes: 0 additions & 3 deletions deps/BulletPhysics/UWP/ARM/libbulletc.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/BulletPhysics/UWP/x64/libbulletc.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/BulletPhysics/UWP/x86/libbulletc.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/ARM/Detour.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/ARM/Recast.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/ARM/libCelt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/ARM/libCompilerRt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/ARM/libNativePath.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x64/Detour.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x64/Recast.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x64/libCelt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x64/libCompilerRt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x64/libNativePath.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x86/Detour.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x86/Recast.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x86/libCelt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x86/libCompilerRt.lib

This file was deleted.

3 changes: 0 additions & 3 deletions deps/NativePath/UWP/x86/libNativePath.lib

This file was deleted.

1 change: 0 additions & 1 deletion deps/OpenAL/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Forks:
WIN8.1/UWP: https://github.com/sinkingsugar/openal-soft-winphone
iOS: Due to LGPL limitations on openal-soft, we are using Apple OpenAL implementation
Other platforms: https://github.com/sinkingsugar/openal-soft
3 changes: 0 additions & 3 deletions deps/freetype/UWP/ARM/freetype.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/freetype/UWP/ARM/freetype.pdb

This file was deleted.

3 changes: 0 additions & 3 deletions deps/freetype/UWP/x64/freetype.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/freetype/UWP/x64/freetype.pdb

This file was deleted.

3 changes: 0 additions & 3 deletions deps/freetype/UWP/x86/freetype.dll

This file was deleted.

3 changes: 0 additions & 3 deletions deps/freetype/UWP/x86/freetype.pdb

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,8 @@
<RemoveDir Condition="Exists('$(StrideCompileAssetOutputPath)')" ContinueOnError="true" Directories="$(StrideCompileAssetOutputPath)"/>
</Target>

<!-- UWP: Adjust Appx folders -->
<PropertyGroup Condition="'$(StrideIsExecutable)' == 'true' And '$(StridePlatform)' == 'UWP'">
<!-- Use OutputPath to define AppxPackage directory -->
<AppxPackageDir>$(OutputPath)\$(AppxPackageDirName)\</AppxPackageDir>
<AppxPackageTestDir>$(AppxPackageDir)Test\</AppxPackageTestDir>
<AppxPackageName>$(AssemblyName)</AppxPackageName>
</PropertyGroup>

<!-- UWP & iOS: Compile and Transform Assets into Content during PrepareResources phase -->
<PropertyGroup Condition="'$(StrideIsExecutable)' == 'true' And ('$(StridePlatform)' == 'UWP' Or '$(StridePlatform)' == 'Android')">
<!-- iOS: Compile and Transform Assets into Content during PrepareResources phase -->
<PropertyGroup Condition="'$(StrideIsExecutable)' == 'true' And '$(StridePlatform)' == 'Android'">
<PrepareResourcesDependsOn>
_StrideDeployAssetsAsContent;
$(PrepareResourcesDependsOn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ private async Task PreLoadPackageDependencies(ILogger log, SolutionProject proje

var outputType = msProject.GetPropertyValue("OutputType");
project.Type = outputType.ToLowerInvariant() == "winexe" || outputType.ToLowerInvariant() == "exe"
|| outputType.ToLowerInvariant() == "appcontainerexe" // UWP
|| msProject.GetPropertyValue("AndroidApplication").ToLowerInvariant() == "true" // Android
? ProjectType.Executable
: ProjectType.Library;
Expand Down
4 changes: 2 additions & 2 deletions sources/core/Stride.Core.IO/NativeLockFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static void LockFile(FileStream fileStream, long offset, long count, bool
count = (count + offset > int.MaxValue) ? int.MaxValue - offset : count;
}

if (Platform.Type == PlatformType.Windows || Platform.Type == PlatformType.UWP)
if (Platform.Type == PlatformType.Windows)
{
var countLow = (uint)count;
var countHigh = (uint)(count >> 32);
Expand Down Expand Up @@ -74,7 +74,7 @@ public static void UnlockFile(FileStream fileStream, long offset, long count)
count = (count + offset > int.MaxValue) ? int.MaxValue - offset : count;
}

if (Platform.Type == PlatformType.Windows || Platform.Type == PlatformType.UWP)
if (Platform.Type == PlatformType.Windows)
{
var countLow = (uint)count;
var countHigh = (uint)(count >> 32);
Expand Down
1 change: 0 additions & 1 deletion sources/core/Stride.Core.IO/Stride.Core.IO.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
<ProjectReference Include="..\Stride.Core\Stride.Core.csproj">
<PrivateAssets>contentfiles;analyzers</PrivateAssets>
</ProjectReference>
<PackageReference Include="SharpDX" Condition="'$(TargetFramework)' == '$(StrideFrameworkUWP)'" />
</ItemGroup>

<Import Project="$(StrideSdkTargets)" />
Expand Down
2 changes: 0 additions & 2 deletions sources/core/Stride.Core/Diagnostics/ConsoleLogListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,12 @@ protected override void OnLog([NotNull] ILogMessage logMessage)
}
}

#if !STRIDE_PLATFORM_UWP
// Log the actual message
Console.WriteLine(GetDefaultText(logMessage));
if (!string.IsNullOrEmpty(exceptionMsg))
{
Console.WriteLine(exceptionMsg);
}
#endif

#if STRIDE_PLATFORM_DESKTOP

Expand Down
7 changes: 0 additions & 7 deletions sources/core/Stride.Core/Platform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ namespace Stride.Core
/// </summary>
public static class Platform
{
#if STRIDE_PLATFORM_UWP
/// <summary>
/// The current running <see cref="PlatformType"/>.
/// </summary>
public static readonly PlatformType Type = PlatformType.UWP;
#else
/// <summary>
/// The current running <see cref="PlatformType"/>.
/// </summary>
Expand All @@ -30,7 +24,6 @@ public static readonly PlatformType Type
: OperatingSystem.IsAndroid() ? PlatformType.Android
: OperatingSystem.IsIOS() ? PlatformType.iOS
: PlatformType.Windows; // For now we use Windows as fallback, but it might be better to throw an exception?
#endif

/// <summary>
/// Gets a value indicating whether the running platform is windows desktop.
Expand Down
18 changes: 1 addition & 17 deletions sources/core/Stride.Core/PlatformFolders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ private static string GetApplicationLocalDirectory()
var directory = Path.Combine(PlatformAndroid.Context.FilesDir.AbsolutePath, "local");
Directory.CreateDirectory(directory);
return directory;
#elif STRIDE_PLATFORM_UWP
return Windows.Storage.ApplicationData.Current.LocalFolder.Path;
#elif STRIDE_PLATFORM_IOS
var directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library", "Local");
Directory.CreateDirectory(directory);
Expand All @@ -117,29 +115,21 @@ private static string GetApplicationRoamingDirectory()
{
#if STRIDE_PLATFORM_ANDROID
var directory = Path.Combine(PlatformAndroid.Context.FilesDir.AbsolutePath, "roaming");
Directory.CreateDirectory(directory);
return directory;
#elif STRIDE_PLATFORM_UWP
return Windows.Storage.ApplicationData.Current.RoamingFolder.Path;
#elif STRIDE_PLATFORM_IOS
var directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library", "Roaming");
Directory.CreateDirectory(directory);
return directory;
#else
// TODO: Should we add "local" ?
var directory = Path.Combine(GetApplicationBinaryDirectory(), "roaming");
#endif
Directory.CreateDirectory(directory);
return directory;
#endif
}

[NotNull]
private static string GetApplicationCacheDirectory()
{
#if STRIDE_PLATFORM_ANDROID
var directory = Path.Combine(PlatformAndroid.Context.FilesDir.AbsolutePath, "cache");
#elif STRIDE_PLATFORM_UWP
var directory = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "cache");
#elif STRIDE_PLATFORM_IOS
var directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "Library", "Caches");
#else
Expand Down Expand Up @@ -177,8 +167,6 @@ private static string GetApplicationTemporaryDirectory()
{
#if STRIDE_PLATFORM_ANDROID
return PlatformAndroid.Context.CacheDir.AbsolutePath;
#elif STRIDE_PLATFORM_UWP
return Windows.Storage.ApplicationData.Current.TemporaryFolder.Path;
#elif STRIDE_PLATFORM_IOS
return Path.Combine (Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "..", "tmp");
#else
Expand Down Expand Up @@ -211,8 +199,6 @@ private static string GetApplicationExecutableDirectory()
#else
return AppDomain.CurrentDomain.BaseDirectory;
#endif
#elif STRIDE_PLATFORM_UWP
return Windows.ApplicationModel.Package.Current.InstalledLocation.Path;
#else
throw new NotImplementedException();
#endif
Expand All @@ -225,8 +211,6 @@ private static string GetApplicationDataDirectory()
return Android.OS.Environment.ExternalStorageDirectory.AbsolutePath + "/Android/data/" + PlatformAndroid.Context.PackageName + "/data";
#elif STRIDE_PLATFORM_IOS
return Foundation.NSBundle.MainBundle.BundlePath + "/data";
#elif STRIDE_PLATFORM_UWP
return Windows.ApplicationModel.Package.Current.InstalledLocation.Path + @"\data";
#else
return Path.Combine(GetApplicationBinaryDirectory(), "data");
#endif
Expand Down
5 changes: 0 additions & 5 deletions sources/core/Stride.Core/PlatformType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ public enum PlatformType
iOS,
#pragma warning restore SA1300 // Element must begin with upper-case letter

/// <summary>
/// The Universal Windows Platform (UWP).
/// </summary>
UWP,

/// <summary>
/// The Linux OS.
/// </summary>
Expand Down
1 change: 0 additions & 1 deletion sources/core/Stride.Core/Stride.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<StrideAssemblyProcessorOptions>--auto-module-initializer --serialization</StrideAssemblyProcessorOptions>
<StrideBuildTags>*</StrideBuildTags>
<RestorePackages>true</RestorePackages>
<ExtrasUwpMetaPackageVersion>6.2.12</ExtrasUwpMetaPackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
14 changes: 0 additions & 14 deletions sources/core/Stride.Core/build/Stride.Core.targets
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
-->
<PropertyGroup>
<!-- Default mappings -->
<StridePlatform Condition="'$(StridePlatform)' == '' And '$(TargetPlatformIdentifier)' == 'UAP'">UWP</StridePlatform>
<StridePlatform Condition="'$(StridePlatform)' == '' And '$(TargetPlatformIdentifier)' == 'Android'">Android</StridePlatform>
<StridePlatform Condition="'$(StridePlatform)' == '' And '$(TargetPlatformIdentifier)' == 'iOS'">iOS</StridePlatform>
<StridePlatform Condition="'$(StridePlatform)' == '' And '$(TargetPlatformIdentifier)' == 'macOS'">macOS</StridePlatform>
Expand Down Expand Up @@ -177,19 +176,6 @@
</ItemGroup>
</Target>

<Target Name="_StrideSetupNativeLibrariesUWP" DependsOnTargets="_StrideBuildDependencies" AfterTargets="ResolveAssemblyReferences" Condition="'$(StridePlatform)' == 'UWP'">
<PropertyGroup>
<StrideCPU Condition="'$(Platform)' == 'x86'">x86</StrideCPU>
<StrideCPU Condition="'$(Platform)' == 'x64'">x64</StrideCPU>
<StrideCPU Condition="'$(Platform)' == 'ARM'">ARM</StrideCPU>
</PropertyGroup>
<ItemGroup>
<Content Include="@(_StrideDependencyNativeLib)" Condition="$([System.String]::Copy('%(_StrideDependencyNativeLib.Link)').StartsWith('$(StrideCPU)'))">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link Condition="'$(StrideCPU)' != ''">$([System.String]::Copy('%(_StrideDependencyNativeLib.Link)').Replace('$(StrideCPU)\', ''))</Link>
</Content>
</ItemGroup>
</Target>
<Target Name="_StrideSetupNativeLibrariesAndroid" DependsOnTargets="_StrideBuildDependencies" AfterTargets="ResolveAssemblyReferences" Condition="'$(StridePlatform)' == 'Android'">
<ItemGroup>
<AndroidNativeLibrary Include="@(_StrideDependencyNativeLib)"/>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5dc95fa

Please sign in to comment.