Vscodium: AppImage binary support

Created on 5 Apr 2019  路  29Comments  路  Source: VSCodium/vscodium

I tried to build VSCodium AppImage from deb binary package by myself, but no avail (Suppose I'm missing something).

Would like to have an official AppImage build here, I'll gladly help to use it for daily basis.

help wanted

Most helpful comment

Since this project already gets built on Travis CI it might be best to run it through linuxdeployqt like shown in https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci to produce AppImages. What does @stripedpajamas think?

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions
  • Can be listed in the AppImageHub central directory of available AppImages
  • Can double as a self-extracting compressed archive with the --appimage-extract parameter
  • No repositories needed. Suitable/optimized for air-gapped (offline) machines

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

All 29 comments

@probonopd Have you known this before? This is VS Code binary without Microsoft proprietary things.

Since this project already gets built on Travis CI it might be best to run it through linuxdeployqt like shown in https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci to produce AppImages. What does @stripedpajamas think?

Providing an AppImage would have, among others, these advantages:

  • Applications packaged as an AppImage can run on many distributions (including Ubuntu, Fedora, openSUSE, CentOS, elementaryOS, Linux Mint, and others)
  • One app = one file = super simple for users: just download one AppImage file, make it executable, and run
  • No unpacking or installation necessary
  • No root needed
  • No system libraries changed
  • Works out of the box, no installation of runtimes needed
  • Optional desktop integration with appimaged
  • Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate
  • Can optionally GPG2-sign your AppImages (inside the file)
  • Works on Live ISOs
  • Can use the same AppImages when dual-booting multiple distributions
  • Can be listed in the AppImageHub central directory of available AppImages
  • Can double as a self-extracting compressed archive with the --appimage-extract parameter
  • No repositories needed. Suitable/optimized for air-gapped (offline) machines

Here is an overview of projects that are already distributing upstream-provided, official AppImages.

If you have questions, AppImage developers are on #AppImage on irc.freenode.net.

+1

Thanks for the info @probonopd! Currently I believe Microsoft does not provide AppImages of their build of vscode, but it does sound like it would be a great thing for VSCodium to provide. They have recently started providing snap packages, so my goal would be to first support VSCodium in the snap format and then, if it is feasible, to support VSCodium in AppImage format. Any help toward either end is welcome.

Consider it done 馃挴

On a deb-based system, e.g., as part of your Travis CI build, run

wget -c "https://github.com/AppImage/pkg2appimage/raw/master/pkg2appimage"
bash -ex pkg2appimage VSCodium

This will convert the deb into an AppImage.

Here is the recipe:
https://github.com/AppImage/pkg2appimage/blob/master/recipes/VSCodium.yml

If you want to make the AppImage generation part of your Travis CI build, you should store a local copy of the recipe and change

https://github.com/AppImage/pkg2appimage/blob/c7ed83bb539358f25c4a3cd0d10017ebf2ce9f9a/recipes/VSCodium.yml#L20-L21

to

cp vscode/.build/linux/deb/amd64/deb/*.deb . so that the deb does not get downloaded, but the one from the currently running Travis CI job is used.

To use the local recipe, invoke pkg2appimage slightly differently:

bash -ex pkg2appimage ./local/path/to/VSCodium.yml

Wow thanks so much @probonopd

I will work on getting this into Travis.

馃帀 馃帀 馃帀

Would it then be helpful for everyone if the outputted AppImage was uploaded as another file in the release to Github Releases?

Would it then be helpful for everyone if the outputted AppImage was uploaded as another file in the release to Github Releases?

Absolutely. 馃憤

Any comments on #108 welcome, or if all looks good I will merge in tomorrow. AppImage would be generated on next release from MS.

Currently it does not pass our automated tests:

/tmp/.mount_BeingTiZw5ff/vscodium.desktop: hint: value "Utility;TextEditor;Development;IDE;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu
FATAL: Key Icon is not in .desktop file exactly once

If those are fixed, it should hopefully pass the tests. (The test checks that Icon= is in the desktop file exactly once, which is probably a bit oversimplistic.)

@probonopd could it be related to this https://github.com/AppImage/appimage.github.io/issues/35 ? Only wondering because I know pkg2appimage runs desktop-file-validate itself and it isn't throwing the FATAL message there. During build I'm running sudo apt-get install desktop-file-utils because when I ran it the first time pkg2appimage failed desktop-file-validate not being installed. So I'm probably using the latest version and maybe the automated tests aren't?

Thanks a lot @probonopd ! I am just a week new to AppImage and no much experience on building AppImage, as the program like VSCodium will be too hard for me.

I will dig deeper on building AppImage as long as I have free time!

+desktop-file-validate ./usr/share/applications/vscodium.desktop
./usr/share/applications/vscodium.desktop: hint: value "Utility;TextEditor;Development;IDE;" for key "Categories" in group "Desktop Entry" contains more than one main category; application might appear more than once in the application menu

is what I see in the build log https://api.travis-ci.com/v3/job/191646710/log.txt

@probonopd could it be related to this AppImage/appimage.github.io#35?

No, it's a test I coded... to ensure that there is exactly one Icon=:

https://github.com/AppImage/pkg2appimage/blob/3168d7ce787246feb697a950005fbffec0533def/appdir-lint.sh#L58-L63

@probonopd how do I fix this? And why wouldn't vscode experience this? We aren't doing icons differently as far as I know.

Hmm alright that actually broke things because Actions references new-empty-window which that for loop deletes.

Comparing VSCodium and Code's resulting .desktop files and they look very similar -- is VSCode's AppImage passing lint?

[Desktop Entry]
Name=VSCodium
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=vscodium --unity-launch %F
Icon=vscodium
Type=Application
StartupNotify=false
StartupWMClass=VSCodium
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;

X-AppImage-Version=1.33.1-1555005058.glibc2.17

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=vscodium --new-window %F
Icon=vscodium
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/share/code/code --unity-launch %F
Icon=com.visualstudio.code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/share/code/code --new-window %F
Icon=com.visualstudio.code

Yes, I wanted to get rid of the [Desktop Action new-empty-window] block because it contains a second Icon= line which makes my test fail (because the test is a bit too simplistic).

Yeah I understand that, but I'm seeing that VSCode's desktop file has the block in there. Was that lint rule added after VSCode's recipe? Does VSCode's current recipe->AppImage fail current linting like VSCodium's does?

I don't know whether recent versions of VSCode have a [Desktop Action new-empty-window] these days. Back when I created that recipe it was working for me.

The desktop file I pasted in from VSCode was from their latest version 1.33.1 and it has the new-empty-window thing.

Does it make sense perhaps for the linter to only care if there is more than one Icon key per Action instead of globally?

We should actually check that Icon= is exactly one in the [Desktop Entry] section but I don't know how to do this in bash.

https://github.com/AppImage/pkg2appimage/blob/3168d7ce787246feb697a950005fbffec0533def/appdir-lint.sh#L58-L63

Is anyone going to miss that desktop action?

I don't know if it will be missed, but I'm trying my best to make as few changes as possible to the build/post-build to keep things in line with VSCode.

I wrote up some bash to check keys in each section separately and opened a PR.

Thanks, please see my comment there.

@probonopd on Microsoft's next release, so probably the beginning of May. The AppImage build process runs at the end of the Linux build script which won't run as the latest release already contains the Linux artifacts.

Optional binary delta updates, e.g., for continuous builds (only download the binary diff) using AppImageUpdate

@probonopd is this currently possible? I tried using AppImageUpdate, but it said no update info was embedded

It is currently not enabled for this AppImage, one would need to embed update information and publish a zsync file.

@probonopd thanks. Also, is there a way to use the cli via AppImage? https://code.visualstudio.com/docs/editor/command-line

Sure, why not?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

apollolux picture apollolux  路  35Comments

linsui picture linsui  路  20Comments

sdaitzman picture sdaitzman  路  40Comments

CuriousFu picture CuriousFu  路  15Comments

JayAndCatchFire picture JayAndCatchFire  路  18Comments