From 3efe4777760b0ce45cfe93e666bf355381a944db Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 15 Jul 2018 12:33:53 +0200 Subject: Update Building.md --- .hgignore | 2 +- BUILDING.md | 89 +++++++++++---------- CMakeLists.txt | 11 ++- lang/bg.ts | 238 +++++++++++++++++++++++++++++++++++---------------------- 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 @@ Browser - + Bookmarks Отметки - + Downloads Сваляния @@ -291,78 +291,123 @@ Инструменти - + + Pa&ge + Страница + + + &New Subwindow Нов Подпрозорец - + New &Window Нов Прозорец - + &About Относно - + A&bout Qt Относно Qt - + &Quit Изход - + &Save Session Запази Сесия - + &Load Session Зареди Сесия - - Tile Windows + + &Tile Windows - - Cascade Windows + + &Cascade Windows - - Current Window + + Current &Window Сегашен Прозорец - + + &Create Bookmark + Създай Отметка + + + + &Save Page + Запиши Страница + + + + &Print Page + Отпечатай Страница + + + + P&rint to PDF + Отпечатай като PDF + + + + Developer Tools + + + + Save Session Запиши сесия - - + + JSON (*.json) JSON (*.json) - + Load Session Зареди сесия - + + Print to PDF + Отпечатай като PDF + + + + PDF files (*.pdf) + PDF файлове (*.pdf) + + + + Load Profile + Зареди Профил + + + Close multiple subwindows? Затвори множество подпрозорци? - + Do you want to close all subwindows? Искате ли да затворите всички подпрозорци? @@ -400,74 +445,6 @@ Начална страница - - PageMenu - - - Page - Страница - - - - Bookmark page - Направи отметка - - - - Save Page - Запиши страница - - - - Print Page - Отпечатай страница - - - - - Print to PDF - Отпечатай като PDF - - - - PDF files (*.pdf) - PDF файлове (*.pdf) - - - - Zoom: 1x - - - - - Zoom: %1x - - - - - Load Profile - Зареди Профил - - - - PageToolsMenu - - - Tools - Инстументи - - - - Injected Scripts - - - - - - Developer Tools - - - QObject @@ -510,6 +487,16 @@ Desktop Audio and Video Capture + + + Developer Tools + + + + + %1 (%2) + + SearchForm @@ -614,7 +601,7 @@ An SSL error has occurred on <strong>%1</strong> - + SSL грешка на <string>%1</strong> @@ -634,7 +621,7 @@ Error code: %1 - + Код на грешката: %1 @@ -647,4 +634,73 @@ + + WebView + + + Back + Назад + + + + Forward + Напред + + + + Reload + Презареди + + + + Reload and bypass Cache + Презареди и заобиколи кеша + + + + Copy image to clipboard + Копирай изображение + + + + Copy image URL to clipboard + Копирай адреса на изображението + + + + Open image in new tab + Отвори изображението в нов таб + + + + Save image + Запиши изображение + + + + Open link in new tab + Отвори линк в нов таб + + + + Open link in new tab with profile + Отвори линк в нов таб с профил + + + + Open link in new window + Отвори линк в нов прозорец + + + + Copy link address + Копирай адрес на линка + + + + + Zoom: %1x + Увеличение: %1x + + -- cgit v1.2.1