From 187d8f28815a51499c12970ba6095c662134bcbb Mon Sep 17 00:00:00 2001 From: Etienne Wan Date: Sun, 8 Oct 2017 23:06:49 +0200 Subject: [PATCH 1/3] [ubuntu-dev] install dependencies to enable codeintel --- ubuntu-dev/ubuntu-dev.dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ubuntu-dev/ubuntu-dev.dockerfile b/ubuntu-dev/ubuntu-dev.dockerfile index 9084a80..b80a1c3 100644 --- a/ubuntu-dev/ubuntu-dev.dockerfile +++ b/ubuntu-dev/ubuntu-dev.dockerfile @@ -201,6 +201,22 @@ RUN git clone https://github.com/kanaka/noVNC /home/user/.novnc/ \ && cd /home/user/.novnc \ && npm install \ && node ./utils/use_require.js --as commonjs --with-app + +# Install dependencies to enable codeintel (https://github.com/c9/c9.ide.language.codeintel) +RUN easy_install pip + && pip install -U pip + && pip install -U virtualenv + && virtualenv --python=python2 $HOME/.c9/python2 + && source $HOME/.c9/python2/bin/activate + && apt-get update + && apt-get install python-dev + && mkdir /tmp/codeintel + && pip download -d /tmp/codeintel codeintel==0.9.3 + && cd /tmp/codeintel + && tar xf CodeIntel-0.9.3.tar.gz + && mv CodeIntel-0.9.3/SilverCity CodeIntel-0.9.3/silvercity + && tar czf CodeIntel-0.9.3.tar.gz CodeIntel-0.9.3 + && pip install -U --no-index --find-links=/tmp/codeintel codeintel # Install the latest Cloud9 SDK with some useful IDE plugins. RUN git clone https://github.com/c9/core.git /home/user/.c9sdk \ From 66a6b77d430703c045b5147efc833804e4733196 Mon Sep 17 00:00:00 2001 From: Etienne Wan Date: Sun, 8 Oct 2017 23:13:00 +0200 Subject: [PATCH 2/3] [ubuntu-dev] dismiss the codeintel popup --- ubuntu-dev/workspace-janitor.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ubuntu-dev/workspace-janitor.js b/ubuntu-dev/workspace-janitor.js index 1b8b074..cf3d992 100644 --- a/ubuntu-dev/workspace-janitor.js +++ b/ubuntu-dev/workspace-janitor.js @@ -71,6 +71,21 @@ module.exports = function (options) { // Use a longer scrollback for the Terminal. p.settings.user.terminal['@scrollback'] = 10000; + + if (!p.settings.project) { + p.settings.user = {}; + } + + if (typeof p.settings.project === 'string') { + p.settings.project = JSON.parse(p.settings.project); + } + + if (!p.settings.project.codeintel) { + p.settings.user.codeintel = {}; + } + + // Dismiss the codeintel popup because it's installed + p.settings.project.codeintel['@dismiss_installer'] = true; } break; } From 5358b24f240577e371f0a1da5a9b21951d8bce61 Mon Sep 17 00:00:00 2001 From: EtienneWan Date: Mon, 9 Oct 2017 13:03:03 +0000 Subject: [PATCH 3/3] [ubuntu-dev] codeintel: fix and cleanup --- ubuntu-dev/ubuntu-dev.dockerfile | 9 +++------ ubuntu-dev/workspace-janitor.js | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ubuntu-dev/ubuntu-dev.dockerfile b/ubuntu-dev/ubuntu-dev.dockerfile index b80a1c3..ef9c6a3 100644 --- a/ubuntu-dev/ubuntu-dev.dockerfile +++ b/ubuntu-dev/ubuntu-dev.dockerfile @@ -57,6 +57,7 @@ RUN __LLVM_VERSION__="5.0" \ valgrind \ x11vnc \ xvfb \ + python-dev \ && mkdir /var/run/sshd \ && pip install --upgrade pip \ && pip install --upgrade virtualenv \ @@ -203,13 +204,8 @@ RUN git clone https://github.com/kanaka/noVNC /home/user/.novnc/ \ && node ./utils/use_require.js --as commonjs --with-app # Install dependencies to enable codeintel (https://github.com/c9/c9.ide.language.codeintel) -RUN easy_install pip - && pip install -U pip - && pip install -U virtualenv - && virtualenv --python=python2 $HOME/.c9/python2 +RUN virtualenv --python=python2 $HOME/.c9/python2 && source $HOME/.c9/python2/bin/activate - && apt-get update - && apt-get install python-dev && mkdir /tmp/codeintel && pip download -d /tmp/codeintel codeintel==0.9.3 && cd /tmp/codeintel @@ -217,6 +213,7 @@ RUN easy_install pip && mv CodeIntel-0.9.3/SilverCity CodeIntel-0.9.3/silvercity && tar czf CodeIntel-0.9.3.tar.gz CodeIntel-0.9.3 && pip install -U --no-index --find-links=/tmp/codeintel codeintel + && rm -rf /tmp/codeintel # Install the latest Cloud9 SDK with some useful IDE plugins. RUN git clone https://github.com/c9/core.git /home/user/.c9sdk \ diff --git a/ubuntu-dev/workspace-janitor.js b/ubuntu-dev/workspace-janitor.js index cf3d992..daf46b5 100644 --- a/ubuntu-dev/workspace-janitor.js +++ b/ubuntu-dev/workspace-janitor.js @@ -73,7 +73,7 @@ module.exports = function (options) { p.settings.user.terminal['@scrollback'] = 10000; if (!p.settings.project) { - p.settings.user = {}; + p.settings.project = {}; } if (typeof p.settings.project === 'string') { @@ -81,7 +81,7 @@ module.exports = function (options) { } if (!p.settings.project.codeintel) { - p.settings.user.codeintel = {}; + p.settings.project.codeintel = {}; } // Dismiss the codeintel popup because it's installed