termux-packages icon indicating copy to clipboard operation
termux-packages copied to clipboard

[Package]: VSCode / VSCodium

Open dariotarantini opened this issue 4 years ago • 20 comments

Package description

VSCode is a powerful code editor available on ARM / ARM64. It can be installed under a proot enviroment, but it would be nice to have directly inside termux repo

Home page URL

https://code.visualstudio.com

Source code URL

https://github.com/VSCodium/vscodium

Packaging policy acknowledgement

Additional information

No response

dariotarantini avatar Oct 03 '21 15:10 dariotarantini

VS Code port would require first patching Electron to work under Termux. And patching Electron means we also need to patch Chromium. Both Chromium and Electron take a very high amount of time to build even on CI. While compiling nodejs, V8 takes more than an hour so wonder how much time Chromium will take. And even then if you manage to get Chromium, Electron and VS Code working on Termux. Keeping it maintained is not gonna be that easy. So I feel maintainers may not accept this package 🙂

And anyways did you try out code-server, it allows you to use VS Code in your browser

Installation:

apt install nodejs-lts yarn
yarn global add code-server

Note: nodejs-lts is required instead of nodejs because code-server only supports 14.x of node for now.

thunder-coding avatar Oct 04 '21 02:10 thunder-coding

@thunder-coding yep, i know it. But i think that it will be awesome to port Electron on termux, thanks to all.app developed with it. I just hope that someone will start working on it. also, thanks, i already knew code-server but i will still use prooted distro with vscode

dariotarantini avatar Oct 04 '21 04:10 dariotarantini

The idea is cool but difficult. I will try to compile vscode via makepkg.

Maxython avatar Oct 04 '21 07:10 Maxython

To compile vscode need packages that are not in termux.
Screenshot_20211009-110918_Termux I'll take care of adding them to termux.

Maxython avatar Oct 09 '21 08:10 Maxython

To compile vscode need packages that are not in termux.

Give here a list of them, and I will see them

thunder-coding avatar Oct 09 '21 09:10 thunder-coding

At the moment, here is the list.

  • [X] keytar
  • [ ] electron
    • [ ] playwright
      • [ ] chromium
        • [x] nss
        • [ ] libva

Those that are not checked are not installed on termux.

Maxython avatar Oct 09 '21 10:10 Maxython

PS: electron is not installed due to a problem with playwright.

Maxython avatar Oct 09 '21 10:10 Maxython

PS: electron is not installed due to a problem with playwright.

Can you open up a draft PR so that I can see what's in the log

thunder-coding avatar Oct 09 '21 10:10 thunder-coding

The result of the playwright compilation: Screenshot_20211009-160143_Termux

Maxython avatar Oct 09 '21 13:10 Maxython

The result of the playwright compilation: Screenshot_20211009-160143_Termux

Should be fixed by patching but first someone needs to add Chromium to x11-repo

thunder-coding avatar Oct 09 '21 17:10 thunder-coding

The result of the playwright compilation: Screenshot_20211009-160143_Termux

Should be fixed by patching but first someone needs to add Chromium to x11-repo

This is exactly what I am doing.

Maxython avatar Oct 09 '21 18:10 Maxython

The result of compiling chromium according to the advice from the developers:
Screenshot_20211010-232658_Termux

Maxython avatar Oct 11 '21 07:10 Maxython

The result of compiling chromium according to the advice from the developers:
Screenshot_20211010-232658_Termux

You need to fetch the source code using depot_tools' gclient https://www.chromium.org/developers/how-tos/get-the-code

thunder-coding avatar Oct 11 '21 08:10 thunder-coding

use proot distro to install vscode. Andronix created distros have it

tathastu871 avatar Dec 19 '21 08:12 tathastu871

VS Code port would require first patching Electron to work under Termux. And patching Electron means we also need to patch Chromium. Both Chromium and Electron take a very high amount of time to build even on CI. While compiling nodejs, V8 takes more than an hour so wonder how much time Chromium will take. And even then if you manage to get Chromium, Electron and VS Code working on Termux. Keeping it maintained is not gonna be that easy. So I feel maintainers may not accept this package 🙂

And anyways did you try out code-server, it allows you to use VS Code in your browser

Installation:

apt install nodejs-lts yarn
yarn global add code-server

Note: nodejs-lts is required instead of nodejs because code-server only supports 14.x of node for now.

error [email protected]: The engine "node" is incompatible with this module. Expected version "= 14". Got "17.3.0"

Do you know a way to install previous version or am I stuck outta luck?

Tsnow95 avatar Jan 03 '22 23:01 Tsnow95

is there any update?

fromyb avatar Sep 08 '22 04:09 fromyb

any info?

ddkwork avatar Nov 20 '22 02:11 ddkwork

Added electron (just the launcher) in https://github.com/termux-user-repository/tur/commit/1a2c9b19c5d39fa7e721fbf32f86bd61505aa80b. Hope that will help.

licy183 avatar Dec 13 '22 00:12 licy183

Added in https://github.com/termux-user-repository/tur/commit/091aaf938540b9735f475884c9bd57851925baf1. It downloads pre-built electron binaries from https://github.com/termux-user-repository/electron-tur-builder. I wonder if it is acceptable to add this to the main repository.

licy183 avatar Jan 07 '23 01:01 licy183

I do not know if this would be off-topic, but with vscode.dev is not easier to compile only VSCode CLI (which is written in Rust) and connect to VSCode.dev via tunnel?

I tried for some time now, and the only package that show errors (some can be patched easily) is keyring. However, I believe the remaining errors are shown because Termux does not have any secret-service, as far as I know.

PillFall avatar Jan 31 '23 03:01 PillFall