Skip to content

Commit 2717282

Browse files
author
Kevin Pfeifer
committed
merge upstream
1 parent 6452d45 commit 2717282

152 files changed

Lines changed: 7234 additions & 1664 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build-ffmpeg.yml

Lines changed: 215 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,33 +47,97 @@ jobs:
4747

4848
- name: Combine
4949
run: osu.Framework.NativeLibs/scripts/ffmpeg/combine_dylibs.sh
50+
env:
51+
platform: macOS
5052

5153
- name: Upload
5254
uses: actions/upload-artifact@v4
5355
with:
5456
name: macOS-universal
5557
path: macOS-universal
5658

59+
build-iOS:
60+
name: Build iOS
61+
runs-on: macos-12
62+
strategy:
63+
matrix:
64+
arch: [arm64, simulator-arm64, simulator-x86_64]
65+
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v4
69+
70+
- uses: ilammy/setup-nasm@v1
71+
if: matrix.arch == 'simulator-x86_64'
72+
73+
- name: Setup gas-preprocessor
74+
run: |
75+
git clone --depth=1 https://github.com/FFmpeg/gas-preprocessor
76+
echo "GAS_PREPROCESSOR=$PWD/gas-preprocessor/gas-preprocessor.pl" >> $GITHUB_ENV
77+
78+
- name: Build
79+
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-iOS.sh
80+
env:
81+
arch: ${{ matrix.arch }}
82+
83+
- name: Upload
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: iOS-${{ matrix.arch }}
87+
path: iOS-${{ matrix.arch }}
88+
89+
combine-iOS:
90+
name: Combine iOS libs
91+
runs-on: macos-12
92+
needs: build-iOS
93+
steps:
94+
- name: Checkout
95+
uses: actions/checkout@v4
96+
97+
- uses: actions/download-artifact@v4
98+
with:
99+
name: iOS-simulator-x86_64
100+
path: iOS-simulator-x86_64
101+
- uses: actions/download-artifact@v4
102+
with:
103+
name: iOS-simulator-arm64
104+
path: iOS-simulator-arm64
105+
- uses: actions/download-artifact@v4
106+
with:
107+
name: iOS-arm64
108+
path: iOS-arm64
109+
110+
- name: Combine dylibs
111+
run: osu.Framework.NativeLibs/scripts/ffmpeg/combine_dylibs.sh
112+
env:
113+
platform: iOS-simulator
114+
115+
- name: Create XCFrameworks
116+
run: osu.Framework.NativeLibs/scripts/ffmpeg/create-xcframeworks.sh
117+
118+
- name: Upload
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: iOS-xcframework
122+
path: iOS-xcframework
123+
57124
build-win:
58-
name: Build Windows (${{ matrix.arch }})
125+
name: Build Windows
59126
runs-on: ubuntu-22.04
60127
strategy:
61128
fail-fast: false
62129
matrix:
63130
arch:
64-
- x64
65131
- x86
66-
- arm64
67-
container:
68-
image: mstorsjo/llvm-mingw:latest
132+
- x64
69133
steps:
70134
- name: Checkout
71135
uses: actions/checkout@v4
72136

73137
- name: Install dependencies
74138
run: |
75-
apt-get update -y -qq
76-
apt-get install -y nasm mingw-w64
139+
sudo apt-get update
140+
sudo apt-get install nasm mingw-w64
77141
78142
- name: Build
79143
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-win.sh
@@ -86,6 +150,27 @@ jobs:
86150
name: win-${{ matrix.arch }}
87151
path: win-${{ matrix.arch }}
88152

153+
# The win-arm64 build runs in a special MinGW container to cross-compile successfully.
154+
build-win-arm64:
155+
name: Build Windows (arm64)
156+
runs-on: ubuntu-22.04
157+
container:
158+
image: mstorsjo/llvm-mingw:latest
159+
steps:
160+
- name: Checkout
161+
uses: actions/checkout@v4
162+
163+
- name: Build
164+
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-win.sh
165+
env:
166+
arch: arm64
167+
168+
- name: Upload
169+
uses: actions/upload-artifact@v4
170+
with:
171+
name: win-arm64
172+
path: win-arm64
173+
89174
build-linux:
90175
name: Build Linux
91176
# Use 20.04 to target glibc 2.31 like the other native libs
@@ -98,6 +183,11 @@ jobs:
98183
- { arch: arm64, container: "arm64v8/ubuntu:20.04" }
99184
- { arch: arm, container: "arm32v7/ubuntu:20.04" }
100185
steps:
186+
- name: Install dependencies
187+
run: |
188+
sudo apt-get update
189+
sudo apt-get install nasm
190+
101191
- name: Checkout
102192
uses: actions/checkout@v4
103193

@@ -121,32 +211,137 @@ jobs:
121211
name: linux-${{ matrix.arch }}
122212
path: linux-${{ matrix.arch }}
123213

214+
build-linux-cross:
215+
name: Build Linux
216+
# Use 20.04 to target glibc 2.31 like the other native libs
217+
runs-on: ubuntu-20.04
218+
strategy:
219+
matrix:
220+
include:
221+
- { arch: x86, container: "i386/ubuntu:20.04" }
222+
- { arch: arm64, container: "arm64v8/ubuntu:20.04" }
223+
- { arch: arm, container: "arm32v7/ubuntu:20.04" }
224+
steps:
225+
- name: Checkout
226+
uses: actions/checkout@v4
227+
228+
- name: Setup QEMU
229+
if: ${{ contains(matrix.arch, 'arm') }}
230+
uses: docker/setup-qemu-action@v2
231+
232+
- name: Build
233+
uses: addnab/docker-run-action@v3
234+
with:
235+
image: ${{ matrix.container }}
236+
options: -v ${{ github.workspace }}:/workspace -w /workspace -e DEBIAN_FRONTEND=noninteractive
237+
run: |
238+
apt-get update -y -qq
239+
apt-get install -y build-essential curl
240+
if [ "$(dpkg --print-architecture)" = "i386" ]; then
241+
apt-get install -y nasm
242+
fi
243+
244+
osu.Framework.NativeLibs/scripts/ffmpeg/build-linux.sh
245+
246+
- name: Upload
247+
uses: actions/upload-artifact@v4
248+
with:
249+
name: linux-${{ matrix.arch }}
250+
path: linux-${{ matrix.arch }}
251+
252+
build-android:
253+
name: Build Android
254+
runs-on: ubuntu-22.04
255+
strategy:
256+
matrix:
257+
arch:
258+
- armeabi-v7a
259+
- arm64-v8a
260+
- x86
261+
- x86_64
262+
263+
steps:
264+
- name: Checkout
265+
uses: actions/checkout@v4
266+
267+
- name: Build
268+
run: osu.Framework.NativeLibs/scripts/ffmpeg/build-android.sh
269+
env:
270+
arch: ${{ matrix.arch }}
271+
272+
- name: Upload
273+
uses: actions/upload-artifact@v4
274+
with:
275+
name: android-${{ matrix.arch }}
276+
path: android-${{ matrix.arch }}
277+
124278
make-pr:
125279
name: Create pull request
126280
runs-on: ubuntu-22.04
127281
needs:
128282
- combine-macos
283+
- combine-iOS
129284
- build-win
285+
- build-win-arm64
130286
- build-linux
131-
strategy:
132-
matrix:
133-
include:
134-
- { name: macOS-universal, path: osu.Framework.NativeLibs/runtimes/osx/native }
135-
- { name: linux-arm64, path: osu.Framework.NativeLibs/runtimes/linux-arm64/native}
136-
- { name: linux-arm, path: osu.Framework.NativeLibs/runtimes/linux-arm/native}
137-
- { name: linux-x64, path: osu.Framework.NativeLibs/runtimes/linux-x64/native}
138-
- { name: linux-x86, path: osu.Framework.NativeLibs/runtimes/linux-x86/native}
139-
- { name: win-arm64, path: osu.Framework.NativeLibs/runtimes/win-arm64/native}
140-
- { name: win-x64, path: osu.Framework.NativeLibs/runtimes/win-x64/native}
141-
- { name: win-x86, path: osu.Framework.NativeLibs/runtimes/win-x86/native}
287+
- build-linux-cross
288+
- build-android
142289
steps:
143290
- name: Checkout
144291
uses: actions/checkout@v4
145292

146293
- uses: actions/download-artifact@v4
147294
with:
148-
name: ${{ matrix.name }}
149-
path: ${{ matrix.path }}
295+
name: macOS-universal
296+
path: osu.Framework.NativeLibs/runtimes/osx/native
297+
- uses: actions/download-artifact@v4
298+
with:
299+
name: iOS-xcframework
300+
path: osu.Framework.iOS/runtimes/ios/native
301+
- uses: actions/download-artifact@v4
302+
with:
303+
name: linux-arm64
304+
path: osu.Framework.NativeLibs/runtimes/linux-x64/native
305+
- uses: actions/download-artifact@v4
306+
with:
307+
name: linux-arm
308+
path: osu.Framework.NativeLibs/runtimes/linux-x64/native
309+
- uses: actions/download-artifact@v4
310+
with:
311+
name: linux-x64
312+
path: osu.Framework.NativeLibs/runtimes/linux-x64/native
313+
- uses: actions/download-artifact@v4
314+
with:
315+
name: linux-x86
316+
path: osu.Framework.NativeLibs/runtimes/linux-x64/native
317+
- uses: actions/download-artifact@v4
318+
with:
319+
name: win-arm64
320+
path: osu.Framework.NativeLibs/runtimes/win-arm64/native
321+
- uses: actions/download-artifact@v4
322+
with:
323+
name: win-x64
324+
path: osu.Framework.NativeLibs/runtimes/win-x64/native
325+
- uses: actions/download-artifact@v4
326+
with:
327+
name: win-x86
328+
path: osu.Framework.NativeLibs/runtimes/win-x86/native
329+
- uses: actions/download-artifact@v4
330+
with:
331+
name: android-armeabi-v7a
332+
path: osu.Framework.Android/armeabi-v7a
333+
- uses: actions/download-artifact@v4
334+
with:
335+
name: android-arm64-v8a
336+
path: osu.Framework.Android/arm64-v8a
337+
- uses: actions/download-artifact@v4
338+
with:
339+
name: android-x86
340+
path: osu.Framework.Android/x86
341+
- uses: actions/download-artifact@v4
342+
with:
343+
name: android-x86_64
344+
path: osu.Framework.Android/x86_64
150345

151346
- uses: peter-evans/create-pull-request@v6
152347
with:

.gitignore

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,15 @@ fabric.properties
308308
# Reference: https://github.com/JetBrains/resharper-rider-samples/blob/master/.gitignore
309309

310310
# User specific
311-
**/.idea/**/workspace.xml
312-
**/.idea/**/tasks.xml
313-
**/.idea/shelf/*
314-
**/.idea/dictionaries
315311
**/.idea/httpRequests/
316312
**/.idea/**/usage.statistics.xml
313+
**/.idea/**/workspace.xml
314+
.idea/**/tasks.xml
315+
.idea/**/usage.statistics.xml
316+
.idea/**/dictionaries
317+
.idea/**/shelf
318+
.idea/*/.idea/projectSettingsUpdater.xml
319+
.idea/*/.idea/encodings.xml
317320

318321
# Sensitive or high-churn files
319322
**/.idea/**/dataSources/
@@ -339,3 +342,8 @@ inspectcode
339342

340343
.idea/.idea.osu-framework.Desktop/.idea/misc.xml
341344
.idea/.idea.osu-framework.Android/.idea/deploymentTargetDropDown.xml
345+
346+
# NativeLibs build folders and tarballs
347+
osu.Framework.NativeLibs/scripts/ffmpeg/*/
348+
osu.Framework.NativeLibs/scripts/ffmpeg/*.tar.gz
349+

.idea/.idea.osu-framework.Android/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/.idea.osu-framework.Desktop/.idea/encodings.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.idea/.idea.osu-framework.Desktop/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/.idea.osu-framework.iOS/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

.idea/.idea.osu-framework/.idea/projectSettingsUpdater.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

CodeAnalysis/BannedSymbols.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ M:System.Object.Equals(System.Object,System.Object)~System.Boolean;Don't use obj
22
M:System.Object.Equals(System.Object)~System.Boolean;Don't use object.Equals. Use IEquatable<T> or EqualityComparer<T>.Default instead.
33
M:System.ValueType.Equals(System.Object)~System.Boolean;Don't use object.Equals(Fallbacks to ValueType). Use IEquatable<T> or EqualityComparer<T>.Default instead.
44
T:System.IComparable;Don't use non-generic IComparable. Use generic version instead.
5-
M:System.Enum.HasFlag(System.Enum);Use osu.Framework.Extensions.EnumExtensions.HasFlagFast<T>() instead.
65
F:System.UriKind.RelativeOrAbsolute;Incompatible results when run on mono (see https://www.mono-project.com/docs/faq/known-issues/urikind-relativeorabsolute/). Use Validation.TryParseUri(string, out Uri?) instead.
76
M:System.Threading.Tasks.Task.Wait();Don't use Task.Wait. Use Task.WaitSafely() to ensure we avoid deadlocks.
87
M:System.Guid.#ctor;Probably meaning to use Guid.NewGuid() instead. If actually wanting empty, use Guid.Empty.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ This framework is intended to take steps beyond what you would normally expect f
2727

2828
## Requirements
2929

30-
- A desktop platform with the [.NET 6.0 SDK](https://dotnet.microsoft.com/download).
30+
- A desktop platform with the [.NET 8.0 SDK](https://dotnet.microsoft.com/download).
3131
- When running on linux, please have a system-wide ffmpeg installation available to support video decoding.
32-
- When running on Windows 7 or 8.1, *[additional prerequisites](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60&pivots=os-windows#dependencies)** may be required to correctly run .NET 6 applications if your operating system is not up-to-date with the latest service packs.
32+
- When running on Windows 7 or 8.1, *[additional prerequisites](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60&pivots=os-windows#dependencies)** may be required to correctly run .NET 8 applications if your operating system is not up-to-date with the latest service packs.
3333
- When working with the codebase, we recommend using an IDE with intellisense and syntax highlighting, such as [Visual Studio 2019+](https://visualstudio.microsoft.com/vs/), [Jetbrains Rider](https://www.jetbrains.com/rider/), or [Visual Studio Code](https://code.visualstudio.com/) with the [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) and [C#](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) plugin installed.
3434

3535
### Building

osu-framework.sln.DotSettings

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,4 +999,5 @@ private void load()
999999
<s:Boolean x:Key="/Default/UserDictionary/Words/=filenames/@EntryIndexedValue">True</s:Boolean>
10001000
<s:Boolean x:Key="/Default/UserDictionary/Words/=localisable/@EntryIndexedValue">True</s:Boolean>
10011001
<s:Boolean x:Key="/Default/UserDictionary/Words/=shaders/@EntryIndexedValue">True</s:Boolean>
1002-
<s:Boolean x:Key="/Default/UserDictionary/Words/=Veldrid/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
1002+
<s:Boolean x:Key="/Default/UserDictionary/Words/=Veldrid/@EntryIndexedValue">True</s:Boolean>
1003+
<s:Boolean x:Key="/Default/UserDictionary/Words/=virtualised/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 commit comments

Comments
 (0)