Browse Source

Update Building.md

Aqua-sama 5 months ago
parent
commit
3efe477776
Signed by: Aqua-sama <aqua@iserlohn-fortress.net> GPG Key ID: 5378B8349C1D5ADA
4 changed files with 203 additions and 137 deletions
  1. 1
    1
      .hgignore
  2. 50
    39
      BUILDING.md
  3. 5
    6
      CMakeLists.txt
  4. 147
    91
      lang/bg.ts

+ 1
- 1
.hgignore View File

@@ -6,7 +6,7 @@ cmake-build-*
6 6
 
7 7
 # kdevelop
8 8
 build*
9
-.kdev4
9
+*.kdev4
10 10
 
11 11
 # qtcreator
12 12
 *.user

+ 50
- 39
BUILDING.md View File

@@ -1,59 +1,52 @@
1
-## Before you start
1
+## Requirements
2 2
 
3
-### [Qt](https://www.qt.io/)
4
-Minimal required version is 5.10.
3
+### [Qt](https://www.qt.io/) 5.11
5 4
 
6
-An up-to-date version of QtWebEngine is highly recommended due to fixes to Blink
7
-that do _not_ get backported. QtWebEngine can be built with older versions of
8
-Qt, so consider building it if you use the LTS Qt release.
5
+Even though most of the browser might work with the last LTS Qt release, always
6
+use an up-to-date version of QtWebEngine. Security fixes to Blink do _not_ get
7
+backported. QtWebEngine can be built with older versions of Qt, if upgrading Qt
8
+is not a possibility.
9 9
 
10
-### [boost](http://www.boost.org/)
11
-Required component: program_options, string algorithms
10
+### [boost](http://www.boost.org/) program_options
12 11
 
13
-### cmake and a build tool
14
-Minimal version 3.1.0, only 3.10+ is tested; your build tool of choice (make,
15
-ninja, etc.)
12
+### cmake 3.10
16 13
 
17
-### A preferably working compiler with C++17 support
18
- - gcc 7 or later
19
- - clang 4 or later
20
- - only MSVC is supported on Windows due to QtWebEngine
14
+### Compiler with C++17 support
15
+ - gcc 7+;  clang 4+
16
+ - Windows: only MSVC is supported due to QtWebEngine
21 17
 
22
-## Compiling
23
-smolbote follows the generic cmake build template:
18
+## Basic Installation
19
+In short, the generic cmake build loop of 'cmake, make, make install' will
20
+generate a makefile, build the program and install it.
24 21
 
25 22
 ~~~ sh
26
-# 1. Clone the repository
23
+# clone the repository
27 24
 hg clone https://neueland.iserlohn-fortress.net/smolbote.hg
28 25
 
29
-# (optional) you can also get checksums for some commits
30
-# get node for the current commit
31
-hg log -r tip --template='{node}'
32
-# get sha512 checksums and signature
33
-curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node
34
-curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node.sig
35
-# verify signature and files
36
-gpg --verify $node.sig
37
-sha512sum --check --quiet $node
26
+# generate makefile
27
+mkdir build && cd build
28
+cmake -DCMAKE_CXX_FLAGS="-O2 [other cxx flags]" -DCMAKE_BUILD_TYPE=Release ../smolbote.hg
38 29
 
39
-# 2. Generate Makefile
40
-mkdir path/to/build && cd path/to/build
41
-cmake -DCMAKE_BUILD_TYPE=Release path/to/smolbote.hg
42
-
43
-# 3. Build
44
-make -j 4
45
-
46
-# 4. Install
30
+# make && make install
31
+make -j4
47 32
 make install
48 33
 ~~~
49 34
 
35
+### -DCMAKE_CXX_FLAGS
36
+cmake does not set any C++ flags by default, including no optimization flags.
37
+You need to set these yourself if your build system doesn't set any either.
38
+
39
+On gcc/clang, no optimize flags are set by default, resulting in rather bloated
40
+code being generated. Recommend setting at least -O2. MSVC has optimze flags
41
+set by default.
42
+
50 43
 ### -DCMAKE_BUILD_TYPE
51
-Controls what flags and optimizations are set. Possible values: Debug, Release,
52
-RelWithDebInfo, MinSizeRel
44
+Install paths are only set on Release builds.
53 45
 
54 46
 ### -DCMAKE_INSTALL_PREFIX
55
-Sets the install location. Binaries will be written to bin/, and plugins to
56
-lib/smolbote/.
47
+Sets the install location prefix.
48
+win32: Binary is written to bin/, and plugins to bin/plugins.
49
+others: Binary will be written to bin/, and plugins to lib/smolbote/.
57 50
 
58 51
 ### Using libc++
59 52
 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.
61 54
 ~~~ sh
62 55
 -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DUseLibCpp=On
63 56
 ~~~
57
+
58
+### Verifying source code integrity
59
+Since mercurial doesn't have any method for signing commits, some commits have
60
+signed sha512 checksums available.
61
+
62
+~~~ sh
63
+# get node for the current commit
64
+node="$(hg log -r tip --template='{node}')"
65
+
66
+# get sha512 checksums and signature
67
+curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node
68
+curl -O https://neueland.iserlohn-fortress.net/smolbote/integrity/$node.sig
69
+
70
+# verify signature and files
71
+gpg --verify $node.sig
72
+sha512sum --check --quiet $node
73
+~~~
74
+

+ 5
- 6
CMakeLists.txt View File

@@ -56,11 +56,10 @@ if (MercurialRepo AND EXISTS "${PROJECT_SOURCE_DIR}/.hg")
56 56
     execute_process(COMMAND hg identify --num       WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerRevision OUTPUT_STRIP_TRAILING_WHITESPACE)
57 57
     execute_process(COMMAND hg identify --branch    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE VerBranch   OUTPUT_STRIP_TRAILING_WHITESPACE)
58 58
 else()
59
-    set(VerInfo     "0.0.0.0")
60
-    set(VerBookmark "unknown")
59
+    set(VerInfo     "0.0.0")
61 60
     set(VerCommit   "00000000")
62 61
     set(VerRevision "0")
63
-    set(VerBranch   "default")
62
+    set(VerBranch   "unknown")
64 63
 endif()
65 64
 
66 65
 # configure a header file to pass version information
@@ -89,7 +88,7 @@ if (Tests)
89 88
     add_subdirectory(test)
90 89
 endif()
91 90
 
92
-message("Version='${VerInfo}' bookmark='${VerBookmark}' commit='${VerCommit}'")
93
-
94
-
91
+# Summarize
95 92
 feature_summary(WHAT ALL)
93
+message("Version='${VerInfo}' bookmark='${VerBookmark}' commit='${VerCommit}'")
94
+message("C++ flags: ${CMAKE_CXX_FLAGS}")

+ 147
- 91
lang/bg.ts View File

@@ -124,12 +124,12 @@
124 124
 <context>
125 125
     <name>Browser</name>
126 126
     <message>
127
-        <location filename="../src/browser.cpp" line="190"/>
127
+        <location filename="../src/browser.cpp" line="191"/>
128 128
         <source>Bookmarks</source>
129 129
         <translation>Отметки</translation>
130 130
     </message>
131 131
     <message>
132
-        <location filename="../src/browser.cpp" line="203"/>
132
+        <location filename="../src/browser.cpp" line="204"/>
133 133
         <source>Downloads</source>
134 134
         <translation>Сваляния</translation>
135 135
     </message>
@@ -291,78 +291,123 @@
291 291
         <translation>Инструменти</translation>
292 292
     </message>
293 293
     <message>
294
-        <location filename="../src/mainwindow/mainwindow.ui" line="67"/>
294
+        <location filename="../src/mainwindow/mainwindow.ui" line="61"/>
295
+        <source>Pa&amp;ge</source>
296
+        <translation>Страница</translation>
297
+    </message>
298
+    <message>
299
+        <location filename="../src/mainwindow/mainwindow.ui" line="79"/>
295 300
         <source>&amp;New Subwindow</source>
296 301
         <translation>Нов Подпрозорец</translation>
297 302
     </message>
298 303
     <message>
299
-        <location filename="../src/mainwindow/mainwindow.ui" line="72"/>
304
+        <location filename="../src/mainwindow/mainwindow.ui" line="84"/>
300 305
         <source>New &amp;Window</source>
301 306
         <translation>Нов Прозорец</translation>
302 307
     </message>
303 308
     <message>
304
-        <location filename="../src/mainwindow/mainwindow.ui" line="77"/>
309
+        <location filename="../src/mainwindow/mainwindow.ui" line="89"/>
305 310
         <source>&amp;About</source>
306 311
         <translation>Относно</translation>
307 312
     </message>
308 313
     <message>
309
-        <location filename="../src/mainwindow/mainwindow.ui" line="82"/>
314
+        <location filename="../src/mainwindow/mainwindow.ui" line="94"/>
310 315
         <source>A&amp;bout Qt</source>
311 316
         <translation>Относно Qt</translation>
312 317
     </message>
313 318
     <message>
314
-        <location filename="../src/mainwindow/mainwindow.ui" line="87"/>
319
+        <location filename="../src/mainwindow/mainwindow.ui" line="99"/>
315 320
         <source>&amp;Quit</source>
316 321
         <translation>Изход</translation>
317 322
     </message>
318 323
     <message>
319
-        <location filename="../src/mainwindow/mainwindow.ui" line="92"/>
324
+        <location filename="../src/mainwindow/mainwindow.ui" line="104"/>
320 325
         <source>&amp;Save Session</source>
321 326
         <translation>Запази Сесия</translation>
322 327
     </message>
323 328
     <message>
324
-        <location filename="../src/mainwindow/mainwindow.ui" line="97"/>
329
+        <location filename="../src/mainwindow/mainwindow.ui" line="109"/>
325 330
         <source>&amp;Load Session</source>
326 331
         <translation>Зареди Сесия</translation>
327 332
     </message>
328 333
     <message>
329
-        <location filename="../src/mainwindow/mainwindow.ui" line="102"/>
330
-        <source>Tile Windows</source>
334
+        <location filename="../src/mainwindow/mainwindow.ui" line="114"/>
335
+        <source>&amp;Tile Windows</source>
331 336
         <translation type="unfinished"></translation>
332 337
     </message>
333 338
     <message>
334
-        <location filename="../src/mainwindow/mainwindow.ui" line="107"/>
335
-        <source>Cascade Windows</source>
339
+        <location filename="../src/mainwindow/mainwindow.ui" line="119"/>
340
+        <source>&amp;Cascade Windows</source>
336 341
         <translation type="unfinished"></translation>
337 342
     </message>
338 343
     <message>
339
-        <location filename="../src/mainwindow/mainwindow.ui" line="112"/>
340
-        <source>Current Window</source>
344
+        <location filename="../src/mainwindow/mainwindow.ui" line="124"/>
345
+        <source>Current &amp;Window</source>
341 346
         <translation>Сегашен Прозорец</translation>
342 347
     </message>
343 348
     <message>
344
-        <location filename="../src/mainwindow/mainwindow.cpp" line="90"/>
349
+        <location filename="../src/mainwindow/mainwindow.ui" line="129"/>
350
+        <source>&amp;Create Bookmark</source>
351
+        <translation>Създай Отметка</translation>
352
+    </message>
353
+    <message>
354
+        <location filename="../src/mainwindow/mainwindow.ui" line="134"/>
355
+        <source>&amp;Save Page</source>
356
+        <translation>Запиши Страница</translation>
357
+    </message>
358
+    <message>
359
+        <location filename="../src/mainwindow/mainwindow.ui" line="139"/>
360
+        <source>&amp;Print Page</source>
361
+        <translation>Отпечатай Страница</translation>
362
+    </message>
363
+    <message>
364
+        <location filename="../src/mainwindow/mainwindow.ui" line="144"/>
365
+        <source>P&amp;rint to PDF</source>
366
+        <translation>Отпечатай като PDF</translation>
367
+    </message>
368
+    <message>
369
+        <location filename="../src/mainwindow/mainwindow.ui" line="149"/>
370
+        <source>Developer Tools</source>
371
+        <translation type="unfinished"></translation>
372
+    </message>
373
+    <message>
374
+        <location filename="../src/mainwindow/mainwindow.cpp" line="120"/>
345 375
         <source>Save Session</source>
346 376
         <translation>Запиши сесия</translation>
347 377
     </message>
348 378
     <message>
349
-        <location filename="../src/mainwindow/mainwindow.cpp" line="90"/>
350
-        <location filename="../src/mainwindow/mainwindow.cpp" line="98"/>
379
+        <location filename="../src/mainwindow/mainwindow.cpp" line="120"/>
380
+        <location filename="../src/mainwindow/mainwindow.cpp" line="128"/>
351 381
         <source>JSON (*.json)</source>
352 382
         <translation>JSON (*.json)</translation>
353 383
     </message>
354 384
     <message>
355
-        <location filename="../src/mainwindow/mainwindow.cpp" line="98"/>
385
+        <location filename="../src/mainwindow/mainwindow.cpp" line="128"/>
356 386
         <source>Load Session</source>
357 387
         <translation>Зареди сесия</translation>
358 388
     </message>
359 389
     <message>
360
-        <location filename="../src/mainwindow/mainwindow.cpp" line="317"/>
390
+        <location filename="../src/mainwindow/mainwindow.cpp" line="172"/>
391
+        <source>Print to PDF</source>
392
+        <translation type="unfinished">Отпечатай като PDF</translation>
393
+    </message>
394
+    <message>
395
+        <location filename="../src/mainwindow/mainwindow.cpp" line="172"/>
396
+        <source>PDF files (*.pdf)</source>
397
+        <translation type="unfinished">PDF файлове (*.pdf)</translation>
398
+    </message>
399
+    <message>
400
+        <location filename="../src/mainwindow/mainwindow.cpp" line="182"/>
401
+        <source>Load Profile</source>
402
+        <translation type="unfinished">Зареди Профил</translation>
403
+    </message>
404
+    <message>
405
+        <location filename="../src/mainwindow/mainwindow.cpp" line="401"/>
361 406
         <source>Close multiple subwindows?</source>
362 407
         <translation>Затвори множество подпрозорци?</translation>
363 408
     </message>
364 409
     <message>
365
-        <location filename="../src/mainwindow/mainwindow.cpp" line="317"/>
410
+        <location filename="../src/mainwindow/mainwindow.cpp" line="401"/>
366 411
         <source>Do you want to close all subwindows?</source>
367 412
         <translation>Искате ли да затворите всички подпрозорци?</translation>
368 413
     </message>
@@ -400,74 +445,6 @@
400 445
         <translation>Начална страница</translation>
401 446
     </message>
402 447
 </context>
403
-<context>
404
-    <name>PageMenu</name>
405
-    <message>
406
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="26"/>
407
-        <source>Page</source>
408
-        <translation>Страница</translation>
409
-    </message>
410
-    <message>
411
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="31"/>
412
-        <source>Bookmark page</source>
413
-        <translation>Направи отметка</translation>
414
-    </message>
415
-    <message>
416
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="38"/>
417
-        <source>Save Page</source>
418
-        <translation>Запиши страница</translation>
419
-    </message>
420
-    <message>
421
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="43"/>
422
-        <source>Print Page</source>
423
-        <translation>Отпечатай страница</translation>
424
-    </message>
425
-    <message>
426
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="56"/>
427
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="58"/>
428
-        <source>Print to PDF</source>
429
-        <translation>Отпечатай като PDF</translation>
430
-    </message>
431
-    <message>
432
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="58"/>
433
-        <source>PDF files (*.pdf)</source>
434
-        <translation>PDF файлове (*.pdf)</translation>
435
-    </message>
436
-    <message>
437
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="72"/>
438
-        <source>Zoom: 1x</source>
439
-        <translation type="unfinished"></translation>
440
-    </message>
441
-    <message>
442
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="92"/>
443
-        <source>Zoom: %1x</source>
444
-        <translation type="unfinished"></translation>
445
-    </message>
446
-    <message>
447
-        <location filename="../src/webengine/widgets/pagemenu.cpp" line="100"/>
448
-        <source>Load Profile</source>
449
-        <translation>Зареди Профил</translation>
450
-    </message>
451
-</context>
452
-<context>
453
-    <name>PageToolsMenu</name>
454
-    <message>
455
-        <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="19"/>
456
-        <source>Tools</source>
457
-        <translation>Инстументи</translation>
458
-    </message>
459
-    <message>
460
-        <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="31"/>
461
-        <source>Injected Scripts</source>
462
-        <translation type="unfinished"></translation>
463
-    </message>
464
-    <message>
465
-        <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="37"/>
466
-        <location filename="../src/webengine/widgets/pagetoolsmenu.cpp" line="48"/>
467
-        <source>Developer Tools</source>
468
-        <translation type="unfinished"></translation>
469
-    </message>
470
-</context>
471 448
 <context>
472 449
     <name>QObject</name>
473 450
     <message>
@@ -510,6 +487,16 @@
510 487
         <source>Desktop Audio and Video Capture</source>
511 488
         <translation type="unfinished"></translation>
512 489
     </message>
490
+    <message>
491
+        <location filename="../src/mainwindow/mainwindow.cpp" line="49"/>
492
+        <source>Developer Tools</source>
493
+        <translation type="unfinished"></translation>
494
+    </message>
495
+    <message>
496
+        <location filename="../src/webengine/webview.cpp" line="31"/>
497
+        <source>%1 (%2)</source>
498
+        <translation type="unfinished"></translation>
499
+    </message>
513 500
 </context>
514 501
 <context>
515 502
     <name>SearchForm</name>
@@ -614,7 +601,7 @@
614 601
     <message>
615 602
         <location filename="../src/webengine/webpage.cpp" line="58"/>
616 603
         <source>An SSL error has occurred on &lt;strong&gt;%1&lt;/strong&gt;</source>
617
-        <translation type="unfinished"></translation>
604
+        <translation>SSL грешка на &lt;string&gt;%1&lt;/strong&gt;</translation>
618 605
     </message>
619 606
     <message>
620 607
         <location filename="../src/webengine/webpage.cpp" line="59"/>
@@ -634,7 +621,7 @@
634 621
     <message>
635 622
         <location filename="../src/webengine/webpage.cpp" line="63"/>
636 623
         <source>Error code: %1</source>
637
-        <translation type="unfinished"></translation>
624
+        <translation>Код на грешката: %1</translation>
638 625
     </message>
639 626
     <message>
640 627
         <location filename="../src/webengine/webpage.cpp" line="107"/>
@@ -647,4 +634,73 @@
647 634
         <translation type="unfinished"></translation>
648 635
     </message>
649 636
 </context>
637
+<context>
638
+    <name>WebView</name>
639
+    <message>
640
+        <location filename="../src/webengine/webview.cpp" line="122"/>
641
+        <source>Back</source>
642
+        <translation>Назад</translation>
643
+    </message>
644
+    <message>
645
+        <location filename="../src/webengine/webview.cpp" line="136"/>
646
+        <source>Forward</source>
647
+        <translation>Напред</translation>
648
+    </message>
649
+    <message>
650
+        <location filename="../src/webengine/webview.cpp" line="150"/>
651
+        <source>Reload</source>
652
+        <translation>Презареди</translation>
653
+    </message>
654
+    <message>
655
+        <location filename="../src/webengine/webview.cpp" line="153"/>
656
+        <source>Reload and bypass Cache</source>
657
+        <translation>Презареди и заобиколи кеша</translation>
658
+    </message>
659
+    <message>
660
+        <location filename="../src/webengine/webview.cpp" line="158"/>
661
+        <source>Copy image to clipboard</source>
662
+        <translation>Копирай изображение</translation>
663
+    </message>
664
+    <message>
665
+        <location filename="../src/webengine/webview.cpp" line="161"/>
666
+        <source>Copy image URL to clipboard</source>
667
+        <translation>Копирай адреса на изображението</translation>
668
+    </message>
669
+    <message>
670
+        <location filename="../src/webengine/webview.cpp" line="165"/>
671
+        <source>Open image in new tab</source>
672
+        <translation>Отвори изображението в нов таб</translation>
673
+    </message>
674
+    <message>
675
+        <location filename="../src/webengine/webview.cpp" line="168"/>
676
+        <source>Save image</source>
677
+        <translation>Запиши изображение</translation>
678
+    </message>
679
+    <message>
680
+        <location filename="../src/webengine/webview.cpp" line="180"/>
681
+        <source>Open link in new tab</source>
682
+        <translation>Отвори линк в нов таб</translation>
683
+    </message>
684
+    <message>
685
+        <location filename="../src/webengine/webview.cpp" line="184"/>
686
+        <source>Open link in new tab with profile</source>
687
+        <translation>Отвори линк в нов таб с профил</translation>
688
+    </message>
689
+    <message>
690
+        <location filename="../src/webengine/webview.cpp" line="196"/>
691
+        <source>Open link in new window</source>
692
+        <translation>Отвори линк в нов прозорец</translation>
693
+    </message>
694
+    <message>
695
+        <location filename="../src/webengine/webview.cpp" line="200"/>
696
+        <source>Copy link address</source>
697
+        <translation>Копирай адрес на линка</translation>
698
+    </message>
699
+    <message>
700
+        <location filename="../src/webengine/webview.cpp" line="214"/>
701
+        <location filename="../src/webengine/webview.cpp" line="220"/>
702
+        <source>Zoom: %1x</source>
703
+        <translation>Увеличение: %1x</translation>
704
+    </message>
705
+</context>
650 706
 </TS>

Loading…
Cancel
Save