From ae9c3276bc77db06c1fb9a68876eaa69588c69cd Mon Sep 17 00:00:00 2001 From: Aofei Sheng Date: Tue, 9 Jul 2024 16:18:30 +0800 Subject: [PATCH] readme: simplify installation instructions This also cleans up the remaining mentioned LLGOROOT. --- README.md | 15 +++++---------- cl/compile_test.go | 4 ---- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9155c2ea..13d794be 100644 --- a/README.md +++ b/README.md @@ -261,10 +261,7 @@ brew update # execute if needed brew install llvm@18 pkg-config libgc brew install cjson sqlite python@3.12 # optional export PATH=$(brew --prefix llvm@18)/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.zshrc -git clone https://github.com/goplus/llgo.git -cd llgo -export LLGOROOT="/path/to/llgo" # Replace this with the root directory of the llgo project -go install -v ./... +go install -v github.com/goplus/llgo/cmd/llgo@latest ``` ### on Linux (Debian/Ubuntu) @@ -276,10 +273,7 @@ sudo apt-get update # execute if needed sudo apt-get install -y llvm-18-dev clang-18 lld-18 pkg-config libgc-dev sudo apt-get install -y libcjson-dev libsqlite3-dev python3.12-dev # optional export PATH=/usr/lib/llvm-18/bin:$PATH # you may want to add this to your shell RC file, e.g. ~/.bashrc -git clone https://github.com/goplus/llgo.git -cd llgo -export LLGOROOT="/path/to/llgo" # Replace this with the root directory of the llgo project -go install -v ./... +go install -v github.com/goplus/llgo/cmd/llgo@latest ``` ### on Windows @@ -298,8 +292,9 @@ TODO How do I generate these tools? ```sh -export CC=clang CXX=clang++ # only for go build; optional if you have other compatible compilers -go install -v ./... # compile all tools except pydump +git clone https://github.com/goplus/llgo.git +cd llgo +go install -v ./chore/... # compile all tools except pydump cd chore/_xtool llgo install ./... # compile pydump go install github.com/goplus/hdq/chore/pysigfetch@v0.8.1 # compile pysigfetch diff --git a/cl/compile_test.go b/cl/compile_test.go index 5267e554..fa77673c 100644 --- a/cl/compile_test.go +++ b/cl/compile_test.go @@ -17,8 +17,6 @@ package cl_test import ( - "os" - "path/filepath" "testing" "github.com/goplus/llgo/cl" @@ -67,8 +65,6 @@ func TestPython(t *testing.T) { } func TestGoPkgMath(t *testing.T) { - root, _ := filepath.Abs("..") - os.Setenv("LLGOROOT", root) conf := build.NewDefaultConf(build.ModeInstall) build.Do([]string{"math"}, conf) }