From 2bcabf23943e96830868c705b51fcd6c541f8f6a Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 12:41:31 +0100 Subject: [PATCH 1/9] change to 0.15.0 and add more vscode plugins --- README.md | 6 ++--- build_release.sh | 15 +---------- launch.json | 6 ++--- package.json | 66 +++++++++++++++++++++++++++++++++++++++--------- theia_run.sh | 2 +- 5 files changed, 60 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index cad1b27..684713a 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,13 @@ This repo holds the scripts for making and running THEIA IDE on a Mycroft device A skill which installs and uses THEIA IDE on a Mycroft device can be found located in the [THEIA Skill](https://github.com/andlo/theia-ide-skill) repo, or in the [Mycroft Marketplace](https://market.mycroft.ai/skills) under "THEIA IDE". ## Usage -Most will simply run the THEIA Skill which automatically downloads the [pre-built binaries for the Mark 1 and Picroft platforms](https://github.com/andlo/theia-for-mycroft/releases). +Most will simply run the THEIA Skill which automatically downloads the [pre-built binaries for the Picroft platforms](https://github.com/andlo/theia-for-mycroft/releases). If you want to compile your own binaries: * clone this repo * run build_release.sh -* package relese dir -On a Raspberry Pi there is limited RAM, so to compile without errors you need to use [zram](https://github.com/novaspirit/rpi_zram). -Also stop Mycroft services during the compile, as they take up most of the available memory. +On a Raspberry Pi there is limited RAM, so to compile without errors you need to increase swap to at least 2046 and change NODE_OPTIONS=--max_old_space_size=1024. ## Credits Andreas Lorensen (@andlo) diff --git a/build_release.sh b/build_release.sh index 468622f..1649408 100755 --- a/build_release.sh +++ b/build_release.sh @@ -8,8 +8,7 @@ curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | ba [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" >/dev/null 2>/dev/null # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" >/dev/null 2>/dev/null # This loads nvm bash_completion -#if [ $1 == "picroft" ] ; then -# export NODE_OPTIONS=--max_old_space_size=1024 +export NODE_OPTIONS=--max_old_space_size=4096 echo "Intstalling node..." nvm install 10 @@ -19,9 +18,7 @@ npm install -g yarn echo "Building theia..." yarn -#yarn --pure-lockfile yarn theia build -#yarn --production yarn autoclean --init echo *.ts >> .yarnclean echo *.ts.map >> .yarnclean @@ -31,14 +28,4 @@ rm -rf ./node_modules/electron rm -rd nvm/.cache/ yarn cache clean -# instll vscode python plugin -mkdir vscode-plugins -cd vscode-plugins -wget https://github.com/$(wget https://github.com/Microsoft/vscode-python/releases/latest -O- | egrep '/.*/.*/.*vsix' -o) -wget https://github.com/$(wget https://github.com/redhat-developer/vscode-yaml/releases/latest -O- | egrep '/.*/.*/.*vsix' -o) - - -cd .. - -cd .. echo "Building theia...OK" diff --git a/launch.json b/launch.json index f213243..7235a76 100644 --- a/launch.json +++ b/launch.json @@ -5,13 +5,11 @@ "configurations": [ { - "name": "Python: Mycroft", + "name": "Python: Attach", "type": "python", "request": "attach", - "port": "5678", - "debugServer": "5678", + "port": 5678, "host": "localhost", - "redirectOutput": true }, { "name": "Python: Current File", diff --git a/package.json b/package.json index 5483fe7..b07067d 100644 --- a/package.json +++ b/package.json @@ -3,31 +3,45 @@ "theia": { "frontend": { "config": { - "applicationName": "Theia for Mycroft", + "applicationName": "Theia for Mycroft 0.15.0", "preferences": { - "files.enableTrash": true + "files.enableTrash": false } } } }, "dependencies": { + "@theia/callhierarchy": "latest", + "@theia/core": "latest", + "@theia/debug": "latest", + "@theia/editor": "latest", "@theia/file-search": "latest", + "@theia/filesystem": "latest", "@theia/git": "latest", - "@theia/json": "latest", + "@theia/keymaps": "latest", + "@theia/languages": "latest", "@theia/markers": "latest", + "@theia/merge-conflicts": "latest", "@theia/messages": "latest", + "@theia/metrics": "latest", + "@theia/mini-browser": "latest", + "@theia/monaco": "latest", "@theia/navigator": "latest", "@theia/outline-view": "latest", - "@theia/preferences": "latest", - "@theia/python": "latest", - "@theia/search-in-workspace": "latest", - "@theia/terminal": "latest", - "@theia/textmate-grammars": "latest", + "@theia/output": "latest", "@theia/plugin": "latest", "@theia/plugin-ext": "latest", "@theia/plugin-ext-vscode": "latest", - "@theia/preview": "latest", - "@theia/getting-started": "latest" + "@theia/preferences": "latest", + "@theia/preview": "latest", + "@theia/process": "latest", + "@theia/search-in-workspace": "latest", + "@theia/task": "latest", + "@theia/terminal": "latest", + "@theia/userstorage": "latest", + "@theia/variable-resolver": "latest", + "@theia/workspace": "latest", + "@theia/getting-started": "latest" }, "resolutions": { "vscode-languageserver-protocol": "3.15.0-next.9", @@ -36,6 +50,34 @@ }, "devDependencies": { "@theia/cli": "latest" + }, + "scripts": { + "postinstall": "download-debug-adapters" + }, + "adapterDir": "plugins", + "adapters": { + "vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix", + "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix", + "vscode-builtin-json-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-language-features-1.39.1-prel.vsix", + "vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix", + "vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix", + "vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix", + "vscode-builtin-markdown-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-language-features-1.39.1-prel.vsix", + "vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix", + "vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix", + "vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix", + "vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix", + "vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix", + "vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix", + "vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix", + "vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix", + "vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix", + "vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix", + "vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix", + "vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix", + "vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix", + "vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix", + "vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix", + "vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.57204/ms-python-release.vsix" } -} - +} \ No newline at end of file diff --git a/theia_run.sh b/theia_run.sh index 7d87290..11ca6c1 100755 --- a/theia_run.sh +++ b/theia_run.sh @@ -16,7 +16,7 @@ if ! [ -f $workspace/.theia/launch.json ]; then fi ## set the VS code plugins dir -export THEIA_DEFAULT_PLUGINS=local-dir://$(pwd)/vscode-plugins +export THEIA_DEFAULT_PLUGINS=local-dir://$(pwd)/plugins ## run theia-ide yarn theia start $workspace --startup-timeout -1 --hostname 0.0.0.0 --port 3000 >/dev/null 2>/dev/null From 29b9550e83bd05cd10091f2e3106dec2ce6d0563 Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 12:57:34 +0100 Subject: [PATCH 2/9] small fix for cleaning up --- build_release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_release.sh b/build_release.sh index 1649408..9cb8c96 100755 --- a/build_release.sh +++ b/build_release.sh @@ -24,8 +24,8 @@ echo *.ts >> .yarnclean echo *.ts.map >> .yarnclean echo *.spec.* >> .yarnclean yarn autoclean --force -rm -rf ./node_modules/electron -rm -rd nvm/.cache/ +rm -rf ./node_modules/electron* +rm -rf nvm/.cache/ yarn cache clean echo "Building theia...OK" From 7a97b28fbc253da2f28f16e80c7bec27ec0229b3 Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 13:14:11 +0100 Subject: [PATCH 3/9] adding cleanup before build --- build_release.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build_release.sh b/build_release.sh index 9cb8c96..9024474 100755 --- a/build_release.sh +++ b/build_release.sh @@ -2,6 +2,16 @@ export NVM_DIR=$(pwd)/nvm mkdir $NVM_DIR +echo "Cleaning up..." +rm en-webpack.config.js +rm webpack.config.js +rm yarn.lock +rm -rf lib +rm -rf node_modules +rm -rf nvm +rm -rf plugins +rm -rf src-gen + echo "Installing nvm..." curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash From 85ade67820e8aa61efb3f1e1ffbd8b8db3690ddd Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 20:43:23 +0100 Subject: [PATCH 4/9] ... --- .gitignore | 10 ++++++++++ build_release.sh | 5 +++-- package.json | 1 + theia_run.sh | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9733581..066f54e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,12 @@ /release /git +/lib +/node_modules +/plugins +/src-gen +/nvm +.yarnclean +gen-webpack.config.js +webpack.config.js +yarn.lock +/.theia \ No newline at end of file diff --git a/build_release.sh b/build_release.sh index 9024474..2f85da8 100755 --- a/build_release.sh +++ b/build_release.sh @@ -3,7 +3,7 @@ export NVM_DIR=$(pwd)/nvm mkdir $NVM_DIR echo "Cleaning up..." -rm en-webpack.config.js +rm gen-webpack.config.js rm webpack.config.js rm yarn.lock rm -rf lib @@ -11,6 +11,7 @@ rm -rf node_modules rm -rf nvm rm -rf plugins rm -rf src-gen +rm .yarnclean echo "Installing nvm..." curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash @@ -38,4 +39,4 @@ rm -rf ./node_modules/electron* rm -rf nvm/.cache/ yarn cache clean -echo "Building theia...OK" +echo "Building theia...OK" \ No newline at end of file diff --git a/package.json b/package.json index b07067d..2fae7fe 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@theia/editor": "latest", "@theia/file-search": "latest", "@theia/filesystem": "latest", + "@theia/json": "latest", "@theia/git": "latest", "@theia/keymaps": "latest", "@theia/languages": "latest", diff --git a/theia_run.sh b/theia_run.sh index 11ca6c1..02ad084 100755 --- a/theia_run.sh +++ b/theia_run.sh @@ -19,4 +19,4 @@ fi export THEIA_DEFAULT_PLUGINS=local-dir://$(pwd)/plugins ## run theia-ide -yarn theia start $workspace --startup-timeout -1 --hostname 0.0.0.0 --port 3000 >/dev/null 2>/dev/null +yarn theia start $workspace --startup-timeout -1 --hostname 0.0.0.0 --port 3001 >/dev/null 2>/dev/null From 6fa9ccb2aff2a4e5af278991c8475bb45cf12cb7 Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 22:21:11 +0100 Subject: [PATCH 5/9] ... --- build_release.sh | 1 + theia_run.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build_release.sh b/build_release.sh index 2f85da8..0c3880f 100755 --- a/build_release.sh +++ b/build_release.sh @@ -20,6 +20,7 @@ curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | ba [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" >/dev/null 2>/dev/null # This loads nvm bash_completion export NODE_OPTIONS=--max_old_space_size=4096 +export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true echo "Intstalling node..." nvm install 10 diff --git a/theia_run.sh b/theia_run.sh index 02ad084..11ca6c1 100755 --- a/theia_run.sh +++ b/theia_run.sh @@ -19,4 +19,4 @@ fi export THEIA_DEFAULT_PLUGINS=local-dir://$(pwd)/plugins ## run theia-ide -yarn theia start $workspace --startup-timeout -1 --hostname 0.0.0.0 --port 3001 >/dev/null 2>/dev/null +yarn theia start $workspace --startup-timeout -1 --hostname 0.0.0.0 --port 3000 >/dev/null 2>/dev/null From b70fdb3707ee9c1a8312e30be1f0f1cc472a5712 Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 22:33:29 +0100 Subject: [PATCH 6/9] ... --- build_release.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_release.sh b/build_release.sh index 0c3880f..7aff3e7 100755 --- a/build_release.sh +++ b/build_release.sh @@ -19,6 +19,7 @@ curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | ba [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" >/dev/null 2>/dev/null # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" >/dev/null 2>/dev/null # This loads nvm bash_completion +mkdir $(pwd)/plugins export NODE_OPTIONS=--max_old_space_size=4096 export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true From 716689b454c120b7ba6afeaa9f2fa165ca484760 Mon Sep 17 00:00:00 2001 From: andlo Date: Sat, 1 Feb 2020 22:49:02 +0100 Subject: [PATCH 7/9] ... --- build_release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_release.sh b/build_release.sh index 7aff3e7..0279ac7 100755 --- a/build_release.sh +++ b/build_release.sh @@ -1,6 +1,5 @@ #!/bin/bash export NVM_DIR=$(pwd)/nvm -mkdir $NVM_DIR echo "Cleaning up..." rm gen-webpack.config.js @@ -14,6 +13,7 @@ rm -rf src-gen rm .yarnclean echo "Installing nvm..." +mkdir $NVM_DIR curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" >/dev/null 2>/dev/null # This loads nvm From 0980211e735360f6f01ac4165200ab17761ab4a3 Mon Sep 17 00:00:00 2001 From: andlo Date: Tue, 11 Feb 2020 19:10:07 +0000 Subject: [PATCH 8/9] ... --- launch.json | 2 +- package.json | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/launch.json b/launch.json index 7235a76..6a02358 100644 --- a/launch.json +++ b/launch.json @@ -9,7 +9,7 @@ "type": "python", "request": "attach", "port": 5678, - "host": "localhost", + "host": "localhost" }, { "name": "Python: Current File", diff --git a/package.json b/package.json index 2fae7fe..5dd7cc0 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "@theia/search-in-workspace": "latest", "@theia/task": "latest", "@theia/terminal": "latest", - "@theia/userstorage": "latest", "@theia/variable-resolver": "latest", "@theia/workspace": "latest", "@theia/getting-started": "latest" @@ -57,11 +56,6 @@ }, "adapterDir": "plugins", "adapters": { - "vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix", - "vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix", - "vscode-builtin-json-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-language-features-1.39.1-prel.vsix", - "vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix", - "vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix", "vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix", "vscode-builtin-markdown-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-language-features-1.39.1-prel.vsix", "vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix", @@ -80,5 +74,4 @@ "vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix", "vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix", "vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.57204/ms-python-release.vsix" - } -} \ No newline at end of file + } \ No newline at end of file From 51c6752f4109400cba604146c2be86836d8b2841 Mon Sep 17 00:00:00 2001 From: andlo Date: Tue, 11 Feb 2020 19:15:39 +0000 Subject: [PATCH 9/9] ... --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5dd7cc0..90043ea 100644 --- a/package.json +++ b/package.json @@ -74,4 +74,5 @@ "vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix", "vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix", "vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.57204/ms-python-release.vsix" - } \ No newline at end of file + } +} \ No newline at end of file