Skip to content

Commit

Permalink
chore: add build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
longseespace committed Jul 13, 2019
1 parent 23aaeb7 commit b1754ca
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ lib*.a

# qt output
/native/dist
/native/output

# qpm
/native/vendor
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
# Ben [![Build Status](https://travis-ci.com/longseespace/ben.svg?branch=develop)](https://travis-ci.com/longseespace/ben)
Fast, native, cross-platform Slack client, written in [React QML][react-qml]
Fast, _native*_, cross-platform Slack client, develop with [React QML][react-qml]

![Screenshot](docs/screenshot.png?raw=true "Screenshot")

_*native in the sense that it's not another Electron app, nor using a webview_

## Features
- Fast: well, at least it's faster than the Electron Slack client
- Cross-platform: one codebase, deploy everywhere
- Hackable: the app is mainly in TypeScript, using front-end technologies (redux, react-redux, redux-persist etc.)
- Better developer experience: supports Hot Module Replacement, React Devtool, Redux Devtool

## Build Instruction for macOS

0. Setup environment:
- Install XCode 10 (with updated Command Line Tool `xcode-select --install`)
- Install Qt 5.10.1
- **Note**: must be version 5.10.1
- Install any additional Kits you wish to use (iOS, iOS Simulator, Android etc.)
- Install [qpm][qpm]
- Install NodeJS & yarn

1. Front-end bundle:
```bash
# install deps
yarn install

# build for macOS
yarn build
```

The JS bundle and app's assets should be available at `./native/dist` folder

2. Native build:
```bash
cd native

# install deps
qpm install

# generate Makefile
mkdir -p output
qmake -o "output/" -spec macx-clang CONFIG+=x86_64 CONFIG+=release PRODUCTION=true "Ben.pro"

# build
make -C "output/" -j7 all

# generate dmg
macdeployqt "./output/Ben.app" -dmg -qmldir="."
```

You should find `Ben.app` and `Ben.dmg` in `output` folder

[react-qml]: https://github.com/longseespace/react-qml
[qpm]: https://www.qpm.io
2 changes: 1 addition & 1 deletion native/Ben.pro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
include(vendor/vendor.pri)

# mac
macx: {
macx {
QT += macextras
LIBS += -framework Cocoa
}
Expand Down

0 comments on commit b1754ca

Please sign in to comment.