Tmxrasterizer fails to start on OSX


(srdjan_markovich) #1

I am not able to use tmxrasterizer on OSX.
On run, I am getting the following message:

This application failed to start because it could not find or load the Qt platform plugin "cocoa"
in “”.

Available platform plugins are: cocoa.

Reinstalling the application may fix this problem.


OSX 10.11.6
Tiled 0.16.2


(Thorbjørn Lindeijer) #2

Hmm, it is working fine here:

MacMini:tiled bjorn$ /Applications/Tiled.app/Contents/MacOS/Tiled --version
Tiled 0.16.2
MacMini:tiled bjorn$ /Applications/Tiled.app/Contents/MacOS/tmxrasterizer 
Usage:
  tmxrasterizer [options] [input file] [output file]

Options:
  -h --help               : Display this help
  -v --version            : Display the version
  -s --scale SCALE        : The scale of the output image (default: 1)
  -t --tilesize SIZE      : The requested size in pixels at which a tile is rendered
                            Overrides the --scale option
  -a --anti-aliasing      : Smooth the output image using anti-aliasing
     --ignore-visibility  : Ignore all layer visibility flags in the map file, and render all
                            layers in the output (default is to omit invisible layers)
     --hide-layer         : Specifies a layer to omit from the output image
                            Can be repeated to hide multiple layers

MacMini:tiled bjorn$ otool -L /Applications/Tiled.app/Contents/MacOS/tmxrasterizer 
/Applications/Tiled.app/Contents/MacOS/tmxrasterizer:
	@executable_path/../Frameworks/libtiled.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.1)
	@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.1)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

Also the Tiled.app includes Contents/PlugIns/platforms/libqcocoa.dylib, which should be the thing you’re somehow missing.

I’m on OS X 10.11.5, but I doubt that’ll make a difference. Can you expect your installation a little to see if you can find anything odd?

Is anybody else reading this on OS X who could check whether tmxrasterizer works for him?


(srdjan_markovich) #3

I’ll do that and I’ll send you what I’ve noticed.

Thank you


(srdjan_markovich) #4

Still no luck…

I have this file…

And this output looks the same as yours:

srdjan@gizmos-imac:~$ otool -L /Applications/Tiled.app/Contents/MacOS/tmxrasterizer 
/Applications/Tiled.app/Contents/MacOS/tmxrasterizer:
	@executable_path/../Frameworks/libtiled.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	@executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.6.0, current version 5.6.1)
	@executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.6.0, current version 5.6.1)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)

(Thorbjørn Lindeijer) #5

Thanks for trying! Unfortunately, I have no idea for now of what could be the problem here. :confused:

If you really need to get this tool to work now, I would suggest you try compiling Tiled yourself. It could be the easiest to use Homebrew to install Qt (you can follow the compile instructions in the Tiled README.md).


(srdjan_markovich) #6

I’ve compiled it but that error pops again.

Anyone else on this list willing to test if tmxrasterizer works on his osx machine?