Hi, i find one interesting thing,please tell me, thx

when i change the code of theia/packages/getting-started, i find the node_modules/@theia/getting-started also auto change the code and same with it, I don’t know for a long time,

[original thread by oyo]

Hi @oyosc - this is expected. Theia repo sub-directory node_modules/@theia/getting-started is a symbolic link to packages/getting-started

~/theia$ ls -al node_modules/@theia/getting-started
lrwxrwxrwx 30 Feb 24 07:04 node_modules/@theia/getting-started -> …/…/packages/getting-started

[oyo]

@marc-dumais where’s the code that achieve symbolic link, i’m sry, not find

yarn does this when working on the main repo

We use yarn workspaces to link local packages: https://classic.yarnpkg.com/en/docs/workspaces/

[oyo]

@anton-kosyakov @paul-marechal thx,and i want know that in theia, can i package it?what should i do?

[oyo]

or i just want package it in theia’s source code,not theia-electron

@oyosc I’m not sure I understand your question, are you trying to include the extension (ex: getting-started) in your own application?

[oyo]

@vince-fugnitto I want to package a desktop Theia application with Electron in theia source code,not in theia-electron,so can you give me any solutions?thx

@oyosc unfortunately I still don’t quite understand the question, you’d like to create a custom electron desktop application but do not want to use theia-electron as an example? The idea is the same, in your package.json you can define both the theia extensions you require (along with any vscode extensions if you’d like), and package it in a similar way using electron-builder. The example theia-electron would be a great place to start (you’d only need to really modify the package.json to your needs).

[oyo]

@vince-fugnitto maybe I understand,but how to package the dependencies of yarn workspace

electron-builder (like in the example under theia-apps) can package your application and create installers (such as AppImage for Linux) so that you can use your application on different operating systems. The main idea is to define your application in the package.json, perform a build (using yarn), and package it using yarn package. For instance, the example-electron present in the main repo is not packaged as an application, but the example present in theia-apps is. Maybe I can provide additional help if you can further describe your use case or what you are specifically trying to achieve.

[oyo]

@vince-fugnitto thx, in theia/examples, I create new folder which named electron-package, and I move the code of theia-electron to it,now it can run as normal, and when I package it, I get the installer.exe, now i install it in my computer that success; but when I open it,I get the error that Cannot find module ‘fix-path’

[oyo]

[oyo]

That’s the code of electron-builder.yml, and I just modify the electronDist and files

@oyosc electron builder does not support yarn workspaces, packaging should happen from the standalone package.json consuming extensions from npm, not from source code

please refer to https://theia-ide.org/docs/composing_applications/ for composing own application

please refer to https://github.com/theia-ide/theia-apps/blob/master/theia-electron/ as an example of electron packaging

you don’t need to clone or build Theia from sources for it