Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
Prepare auto-updating installer with default plugins and customizations
Browse files Browse the repository at this point in the history
* add preinstalled theiaPlugins to package-json of electron-app (preparation for #5)
* add lerna to enable a multi-package repository for electron app + customization packages
* add a custom main js that sets the environment variable for preinstalled plugins
* add a customization module for the installer at theia-example-updater. This may be used to enable updates (#13), to customize the about dialog (#10), and to customize the getting started page (#9)

Signed-off-by: Johannes Faltermeier <[email protected]>
Signed-off-by: Lucas Koehler <[email protected]>
Contributed on behalf of STMicroelectronics
  • Loading branch information
jfaltermeier committed Dec 18, 2020
1 parent bf0c7af commit 78891b7
Show file tree
Hide file tree
Showing 28 changed files with 2,255 additions and 109 deletions.
15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.DS_Store
node_modules
.browser_modules
dist
lib
src-gen
webpack.config.js
gen-webpack.config.js
**/node_modules
**/.browser_modules
**/dist
**/lib
**/src-gen
**/webpack.config.js
**/gen-webpack.config.js
**/plugins
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import groovy.json.JsonSlurper

distFolder = "dist"
distFolder = "electron-app/dist"
releaseBranch = "master"

pipeline {
Expand Down
26 changes: 26 additions & 0 deletions configs/base.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"skipLibCheck": true,
"declaration": true,
"declarationMap": true,
"noImplicitAny": true,
"noEmitOnError": false,
"noImplicitThis": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"downlevelIteration": true,
"resolveJsonModule": true,
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"jsx": "react",
"lib": [
"es6",
"dom"
],
"sourceMap": true,
"composite": true
}
}
File renamed without changes.
17 changes: 14 additions & 3 deletions electron-builder.yml → electron-app/electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
appId: eclipse.theia
productName: Theia
copyright: Copyright © 2020 Eclipse Foundation, Inc
electronDist: node_modules/electron/dist
electronDist: ../node_modules/electron/dist
electronVersion: 9.3.2
# Although it is generally not recommended to disable asar, it is required for Theia.
# Enabling this leads to: process ERROR Error: spawn ENOTDIR
# because binaries can not be executed from the asar archive.
# See asar file API limitations: https://www.electronjs.org/docs/tutorial/application-packaging#limitations-of-the-node-api
asar: false

directories:
buildResources: resources

# node_modules and package.json are copied automatically
# Copying node_modules must be automatic for correct resolvement of binaries.
# Furthermore, This reduces bundle sizes significantly because it avoids duplicates of the electron runtime.
files:
- node_modules
- src-gen
- lib
- scripts
- package.json
extraResources:
- from: plugins
to: app/plugins

win:
icon: resources/icon.ico
Expand Down Expand Up @@ -50,3 +60,4 @@ deb:
artifactName: ${productName}-${version}.${ext}

afterPack: ./scripts/after-pack.js

File renamed without changes.
118 changes: 118 additions & 0 deletions electron-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"private": true,
"name": "theia-example",
"description": "Theia Development Environment",
"productName": "Theia",
"version": "1.8.0",
"main": "scripts/theia-electron-main.js",
"license": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0",
"author": "Rob Moran <[email protected]>",
"homepage": "https://github.com/eclipse-theia/theia-example#readme",
"bugs": {
"url": "https://github.com/eclipse-theia/theia/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/eclipse-theia/theia-example.git"
},
"engines": {
"yarn": "1.0.x || >=1.2.1",
"node": ">=12.14.1 <13"
},
"theia": {
"target": "electron",
"frontend": {
"config": {
"applicationName": "Theia"
}
},
"backend": {
"config": {
"startupTimeout": -1
}
}
},
"dependencies": {
"@theia/callhierarchy": "^1.8.0",
"@theia/console": "^1.8.0",
"@theia/core": "^1.8.0",
"@theia/debug": "^1.8.0",
"@theia/editor": "^1.8.0",
"@theia/editor-preview": "^1.8.0",
"@theia/electron": "^1.8.0",
"@theia/file-search": "^1.8.0",
"@theia/filesystem": "^1.8.0",
"@theia/getting-started": "^1.8.0",
"@theia/git": "^1.8.0",
"@theia/keymaps": "^1.8.0",
"@theia/markers": "^1.8.0",
"@theia/messages": "^1.8.0",
"@theia/metrics": "^1.8.0",
"@theia/mini-browser": "^1.8.0",
"@theia/monaco": "^1.8.0",
"@theia/navigator": "^1.8.0",
"@theia/outline-view": "^1.8.0",
"@theia/output": "^1.8.0",
"@theia/plugin-dev": "^1.8.0",
"@theia/plugin-ext": "^1.8.0",
"@theia/plugin-ext-vscode": "^1.8.0",
"@theia/preferences": "^1.8.0",
"@theia/preview": "^1.8.0",
"@theia/process": "^1.8.0",
"@theia/scm": "^1.8.0",
"@theia/scm-extra": "^1.8.0",
"@theia/search-in-workspace": "^1.8.0",
"@theia/task": "^1.8.0",
"@theia/terminal": "^1.8.0",
"@theia/timeline": "^1.8.0",
"@theia/typehierarchy": "^1.8.0",
"@theia/userstorage": "^1.8.0",
"@theia/variable-resolver": "^1.8.0",
"@theia/vsx-registry": "^1.8.0",
"@theia/workspace": "^1.8.0",
"fs-extra": "^9.0.1",
"theia-example-updater": "^1.8.0"
},
"devDependencies": {
"@theia/cli": "^1.8.0",
"app-builder-lib": "^22.9.0",
"electron-builder": "^22.8.0",
"rimraf": "^2.7.1"
},
"scripts": {
"prepare": "yarn build && yarn download:plugins",
"lint": "theiaext lint",
"clean": "theia clean && rimraf node_modules",
"clean:dist": "rimraf dist",
"build": "theia rebuild:electron && yarn bundle",
"bundle": "theia build",
"watch": "concurrently -n compile,bundle \"theiaext watch --preserveWatchOutput\" \"theia build --watch --mode development\"",
"start": "electron scripts/theia-electron-main.js",
"start:debug": "yarn start --log-level=debug",
"test": "electron-mocha --timeout 60000 \"./lib/test/**/*.espec.js\"",
"package": "yarn clean:dist && electron-builder -c.mac.identity=null --publish never",
"deploy": "yarn clean:dist && electron-builder -c.mac.identity=null --publish always",
"package:preview": "yarn clean:dist && electron-builder --dir",
"download:plugins": "theia download:plugins"
},
"theiaPluginsDir": "plugins",
"theiaPlugins": {
"redhat.java": "https://open-vsx.org/api/redhat/java/0.69.0/file/redhat.java-0.69.0.vsix",
"vscjava.vscode-java-debug": "https://open-vsx.org/api/vscjava/vscode-java-debug/0.28.0/file/vscjava.vscode-java-debug-0.28.0.vsix",
"vscjava.vscode-java-test": "https://open-vsx.org/api/vscjava/vscode-java-test/0.24.2/file/vscjava.vscode-java-test-0.24.2.vsix",
"vscjava.vscode-maven": "https://open-vsx.org/api/vscjava/vscode-maven/0.21.2/file/vscjava.vscode-maven-0.21.2.vsix",
"vscjava.vscode-java-dependency": "https://open-vsx.org/api/vscjava/vscode-java-dependency/0.13.0/file/vscjava.vscode-java-dependency-0.13.0.vsix",
"alphabotsec.vscode-eclipse-keybindings": "https://open-vsx.org/api/alphabotsec/vscode-eclipse-keybindings/0.12.0/file/alphabotsec.vscode-eclipse-keybindings-0.12.0.vsix",
"vscode.css": "https://open-vsx.org/api/vscode/css/1.51.1/file/vscode.css-1.51.1.vsix",
"vscode.html": "https://open-vsx.org/api/vscode/html/1.51.1/file/vscode.html-1.51.1.vsix",
"vscode.javascript": "https://open-vsx.org/api/vscode/javascript/1.51.1/file/vscode.javascript-1.51.1.vsix",
"vscode.json": "https://open-vsx.org/api/vscode/json/1.51.1/file/vscode.json-1.51.1.vsix",
"vscode.json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.51.1/file/vscode.json-language-features-1.51.1.vsix",
"vscode.log": "https://open-vsx.org/api/vscode/log/1.51.1/file/vscode.log-1.51.1.vsix",
"vscode.markdown": "https://open-vsx.org/api/vscode/markdown/1.51.1/file/vscode.markdown-1.51.1.vsix",
"vscode.typescript": "https://open-vsx.org/api/vscode/typescript/1.51.1/file/vscode.typescript-1.51.1.vsix",
"vscode.typescript-language-features": "https://open-vsx.org/api/vscode/typescript-language-features/1.51.1/file/vscode.typescript-language-features-1.51.1.vsix",
"vscode.yaml": "https://open-vsx.org/api/vscode/yaml/1.51.1/file/vscode.yaml-1.51.1.vsix",
"vscode.xml": "https://open-vsx.org/api/vscode/xml/1.51.1/file/vscode.xml-1.51.1.vsix"
}
}
Loading

0 comments on commit 78891b7

Please sign in to comment.