Skip to content

Commit

Permalink
Merge pull request #11 from freemountain/merge-qnode
Browse files Browse the repository at this point in the history
merge qnode
  • Loading branch information
freemountain authored Feb 2, 2017
2 parents 715368e + 83d1195 commit 2542736
Show file tree
Hide file tree
Showing 210 changed files with 8,493 additions and 786 deletions.
36 changes: 26 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
*.pro.user
*.qmake.stash
vendor
example/*/node_modules
build
qpm
setupfile
coverage
src/node_path/node_modules
*.swp
tmp
dist
default
node_modules
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*build-*

# QtCreator

*.autosave

# QtCtreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCtreator CMake
CMakeLists.txt.user*
11 changes: 11 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[submodule "vendor/gel"]
path = vendor/gel
url = https://github.com/Cutehacks/gel

[submodule "tools/qbs"]
path = tools/qbs
url = https://github.com/qt-labs/qbs

[submodule "tools/linuxdeployqt"]
path = tools/linuxdeployqt
url = https://github.com/probonopd/linuxdeployqt
13 changes: 13 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Build
- add qt to path
- build qbs: `./configure`
- config qbs
- `./build/tools/qbs/bin/qbs setup-toolchains --detect`
- `./build/tools/qbs/bin/qbs setup-qt --detect`
- Follow step in the generated warning, something like:
- qbs config profiles.<my-own-qt>.baseProfile xcode-macosx-x86_64
- `./build/tools/qbs/bin/qbs config defaultProfile <my-own-qt>`
- build all the stuff
- `./build/tools/qbs/bin/qbs build`
- build path is `build/default`
- install path is `build/default/install-root`
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

186 changes: 0 additions & 186 deletions Makefile

This file was deleted.

63 changes: 4 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
Quark is the easiest way to write and ship cross-platform desktop applications using JavaScript and QML. It uses Node.js 7.0 and Qt 5.7 under the hood.

## How does it work
A Quark application consists of a Node.js host process and a QML-based rendering process.
A Quark application consists of a JavaScript host process and a QML-based rendering process.

The host process can be powered by Node.js or the Qt JavaScript engine V4 with an Node.js like api (currently wip, see src/libqnode).

This architecture is used to make it possible to script the whole application logic in JavaScript, while leveraging QT's declarative, cross-platform view-layer (QML).
Both processes are always being aware of the whole application state (think Elm or Redux), using stdin and stdout to exchange updates and or actions in a unidirectional way.
Expand Down Expand Up @@ -84,63 +86,6 @@ ApplicationWindow {
}
}
```
### Running the Example

This example can either be run by using the GUI app or by invoking the terminal.

#### GUI
- run the prebuilt quark app
- drag&drop the package.json on the __run__ button

#### Terminal
```
./path/to/quark ./path/to/package.json
```

## Downloads
Prebuilt binaries can be found on the [releases page](https://github.com/freemountain/quark/releases)

## Development
## Building
### Requirements
- Qt 5.7

### OSX
```bash
export PATH=$PATH:/path/to/Qt/5.7/clang_64/bin
make bootstrap
mkdir build
cd build
qmake ..
make
# on osx you can call the run target which will build, test and run quark
make run APP=example/default
#if you want to deploy:
./../tools/deploy_mac.sh quark.app
```

### WIN (using mingw)
```bash
export PATH=$PATH:/c/Qt/5.7/mingw53_32/bin
export PATH=$PATH:/c/Qt/Tools/mingw530_32/bin
mingw32-make bootstrap
mkdir build
cd build
qmake ..
mingw32-make
#if you want to deploy:
./../tools/deploy_win.sh quark.exe /path/to/node.exe
```

### Linux (Ubuntu 16.04)
```bash
export PATH=/path/to/Qt/5.7/clang_64/bin:/path/to/linuxdeployqt:$PATH
sudo apt-get install mesa-common-dev libglu1-mesa-dev patchelf
make bootstrap
mkdir build
cd build
qmake ..
make
#if you want to deploy:
./../tools/deploy_linux.sh quark
```
Prebuilt binaries can be found on the [releases page](https://github.com/freemountain/quark/releases).
29 changes: 29 additions & 0 deletions configure
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e
set -o xtrace

PROJECT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OS="linux"
pushd . > /dev/null

cd "$PROJECT_PATH"
git submodule update --init --recursive

mkdir -p "$PROJECT_PATH/build/tools/qbs"
cd "$PROJECT_PATH/build/tools/qbs"
qmake -r "$PROJECT_PATH/tools/qbs/qbs.pro"
make

if [[ "$OSTYPE" == "linux-gnu" ]]; then
BIN_PATH="$PROJECT_PATH/build/tools/"
mkdir -p "$BIN_PATH"

if [ ! -f "$BIN_PATH/linuxdeployqt" ] ; then
cd "$BIN_PATH"
wget "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
mv "linuxdeployqt-continuous-x86_64.AppImage" "linuxdeployqt"
chmod +x "linuxdeployqt"
fi
fi

popd > /dev/null
Loading

0 comments on commit 2542736

Please sign in to comment.