Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong executable in .desktop #1291

Closed
dperetti opened this issue Feb 22, 2017 · 23 comments · May be fixed by qcif/data-curator#563
Closed

wrong executable in .desktop #1291

dperetti opened this issue Feb 22, 2017 · 23 comments · May be fixed by qcif/data-curator#563

Comments

@dperetti
Copy link

dperetti commented Feb 22, 2017

13.11.1

Linux deb

If find this :
Exec="/opt/CodeStory/codestory"

But my executable is CodeStory.

I set this in my electron-builder.yml.

executableName: 'CodeStory'
@develar
Copy link
Member

develar commented Feb 22, 2017

Is executable app file also named as codestory?

@dperetti
Copy link
Author

No, precisely it's CodeStory and the correct exec should be:

Exec="/opt/CodeStory/CodeStory"

@develar
Copy link
Member

develar commented Feb 22, 2017

executableName always is lowercased. Do you want "DO NOT touch my option" and force it to be exactly as specified with uppercased chars?

develar added a commit to develar/electron-builder that referenced this issue Feb 23, 2017
develar added a commit to develar/electron-builder that referenced this issue Feb 23, 2017
@develar
Copy link
Member

develar commented Feb 23, 2017

I cannot reproduce — codestory is used in the deb. But you want CodeStory, right?

@dperetti
Copy link
Author

Actually I would even prefer "Code Story", which works on Windows. But I wanted to put another possible issue aside
I'm using a prebuilt app directory. Whatever the name of my electron app living inside, I should be able to specify it in the config and get it to work. Maybe I'm just confused with the documentation but I made multiple attempts with different combinations and something was always wrong in the end.
I'll try to narrow down the issue a bit further and I'll let you know.
Thanks !

@develar
Copy link
Member

develar commented Feb 23, 2017

Code Story contradicts to linux conventions

I'm using a prebuilt app directory
I should be able to specify it in the config and get it to work

Yes, in case of prebuilt app directory we must use executableName and convert it to correct value according to target (i.e. lowercase).

@dperetti
Copy link
Author

It's an app, not a unix command. In Ubuntu, apps are called "LibreOffice Writer", "LibreOffice Calc", etc.
Actually I have Code Story, but also other variants : Code Story DEMO, Code Story READER.
I should be able to use this on Linux !
I don't think we should need to use executableName if productName is correctly set.
This is probably related, but I just tried to build an AppImage with the productName set to "Code Story" (which is the exact name of my electron app in the pre-built folder).
The build is successful, but when I run it is says (sorry it's french!) :

/tmp/.mount_Rzpxw0/AppRun: ligne 56: /tmp/.mount_Rzpxw0/usr/bin/codestory: Aucun fichier ou dossier de ce type

So apparently Code Story it was automatically converted to codestory. Why not, but then the executable should be renamed as well I guess.

@develar
Copy link
Member

develar commented Feb 23, 2017

Ok. So, you worry only about product name. Error is clear — you build app using electron-packager and your app name is Code Story But electron-builder expect it as codestory (as electron-builder packs and as it should be according to linux conventions). So, executableName must be taken in account for prepackaged app.

@dperetti
Copy link
Author

I'm fine with electron-builder renaming the executable internally as long as it does it in a way that doesn't brake anything :-)

@dperetti
Copy link
Author

BTW, if I set executableName to "codestory", it doesn't change anything and I get the exact same error.

@develar
Copy link
Member

develar commented Feb 23, 2017

Will be fixed in 2 days. As workaround, you can currently or use electron-builder to pack, or rename executable manually before build.

@dperetti
Copy link
Author

That's weird, even though I renamed my executable manually to codestory, I still get the same error.
How can I read the content of the AppImage to figure out ?
I tried this :

./appimagetool-x86_64.AppImage -l codestory-1.0.4-x86_64.AppImage 
This doesn't look like a squashfs image.
sqfs_open_image error

@develar
Copy link
Member

develar commented Feb 23, 2017

How can I read the content of the AppImage to figure out ?

Using any "normal" unarchiver. e.g. http://www.iunarchive.com

@dperetti
Copy link
Author

well, just ark > 16.0.8 apparently AppImage/AppImageKit#173

@dperetti
Copy link
Author

Isn't supposed the --appimage-extract option to extract the content of the AppImage ?
It works when I do : appimagetool-x86_64.AppImage --appimage-extract. I get a bunch of files in the console and also a full squashfs-root folder.
But with my codestory Appimage, nothing, just this :

./codestory-1.0.4-x86_64.AppImage --appimage-extract
installed: X-AppImage-BuildId=617b5240-f9a9-11a6-32f4-0dfe4513412d image: X-AppImage-BuildId=617b5240-f9a9-11a6-32f4-0dfe4513412d
/tmp/.mount_QhIfHt/AppRun: ligne 58: /tmp/.mount_QhIfHt/usr/bin/codestory: Aucun fichier ou dossier de ce type

@develar
Copy link
Member

develar commented Feb 23, 2017

sudo mount file.AppImage /mnt?

@dperetti
Copy link
Author

thanks ! I could figure out that I probably did a mistake somewhere. Using "codestory" everywhere definitely works.

@dperetti
Copy link
Author

Of course, you'll just need to make sure the full real name (with spaces if any) is set in the .desktop file.

@dperetti
Copy link
Author

Another way to this : when using a prebuilt app, any key from package.json should be overridable.
In my case, what really blocks me is the fact that the name is taken from package.json and cannot be overridden in the builder config.

@develar
Copy link
Member

develar commented Feb 24, 2017

It cannot be overridden because in this case we must modify packed package.json — but as you don't use electron-builder to pack, it is not possible.

@dperetti
Copy link
Author

I don't get it. I think it should be the exact opposite : since I'm using a prebuilt app, I should be able package it without relying on package.json, just using the config. This step should even be electron-agnostic.

@develar
Copy link
Member

develar commented Feb 24, 2017

To set application name, you can use productName in the config.

@develar
Copy link
Member

develar commented Feb 24, 2017

14.3.0 — executableName is used as is. Not lowercased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants