{
 "app_id": "org.onlyoffice.desktopeditors",
 "source_url": "https://raw.githubusercontent.com/flathub/org.onlyoffice.desktopeditors/master/org.onlyoffice.desktopeditors.json",
 "runtime": "org.freedesktop.Platform",
 "runtime_version": "25.08",
 "sdk": "org.freedesktop.Sdk",
 "finish_args": [
  "--share=network",
  "--share=ipc",
  "--socket=x11",
  "--socket=wayland",
  "--socket=pulseaudio",
  "--device=dri",
  "--filesystem=/tmp",
  "--filesystem=xdg-run/gvfsd",
  "--filesystem=~/.local/share/gtk-3.0",
  "--filesystem=host",
  "--filesystem=xdg-run/gvfs",
  "--talk-name=org.gtk.vfs.*"
 ],
 "module_count": 1,
 "fetched_at": "2026-09-17T16:16:10.199463+00:00",
 "manifest": {
  "app-id": "org.onlyoffice.desktopeditors",
  "base": "org.electronjs.Electron2.BaseApp",
  "base-version": "25.08",
  "runtime": "org.freedesktop.Platform",
  "runtime-version": "25.08",
  "sdk": "org.freedesktop.Sdk",
  "command": "desktopeditors",
  "separate-locales": false,
  "finish-args": [
   "--share=ipc",
   "--socket=x11",
   "--socket=wayland",
   "--socket=pulseaudio",
   "--share=network",
   "--filesystem=host",
   "--filesystem=~/.local/share/gtk-3.0",
   "--filesystem=/tmp",
   "--filesystem=xdg-run/gvfs",
   "--filesystem=xdg-run/gvfsd",
   "--talk-name=org.gtk.vfs.*",
   "--env=LC_ALL=C.UTF-8",
   "--device=dri"
  ],
  "modules": [
   {
    "name": "desktopeditors",
    "buildsystem": "simple",
    "build-commands": [
     "install -Dm755 desktop-editors /app/bin/desktopeditors",
     "cp /usr/bin/ar /app/bin",
     "mkdir -p /app/bin/opt/onlyoffice",
     "mv opt/onlyoffice/desktopeditors /app/bin/opt/onlyoffice/desktopeditors",
     "ARCH_TRIPLE=$(gcc --print-multiarch) && cp /usr/lib/${ARCH_TRIPLE}/libbfd-*.so /app/lib",
     "install -Dm755 org.onlyoffice.desktopeditors.metainfo.xml /app/share/metainfo/org.onlyoffice.desktopeditors.metainfo.xml",
     "mkdir -p /app/share/applications",
     "sed 's|Icon=.*|Icon=org.onlyoffice.desktopeditors|;' usr/share/applications/onlyoffice-desktopeditors.desktop > /app/share/applications/org.onlyoffice.desktopeditors.desktop",
     "sed -i -e 's|Exec=/usr/bin/onlyoffice-|Exec=|;' /app/share/applications/org.onlyoffice.desktopeditors.desktop",
     "echo \"package = flatpak\" > /app/bin/opt/onlyoffice/desktopeditors/converter/package.config",
     "for icon_size in 16 24 32 48 64 128 256; do install -Dm644 usr/share/icons/hicolor/${icon_size}x${icon_size}/apps/onlyoffice-desktopeditors.png /app/share/icons/hicolor/${icon_size}x${icon_size}/apps/org.onlyoffice.desktopeditors.png; done"
    ],
    "sources": [
     {
      "type": "archive",
      "only-arches": [
       "x86_64"
      ],
      "url": "http://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors-9.4.0-x64.tar.xz",
      "sha256": "d054d35f6c11274755cdad32683e8238f886420756c6cdcbf68c3b89ea66675c",
      "strip-components": 0
     },
     {
      "type": "archive",
      "only-arches": [
       "aarch64"
      ],
      "url": "http://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors-9.4.0-aarch64.tar.xz",
      "sha256": "3cc3676643bc79717fc3b5de3a1a7ebf27c085573b030295a7af46a39a6f676f",
      "strip-components": 0
     },
     {
      "type": "script",
      "dest-filename": "desktop-editors",
      "commands": [
       "export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH",
       "export CUSTOM_FONTS_PATH=/run/host/usr/local/share/fonts",
       "cd /app/bin/opt/onlyoffice/desktopeditors/",
       "exec ./DesktopEditors \"$@\""
      ]
     },
     {
      "type": "file",
      "path": "org.onlyoffice.desktopeditors.metainfo.xml"
     }
    ]
   }
  ]
 }
}