From f3c2331fc63a972acebbf1343445d08a39d48982 Mon Sep 17 00:00:00 2001 From: emizzle Date: Thu, 7 May 2020 22:17:25 +1000 Subject: [PATCH] chore: README update for macos - Update README for macos - Add `nimble install` step to README - Update makefile for macos build to use `.dylib` --- .gitignore | 1 + Makefile | 2 +- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 1ba60b62cf..8dc814c6a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ libstatus.a +libstatus.dylib nim_status_client nim_libstatus data/ diff --git a/Makefile b/Makefile index fcd2fc1e17..1a047c7ed0 100644 --- a/Makefile +++ b/Makefile @@ -4,4 +4,4 @@ build: nim c -d:release -L:libstatus.a -L:-lm --outdir:. src/nim_status_client.nim build-osx: - nim c -d:release -L:libstatus.a -L:-lm -L:"-framework Foundation -framework Security -framework IOKit -framework CoreServices" --outdir:. src/nim_status_client.nim + nim c -d:release -L:libstatus.dylib -L:-lm -L:"-framework Foundation -framework Security -framework IOKit -framework CoreServices" --outdir:. src/nim_status_client.nim diff --git a/README.md b/README.md index 1dcfa0229c..f1695a5b79 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,67 @@ Experiments calling status-go from nim, inspired in [nim-stratus](https://github ![Image](screenRec.gif) -``` -# 1. Install nim 1.2.0 +### 1. Install nim 1.2.0 -# 2. Install QT, and add it to the PATH +``` +# linux +??? apt-get install nim ??? + +# macos +brew install nim +``` + +### 2. Install QT, and add it to the PATH + +``` +# Linux export PATH=$PATH:/path/to/Qt/5.14.2/gcc_64/bin -# 3. Clone and build DOtherside +# macos +export PATH=$PATH:/path/to/Qt/5.14.2/clang_64/bin +``` + +### 3. Clone and build DOtherside + +``` git clone https://github.com/filcuc/DOtherSide cd DOtherSide mkdir build && cd build cmake .. make +``` +### 4. Setup Library Path -# 4. Setup Library Path +``` export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/dotherside/build/lib +``` +### 5. Copy libstatus to repo -# 5. Copy libstatus.a to repo. Can be obtained from `status-react/result` -# by executing `make status-go-desktop` +Copy `libstatus.a` to the root folder. Can be obtained from `status-react/result` by executing `make status-go-desktop`. +**macos:** rename `libstatus.a` to `libstatus.dylib` _before_ copying over. Alternatively, modify `desktop/default.nix` to output `libstatus.dylib` before copying over. +### 6. Install nim dependencies -# 6. -## linux +Ignore errors about `nim_status_client` failing to build. + +``` +nimble install +``` + +### 7. Build `nim-status-client` + +``` +# linux make build -## macos +# macos make build-osx +``` -#7. +### 8. Run the app + +``` ./nim_status_client ```