No way to export to any format: empty combobox, no "export handler" from comand line

Hi all,

A bit of context first: Tiled version 1.2.1 under Ubuntu 19.04

My issue: it’s the first time I’m using Tiled, and I want to export my map in json format. But I can’t. If I want to do it from the interface, I have no choice in the format selection combobox but “tiled format”, nothing more. If I try from the command line with

tiled --export-map test.tmx test.json

I got an error message (I translate it from french) : “no export handler found for the target”
If I try :

tiled --export-map json test.tmx test.json

I got : “unrecognized format”

And :
tiled --export-formats

gives :
format for map export: tmx
format for tileset export : tsx

that’s all. So I wonder if I’m doing something in the wrong way, if I need some kind of plugin (in that case, how and where to got it) or is something to report as a bug ?

Thanks a lot
Patrice

Hmm, how did you install Tiled?

Can you go into Edit > Preferences… > Plugins and see if any plugins are listed there? The JSON format would be provided by a libjson.so.

Hi

Here the answers you need :

  • I installed tiled through an ‘apt install tiled’ command
  • the plugin list is all empty. I’m not in front of my pc right now (time to sleep here in France :)) so I will confirm it tomorrow.

I can provide a list of what has been installed by the packet manager if you need : do libjson a third party lib that tiled depends on ? Or should it be part of tiled and therefore should be installed with it ?

Hi,

Today at the office I made a test under Ubuntu 16.04, and instaled tiled : apt install tiled
It instal Tiled version 0.14.2 (?). I can export to many format, as expected, but there is no plugin sub menu in edit -> preference… strange

Also, the --export-formats command list many format.

So, I hope it helps, maybe the it’s an issue in the deb package in Ubuntu 19 ? Or, since I made some test with various json solutions few weeks ago there is a conflict …

It’s not a sub-menu, but one of the tabs in the Preferences dialog.

The Tiled package depends on the libtiled package, which does include the plugin files. But these plugin files are not in a directory that is searched for plugins, so indeed the packaging is broken.

The last Ubuntu Tiled package where plugins worked seems to be Tiled 1.0.3 in Bionic, where the plugins were still in /usr/lib/tiled/plugins, which is where Tiled installs them by default. I’m not sure when the additional x86_64-linux-gnu directory is introduced, or whether this is something I should fix or the packager should fix. But the problem should be reported to the package maintainer, who can contact me if something needs to change about Tiled to make the setup work.

Do you want me to report this to Ubuntu/bugs or do you take care of this ?

About sub menu, you’re right, I was thinking of tab : and there is no “plugin” tab with Tiled in my ubuntu 16.04. At home, with Ubuntu 19, tab exists but is empty (this is consistent with plugins in directory x86_64.... and Tiled that do not look inside them)

I’ve reported the bug now, see https://bugs.launchpad.net/ubuntu/+source/tiled-qt/+bug/1831557.

Ah, that’s because Ubuntu 16.04 ships with Tiled 0.14.2, whereas the support for choosing which plugins are enabled was introduced in Tiled 0.15.

Btw, you should be able to create a symlink to the plugins directory to make Tiled find them:

sudo mkdir /usr/lib/tiled
sudo ln -s /usr/lib/x86_64-linux-gnu/tiled/plugins /usr/lib/tiled

But of course, such a link may cause problems when the package is fixed.

Good.

I created the symlink yesterday, and it works fine, plugins are found and I got json.

Thank you for the help, we just have now to wait for the fix.

Patrice