Help with QXmlEdit Snap build

Hi! I am trying to build a snap for QXmlEdit. The build seems to work OK but I cannot run the snap after installing it. I get the error:

/snap/qxmledit/x7/bin/desktop-launch: line 461: /snap/qxmledit/x7/usr/bin/qxmledit: No such file or directory

I believe this is because the files from the build are not ending up in the correct place. The binary qxmledit is in /opt/qxmledit/ along with the .desktop .appdata.xml and .pdf files to name a few.

QXmlEdit has environmental variables that can be set to tell it where to put the files but I cannot seem to figure out how to set these before a build.

Any tips on how to make this work would be appreciated!

Github repo of snap (so far): frederickjh/qxmledit

It is building locally now. The first few attempts to build via have failed.

QXmlEdit Icon shows correctly in Unity 7 on 16.04 in the taskbar and when spreading windows in the QXmlEdit window’s bottom right-hand corner. In the Unity Launcher it shows a grey icon with a question mark. Dash shows a blank sheet of paper with the upper right-hand corner turned down.

Any tips on how to fix this would be appreciated. I see that the GIMP snap and the Mattermost snap appear to be using sed in override-build: to set the path to the icon in the .desktop file. Is this what is needed to fix this?

My previous attempts to use override-build: have been unsuccessful, in that the build seems to not happen. I am using qmake. When I do something like this and run snapcraft it runs through without errors but the build does not seem to run as the files don’t end up where they should if I don’t use override-build:.

override-build: |
   snapcraftctl build