aboutsummaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
Diffstat (limited to 'installer')
-rw-r--r--installer/install-clangd.cmd24
-rwxr-xr-xinstaller/install-clangd.sh39
-rw-r--r--installer/install-reason-language-server.cmd2
-rwxr-xr-xinstaller/install-reason-language-server.sh2
4 files changed, 65 insertions, 2 deletions
diff --git a/installer/install-clangd.cmd b/installer/install-clangd.cmd
new file mode 100644
index 0000000..3079de1
--- /dev/null
+++ b/installer/install-clangd.cmd
@@ -0,0 +1,24 @@
+@echo off
+
+setlocal
+
+cd /d %~dp0
+
+set installer_dir=%cd%
+set server_dir=..\servers\clangd
+if exist %server_dir% rd /Q /S "%server_dir%"
+md "%server_dir%"
+cd /d "%server_dir%"
+
+echo Downloading clang and LLVM...
+curl -L -o LLVM-9.0.0-win64.exe "http://releases.llvm.org/9.0.0/LLVM-9.0.0-win64.exe"
+echo Running setup...
+
+REM Run setup as regular user to avoid a UAC popup
+set __COMPAT_LAYER=RUNASINVOKER
+md tmp
+LLVM-9.0.0-win64.exe /S /D=%cd%\tmp
+copy tmp\bin\clangd.exe clangd.exe
+del LLVM-9.0.0-win64.exe
+rd /Q /S %cd%\tmp
+.\clangd.exe --version
diff --git a/installer/install-clangd.sh b/installer/install-clangd.sh
new file mode 100755
index 0000000..75db8c1
--- /dev/null
+++ b/installer/install-clangd.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -e
+
+cd $(dirname $0)
+
+server_dir="../servers/clangd"
+[ -d $server_dir ] && rm -rf $server_dir
+mkdir $server_dir && cd $server_dir
+
+os=$(uname -s | tr "[:upper:]" "[:lower:]")
+
+case $os in
+ linux)
+ platform="pc-linux-gnu"
+ ;;
+ darwin)
+ platform="darwin-apple"
+ ;;
+esac
+
+# Check Ubuntu version
+ubuntu_version=$(lsb_release -a 2>&1 | grep 'Release' | awk '{print $2}')
+
+case $ubuntu_version in
+ 14.04|16.04|18.04)
+ platform="linux-gnu-ubuntu-$ubuntu_version"
+ ;;
+esac
+
+filename="clang+llvm-9.0.0-x86_64-$platform"
+url="http://releases.llvm.org/9.0.0/$filename.tar.xz"
+echo "Downloading clangd and LLVM..."
+curl -LO "$url"
+echo "Extracting archive..."
+tar xf $filename.tar.xz --strip-components=1 $filename/
+rm $filename.tar.xz
+ln -sf bin/clangd
+./clangd --version
diff --git a/installer/install-reason-language-server.cmd b/installer/install-reason-language-server.cmd
index 64b4cf8..9645260 100644
--- a/installer/install-reason-language-server.cmd
+++ b/installer/install-reason-language-server.cmd
@@ -1,6 +1,6 @@
@echo off
-curl -L -o rls-windows.zip "https://github.com/jaredly/reason-language-server/releases/download/1.7.4/rls-windows.zip"
+curl -L -o rls-windows.zip "https://github.com/jaredly/reason-language-server/releases/download/1.7.5/rls-windows.zip"
call "%~dp0\run_unzip.cmd" rls-windows.zip
del rls-windows.zip
diff --git a/installer/install-reason-language-server.sh b/installer/install-reason-language-server.sh
index b3125d1..f5af8c7 100755
--- a/installer/install-reason-language-server.sh
+++ b/installer/install-reason-language-server.sh
@@ -15,7 +15,7 @@ darwin)
;;
esac
-version="1.7.4"
+version="1.7.5"
url="https://github.com/jaredly/reason-language-server/releases/download/$version/rls-$os.zip"
curl -LO "$url"
unzip "rls-$os.zip"