Package Details: ldtk-bin 1.5.3-3

Git Clone URL: https://aur.archlinux.org/ldtk-bin.git (read-only, click to copy)
Package Base: ldtk-bin
Description: Modern and efficient 2D level editor with a strong focus on user-friendliness
Upstream URL: https://ldtk.io/
Keywords: 2d development editor gamedev
Licenses: MIT
Conflicts: ldtk
Provides: ldtk
Submitter: zxp19821005
Maintainer: zxp19821005
Last Packager: zxp19821005
Votes: 1
Popularity: 0.000003
First Submitted: 2024-03-15 01:35 (UTC)
Last Updated: 2024-07-12 09:59 (UTC)

Dependencies (4)

Required by (0)

Sources (3)

Latest Comments

zxp19821005 commented on 2025-01-21 01:56 (UTC)

@icarito Maybe you can see this: https://github.com/deepnight/ldtk/blob/72c75f1abfdc28f58522b858c6a69fe4af6a9522/app/package.json#L40 The upstream built it using electron24

icarito commented on 2025-01-20 19:47 (UTC) (edited on 2025-01-20 19:48 (UTC) by icarito)

I built this with Electron 28:

# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=ldtk-bin
_pkgname=LDtk
pkgver=1.5.3
_electronversion=28
pkgrel=3
pkgdesc="Modern and efficient 2D level editor with a strong focus on user-friendliness"
arch=('x86_64')
url="https://ldtk.io/"
_ghurl="https://github.com/deepnight/ldtk"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    "electron${_electronversion}"
    'libdbusmenu-glib'
)
makedepends=(
    'fuse2'
    'asar'
)
source=(
    "${pkgname%-bin}-${pkgver}.zip::${_ghurl}/releases/download/v${pkgver}/ubuntu-distribution.zip"
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/deepnight/ldtk/v${pkgver}/LICENSE"
    "${pkgname%-bin}.sh"
)
sha256sums=('8bb1c870ab35d2cadfbf08a119d3049e7986a2a80558d2610babc67fcd502566'
            'f409a37a40e823efefddac3140d991141633d4db3cec4f8667bc23b846dcc335'
            '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
build() {
    sed -e "s|@electronversion@|${_electronversion}|g" \
          -e "s|@appname@|${pkgname%-bin}|g" \
          -e "s|@runname@|app.asar|g" \
          -e "s|@cfgdirname@|${_pkgname}|g" \
          -e "s|@options@|levelIndex=1|g" \
          -i "${srcdir}/${pkgname%-bin}.sh"
    mv "${srcdir}/${_pkgname} ${pkgver} installer.AppImage" "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
    chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
    "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
    sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
    find "${srcdir}/squashfs-root/" -type d -exec chmod 755 {} \;
    asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked"
    sed "s|misc_JsTools.getExeDir()|\"\/usr\/lib\/${pkgname%-bin}\"|g" -i "${srcdir}/app.asar.unpacked/assets/js/renderer.js"
    asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
    cp -r "${srcdir}/squashfs-root/extraFiles" "${pkgdir}/usr/lib/${pkgname%-bin}"
    install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
    for _icons in 16x16 32x32 48x48 64x64 128x128 256x256 512x512;do
      install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
        -t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
    done
    install -Dm644 "${srcdir}/squashfs-root/usr/share/mime/${pkgname%-bin}.xml" -t "${pkgdir}/usr/share/mime"
    install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

zxp19821005 commented on 2024-04-22 04:17 (UTC)

@atomicptr Thanks for your feedback,it's my mistake,fixed it.

atomicptr commented on 2024-04-21 12:38 (UTC)

This does not work for me and just crashes on start

[92113:0421/143118.548969:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Error launching app
Unable to find Electron app at /usr/lib/ldtk/app

Cannot find module '/usr/lib/ldtk/app'
Require stack:
- /usr/lib/electron24/resources/default_app.asar/main.js
- 

The .AppImage file (if I download it myself) does work fine though