aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-07-15 12:33:53 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-07-15 12:33:53 +0200
commit3efe4777760b0ce45cfe93e666bf355381a944db (patch)
tree87532b6bcb0b0d81a1c212adc54c4de5321e2cb6
parentAdBlockRule: parse some options (diff)
downloadsmolbote-3efe4777760b0ce45cfe93e666bf355381a944db.tar.xz
Update Building.md
-rw-r--r--.hgignore2
-rw-r--r--BUILDING.md89
-rw-r--r--CMakeLists.txt11
-rw-r--r--lang/bg.ts238
4 files changed, 203 insertions, 137 deletions
diff --git a/.hgignore b/.hgignore
index dab1be2..e008333 100644
--- a/.hgignore
+++ b/.hgignore
@@ -6,7 +6,7 @@ cmake-build-*
# kdevelop
build*
-.kdev4
+*.kdev4
# qtcreator
*.user
diff --git a/BUILDING.md b/BUILDING.md
index 64bcd1e..50ca3ea 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -1,59 +1,52 @@
-## Before you start
+## Requirements
-### [Qt](https://www.qt.io/)
-Minimal required version is 5.10.
+### [Qt](https://www.qt.io/) 5.11
-An up-to-date version of QtWebEngine is highly recommended due to fixes to Blink
-that do _not_ get backported. QtWebEngine can be built with older versions of
-Qt, so consider building it if you use the LTS Qt release.
+Even though most of the browser might work with the last LTS Qt release, always
+use an up-to-date version of QtWebEngine. Security fixes to Blink do _not_ get
+backported. QtWebEngine can be built with older versions of Qt, if upgrading Qt
+is not a possibility.
-### [boost](http://www.boost.org/)
-Required component: program_options, string algorithms
+### [boost](http://www.boost.org/) program_options
-### cmake and a build tool
-Minimal version 3.1.0, only 3.10+ is tested; your build tool of choice (make,
-ninja, etc.)
+### cmake 3.10
-### A preferably working compiler with C++17 support
- - gcc 7 or later
- - clang 4 or later
- - only MSVC is supported on Windows due to QtWebEngine
+### Compiler with C++17 support
+ - gcc 7+; clang 4+
+ - Windows: only MSVC is supported due to QtWebEngine
-## Compiling
-smolbote follows the generic cmake build template:
+## Basic Installation
+In short, the generic cmake build loop of 'cmake, make, make install' will
+generate a makefile, build the program and install it.
~~~ sh
-# 1. Clone the repository
+# clone the repository
hg clone https://neueland.iserlohn-fortress.net/smolbote.hg
-# (optional) you can also get checksums for some commits
-# get node for the current commit
-hg log -r tip --template='{node}'
-# get sha512 checksums and signature
-curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node
-curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node.sig
-# verify signature and files
-gpg --verify $node.sig
-sha512sum --check --quiet $node
+# generate makefile
+mkdir build && cd build
+cmake -DCMAKE_CXX_FLAGS="-O2 [other cxx flags]" -DCMAKE_BUILD_TYPE=Release ../smolbote.hg
-# 2. Generate Makefile
-mkdir path/to/build && cd path/to/build
-cmake -DCMAKE_BUILD_TYPE=Release path/to/smolbote.hg
-
-# 3. Build
-make -j 4
-
-# 4. Install
+# make && make install
+make -j4
make install
~~~
+### -DCMAKE_CXX_FLAGS
+cmake does not set any C++ flags by default, including no optimization flags.
+You need to set these yourself if your build system doesn't set any either.
+
+On gcc/clang, no optimize flags are set by default, resulting in rather bloated
+code being generated. Recommend setting at least -O2. MSVC has optimze flags
+set by default.
+
### -DCMAKE_BUILD_TYPE
-Controls what flags and optimizations are set. Possible values: Debug, Release,
-RelWithDebInfo, MinSizeRel
+Install paths are only set on Release builds.
### -DCMAKE_INSTALL_PREFIX
-Sets the install location. Binaries will be written to bin/, and plugins to
-lib/smolbote/.
+Sets the install location prefix.
+win32: Binary is written to bin/, and plugins to bin/plugins.
+others: Binary will be written to bin/, and plugins to lib/smolbote/.
### Using libc++
You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.
@@ -61,3 +54,21 @@ You can use libc++ over stdlibc++ by setting UseLibCpp to On. Requires clang.
~~~ sh
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On
~~~
+
+### Verifying source code integrity
+Since mercurial doesn't have any method for signing commits, some commits have
+signed sha512 checksums available.
+
+~~~ sh
+# get node for the current commit
+node="$(hg log -r tip --template='{node}')"
+
+# get sha512 checksums and signature
+curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node
+curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node.sig
+
+# verify signature and files
+gpg --verify $node.sig
+sha512sum --check --quiet $node
+~~~
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64b5fa5..a41bfe0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,11 +56,10 @@ if (MercurialRepo AND EXISTS "${PROJECT_SOURCE_DIR}/.hg")
execute_process(COMMAND hg identify --num WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerRevision OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND hg identify --branch WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerBranch OUTPUT_STRIP_TRAILING_WHITESPACE)
else()
- set(VerInfo "0.0.0.0")
- set(VerBookmark "unknown")
+ set(VerInfo "0.0.0")
set(VerCommit "00000000")
set(VerRevision "0")
- set(VerBranch "default")
+ set(VerBranch "unknown")
endif()
# configure a header file to pass version information
@@ -89,7 +88,7 @@ if (Tests)
add_subdirectory(test)
endif()
-message("Version='${VerInfo}' bookmark='${VerBookmark}' commit='${VerCommit}'")
-
-
+# Summarize
feature_summary(WHAT ALL)
+message("Version='${VerInfo}' bookmark='${VerBookmark}' commit='${VerCommit}'")
+message("C++ flags: ${CMAKE_CXX_FLAGS}")
diff --git a/lang/bg.ts b/lang/bg.ts
index 9108f68..4b8eb7a 100644
--- a/lang/bg.ts
+++ b/lang/bg.ts
@@ -124,12 +124,12 @@
<context>
<name>Browser</name>
<message>
- <location filename="../src/browser.cpp" line="190"/>
+ <location filename="../src/browser.cpp" line="191"/>
<source>Bookmarks</source>
<translation>Отметки</translation>
</message>
<message>
- <location filename="../src/browser.cpp" line="203"/>
+ <location filename="../src/browser.cpp" line="204"/>
<source>Downloads</source>
<translation>Сваляния</translation>
</message>
@@ -291,78 +291,123 @@
<translation>Инструменти</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="67"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="61"/>
+ <source>Pa&amp;ge</source>
+ <translation>Страница</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.ui" line="79"/>
<source>&amp;New Subwindow</source>
<translation>Нов Подпрозорец</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="72"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="84"/>
<source>New &amp;Window</source>
<translation>Нов Прозорец</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="77"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="89"/>
<source>&amp;About</source>
<translation>Относно</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="82"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="94"/>
<source>A&amp;bout Qt</source>
<translation>Относно Qt</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="87"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="99"/>
<source>&amp;Quit</source>
<translation>Изход</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="92"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="104"/>
<source>&amp;Save Session</source>
<translation>Запази Сесия</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="97"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="109"/>
<source>&amp;Load Session</source>
<translation>Зареди Сесия</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="102"/>
- <source>Tile Windows</source>
+ <location filename="../src/mainwindow/mainwindow.ui" line="114"/>
+ <source>&amp;Tile Windows</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="107"/>
- <source>Cascade Windows</source>
+ <location filename="../src/mainwindow/mainwindow.ui" line="119"/>
+ <source>&amp;Cascade Windows</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.ui" line="112"/>
- <source>Current Window</source>
+ <location filename="../src/mainwindow/mainwindow.ui" line="124"/>
+ <source>Current &amp;Window</source>
<translation>Сегашен Прозорец</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.cpp" line="90"/>
+ <location filename="../src/mainwindow/mainwindow.ui" line="129"/>
+ <source>&amp;Create Bookmark</source>
+ <translation>Създай Отметка</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.ui" line="134"/>
+ <source>&amp;Save Page</source>
+ <translation>Запиши Страница</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.ui" line="139"/>
+ <source>&amp;Print Page</source>
+ <translation>Отпечатай Страница</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.ui" line="144"/>
+ <source>P&amp;rint to PDF</source>
+ <translation>Отпечатай като PDF</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.ui" line="149"/>
+ <source>Developer Tools</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="120"/>
<source>Save Session</source>
<translation>Запиши сесия</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.cpp" line="90"/>
- <location filename="../src/mainwindow/mainwindow.cpp" line="98"/>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="120"/>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="128"/>
<source>JSON (*.json)</source>
<translation>JSON (*.json)</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.cpp" line="98"/>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="128"/>
<source>Load Session</source>
<translation>Зареди сесия</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.cpp" line="317"/>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="172"/>
+ <source>Print to PDF</source>
+ <translation type="unfinished">Отпечатай като PDF</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="172"/>
+ <source>PDF files (*.pdf)</source>
+ <translation type="unfinished">PDF файлове (*.pdf)</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="182"/>
+ <source>Load Profile</source>
+ <translation type="unfinished">Зареди Профил</translation>
+ </message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="401"/>
<source>Close multiple subwindows?</source>
<translation>Затвори множество подпрозорци?</translation>
</message>
<message>
- <location filename="../src/mainwindow/mainwindow.cpp" line="317"/>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="401"/>
<source>Do you want to close all subwindows?</source>
<translation>Искате ли да затворите всички подпрозорци?</translation>
</message>
@@ -401,74 +446,6 @@
</message>
</context>
<context>
- <name>PageMenu</name>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="26"/>
- <source>Page</source>
- <translation>Страница</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="31"/>
- <source>Bookmark page</source>
- <translation>Направи отметка</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="38"/>
- <source>Save Page</source>
- <translation>Запиши страница</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="43"/>
- <source>Print Page</source>
- <translation>Отпечатай страница</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="56"/>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="58"/>
- <source>Print to PDF</source>
- <translation>Отпечатай като PDF</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="58"/>
- <source>PDF files (*.pdf)</source>
- <translation>PDF файлове (*.pdf)</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="72"/>
- <source>Zoom: 1x</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="92"/>
- <source>Zoom: %1x</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagemenu.cpp" line="100"/>
- <source>Load Profile</source>
- <translation>Зареди Профил</translation>
- </message>
-</context>
-<context>
- <name>PageToolsMenu</name>
- <message>
- <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="19"/>
- <source>Tools</source>
- <translation>Инстументи</translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="31"/>
- <source>Injected Scripts</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="37"/>
- <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="48"/>
- <source>Developer Tools</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
<name>QObject</name>
<message>
<location filename="../src/webengine/webpage.cpp" line="19"/>
@@ -510,6 +487,16 @@
<source>Desktop Audio and Video Capture</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../src/mainwindow/mainwindow.cpp" line="49"/>
+ <source>Developer Tools</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="31"/>
+ <source>%1 (%2)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>SearchForm</name>
@@ -614,7 +601,7 @@
<message>
<location filename="../src/webengine/webpage.cpp" line="58"/>
<source>An SSL error has occurred on &lt;strong&gt;%1&lt;/strong&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>SSL грешка на &lt;string&gt;%1&lt;/strong&gt;</translation>
</message>
<message>
<location filename="../src/webengine/webpage.cpp" line="59"/>
@@ -634,7 +621,7 @@
<message>
<location filename="../src/webengine/webpage.cpp" line="63"/>
<source>Error code: %1</source>
- <translation type="unfinished"></translation>
+ <translation>Код на грешката: %1</translation>
</message>
<message>
<location filename="../src/webengine/webpage.cpp" line="107"/>
@@ -647,4 +634,73 @@
<translation type="unfinished"></translation>
</message>
</context>
+<context>
+ <name>WebView</name>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="122"/>
+ <source>Back</source>
+ <translation>Назад</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="136"/>
+ <source>Forward</source>
+ <translation>Напред</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="150"/>
+ <source>Reload</source>
+ <translation>Презареди</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="153"/>
+ <source>Reload and bypass Cache</source>
+ <translation>Презареди и заобиколи кеша</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="158"/>
+ <source>Copy image to clipboard</source>
+ <translation>Копирай изображение</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="161"/>
+ <source>Copy image URL to clipboard</source>
+ <translation>Копирай адреса на изображението</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="165"/>
+ <source>Open image in new tab</source>
+ <translation>Отвори изображението в нов таб</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="168"/>
+ <source>Save image</source>
+ <translation>Запиши изображение</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="180"/>
+ <source>Open link in new tab</source>
+ <translation>Отвори линк в нов таб</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="184"/>
+ <source>Open link in new tab with profile</source>
+ <translation>Отвори линк в нов таб с профил</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="196"/>
+ <source>Open link in new window</source>
+ <translation>Отвори линк в нов прозорец</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="200"/>
+ <source>Copy link address</source>
+ <translation>Копирай адрес на линка</translation>
+ </message>
+ <message>
+ <location filename="../src/webengine/webview.cpp" line="214"/>
+ <location filename="../src/webengine/webview.cpp" line="220"/>
+ <source>Zoom: %1x</source>
+ <translation>Увеличение: %1x</translation>
+ </message>
+</context>
</TS>