The app I packaged seems to hang during launch with no errors.
It works when run inside flatpak-builder --run build-dir manifest.json sh
using the launch script /app/rimpy-wrapper.sh
:
Launching RimPy
ERROR: ld.so: object 'libpcre.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
(RimPy:4): dbind-WARNING **: 01:07:23.040: Couldn't connect to accessibility bus: Failed to connect to socket /run/user/1000/at-spi/bus_0: No such file or directory
Gtk-Message: 01:07:23.065: Failed to load module "canberra-gtk-module"
Gtk-Message: 01:07:23.065: Failed to load module "pk-gtk-module"
Gtk-Message: 01:07:23.066: Failed to load module "canberra-gtk-module"
Gtk-Message: 01:07:23.066: Failed to load module "pk-gtk-module"
Sandboxing disabled by user.
ERROR: ld.so: object 'libpcre.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libpcre.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object 'libpcre.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
[47:70:0605/010733.116505:ERROR:nss_util.cc(283)] After loading Root Certs, loaded==false: /usr/lib/x86_64-linux-gnu/libnssckbi.so: undefined symbol: C_GetInterface
[47:65:0605/010733.118596:ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -202
js: Uncaught TypeError: Cannot read property 'lastChild' of undefined
js: Uncaught TypeError: Cannot read property 'parentElement' of null
(Any errors/warnings in the output above are normal for this program and it still launches/runs)
After it is packaged, this is the only output when run:
Launching RimPy
ERROR: ld.so: object 'libpcre.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
It just sits on that line, never crashing or continuing.
Here is the manifest.json:
{
"app-id": "io.github.kuuchuu.RimPy",
"runtime": "org.kde.Platform",
"runtime-version": "6.7",
"sdk": "org.kde.Sdk",
"command": "/app/rimpy-wrapper.sh",
"finish-args": [
"--share=network",
"--filesystem=home",
"--filesystem=xdg-config/RimPy Mod Manager:create",
"--filesystem=xdg-data/RimPy:create",
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--share=ipc"
],
"modules": [
{
"name": "rimpy",
"buildsystem": "simple",
"build-commands": [
"mkdir -p /app",
"mv src/* /app",
"install -D io.github.kuuchuu.RimPy.png /app/share/icons/hicolor/256x256/apps/io.github.kuuchuu.RimPy.png",
"install -D rimpy.desktop /app/share/applications/io.github.kuuchuu.RimPy.desktop",
"install -D rimpy-wrapper.sh /app/rimpy-wrapper.sh",
"chmod +x /app/rimpy-wrapper.sh",
"chmod +x /app/RimPy",
"chmod +x /app/RimPy.sh"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/rimpy-custom/RimPy/releases/download/$RIMPYVERSION/RimPy_Linux.tar.gz",
"sha256": "$RIMPYSHA",
"dest": "src",
"strip-components": 0
},
{
"type": "file",
"path": "$WKDIR/io.github.kuuchuu.RimPy.png"
},
{
"type": "file",
"path": "$WKDIR/rimpy.desktop"
},
{
"type": "file",
"path": "$WKDIR/rimpy-wrapper.sh"
}
]
}
]
}
Here is my build.sh:
#!/bin/bash
PAKID="io.github.kuuchuu.RimPy"
cd $PAKID || exit
RIMPYVERSION=$(awk -F '/' '{print $1}' rimpy.version)
RIMPYSHA=$(awk -F '/' '{print $2}' rimpy.version)
WKDIR=$(readlink -f $PAKID | sed 's,/*[^/]\+/*$,,')
JSON=$(sed "s/\$RIMPYVERSION/$RIMPYVERSION/g" < manifest.json | sed "s/\$RIMPYSHA/$RIMPYSHA/g" | sed "s/\\\$WKDIR/$(echo "$WKDIR" | sed 's/\//\\\//g')/g")
echo "$JSON" | flatpak-builder --repo=repo --force-clean build-dir /dev/stdin
flatpak build-bundle repo "rimpy.$RIMPYVERSION.flatpak" io.github.kuuchuu.RimPy
echo -e "\nFlatpak built!"
#rm -rdf .flatpak-builder build-dir repo
echo -e "\nRun \`flatpak install '$PWD/rimpy.$RIMPYVERSION.flatpak'\` to install."
rimpy-wrapper.sh:
#!/bin/sh
echo "RimPy Log: $HOME/.config/RimPy Mod Manager/rimpy.flatpak.log"
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>"$HOME/.config/RimPy Mod Manager/rimpy.flatpak.log" 2>&1
cd /app || exit
echo "Launching RimPy"
exec /app/RimPy.sh
rimpy.version:
1.2.6.29/2c83a0c3446b8391e9ab98bf5e2332e718d0f0fb10e6b0035ffa45b55311a705
temporary rimpy.desktop:
[Desktop Entry]
Version=1.0
Name=RimPy
Comment=A Mod Manager for RimWorld
Exec=/app/rimpy-wrapper.sh
Icon=io.github.kuuchuu.RimPy
Terminal=false
Type=Application
Categories=Game;Utility;
Folder structure:
.
├── build.sh
├── io.github.kuuchuu.RimPy
│ ├── io.github.kuuchuu.RimPy.png
│ ├── manifest.json
│ ├── rimpy-wrapper.sh
│ ├── rimpy.desktop
│ └── rimpy.version
Any help figuring this out would be really appreciated!