Skip to content

Commit

Permalink
Adding .pro option to build w/ webengine.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Jun 4, 2018
1 parent a43f68e commit e789d03
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 9 deletions.
17 changes: 10 additions & 7 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@ TEMPLATE = app

QT += widgets

# webengine
#QT += webenginewidgets

# webkit is supposed to be obsoleted by webengine, but webengine is disabled
# webkit is supposed to be OBSOLETED by webengine, but webengine is disabled
# on Linux since Qt 5.9 due to its tragic performance > conditional compilation
# seems to be the only way (webkit on Linux, webengine on Windows)
QT += webkit
QT += webkitwidgets
# seems to be the only way:
# - webkit on Linux
# - webengine on Windows and macOS
mfwebengine {
QT += webengine
} else {
QT += webkit
QT += webkitwidgets
}

# dependencies
INCLUDEPATH += $$PWD/../deps/discount
Expand Down
26 changes: 26 additions & 0 deletions build/make-mf-with-webengine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
#
# MindForger thinking notebook
#
# Copyright (C) 2016-2018 Martin Dvorak <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# make project w/ QtWebEngine instead QtWebKit

cd ..
make clean
qmake -r CONFIG+=mfwebengine mindforger.pro && make -j 8

# eof
40 changes: 40 additions & 0 deletions build/make-webengine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash
#
# MindForger thinking notebook
#
# Copyright (C) 2016-2018 Martin Dvorak <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

# make project w/ QtWebEngine instead QtWebKit

# source http://code.qt.io/cgit/qt/qtwebengine.git/
#git clone http://code.qt.io/qt/qtwebengine.git
# choose branch based on Qt version
#git checkout 5.11

# dependencies

#sudo apt-get install bison build-essential gperf flex ruby python libasound2-dev libbz2-dev libcap-dev libcups2-dev libdrm-dev libegl1-mesa-dev libgcrypt11-dev libnss3-dev libpci-dev libpulse-dev libudev-dev libxtst-dev gyp ninja-build
#sudo apt-get install libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libfontconfig1-dev libxss-dev libsrtp0-dev libwebp-dev libjsoncpp-dev libopus-dev libminizip-dev libavutil-dev libavformat-dev libavcodec-dev libevent-dev

# update
#git submodule update --init

# build
#qmake -r
#make -j 8
#sudo make install

# eof
2 changes: 1 addition & 1 deletion lib/src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#ifndef M8R_DEBUG_H_
#define M8R_DEBUG_H_

//#define DO_M8R_DEBUG
#define DO_M8R_DEBUG

#ifdef DO_M8R_DEBUG
#include <chrono>
Expand Down
2 changes: 1 addition & 1 deletion mindforger.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.0.1, 2018-05-30T13:42:17. -->
<!-- Written by QtCreator 3.0.1, 2018-06-04T13:36:42. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
Expand Down

0 comments on commit e789d03

Please sign in to comment.