Compare commits
446 Commits
v0.1.0
...
release/0.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bb1af0f72 | |||
| 783fb12ae8 | |||
| 6b8ac9de88 | |||
| ac0d19e5fe | |||
| 2d2a561c41 | |||
| ba8c3ad00e | |||
| dd5ebd2d0a | |||
| caff862805 | |||
| 2f9dd40086 | |||
| e18ff9c274 | |||
| 1b11c54bfa | |||
| eb95d58cfd | |||
| 14c72d38aa | |||
| 380031d34a | |||
| e642cb509d | |||
| f69004ebbb | |||
| f7ecf2920d | |||
| 797cd7953b | |||
| 236eb007e4 | |||
| eb3fccee23 | |||
| 94a37f73c3 | |||
| fed639b5fb | |||
| 64f4f32a60 | |||
| ba859d0e46 | |||
| a59ae13b47 | |||
| bdaba34a8c | |||
| cf22be91d0 | |||
| 846892446b | |||
| 7282698a9d | |||
| 302d6028e6 | |||
| 947b67a54d | |||
| feb35e8ecd | |||
| 801d3e44e2 | |||
| 10a11e2778 | |||
| a4fac24a5d | |||
| 6e9bd48b28 | |||
| 9c11087c2e | |||
| 6c299469de | |||
| c9d44a4660 | |||
| 24077dbd1e | |||
| bbcd3c610c | |||
| 6b9b498874 | |||
| fa008f39c3 | |||
| 33a82da9d2 | |||
| 2ef529b235 | |||
| 7c29eb313a | |||
| 08abd7385c | |||
| 25eb733db0 | |||
| 8d053b00d7 | |||
| 6f79cffb34 | |||
| 1bde003f4a | |||
| bc3ddd7776 | |||
| c835790453 | |||
| 6b1349cdce | |||
| b68790a7d3 | |||
| c9ec84fcb3 | |||
| c376070191 | |||
| 3ebbf497d2 | |||
| 81357c3bbf | |||
| bcbea61fcc | |||
| 4aa20b048f | |||
| 144ecddc74 | |||
| 61179da2d1 | |||
| 012c2c508d | |||
| 29ecbbbf05 | |||
| 1f26d795cc | |||
| cb27392673 | |||
| 1c068d42f7 | |||
| 140785099c | |||
| ff2b2db8e3 | |||
| 7ce8cd92a6 | |||
| 09e051cfe3 | |||
| 49ef260805 | |||
| e8a3bf9120 | |||
| feee0ec6ed | |||
| e31fa22449 | |||
| d244ca33da | |||
| a657d0e70a | |||
| a18790ffd4 | |||
| 6ff29e3da3 | |||
| 5c3b84725b | |||
| ebd3ab8b57 | |||
| 76e0cd48d4 | |||
| bfdeae7733 | |||
| 26cdb7b399 | |||
| 4c7b3621c8 | |||
| ef83da0c61 | |||
| 1a06b22f04 | |||
| cb28be436c | |||
| 4b3e1df51d | |||
| 40b8d4ac0a | |||
| cb99a89fe0 | |||
| c8464b6928 | |||
| fd11923a3c | |||
| 6f9339833b | |||
| af11f38f2c | |||
| 2c6fa61617 | |||
| 58bed936e2 | |||
| 9ce18bfee0 | |||
| 2d697e5202 | |||
| 129aed9b4a | |||
| 2f546ee93a | |||
| aa42fcc3e1 | |||
| 26fd6c802d | |||
| 134e62214d | |||
| 7ddee54aad | |||
| 5534c662b6 | |||
| d21402cd76 | |||
| eb77035dea | |||
| 0f0cec1f8e | |||
| d8b90efc2e | |||
| 7778f5187b | |||
| a26e12c456 | |||
| cea52c6a21 | |||
| baac06f75c | |||
| 8c7c1001c0 | |||
| f25d7e6077 | |||
| 218c3db16c | |||
| 8f7de119e9 | |||
| 831720529d | |||
| 1678282e63 | |||
| 222b364678 | |||
| a32f7d9209 | |||
| b7dce47fad | |||
| cb35be1dcd | |||
| b6aa27bc92 | |||
| d63f5109ca | |||
| 0f5400db41 | |||
| 82beb88b1b | |||
| e1bcb21c35 | |||
| 2610f0ff3b | |||
| 4cec3c5c75 | |||
| b6220c894f | |||
| e003a1444d | |||
| 9aa056770e | |||
| de9cb0915f | |||
| ab0a007d60 | |||
| f5b998de28 | |||
| 57814cd034 | |||
| 9b1287181b | |||
| 2ffd829142 | |||
| ecb5e3d40d | |||
| 9a247bc9ef | |||
| 5f644d86b2 | |||
| c11a5452e4 | |||
| 3a178eaba1 | |||
| a2f83366c5 | |||
| e0381f47c1 | |||
| 334e897195 | |||
| 8b745598e9 | |||
| 04e4ee3748 | |||
| 2d96d6e842 | |||
| a0b457adaf | |||
| fefa9f8af2 | |||
| ac2225b48b | |||
| e7062cd2d9 | |||
| fcefbf222b | |||
| 5bca1fcf7c | |||
| 5c17e4b560 | |||
| 3ddb171bf3 | |||
| 9f2c4b7650 | |||
| c71db8aa1a | |||
| 54fe8a4e93 | |||
| fb55e40672 | |||
| a2b8671b4f | |||
| 6876c2cda4 | |||
| 11b44d34e9 | |||
| 9c6d1d4145 | |||
| e1e8f1d05c | |||
| 8579fed578 | |||
| 37427c078a | |||
| 8752e8076a | |||
| eb24d25519 | |||
| 101691cfcd | |||
| 79c27e0c7a | |||
| 116b547293 | |||
| fdc2696422 | |||
| 1f76b949dc | |||
| c233171c6d | |||
| dcfb747ffc | |||
| ec1a294a9c | |||
| 8eb4407d80 | |||
| 9288181c73 | |||
| 203bc30a94 | |||
| f3180f1f9d | |||
| 6a26db31dc | |||
| 055757f5bf | |||
| 6676d916cb | |||
| 5452bc4b14 | |||
| 9787b420fe | |||
| 9b9979fcab | |||
| b1d419d5a9 | |||
| a4c17e159d | |||
| f3b2f164b2 | |||
| 90bd8f9a66 | |||
| 6601d7e191 | |||
| b26d655a7a | |||
| 732ff9dc85 | |||
| 1b4b360af1 | |||
| 1200f0da4a | |||
| d3bd271ba1 | |||
| b110955c48 | |||
| 5fe6480bd7 | |||
| 7cd72764eb | |||
| a2df7f33b4 | |||
| 3b3dc2db18 | |||
| ed7ce6088c | |||
| 800648e38e | |||
| 932644bebc | |||
| 4f87b7236c | |||
| fcbf2ff078 | |||
| 3ff3cf5923 | |||
| 23aac1aeb4 | |||
| 8d0b4e5b06 | |||
| 5abf792055 | |||
| 23cbd37535 | |||
| 99af6ea79f | |||
| 4599f2ed61 | |||
| c317bb22a2 | |||
| 4c19ec02a2 | |||
| 727440f950 | |||
| 12fa4b486d | |||
| 6cd537d21c | |||
| d7a44b5580 | |||
| 13f0afadf1 | |||
| 559ee92469 | |||
| 7e02eafc1e | |||
| 2f1d09cf23 | |||
| ddadee8597 | |||
| 1236d3b5fa | |||
| fad8f943f7 | |||
| 4629a47d52 | |||
| a6caf1cf78 | |||
| 21c891e435 | |||
| d9cbc512b1 | |||
| 3fc57a309f | |||
| ad92367761 | |||
| 6c2401da61 | |||
| 89656ded2d | |||
| 97eec7afbf | |||
| 4c4fa35f45 | |||
| 8bc7c9b84e | |||
| 9a91910268 | |||
| 1b93b79061 | |||
| d2acc9cddb | |||
| ef37e8948f | |||
| f24039251c | |||
| 3bf30183bc | |||
| 1f6faf8646 | |||
| 3d0cf8b819 | |||
| bca48bb137 | |||
| 78636fe034 | |||
| 4a1f6036b2 | |||
| ce551a0b95 | |||
| fcfb9799a3 | |||
| 384dbe7212 | |||
| a96c79bd9b | |||
| fe008a2859 | |||
| e0695bafd6 | |||
| 8c979c5325 | |||
| 3227974829 | |||
| 98282d5808 | |||
| d267e07da2 | |||
| d73df43f93 | |||
| 0136f9c9e4 | |||
| 3b22972a78 | |||
| 75392823b2 | |||
| b6356a33fa | |||
| 601da85cd8 | |||
| d37dbae1d4 | |||
| 020355bd99 | |||
| d25283dd42 | |||
| b842774d5b | |||
| da5186ac80 | |||
| 2e8ce09703 | |||
| 92f9538be3 | |||
| 1a58d5eeb1 | |||
| 522e5148c9 | |||
| 851fccb65c | |||
| 32af98c00e | |||
| 4debbe5a58 | |||
| 17398dbc21 | |||
| 8f157435ab | |||
| 740d06fe36 | |||
| f143417a88 | |||
| 7a8f15ca04 | |||
| 5465816685 | |||
| 18d75b3003 | |||
| e90fdd1cf2 | |||
| e08969cd7a | |||
| 57185b4d7d | |||
| a17a0bb4ac | |||
| 77ab13ea07 | |||
| 4e8717f8eb | |||
| 6c533e924a | |||
| 47f5755828 | |||
| 328e45916e | |||
| c6d4bab8bc | |||
| 45bb34fe23 | |||
| 5fb2e902e9 | |||
| 6076841df4 | |||
| 68d74e9922 | |||
| ba2270a74b | |||
| e7a9736277 | |||
| e1e4ddc90f | |||
| 4f5a34936e | |||
| 5431550a82 | |||
| fcf0cefbc8 | |||
| 1963221874 | |||
| ed2df01319 | |||
| e182e596ad | |||
| 58e2080ad9 | |||
| 90695fc055 | |||
| f5c7f1844f | |||
| 5c6ff51bf2 | |||
| c30a766fa3 | |||
| 40fd601d79 | |||
| da365345a1 | |||
| 01d4b7d530 | |||
| cdd1711a43 | |||
| f6bafbcdcc | |||
| 699c83560e | |||
| 5094b12560 | |||
| 1267d92b5d | |||
| d0edc02b0b | |||
| fa80ec9524 | |||
| b07f0cab75 | |||
| 02f2bb7600 | |||
| 98f764201d | |||
| 65600e7cd9 | |||
| d3a2d9a030 | |||
| 1118586455 | |||
| 9aec2b33c4 | |||
| 86d797552a | |||
| b0d48ea140 | |||
| 801daa0c57 | |||
| a27905b504 | |||
| f3cedc31af | |||
| e30a151003 | |||
| cb144a1e88 | |||
| 6f03ff6ee2 | |||
| 6a5af20064 | |||
| 7846fb502e | |||
| dedb10a92a | |||
| a640826fb8 | |||
| 587a717464 | |||
| 36754a3137 | |||
| 52125e1235 | |||
| 7aaf682d39 | |||
| 8064a9f7b0 | |||
| b0666927b7 | |||
| 104754a6e9 | |||
| 3c1c2bf8d3 | |||
| f923a0d02c | |||
| 09fe283399 | |||
| 3e2beaa368 | |||
| 80f0806d3c | |||
| 9ca1b82ada | |||
| 8ee73855ec | |||
| f7f4c935cc | |||
| 79fe23b8ba | |||
| 8a8544f7e0 | |||
| bb67a7b335 | |||
| 6a6a35842c | |||
| 4ddfbb169d | |||
| b120802368 | |||
| d0f4dc4f96 | |||
| b76f0ddd0f | |||
| e96bb2e895 | |||
| 1f5134416c | |||
| 3f7f537999 | |||
| 26439aafd8 | |||
| 9059ff527a | |||
| b09f72aac0 | |||
| df794204d5 | |||
| 6c1a3c29e2 | |||
| 36de4febed | |||
| b0219c2f7a | |||
| 42a00482c0 | |||
| eec95541b6 | |||
| cdd291bef5 | |||
| fe0c052149 | |||
| ac0881c797 | |||
| db0632d345 | |||
| ee6973edb7 | |||
| a95f7b556b | |||
| 732ac2ab11 | |||
| ab317d0485 | |||
| d78f69ce4c | |||
| 248717b36a | |||
| 4e4a844336 | |||
| 3e9f661baa | |||
| ad84928b07 | |||
| 097bf24bd1 | |||
| 6d21a7807d | |||
| 91f1fbe8f3 | |||
| e53ec13794 | |||
| 28e2bc0450 | |||
| 93c7de5ee5 | |||
| 8495688593 | |||
| ec9dc25841 | |||
| f9c7b23391 | |||
| 407eccd862 | |||
| bbdfb4d3b0 | |||
| baccee30fd | |||
| 5e6da4ca65 | |||
| 1495ec0619 | |||
| afacf892e9 | |||
| 222bd51223 | |||
| d1f1c6c2c7 | |||
| 8abaf1af01 | |||
| ec800eda22 | |||
| d8b42203a0 | |||
| 3f9e81a231 | |||
| fad2324e4a | |||
| 609ca1b9c2 | |||
| 008dc5005c | |||
| 9373121d03 | |||
| f80323eeb3 | |||
| db934460d3 | |||
| 368486949b | |||
| 5ec634c303 | |||
| 9a77d12cfa | |||
| 2a7834aa70 | |||
| 261e8886ba | |||
| 033421231a | |||
| 16d17e5519 | |||
| e6067a1ffa | |||
| b85827bc1c | |||
| a5878181ec | |||
| 17f2f0bc1c | |||
| 6c1ccdff89 | |||
| 8cd2a55988 | |||
| 47ae2f316e | |||
| fd4f3e2ef7 | |||
| a04c91f6f3 | |||
| 84c2775152 | |||
| 58e1302486 | |||
| 1ad8c8756f | |||
| 2382cafb19 | |||
| 1f4f19f294 | |||
| 4ac45ad335 | |||
| 6947abdb17 | |||
| a03af64a74 | |||
| 9604c84131 | |||
| e8fc6370d9 |
@@ -1,2 +1,5 @@
|
||||
SRC_ROOT=$$PWD
|
||||
BUILD_ROOT=$$shadowed($$PWD)
|
||||
|
||||
ZEAL_COMMON_PRI = $$SRC_ROOT/qmake/common.pri
|
||||
ZEAL_LIBRARY_PRI = $$SRC_ROOT/qmake/library.pri
|
||||
|
||||
@@ -1,64 +1,9 @@
|
||||
build_image: shippableimages/ubuntu1404_base
|
||||
cache: true
|
||||
before_install:
|
||||
- dpkg --add-architecture i386
|
||||
- shippable_retry sudo apt-get -y -q update
|
||||
- export QT_DIR=$HOME/qt/5.4/mingw491_32
|
||||
install:
|
||||
- shippable_retry sudo apt-get -y -q install --no-install-recommends wine p7zip-full ca-certificates curl
|
||||
# Install Qt
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || mkdir -p $HOME/qt/OUT'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || curl -Lso $HOME/qt/qt.exe http://download.qt.io/official_releases/qt/5.4/5.4.0/qt-opensource-windows-x86-mingw491_opengl-5.4.0.exe'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || wine $HOME/qt/qt.exe --dump-binary-data -o $HOME/qt/OUT'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || 7z x $HOME/qt/OUT/qt.54.win32_mingw491/5.4.0-1i686-4.9.1-release-posix-dwarf-rt_v3-rev2-runtime.7z -o$HOME/qt'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || 7z x $HOME/qt/OUT/qt.54.win32_mingw491/5.4.0-1icu_53_1_mingw_builds_4_9_1_posix_dwarf_32.7z -o$HOME/qt'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || 7z x $HOME/qt/OUT/qt.54.win32_mingw491/5.4.0-1qt5_addons.7z -o$HOME/qt'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || 7z x $HOME/qt/OUT/qt.54.win32_mingw491/5.4.0-1qt5_essentials.7z -o$HOME/qt'
|
||||
- bash -c '[ -d $HOME/qt/Tools ] || 7z x $HOME/qt/OUT/qt.tools.win32_mingw491/4.9.1-2i686-4.9.1-release-posix-dwarf-rt_v3-rev2.7z -o$HOME/qt'
|
||||
- rm -rf $HOME/qt/OUT
|
||||
- rm -f $HOME/qt/qt.exe
|
||||
# Install libarchive headers and library
|
||||
- bash -c '[ -f $HOME/qt/Tools/mingw491_32/i686-w64-mingw32/include/archive.h ] || curl -LOs https://bitbucket.org/zealdocs/zeal-win32-binary-downloads/downloads/libarchive-3.1.2-win32-mingw491.7z'
|
||||
- bash -c '[ -f $HOME/qt/Tools/mingw491_32/i686-w64-mingw32/include/archive.h ] || 7z x libarchive-3.1.2-win32-mingw491.7z -o$HOME/qt/Tools/mingw491_32/i686-w64-mingw32'
|
||||
- rm -f libarchive-3.1.2-win32-mingw491.7z
|
||||
# Setup environment
|
||||
- echo '[Paths]' > $QT_DIR/bin/qt.conf
|
||||
- echo 'Prefix=..' >> $QT_DIR/bin/qt.conf
|
||||
- echo '[HKEY_CURRENT_USER\Environment]' > $HOME/qt/temp.reg
|
||||
- echo '"QMAKESPEC"="BASEDIR\\5.4\\mingw491_32\\mkspecs\\win32-g++"' >> $HOME/qt/temp.reg
|
||||
- echo '"QTDIR"="BASEDIR\\5.4\\mingw491_32"' >> $HOME/qt/temp.reg
|
||||
- echo '"PATH"="BASEDIR\\Tools\\mingw491_32\\libexec\\gcc\\i686-w64-mingw32;BASEDIR\\Tools\\mingw491_32\\bin;BASEDIR\\5.4\\mingw491_32\\bin"' >> $HOME/qt/temp.reg
|
||||
- sed -i "s.BASEDIR.Z:$HOME/qt.g" $HOME/qt/temp.reg
|
||||
- sed -i 's./.\\\\.g' $HOME/qt/temp.reg
|
||||
- wine regedit $HOME/qt/temp.reg
|
||||
before_script:
|
||||
- export ZEAL_VERSION=`date +%Y%m%d`
|
||||
- export ZEAL_DIR=zeal-$ZEAL_VERSION
|
||||
script:
|
||||
- wine qmake
|
||||
- wine mingw32-make
|
||||
after_success:
|
||||
# Prepare ZIP package
|
||||
- mkdir $ZEAL_DIR
|
||||
- cp bin/zeal.exe $ZEAL_DIR
|
||||
- for dir in imageformats platforms sqldrivers; do mkdir $ZEAL_DIR/$dir; done
|
||||
- cp $HOME/qt/Tools/mingw491_32/opt/bin/ssleay32.dll $ZEAL_DIR
|
||||
- cp $HOME/qt/Tools/mingw491_32/opt/bin/libeay32.dll $ZEAL_DIR
|
||||
- for l in gif ico jpeg tiff; do cp $QT_DIR/plugins/imageformats/q$l.dll $ZEAL_DIR/imageformats; done
|
||||
- cp $QT_DIR/plugins/platforms/qwindows.dll $ZEAL_DIR/platforms
|
||||
- cp $QT_DIR/plugins/sqldrivers/qsqlite.dll $ZEAL_DIR/sqldrivers
|
||||
- cp $QT_DIR/bin/libstdc++-6.dll $ZEAL_DIR
|
||||
- cp $QT_DIR/bin/libgcc_s_dw2-1.dll $ZEAL_DIR
|
||||
- cp $QT_DIR/bin/libwinpthread-1.dll $ZEAL_DIR
|
||||
- cp $QT_DIR/bin/icu*.dll $ZEAL_DIR
|
||||
- for l in Core Gui Multimedia MultimediaWidgets Network OpenGL Qml Quick Sql WebKit WebKitWidgets WebChannel Widgets Positioning PrintSupport Sensors; do cp $QT_DIR/bin/Qt5$l.dll $ZEAL_DIR; done
|
||||
# Pack everything into ZIP
|
||||
- 7z a -mx=9 $ZEAL_DIR.zip $ZEAL_DIR
|
||||
# Upload to BitBucket
|
||||
- bash -c 'curl -H "Content-Type:application/octet-stream" -H "Auth-Token:$AUTH_TOKEN" --data-binary @$ZEAL_DIR.zip ci2bb.herokuapp.com || true'
|
||||
# Cleanup
|
||||
- rm -rf $ZEAL_DIR*
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: LRSLJQbkpc6kkWDVbmvCARm20edC+1RCCgSdEzK0GfG66V+dyGYi6ubFBv1M+kV9YEVY1FkkZctiKlneJLpi/YS3pSJF7bEhYggtxNxRD+9bAVk4GZwVxT7TUw1ZPtLUkWc7L7PqgIO+OOiI8THwsONBNcn5q4fLsByhlt2XOyGPOrQYmfmqjWpgErgI0K4aYoJfoJGTgV2v5sZ+owSkMniyJY5WU9iZkRLO63ddmk72d9eq8ECwgQqxDyhR9/WtHkMPCrwVh06RFd9jG4DfCNDDZRdQLdGxCPXTNwP7QHqG9mKFRQeM91gs/tKlhFFlfPHMckWiBK4hAo+WLC+Ekg==
|
||||
language: c
|
||||
compiler:
|
||||
- gcc
|
||||
build:
|
||||
ci:
|
||||
- shippable_retry sudo apt-get -y -qq update
|
||||
- shippable_retry sudo apt-get -y -qq install --no-install-recommends qt5-default libqt5webkit5-dev libqt5x11extras5-dev libarchive-dev libxcb-keysyms1-dev
|
||||
- qmake
|
||||
- make
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# Zeal
|
||||
|
||||
[](https://app.shippable.com/projects/54ac2ce4d46935d5fbc19b84/builds/latest)
|
||||
[](https://ci.appveyor.com/project/trollixx/zeal)
|
||||
[](https://scan.coverity.com/projects/4271)
|
||||
[](https://kiwiirc.com/client/irc.freenode.net/#zealdocs)
|
||||
[](https://github.com/zealdocs/zeal/releases)
|
||||
[](https://kiwiirc.com/client/irc.freenode.net/#zealdocs)
|
||||
[](https://telegram.me/zealdocschat)
|
||||
[](https://telegram.me/zealdocs)
|
||||
[](https://twitter.com/zealdocs)
|
||||
|
||||
> **zeal** *noun*
|
||||
>
|
||||
@@ -13,34 +14,42 @@
|
||||
>
|
||||
> (from WordNet 3.0)
|
||||
|
||||
Zeal is a simple offline documentation browser inspired by [Dash](http://kapeli.com/dash/).
|
||||
Zeal is a simple offline documentation browser inspired by [Dash](https://kapeli.com/dash).
|
||||
|
||||

|
||||

|
||||
|
||||
[More screenshots](http://imgur.com/a/eVi97)
|
||||
[More screenshots](https://imgur.com/a/eVi97)
|
||||
|
||||
## Build Status
|
||||
|
||||
[](https://scan.coverity.com/projects/4271)
|
||||
|
||||
OS \ Branch | master | stable
|
||||
------------|--------|-------
|
||||
Linux | [](https://app.shippable.com/projects/54ac2ce4d46935d5fbc19b84) | [](https://app.shippable.com/projects/54ac2ce4d46935d5fbc19b84)
|
||||
Windows | [](https://ci.appveyor.com/project/trollixx/zeal) | [](https://ci.appveyor.com/project/trollixx/zeal)
|
||||
|
||||
## Download
|
||||
|
||||
For details about binary packages (currently available for Windows and Ubuntu) see [downloads page](http://zealdocs.org/download.html). Also, the latest unstable builds are available [here]( https://bitbucket.org/zealdocs/zeal-win32-binary-downloads/downloads).
|
||||
Get binary builds for Windows and Linux from the [download page](https://zealdocs.org/download.html).
|
||||
|
||||
## How to use
|
||||
|
||||
After installing Zeal, you need to download docsets. Go to *File->Options->Docsets*, select the ones you want, and click the *Download* button.
|
||||
After installing Zeal, you need to download docsets. Go to *Tools->Docsets*, select the ones you want, and click the *Download* button.
|
||||
|
||||
## How to compile
|
||||
|
||||
If you prefer to compile Zeal manually.
|
||||
|
||||
### Requirements
|
||||
* [Qt](https://www.qt.io/) (version 5.2.0 or above is required)
|
||||
* [libarchive](http://libarchive.org/)
|
||||
* Optionally [libappindicator](https://launchpad.net/libappindicator) for Unity users
|
||||
* [Qt](https://www.qt.io/) version 5.2.0 or above. Required modules: Qt WebKit Widgets, Qt SQL plugin for SQLite, Qt X11 Extras (X11 only).
|
||||
* [libarchive](http://libarchive.org/).
|
||||
* X11 only: `xcb-util-keysyms`.
|
||||
* Ubuntu Unity only: [libappindicator](https://launchpad.net/libappindicator).
|
||||
|
||||
To compile it, run `qmake` and `make`.
|
||||
To compile Zeal run `qmake` and then `make`. Linux users can install Zeal with `make install` command.
|
||||
|
||||
## Query & Filter docsets
|
||||
|
||||
You can limit the search scope by using ':' to indicate the desired docsets.
|
||||
You can limit the search scope by using ':' to indicate the desired docsets:
|
||||
|
||||
`java:BaseDAO`
|
||||
|
||||
@@ -56,4 +65,17 @@ If you prefer, you can start Zeal with a query from command line:
|
||||
|
||||
## Creating your own docsets
|
||||
|
||||
You can use [Dash's instructions for generating docsets](http://kapeli.com/docsets).
|
||||
You can use [Dash's instructions for generating docsets](https://kapeli.com/docsets).
|
||||
|
||||
## Contact and Support
|
||||
|
||||
We want your feedback! Here's a list of different ways to contact developers and request help:
|
||||
* Report bugs and submit feature requests to [GitHub issues](https://github.com/zealdocs/zeal/issues).
|
||||
* Ask any questions in our [Google Group](https://groups.google.com/d/forum/zealdocs). You can simply send an email to zealdocs@googlegroups.com.
|
||||
* For a quick chat with developers and other Zeal users use our IRC channel: #zealdocs on [Freenode](https://freenode.net/). Also available through Kiwi IRC [web interface](https://kiwiirc.com/client/irc.freenode.net/#zealdocs). Please, take into consideration possible time zone differences.
|
||||
* Finally, for a private communications send us [email](mailto:zeal@zealdocs.org).
|
||||
* And do not forget to follow [@zealdocs](https://twitter.com/zealdocs) on Twitter!
|
||||
|
||||
## License
|
||||
|
||||
This software is licensed under the terms of the GNU General Public License version 3 (GPLv3). Full text of the license is available in the [COPYING](https://github.com/zealdocs/zeal/blob/master/COPYING) file and [online](http://opensource.org/licenses/gpl-3.0.html).
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
include($$ZEAL_COMMON_PRI)
|
||||
|
||||
TEMPLATE = aux
|
||||
|
||||
unix:!macx {
|
||||
TARGET = zeal
|
||||
appicons16.files=freedesktop/appicons/16/*
|
||||
appicons24.files=freedesktop/appicons/24/*
|
||||
appicons32.files=freedesktop/appicons/32/*
|
||||
appicons64.files=freedesktop/appicons/64/*
|
||||
appicons128.files=freedesktop/appicons/128/*
|
||||
|
||||
appicons16.path=$$PREFIX/share/icons/hicolor/16x16/apps
|
||||
appicons24.path=$$PREFIX/share/icons/hicolor/24x24/apps
|
||||
appicons32.path=$$PREFIX/share/icons/hicolor/32x32/apps
|
||||
appicons64.path=$$PREFIX/share/icons/hicolor/64x64/apps
|
||||
appicons128.path=$$PREFIX/share/icons/hicolor/128x128/apps
|
||||
|
||||
desktop.files=freedesktop/zeal.desktop
|
||||
desktop.path=$$PREFIX/share/applications
|
||||
|
||||
INSTALLS += appicons16 appicons24 appicons32 appicons64 appicons128 desktop
|
||||
}
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
@@ -0,0 +1,72 @@
|
||||
# Shared build options
|
||||
#
|
||||
# This file must be included at the top of every non-subdirs .pro file.
|
||||
# Use:
|
||||
# include($$ZEAL_COMMON_PRI)
|
||||
|
||||
# Compilation settings
|
||||
CONFIG += c++11 silent
|
||||
|
||||
# Shared include path
|
||||
INCLUDEPATH += $$SRC_ROOT/src/libs
|
||||
LIBS = -L$$BUILD_ROOT/.lib
|
||||
|
||||
# QString options
|
||||
DEFINES *= QT_USE_QSTRINGBUILDER
|
||||
DEFINES *= QT_RESTRICTED_CAST_FROM_ASCII
|
||||
DEFINES *= QT_NO_CAST_TO_ASCII
|
||||
DEFINES *= QT_NO_URL_CAST_FROM_STRING
|
||||
|
||||
# Workaround for AppVeyor: Do not warn if the library had to be created.
|
||||
# Based on https://codereview.qt-project.org/150326
|
||||
win32-g++:lessThan(QT_VERSION, "5.6.0") {
|
||||
QMAKE_LIB = ar -rc
|
||||
}
|
||||
|
||||
# Keep build directory clean
|
||||
MOC_DIR = $$BUILD_ROOT/.moc
|
||||
OBJECTS_DIR = $$BUILD_ROOT/.obj
|
||||
RCC_DIR = $$BUILD_ROOT/.rcc
|
||||
UI_DIR = $$BUILD_ROOT/.ui
|
||||
|
||||
# Application version
|
||||
VERSION = 0.3.1
|
||||
DEFINES += ZEAL_VERSION=\\\"$${VERSION}\\\"
|
||||
|
||||
# Browser engine
|
||||
CONFIG(zeal_qtwebengine) {
|
||||
qtHaveModule(webenginewidgets): BROWSER_ENGINE = qtwebengine
|
||||
else: error("Qt WebEngine is not available.")
|
||||
} else {
|
||||
qtHaveModule(webkitwidgets): BROWSER_ENGINE = qtwebkit
|
||||
else: qtHaveModule(webenginewidgets): BROWSER_ENGINE = qtwebengine
|
||||
else: error("Zeal requires Qt WebEngine or Qt WebKit.")
|
||||
}
|
||||
|
||||
equals(BROWSER_ENGINE, qtwebengine) {
|
||||
message("Browser engine: Qt WebEngine.")
|
||||
QT += webenginewidgets
|
||||
DEFINES += USE_WEBENGINE
|
||||
} else {
|
||||
message("Browser engine: Qt WebKit.")
|
||||
QT += webkitwidgets
|
||||
DEFINES += USE_WEBKIT
|
||||
}
|
||||
|
||||
# Portable build
|
||||
CONFIG(zeal_portable) {
|
||||
message("Portable build: Yes.")
|
||||
DEFINES += PORTABLE_BUILD
|
||||
}
|
||||
|
||||
# Unix installation prefix
|
||||
unix:!macx {
|
||||
isEmpty(PREFIX): PREFIX = /usr
|
||||
}
|
||||
|
||||
unix:!macx:packagesExist(appindicator-0.1) {
|
||||
CONFIG += link_pkgconfig
|
||||
PKGCONFIG += appindicator-0.1 gtk+-2.0
|
||||
DEFINES += USE_APPINDICATOR
|
||||
message("AppIndicator support: Yes.")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
include($$ZEAL_COMMON_PRI)
|
||||
include($$replace(_PRO_FILE_PWD_, ([^/]+$), \\1/\\1.pri))
|
||||
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
|
||||
DESTDIR = $$BUILD_ROOT/.lib
|
||||
TARGET = $$ZEAL_LIB_NAME
|
||||
@@ -1,48 +0,0 @@
|
||||
/****************************************************************************
|
||||
** Copyright (c) 2006 - 2011, the LibQxt project.
|
||||
** See the Qxt AUTHORS file for a list of authors and copyright holders.
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** * Neither the name of the LibQxt project nor the
|
||||
** names of its contributors may be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
** <http://libqxt.org> <foundation@libqxt.org>
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef QXTGLOBAL_H
|
||||
#define QXTGLOBAL_H
|
||||
|
||||
#include <QtGlobal>
|
||||
|
||||
//--------------------------export macros------------------------------
|
||||
|
||||
#if !defined(QXT_STATIC)
|
||||
# if defined(BUILD_QXT_GUI)
|
||||
# define QXT_GUI_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define QXT_GUI_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define QXT_GUI_EXPORT
|
||||
#endif // BUILD_QXT_GUI
|
||||
|
||||
#endif // QXT_GLOBAL
|
||||
@@ -1,222 +0,0 @@
|
||||
#include "qxtglobalshortcut_p.h"
|
||||
/****************************************************************************
|
||||
** Copyright (c) 2006 - 2011, the LibQxt project.
|
||||
** See the Qxt AUTHORS file for a list of authors and copyright holders.
|
||||
** All rights reserved.
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in the
|
||||
** documentation and/or other materials provided with the distribution.
|
||||
** * Neither the name of the LibQxt project nor the
|
||||
** names of its contributors may be used to endorse or promote products
|
||||
** derived from this software without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
** DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
||||
** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
** <http://libqxt.org> <foundation@libqxt.org>
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include <QApplication>
|
||||
#include <QKeySequence>
|
||||
#include <QVector>
|
||||
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
namespace {
|
||||
|
||||
const QVector<quint32> maskModifiers = QVector<quint32>()
|
||||
<< 0 << Mod2Mask << LockMask << (Mod2Mask | LockMask);
|
||||
|
||||
typedef int (*X11ErrorHandler)(Display *display, XErrorEvent *event);
|
||||
|
||||
class QxtX11ErrorHandler {
|
||||
public:
|
||||
static bool error;
|
||||
|
||||
static int qxtX11ErrorHandler(Display *display, XErrorEvent *event)
|
||||
{
|
||||
Q_UNUSED(display);
|
||||
switch (event->error_code)
|
||||
{
|
||||
case BadAccess:
|
||||
case BadValue:
|
||||
case BadWindow:
|
||||
if (event->request_code == 33 /* X_GrabKey */ ||
|
||||
event->request_code == 34 /* X_UngrabKey */) {
|
||||
error = true;
|
||||
//TODO:
|
||||
//char errstr[256];
|
||||
//XGetErrorText(dpy, err->error_code, errstr, 256);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
QxtX11ErrorHandler()
|
||||
{
|
||||
error = false;
|
||||
m_previousErrorHandler = XSetErrorHandler(qxtX11ErrorHandler);
|
||||
}
|
||||
|
||||
~QxtX11ErrorHandler()
|
||||
{
|
||||
XSetErrorHandler(m_previousErrorHandler);
|
||||
}
|
||||
|
||||
private:
|
||||
X11ErrorHandler m_previousErrorHandler;
|
||||
};
|
||||
|
||||
bool QxtX11ErrorHandler::error = false;
|
||||
|
||||
class QxtX11Data {
|
||||
public:
|
||||
QxtX11Data()
|
||||
{
|
||||
QPlatformNativeInterface *native = qApp->platformNativeInterface();
|
||||
void *display = native->nativeResourceForScreen(QByteArray("display"),
|
||||
QGuiApplication::primaryScreen());
|
||||
m_display = reinterpret_cast<Display *>(display);
|
||||
}
|
||||
|
||||
bool isValid()
|
||||
{
|
||||
return m_display != 0;
|
||||
}
|
||||
|
||||
Display *display()
|
||||
{
|
||||
Q_ASSERT(isValid());
|
||||
return m_display;
|
||||
}
|
||||
|
||||
Window rootWindow()
|
||||
{
|
||||
return DefaultRootWindow(display());
|
||||
}
|
||||
|
||||
bool grabKey(quint32 keycode, quint32 modifiers, Window window)
|
||||
{
|
||||
QxtX11ErrorHandler errorHandler;
|
||||
|
||||
for (int i = 0; !errorHandler.error && i < maskModifiers.size(); ++i) {
|
||||
XGrabKey(display(), keycode, modifiers | maskModifiers[i], window, True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
|
||||
if (errorHandler.error) {
|
||||
ungrabKey(keycode, modifiers, window);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ungrabKey(quint32 keycode, quint32 modifiers, Window window)
|
||||
{
|
||||
QxtX11ErrorHandler errorHandler;
|
||||
|
||||
for (quint32 maskMods : maskModifiers)
|
||||
XUngrabKey(display(), keycode, modifiers | maskMods, window);
|
||||
|
||||
return !errorHandler.error;
|
||||
}
|
||||
|
||||
private:
|
||||
Display *m_display;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
bool QxtGlobalShortcutPrivate::nativeEventFilter(const QByteArray &eventType,
|
||||
void *message, long *result)
|
||||
{
|
||||
Q_UNUSED(result);
|
||||
|
||||
xcb_key_press_event_t *kev = 0;
|
||||
if (eventType == "xcb_generic_event_t") {
|
||||
xcb_generic_event_t *ev = static_cast<xcb_generic_event_t *>(message);
|
||||
if ((ev->response_type & 127) == XCB_KEY_PRESS)
|
||||
kev = static_cast<xcb_key_press_event_t *>(message);
|
||||
}
|
||||
|
||||
if (kev != 0) {
|
||||
unsigned int keycode = kev->detail;
|
||||
unsigned int keystate = 0;
|
||||
if(kev->state & XCB_MOD_MASK_1)
|
||||
keystate |= Mod1Mask;
|
||||
if(kev->state & XCB_MOD_MASK_CONTROL)
|
||||
keystate |= ControlMask;
|
||||
if(kev->state & XCB_MOD_MASK_4)
|
||||
keystate |= Mod4Mask;
|
||||
if(kev->state & XCB_MOD_MASK_SHIFT)
|
||||
keystate |= ShiftMask;
|
||||
|
||||
activateShortcut(keycode,
|
||||
// Mod1Mask == Alt, Mod4Mask == Meta
|
||||
keystate & (ShiftMask | ControlMask | Mod1Mask | Mod4Mask));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
quint32 QxtGlobalShortcutPrivate::nativeModifiers(Qt::KeyboardModifiers modifiers)
|
||||
{
|
||||
// ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, and Mod5Mask
|
||||
quint32 native = 0;
|
||||
if (modifiers & Qt::ShiftModifier)
|
||||
native |= ShiftMask;
|
||||
if (modifiers & Qt::ControlModifier)
|
||||
native |= ControlMask;
|
||||
if (modifiers & Qt::AltModifier)
|
||||
native |= Mod1Mask;
|
||||
if (modifiers & Qt::MetaModifier)
|
||||
native |= Mod4Mask;
|
||||
|
||||
/// TODO: resolve these?
|
||||
//if (modifiers & Qt::MetaModifier)
|
||||
//if (modifiers & Qt::KeypadModifier)
|
||||
//if (modifiers & Qt::GroupSwitchModifier)
|
||||
return native;
|
||||
}
|
||||
|
||||
quint32 QxtGlobalShortcutPrivate::nativeKeycode(Qt::Key key)
|
||||
{
|
||||
QxtX11Data x11;
|
||||
if (!x11.isValid())
|
||||
return 0;
|
||||
|
||||
KeySym keysym = XStringToKeysym(QKeySequence(key).toString().toLatin1().data());
|
||||
if (keysym == NoSymbol)
|
||||
keysym = static_cast<ushort>(key);
|
||||
|
||||
return XKeysymToKeycode(x11.display(), keysym);
|
||||
}
|
||||
|
||||
bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativeMods)
|
||||
{
|
||||
QxtX11Data x11;
|
||||
return x11.isValid() && x11.grabKey(nativeKey, nativeMods, x11.rootWindow());
|
||||
}
|
||||
|
||||
bool QxtGlobalShortcutPrivate::unregisterShortcut(quint32 nativeKey, quint32 nativeMods)
|
||||
{
|
||||
QxtX11Data x11;
|
||||
return x11.isValid() && x11.ungrabKey(nativeKey, nativeMods, x11.rootWindow());
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
include($$ZEAL_COMMON_PRI)
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
QT += gui widgets sql concurrent
|
||||
|
||||
SOURCES += \
|
||||
main.cpp
|
||||
|
||||
RESOURCES += \
|
||||
resources/zeal.qrc
|
||||
|
||||
DESTDIR = $$BUILD_ROOT/bin
|
||||
|
||||
unix:!macx {
|
||||
TARGET = zeal
|
||||
target.path = $$PREFIX/bin
|
||||
|
||||
INSTALLS += target
|
||||
}
|
||||
|
||||
win32 {
|
||||
TARGET = zeal
|
||||
RC_ICONS = resources/zeal.ico
|
||||
}
|
||||
|
||||
macx {
|
||||
TARGET = Zeal
|
||||
ICON = resources/zeal.icns
|
||||
}
|
||||
|
||||
# FIXME: Hardcoded link line & cyclic dependencies.
|
||||
LIBS += -lCore -lUi -lRegistry -lUtil
|
||||
|
||||
# Depend on all dependencies of libraries
|
||||
for(lib_dir, $$list($$files($$SRC_ROOT/src/libs/*))) {
|
||||
!equals(lib_dir, $$SRC_ROOT/src/libs/libs.pro) {
|
||||
include($$lib_dir/$$basename(lib_dir).pri)
|
||||
PRE_TARGETDEPS += $$BUILD_ROOT/.lib/lib$${ZEAL_LIB_NAME}.a
|
||||
# LIBS += -l$$ZEAL_LIB_NAME
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015-2016 Oleg Shparber
|
||||
** Copyright (C) 2013-2014 Jerzy Kozera
|
||||
** Contact: https://go.zealdocs.org/l/contact
|
||||
**
|
||||
** This file is part of Zeal.
|
||||
**
|
||||
** Zeal 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 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** Zeal 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 Zeal. If not, see <https://www.gnu.org/licenses/>.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <core/application.h>
|
||||
#include <core/localserver.h>
|
||||
#include <registry/searchquery.h>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QCommandLineParser>
|
||||
#include <QDesktopServices>
|
||||
#include <QDir>
|
||||
#include <QIcon>
|
||||
#include <QMessageBox>
|
||||
#include <QSqlDatabase>
|
||||
#include <QTextStream>
|
||||
#include <QUrlQuery>
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
#include <QSettings>
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace Zeal;
|
||||
|
||||
namespace {
|
||||
const char contactUrl[] = "https://go.zealdocs.org/l/contact";
|
||||
}
|
||||
|
||||
struct CommandLineParameters
|
||||
{
|
||||
bool force;
|
||||
bool preventActivation;
|
||||
Registry::SearchQuery query;
|
||||
#ifdef Q_OS_WIN32
|
||||
bool registerProtocolHandlers;
|
||||
bool unregisterProtocolHandlers;
|
||||
#endif
|
||||
};
|
||||
|
||||
QString stripParameterUrl(const QString &url, const QString &scheme)
|
||||
{
|
||||
QStringRef ref = url.midRef(scheme.length() + 1);
|
||||
if (ref.startsWith(QLatin1String("//")))
|
||||
ref = ref.mid(2);
|
||||
if (ref.endsWith(QLatin1Char('/')))
|
||||
ref = ref.left(ref.length() - 1);
|
||||
return ref.toString();
|
||||
}
|
||||
|
||||
CommandLineParameters parseCommandLine(const QStringList &arguments)
|
||||
{
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription(QObject::tr("Zeal - Offline documentation browser."));
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
|
||||
// TODO: [Qt 5.4] parser.addOption({{"f", "force"}, "Force the application run."});
|
||||
parser.addOption(QCommandLineOption({QStringLiteral("f"), QStringLiteral("force")},
|
||||
QObject::tr("Force the application run.")));
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
parser.addOption(QCommandLineOption({QStringLiteral("register")},
|
||||
QObject::tr("Register protocol handlers")));
|
||||
parser.addOption(QCommandLineOption({QStringLiteral("unregister")},
|
||||
QObject::tr("Unregister protocol handlers")));
|
||||
#endif
|
||||
parser.addPositionalArgument(QStringLiteral("url"), QObject::tr("dash[-plugin]:// URL"));
|
||||
parser.process(arguments);
|
||||
|
||||
CommandLineParameters clParams;
|
||||
clParams.force = parser.isSet(QStringLiteral("force"));
|
||||
clParams.preventActivation = false;
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
clParams.registerProtocolHandlers = parser.isSet(QStringLiteral("register"));
|
||||
clParams.unregisterProtocolHandlers = parser.isSet(QStringLiteral("unregister"));
|
||||
|
||||
if (clParams.registerProtocolHandlers && clParams.unregisterProtocolHandlers) {
|
||||
QTextStream(stderr) << QObject::tr("Parameter conflict: --register and --unregister.\n");
|
||||
::exit(EXIT_FAILURE);
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: Support dash-feed:// protocol
|
||||
const QString arg
|
||||
= QUrl::fromPercentEncoding(parser.positionalArguments().value(0).toUtf8());
|
||||
if (arg.startsWith(QLatin1String("dash:"))) {
|
||||
clParams.query.setQuery(stripParameterUrl(arg, QStringLiteral("dash")));
|
||||
} else if (arg.startsWith(QLatin1String("dash-plugin:"))) {
|
||||
const QUrlQuery urlQuery(stripParameterUrl(arg, QStringLiteral("dash-plugin")));
|
||||
|
||||
const QString keys = urlQuery.queryItemValue(QStringLiteral("keys"));
|
||||
if (!keys.isEmpty())
|
||||
clParams.query.setKeywords(keys.split(QLatin1Char(',')));
|
||||
|
||||
clParams.query.setQuery(urlQuery.queryItemValue(QStringLiteral("query")));
|
||||
|
||||
const QString preventActivation
|
||||
= urlQuery.queryItemValue(QStringLiteral("prevent_activation"));
|
||||
clParams.preventActivation = preventActivation == QLatin1String("true");
|
||||
} else {
|
||||
clParams.query.setQuery(arg);
|
||||
}
|
||||
|
||||
return clParams;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
void registerProtocolHandler(const QString &scheme, const QString &description)
|
||||
{
|
||||
const QString appPath = QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
|
||||
const QString regPath = QStringLiteral("HKEY_CURRENT_USER\\Software\\Classes\\") + scheme;
|
||||
|
||||
QScopedPointer<QSettings> reg(new QSettings(regPath, QSettings::NativeFormat));
|
||||
|
||||
reg->setValue(QStringLiteral("Default"), description);
|
||||
reg->setValue(QStringLiteral("URL Protocol"), QString());
|
||||
|
||||
reg->beginGroup(QStringLiteral("DefaultIcon"));
|
||||
reg->setValue(QStringLiteral("Default"), QString("%1,1").arg(appPath));
|
||||
reg->endGroup();
|
||||
|
||||
reg->beginGroup(QStringLiteral("shell"));
|
||||
reg->beginGroup(QStringLiteral("open"));
|
||||
reg->beginGroup(QStringLiteral("command"));
|
||||
reg->setValue(QStringLiteral("Default"), QVariant(appPath + QLatin1String(" %1")));
|
||||
}
|
||||
|
||||
void registerProtocolHandlers(const QHash<QString, QString> &protocols, bool force = false)
|
||||
{
|
||||
const QString regPath = QStringLiteral("HKEY_CURRENT_USER\\Software\\Classes");
|
||||
QScopedPointer<QSettings> reg(new QSettings(regPath, QSettings::NativeFormat));
|
||||
|
||||
const QStringList groups = reg->childGroups();
|
||||
for (auto it = protocols.cbegin(); it != protocols.cend(); ++it) {
|
||||
if (force || !groups.contains(it.key()))
|
||||
registerProtocolHandler(it.key(), it.value());
|
||||
}
|
||||
}
|
||||
|
||||
void unregisterProtocolHandlers(const QHash<QString, QString> &protocols)
|
||||
{
|
||||
const QString regPath = QStringLiteral("HKEY_CURRENT_USER\\Software\\Classes");
|
||||
QScopedPointer<QSettings> reg(new QSettings(regPath, QSettings::NativeFormat));
|
||||
|
||||
for (auto it = protocols.cbegin(); it != protocols.cend(); ++it)
|
||||
reg->remove(it.key());
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Do not allow Qt version lower than the app was compiled with.
|
||||
QT_REQUIRE_VERSION(argc, argv, QT_VERSION_STR);
|
||||
|
||||
QCoreApplication::setApplicationName(QStringLiteral("Zeal"));
|
||||
QCoreApplication::setApplicationVersion(ZEAL_VERSION);
|
||||
QCoreApplication::setOrganizationDomain(QStringLiteral("zealdocs.org"));
|
||||
QCoreApplication::setOrganizationName(QStringLiteral("Zeal"));
|
||||
|
||||
QScopedPointer<QApplication> qapp(new QApplication(argc, argv));
|
||||
|
||||
const CommandLineParameters clParams = parseCommandLine(qapp->arguments());
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
const static QHash<QString, QString> protocols = {
|
||||
{QStringLiteral("dash"), QStringLiteral("Dash Protocol")},
|
||||
{QStringLiteral("dash-plugin"), QStringLiteral("Dash Plugin Protocol")}
|
||||
};
|
||||
|
||||
if (clParams.unregisterProtocolHandlers) {
|
||||
unregisterProtocolHandlers(protocols);
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
registerProtocolHandlers(protocols, clParams.registerProtocolHandlers);
|
||||
if (clParams.registerProtocolHandlers)
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Detect already running instance and optionally send the search query to it.
|
||||
if (!clParams.force && Core::LocalServer::sendQuery(clParams.query, clParams.preventActivation))
|
||||
return 0;
|
||||
|
||||
// Set application-wide window icon. All message boxes and other windows will use it by default.
|
||||
qapp->setWindowIcon(QIcon::fromTheme(QStringLiteral("zeal"),
|
||||
QIcon(QStringLiteral(":/zeal.ico"))));
|
||||
|
||||
QScopedPointer<Core::LocalServer> localServer(new Core::LocalServer());
|
||||
if (!localServer->start()) {
|
||||
QScopedPointer<QMessageBox> msgBox(new QMessageBox());
|
||||
msgBox->setWindowTitle(QStringLiteral("Zeal"));
|
||||
|
||||
msgBox->setIcon(QMessageBox::Warning);
|
||||
msgBox->setText(QObject::tr("Another application instance can be still running, "
|
||||
"or has crashed.<br>Make sure to start Zeal only once."));
|
||||
msgBox->addButton(QMessageBox::Help);
|
||||
msgBox->addButton(QMessageBox::Retry);
|
||||
QPushButton *quitButton = msgBox->addButton(QObject::tr("&Quit"),
|
||||
QMessageBox::DestructiveRole);
|
||||
msgBox->setDefaultButton(quitButton);
|
||||
|
||||
switch (msgBox->exec()) {
|
||||
case QMessageBox::Rejected:
|
||||
return EXIT_SUCCESS;
|
||||
case QMessageBox::Help:
|
||||
QDesktopServices::openUrl(QUrl(contactUrl));
|
||||
}
|
||||
|
||||
msgBox->removeButton(msgBox->button(QMessageBox::Retry));
|
||||
|
||||
if (!localServer->start(true)) {
|
||||
msgBox->setIcon(QMessageBox::Critical);
|
||||
msgBox->setText(QObject::tr("Zeal is unable to start. Please report the issue "
|
||||
"providing the details below."));
|
||||
msgBox->setDetailedText(localServer->errorString());
|
||||
|
||||
if (msgBox->exec() == QMessageBox::Help)
|
||||
QDesktopServices::openUrl(QUrl(contactUrl));
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for SQLite plugin
|
||||
// TODO: Specific to docset format and should be handled accordingly in the future
|
||||
if (!QSqlDatabase::isDriverAvailable(QStringLiteral("QSQLITE"))) {
|
||||
QScopedPointer<QMessageBox> msgBox(new QMessageBox());
|
||||
msgBox->setWindowTitle(QStringLiteral("Zeal"));
|
||||
msgBox->setIcon(QMessageBox::Critical);
|
||||
msgBox->setText(QObject::tr("Qt SQLite driver is not available."));
|
||||
msgBox->addButton(QMessageBox::Help);
|
||||
QPushButton *quitButton = msgBox->addButton(QObject::tr("&Quit"),
|
||||
QMessageBox::DestructiveRole);
|
||||
msgBox->setDefaultButton(quitButton);
|
||||
if (msgBox->exec() == QMessageBox::Help)
|
||||
QDesktopServices::openUrl(QUrl(contactUrl));
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
QDir::setSearchPaths(QStringLiteral("typeIcon"), {QStringLiteral(":/icons/type")});
|
||||
|
||||
QScopedPointer<Core::Application> app(new Core::Application());
|
||||
QObject::connect(localServer.data(), &Core::LocalServer::newQuery,
|
||||
app.data(), &Core::Application::executeQuery);
|
||||
|
||||
if (!clParams.query.isEmpty())
|
||||
Core::LocalServer::sendQuery(clParams.query, clParams.preventActivation);
|
||||
|
||||
return qapp->exec();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Zeal - Start Page</title>
|
||||
<title>Start Page</title>
|
||||
<link href="main.css" rel="stylesheet" type="text/css">
|
||||
</head>
|
||||
<body onmousedown="event.preventDefault()" oncontextmenu="event.preventDefault()">
|
||||
@@ -11,8 +11,8 @@
|
||||
</div>
|
||||
<div class="dynamic"></div>
|
||||
<footer>
|
||||
<p><a href="http://zealdocs.org">Visit Zeal website</a><p>
|
||||
<p><a href="http://www.kapeli.com/dash">Get Dash for OS X or iOS</a><p>
|
||||
<p><a href="https://zealdocs.org">zealdocs.org</a> | <a href="https://twitter.com/zealdocs">@zealdocs</a><p>
|
||||
<p><small><a href="https://www.kapeli.com/dash">Get Dash for OS X or iOS</a></small><p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 923 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 578 B After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 482 B |
|
Before Width: | Height: | Size: 360 B After Width: | Height: | Size: 316 B |
|
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 523 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 482 B |
|
After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 474 B |
|
After Width: | Height: | Size: 580 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 421 B |
|
After Width: | Height: | Size: 577 B |
|
After Width: | Height: | Size: 471 B |
|
After Width: | Height: | Size: 557 B |
|
After Width: | Height: | Size: 430 B |
|
After Width: | Height: | Size: 580 B |
|
After Width: | Height: | Size: 294 B |
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 507 B |
|
After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 510 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 599 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 478 B |
|
After Width: | Height: | Size: 304 B |
|
Before Width: | Height: | Size: 554 B After Width: | Height: | Size: 510 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 315 B After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 271 B |
|
After Width: | Height: | Size: 309 B |
|
After Width: | Height: | Size: 310 B |
|
Before Width: | Height: | Size: 454 B After Width: | Height: | Size: 410 B |
|
After Width: | Height: | Size: 240 B |
|
Before Width: | Height: | Size: 386 B After Width: | Height: | Size: 342 B |
|
After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 500 B |
|
After Width: | Height: | Size: 337 B |
|
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 521 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 246 B |
|
After Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 435 B |