chore: README update for macos

- Update README for macos
- Add `nimble install` step to README
- Update makefile for macos build to use `.dylib`
This commit is contained in:
emizzle 2020-05-07 22:17:25 +10:00
parent e7a01026da
commit f3c2331fc6
No known key found for this signature in database
GPG Key ID: 1FD4BAB3C37EE9BA
3 changed files with 45 additions and 12 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
libstatus.a libstatus.a
libstatus.dylib
nim_status_client nim_status_client
nim_libstatus nim_libstatus
data/ data/

View File

@ -4,4 +4,4 @@ build:
nim c -d:release -L:libstatus.a -L:-lm --outdir:. src/nim_status_client.nim nim c -d:release -L:libstatus.a -L:-lm --outdir:. src/nim_status_client.nim
build-osx: 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

View File

@ -4,35 +4,67 @@ Experiments calling status-go from nim, inspired in [nim-stratus](https://github
![Image](screenRec.gif) ![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 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 git clone https://github.com/filcuc/DOtherSide
cd DOtherSide cd DOtherSide
mkdir build && cd build mkdir build && cd build
cmake .. cmake ..
make make
```
### 4. Setup Library Path
# 4. Setup Library Path ```
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/dotherside/build/lib 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` Copy `libstatus.a` to the root folder. Can be obtained from `status-react/result` by executing `make status-go-desktop`.
# 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. Ignore errors about `nim_status_client` failing to build.
## linux
```
nimble install
```
### 7. Build `nim-status-client`
```
# linux
make build make build
## macos # macos
make build-osx make build-osx
```
#7. ### 8. Run the app
```
./nim_status_client ./nim_status_client
``` ```