mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-03 15:38:54 +02:00
Add KosmicKrisp translation layer for macOS 26+
- Mesa 26.0 introduced KosmicKrisp, a Vulkan-on-Metal translation layer and the eventual successor to MoltenVK
This commit is contained in:
@@ -48,7 +48,7 @@ def get_new_name(
|
||||
return Path(os.path.join(output_directory, input_component))
|
||||
|
||||
def get_archs(dylib_path: Path) -> list[str]:
|
||||
res = subprocess.check_output([LIPO, "-info", str(dylib_path)]).decode("utf-8")
|
||||
res = subprocess.check_output([LIPO, "-info", str(dylib_path.absolute())]).decode("utf-8")
|
||||
if res.startswith("Non-fat file"):
|
||||
return [res.split(":")[-1].strip()]
|
||||
else:
|
||||
|
||||
@@ -18,14 +18,18 @@ mkdir "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||
cp "$PUBLISH_DIRECTORY/Ryujinx" "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
|
||||
chmod u+x "$APP_BUNDLE_DIRECTORY/Contents/MacOS/Ryujinx"
|
||||
|
||||
# List all dylibs in PUBLISH_DIRECTORY
|
||||
ls -la "$PUBLISH_DIRECTORY"/*.dylib
|
||||
|
||||
# Then all libraries
|
||||
cp "$PUBLISH_DIRECTORY"/*.dylib "$APP_BUNDLE_DIRECTORY/Contents/Frameworks"
|
||||
find "$PUBLISH_DIRECTORY" -name "*.dylib" -exec cp {} "$APP_BUNDLE_DIRECTORY/Contents/Frameworks" \;
|
||||
|
||||
# Then resources
|
||||
cp Info.plist "$APP_BUNDLE_DIRECTORY/Contents"
|
||||
cp Ryujinx.icns "$APP_BUNDLE_DIRECTORY/Contents/Resources/Ryujinx.icns"
|
||||
cp updater.sh "$APP_BUNDLE_DIRECTORY/Contents/Resources/updater.sh"
|
||||
cp Assets.car "$APP_BUNDLE_DIRECTORY/Contents/Resources/Assets.car"
|
||||
cp -r vulkan "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||
cp -r "$PUBLISH_DIRECTORY/THIRDPARTY.md" "$APP_BUNDLE_DIRECTORY/Contents/Resources"
|
||||
|
||||
echo -n "APPL????" > "$APP_BUNDLE_DIRECTORY/Contents/PkgInfo"
|
||||
|
||||
@@ -47,7 +47,7 @@ EXECUTABLE_SUB_PATH=Contents/MacOS/Ryujinx
|
||||
rm -rf "$TEMP_DIRECTORY"
|
||||
mkdir -p "$TEMP_DIRECTORY"
|
||||
|
||||
DOTNET_COMMON_ARGS=(-p:DebugType=embedded -p:Version="$VERSION" -p:SourceRevisionId="$SOURCE_REVISION_ID" --self-contained true $EXTRA_ARGS)
|
||||
DOTNET_COMMON_ARGS=(-p:DebugType=embedded -p:Version="$VERSION" -p:SourceRevisionId="$SOURCE_REVISION_ID" -p:UseSharedCompilation=false --self-contained true $EXTRA_ARGS)
|
||||
|
||||
dotnet restore
|
||||
dotnet build -c "$CONFIGURATION" src/Ryujinx
|
||||
@@ -76,6 +76,9 @@ rm "$UNIVERSAL_APP_BUNDLE/$EXECUTABLE_SUB_PATH"
|
||||
# Make it libraries universal
|
||||
python3 "$BASE_DIR/distribution/macos/construct_universal_dylib.py" "$ARM64_APP_BUNDLE" "$X64_APP_BUNDLE" "$UNIVERSAL_APP_BUNDLE" "**/*.dylib"
|
||||
|
||||
# Copy arm64-only libraries to UNIVERSAL_APP_BUNDLE
|
||||
cp "$ARM64_APP_BUNDLE/Contents/Frameworks/libvulkan_kosmickrisp.dylib" "$UNIVERSAL_APP_BUNDLE/Contents/Frameworks/libvulkan_kosmickrisp.dylib"
|
||||
|
||||
if ! [ -x "$(command -v lipo)" ];
|
||||
then
|
||||
if ! [ -x "$(command -v llvm-lipo-17)" ];
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"file_format_version" : "1.0.0",
|
||||
"ICD": {
|
||||
"library_path": "../../../Frameworks/libMoltenVK.dylib",
|
||||
"api_version" : "1.4.0",
|
||||
"is_portability_driver" : true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"ICD": {
|
||||
"api_version": "1.3.0",
|
||||
"library_path": "../../../Frameworks/libvulkan_kosmickrisp.dylib"
|
||||
},
|
||||
"file_format_version": "1.0.1"
|
||||
}
|
||||
Reference in New Issue
Block a user