AppImage

How to create an AppImage for Visual Studio Code (OSS)?


#1

Hi,

I would like to create an open-source AppImage for Visual Studio Code. Now, this Recipe of Simon Peter builds an AppImage of Visual Studio Code from binary releases provided by Microsoft, but these binary releases are proprietary-licensed (specifically they are licensed under an EULA), I would like to create an open-source AppImage. Building VSCode from source is fairly simple, it requires the build dependencies (note these are not run-time dependencies!), npm, gulp and python2 and the run-time dependencies of gtk2, gconf, alsa-lib, libnotify, libxtst, nodejs and nss and the actual compilation of VSCode only requires the commands:

./scripts/npm.sh install
node --max_old_space_size=2048 /usr/bin/gulp vscode-linux-x64

to be run from the top-level directory of VSCode’s source code. I just do not understand how to implement this in an AppImage Recipe. Any ideas?

Thanks for your time,
Brenton


#2

As a quick solution you could build a deb and then in a second step convert this to an AppImage like in my recipe. Let me know if this is an acceptable solution for you.


#3

Well sounds more like a temporary work-around to me than a long-term solution, as with enough new versions of VSCode being released it will get tedious. I think AppImages are the best cross-distro packaging format, as they’re run and not installed which has several advantages, and as you’re their creator I must say great idea. The main disadvantage is that unlike Snap packages (another cross-distro packaging format), they are challenging to build from source. Is there any way around that? Have you ever seen the PKGBUILD format used by Arch Linux’s pacman package manager to build packages? I ask because it’s a nice, simple shell script, that is used to build packages. It’s as simple as it is customizable. It would be awesome if one could write Prefs files like it.


#4

AppImage is mainly targeted at the upstream authors, who often use continuous integration (CI) systems such as Travis CI to build binaries anyway. AppImage can be used to bundle up these.

In the case of VSCode, it looks like only Microsoft itself is allowed to do an officially VSCode-branded version (similar to Chromium vs. Google Chrome). So I think the best thing we can do is point people to upvote https://github.com/Microsoft/vscode/issues/10857#issuecomment-242986269 :slight_smile:


#5

Please see https://github.com/Microsoft/vscode/issues/10857. I have updated the VSCode recipe.