Status Desktop client made in Nim & QML https://status.app
Go to file
emizzle 4769f578a6 feat: Onboarding carousel
Onboarding carousel completed

Redo folder restructuring

NOTES:
1. nim_status_client binary is output to `./bin/nim_status_client`, so you'll need to update your workflow to run this file. README has been updated to reflect this. Also, if you're running VSCode, instructions for code reload were added.
2. All `ui` files now live in `ui/`
3. All lib files (ie `libstatus`) now live in `lib/`
4. Removed the Qt Creater user project file as this is unique to each user
5. Moved the project file to `ui/`, so just open up the `ui` folder in Qt creator and it should locate the project file
6. `-d:release` removed from compilation as it wasn't needed
7. Broke up main.qml in to the main app and onboarding components, however this should be broken down further into more reusable components
8. Click "Get started" to show chat

Format some files using nimpretty
2020-05-12 18:52:51 -04:00
fonts/Inter feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
img feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
lib feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
sqlite SQLCipher experiment (#17) 2020-05-11 16:35:58 -04:00
src feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
ui feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
.gitignore feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
Inter-Black.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-BlackItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Bold.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-BoldItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-ExtraBold.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-ExtraBoldItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-ExtraLight.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-ExtraLightItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Italic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Light.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-LightItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Medium.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-MediumItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Regular.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-SemiBold.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-SemiBoldItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-Thin.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-ThinItalic.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Inter-V.otf feat: add chat box, fonts and padding size 2020-05-12 16:42:19 -04:00
Makefile feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
README.md feat: Onboarding carousel 2020-05-12 18:52:51 -04:00
nim_status_client.nimble test 2020-05-08 11:14:34 -04:00
screenRec.gif Initial commit 2020-05-06 13:40:00 -04:00
status.ico add status icon 2020-05-11 16:41:45 -04:00

README.md

nim-status-client

Experiments calling status-go from nim, inspired in nim-stratus by @arnetheduck

1. Install nim 1.2.0

# 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

# macos
export PATH=$PATH:/path/to/Qt/5.14.2/clang_64/bin

3. Clone and build DOtherside

For Linux:

sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install doxygen
git clone https://github.com/filcuc/DOtherSide
cd DOtherSide
mkdir build && cd build
cmake ..
make

4. Setup Library Path

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/dotherside/build/lib

5. Copy libstatus to repo

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

Ignore errors about nim_status_client failing to build.

nimble install

7. Build nim-status-client

# linux
make build

# macos
make build-osx

8. Run the app

./bin/nim_status_client

9. "Cold" reload using VSCode

We can setup a "cold" reload, whereby the app will be rebuilt and restarted when changes in the source are saved. This will not save state, as the app will be restarted, but it will save us some time from manually restarting the app. We can handily force an app rebuild/relaunch with the shortcut Cmd+Shift+b (execute the default build task, which we'll setup below).

To enable a meagre app reload during development, first creates a task in .vscode/tasks.json. This task sets up the default build task for the workspace, and depends on the task that compiles our nim:

({
  "label": "Build Nim Status Client",
  "type": "shell",
  "command": "nim",
  "args": [
    "c",
    "-L:lib/libstatus.dylib",
    "-L:-lm",
    "-L:\"-framework Foundation -framework Security -framework IOKit -framework CoreServices\"",
    "--outdir:./bin",
    "src/nim_status_client.nim"
  ],
  "options": {
    "cwd": "${workspaceRoot}"
  }
},
{
  "label": "Run nim_status_client",
  "type": "shell",
  "command": "bash",
  "args": ["./run.sh"],
  "options": {
    "cwd": "${workspaceRoot}/.vscode"
  },
  "dependsOn": ["Build Nim Status Client"],
  "group": {
    "kind": "build",
    "isDefault": true
  }
})

Next, add a .vscode/run.sh file, changing the DOtherSide lib path to be specific to your environment:

export LD_LIBRARY_PATH="/Users/emizzle/repos/github.com/filcuc/DOtherSide/build/lib"
../bin/nim_status_client

Auto build on save (for the "cold" reload effect)

Finally, to get trigger this default build task when our files our saved, we need to enable a task to be run while .nim files are saved, and when .qml files are saved.

Build on save

To build on save of our source files, first install the "Trigger Task on Save" VS Code extension to detect changes to our changable files, which will trigger a build/run. Once installed, update settings.json like so:

"files.autoSave": "afterDelay",
"triggerTaskOnSave.tasks": {
  "Run nim_status_client": ["ui/**/*", "src/*.nim"]
},
"triggerTaskOnSave.restart": true,
"triggerTaskOnSave.showStatusBarToggle": true