GreemDev / Ryujinx

Experimental Switch emulator written in C#
MIT License
4.15k stars 313 forks source link

[Bug] Issue with Ryujinx.xml mime file application #205

Open coreybruce opened 2 hours ago

coreybruce commented 2 hours ago

Description of the issue

Hi there I was trying to create a AUR package for the Ryujinx-bin package using the binaries but I am having a issue with the Ryujinx.xml mime file, when I try and run the application I get this error

Failure processing application bundle; possible file corruption.
Arithmetic overflow while reading bundle.
A fatal error occurred while processing application bundle

My package put the file in /usr/share/mime/packages/Ryujinx.xml

Would you have any idea what is happening or if I did anything wrong with packaging?

Reproduction steps

N/A

Log file

N/A

OS

LInux

Ryujinx version

1.2.72

Game version

No response

CPU

No response

GPU

No response

RAM

No response

List of applied mods

No response

Additional context?

No response

GreemDev commented 2 hours ago

It's likely something from your own packaging. I know people use the AUR and I haven't heard of this.

coreybruce commented 2 hours ago

It's likely something from your own packaging. I know people use the AUR and I haven't heard of this.

Hmm alright well I like to tackle challenges, maybe we could hopefully work this out together :smile: :stuck_out_tongue:

Here is my PKGBUILD file, as you can see it downloads the binaries for each architecture from your repositoryand put them where they need to go. Does anything on this look incorrect?

pkgname=ryujinx-bin
pkgver=1.2.72
pkgrel=1
pkgdesc='Experimental Nintendo Switch Emulator written in C#'
arch=('x86_64' 'aarch64')
url='https://github.com/GreemDev/Ryujinx'
license=('MIT')
depends=('sdl2' 'openal')
conflicts=(ryujinx ryujinx-git)
sha256sums=('a19dc6e539931df63d4813f787c51f460cf72e0c44b20add1c0c6ef56c47d840'
            '59af0efa6989f9aee9c120a0ac8d12a162c29097993f7280f4f51389d3deabb5'
            '0a12333b3b648a8c60ed165507c4da5a32fdd43a4013824818288a7848585da3')
sha256sums_x86_64=('bd2b2f35227e38db6aa37a3d99d3d8d2698ff775441f9abd6bd86ad9ee72282f'
                   '1128ade03525b474de3c9311a3494fdc0d0953c3fcce9ceb1fc4ae6d801ad9d7')
sha256sums_aarch64=('b700e046679e45dfb922b4b72f2a9a00fe711a8208f273bdef3a4d82c2715974'
                    '41f6c0003c5eb653449a68d87659fc4e80ea758b9eb5a29af6e19184b909ba19')
source=("Ryujinx.desktop" "Ryujinx.svg")
source_x86_64=("$url/releases/download/$pkgver/ryujinx-$pkgver-linux_x64.tar.gz" "$url/releases/download/$pkgver/sdl2-ryujinx-headless-$pkgver-linux_x64.tar.gz")
source_aarch64=("$url/releases/download/$pkgver/ryujinx-$pkgver-linux_arm64.tar.gz" "$url/releases/download/$pkgver/sdl2-ryujinx-headless-$pkgver-linux_arm64.tar.gz")

package() {

mkdir --parents "${pkgdir}/opt"
    cp --recursive "${srcdir}/publish" "${pkgdir}/opt/ryujinx"
    chmod +x "${pkgdir}/opt/ryujinx/Ryujinx"

    # create writable logs directory
    install --directory --mode=777 "${pkgdir}/opt/ryujinx/Logs"

    mkdir --parents "${pkgdir}/usr/bin"
    ln --symbolic "/opt/ryujinx/Ryujinx" "${pkgdir}/usr/bin/Ryujinx"
    ln --symbolic "/opt/ryujinx/Ryujinx.sh" "${pkgdir}/usr/bin/Ryujinx.sh"

    install -Dm644 "${srcdir}/Ryujinx.desktop" "${pkgdir}/usr/share/applications/Ryujinx.desktop"
    install -Dm644 "${srcdir}/Ryujinx.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/Ryujinx.svg"
    install -Dm644 "${srcdir}/Ryujinx.xml" "${pkgdir}/usr/share/mime/packages/Ryujinx.xml"
}
GreemDev commented 2 hours ago

Frankly I don't know what any of this does.

coreybruce commented 1 hour ago

Oh ok no problem, basically it download the zipped binaries from your repo, unzips it and puts all the files into the locations needed in Linux. Do you do any testing or work on Linux yourself at all or could tell me if those paths are correct?

This is the Ryujynx.xml file in /usr/share/mime/packages/

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="application/x-nx-nca">
        <comment>Nintendo Content Archive</comment>
        <acronym>NCA</acronym>
        <glob pattern="*.nca"/>
        <magic><match value="NCA" type="string" offset="512"/></magic>
    </mime-type>
    <mime-type type="application/x-nx-nro">
        <comment>Nintendo Relocatable Object</comment>
        <acronym>NRO</acronym>
        <glob pattern="*.nro"/>
        <magic><match value="NRO0" type="string" offset="16"/></magic>
    </mime-type>
    <mime-type type="application/x-nx-nso">
        <comment>Nintendo Shared Object</comment>
        <acronym>NSO</acronym>
        <glob pattern="*.nso"/>
        <magic><match value="NSO0" type="string" offset="0"/></magic>
    </mime-type>
    <mime-type type="application/x-nx-nsp">
        <comment>Nintendo Submission Package</comment>
        <acronym>NSP</acronym>
        <glob pattern="*.nsp"/>
        <magic><match value="PFS0" type="string" offset="0"/></magic>
    </mime-type>
    <mime-type type="application/x-nx-xci">
        <comment>Nintendo Switch Cartridge</comment>
        <acronym>XCI</acronym>
        <glob pattern="*.xci"/>
        <magic><match value="HEAD" type="string" offset="4352"/></magic>
    </mime-type>
</mime-info>
GreemDev commented 1 hour ago

I do absolutely 0 work on Linux. Any Linux/macOS testing is done by everyone else. I can only do the bare minimum and check if it boots under Linux via WSL.

The XML file seems to match the one here, so it should be fine.

coreybruce commented 1 hour ago

Ah ok that's all good, I understand, on that unrelated note of things working and booting it does run on the Raspberry Pi 5 even if the hardware doesn't technically have the ability to properly run Switch games but I managed to boot a game on it :smile:

Is there anyone who works on this that has any Linux and knowledge to help? if it matches the file then I don't know why it's working unless there is something else the package needs to do to work as that would be great to figure out.