Skip to content
This repository has been archived by the owner on Mar 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from andlo/0.15.0
Browse files Browse the repository at this point in the history
0.15.0
  • Loading branch information
andlo committed Feb 11, 2020
2 parents 84cbb5c + 51c6752 commit c17fc66
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 40 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
/release
/git
/lib
/node_modules
/plugins
/src-gen
/nvm
.yarnclean
gen-webpack.config.js
webpack.config.js
yarn.lock
/.theia
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
36 changes: 18 additions & 18 deletions build_release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
#!/bin/bash
export NVM_DIR=$(pwd)/nvm
mkdir $NVM_DIR

echo "Cleaning up..."
rm gen-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
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
[ -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
mkdir $(pwd)/plugins
export NODE_OPTIONS=--max_old_space_size=4096
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

echo "Intstalling node..."
nvm install 10
Expand All @@ -19,26 +31,14 @@ 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
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

# 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"
echo "Building theia...OK"
8 changes: 3 additions & 5 deletions launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
"configurations": [

{
"name": "Python: Mycroft",
"name": "Python: Attach",
"type": "python",
"request": "attach",
"port": "5678",
"debugServer": "5678",
"host": "localhost",
"redirectOutput": true
"port": 5678,
"host": "localhost"
},
{
"name": "Python: Current File",
Expand Down
61 changes: 49 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/git": "latest",
"@theia/filesystem": "latest",
"@theia/json": "latest",
"@theia/git": "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/variable-resolver": "latest",
"@theia/workspace": "latest",
"@theia/getting-started": "latest"
},
"resolutions": {
"vscode-languageserver-protocol": "3.15.0-next.9",
Expand All @@ -36,6 +50,29 @@
},
"devDependencies": {
"@theia/cli": "latest"
},
"scripts": {
"postinstall": "download-debug-adapters"
},
"adapterDir": "plugins",
"adapters": {
"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"
}
}

}
2 changes: 1 addition & 1 deletion theia_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c17fc66

Please sign in to comment.