Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zealdocs/zeal into
Browse files Browse the repository at this point in the history
rebase-pr1002

Fix Git conflicts of PR zealdocs#1002.
  • Loading branch information
gcoelho committed Feb 16, 2020
2 parents 23a76a1 + 58b9276 commit 718e1d7
Show file tree
Hide file tree
Showing 264 changed files with 3,069 additions and 2,019 deletions.
183 changes: 183 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
version: '{branch}-{build}'
pull_requests:
do_not_increment_build_number: true
branches:
only:
- master
- stable
- /release\/.*/
image:
- Visual Studio 2015
- Ubuntu1804
configuration: Release
platform:
- x86
- x64
environment:
APPVEYOR_YML_DISABLE_PS_LINUX: true
matrix:
- ZEAL_PORTABLE_BUILD: "OFF"
- ZEAL_PORTABLE_BUILD: "ON"
matrix:
exclude:
- image: Ubuntu1804
platform: x86
init:
- ps: |-
if ($Env:PLATFORM -eq "x64") {
$Env:QT_ROOT = "C:\Qt\5.11\msvc2015_64"
} else {
$Env:QT_ROOT = "C:\Qt\5.11\msvc2015"
}
$Env:Path += ";${Env:QT_ROOT}\bin;C:\Program Files\7-Zip"
install:
- ps: |-
# Install vcpkg toolchain.
$Env:VCPKG_ROOT = "c:\projects\vcpkg-export"
$vcpkgArchive = "vcpkg-export-20181014.4-${Env:PLATFORM}.7z"
appveyor DownloadFile "https://dl.bintray.com/zealdocs/windows-ci/$vcpkgArchive"
7z x $vcpkgArchive -o"${Env:VCPKG_ROOT}"
# Install QtWebKit.
$qtWebKitArchiveBaseName = "qtwebkit-5.212.0_72cfbd7-qt5111-msvc2015-${Env:PLATFORM}"
appveyor Downloadfile "https://dl.bintray.com/zealdocs/windows-ci/$qtWebKitArchiveBaseName.zip"
7z x "$qtWebKitArchiveBaseName.zip"
Get-ChildItem ".\$qtWebKitArchiveBaseName" | Copy -Destination ${Env:QT_ROOT} -Recurse -Force
- sh: |-
sudo apt-get -y -qq update
sudo apt-get -y -qq install \
--no-install-recommends \
cmake \
extra-cmake-modules \
qt5-default \
libqt5webkit5-dev \
libqt5x11extras5-dev \
libarchive-dev \
libsqlite3-dev \
libxcb-keysyms1-dev
before_build:
- ps: |-
Write-Output "Source directory: ${Env:APPVEYOR_BUILD_FOLDER}"
New-Item -ItemType Directory -Force -Path dist | Out-Null
Set-Location -Path dist
# Prepare .sln with CMake:
$cmakeGenerator = "Visual Studio 14 2015"
if ($Env:PLATFORM -eq "x64") {
$cmakeGenerator += " Win64"
}
Write-Output "Generator: $cmakeGenerator"
cmake "${Env:APPVEYOR_BUILD_FOLDER}" `
-G "$cmakeGenerator" `
-DZEAL_PORTABLE_BUILD="${Env:ZEAL_PORTABLE_BUILD}" `
-DCMAKE_BUILD_TYPE="${Env:CONFIGURATION}" `
-DCMAKE_PREFIX_PATH="${Env:QT_ROOT}" `
-DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_ROOT}\scripts\buildsystems\vcpkg.cmake"
Set-Location -Path ${Env:APPVEYOR_BUILD_FOLDER}
- sh: |-
mkdir build
cd build
cmake .. \
-DZEAL_PORTABLE_BUILD="${ZEAL_PORTABLE_BUILD}"
cd ..
build_script:
- ps: |-
msbuild "dist\ALL_BUILD.vcxproj" /m /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- sh: |-
cmake --build build
after_build:
- ps: |-
if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {
Write-Output "Deployment is disabled for pull requests."
Exit-AppveyorBuild
}
$package = "zeal"
if ($Env:ZEAL_PORTABLE_BUILD -eq "ON") {
$package = $package + "-portable"
}
if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {
$package = $package + "-unstable"
} elseif (${env:APPVEYOR_REPO_BRANCH}.StartsWith("release/")) {
$package = $package + "-stable"
} else {
Write-Output "Skipping deployment for this branch..."
Exit-AppveyorBuild
}
$Env:ZEAL_PKG_NAME = $package
# TODO: Use APPVEYOR_BUILD_VERSION.
$Env:ZEAL_PKG_VERSION = git describe | ForEach-Object {$_ -replace "^v",""}
$binaryDir = "dist\bin\Release"
$deploymentDir = "${Env:ZEAL_PKG_NAME}-${Env:ZEAL_PKG_VERSION}-windows-${Env:PLATFORM}"
Write-Output "Output Directory: $deploymentDir"
New-Item -Type directory -Path . -Name "$deploymentDir" -Force | Out-Null
& windeployqt `
--no-angle `
--no-compiler-runtime `
--no-opengl-sw `
--no-plugins `
--no-system-d3d-compiler `
--no-translations `
--dir "$deploymentDir" `
"$binaryDir\zeal.exe"
function AddItem ($path) {
Copy-Item "$path" "$deploymentDir"
Write-Host "Added $path"
}
AddItem "$binaryDir\*"
# OpenSSL is a runtime dependency, so copy it manually.
AddItem "${Env:VCPKG_ROOT}\installed\${Env:PLATFORM}-windows\bin\libeay32.dll"
AddItem "${Env:VCPKG_ROOT}\installed\${Env:PLATFORM}-windows\bin\ssleay32.dll"
function AddQtPlugin ($directory, $plugin) {
if ( -Not (Test-Path "$deploymentDir\$directory")) {
New-Item -ItemType directory -Path "$deploymentDir" -Name "$directory" | Out-Null
}
Copy-Item "${Env:QT_ROOT}\plugins\$directory\q$plugin.dll" "$deploymentDir\$directory"
Write-Host "Added $directory\$plugin.dll"
}
AddQtPlugin "imageformats" "gif"
AddQtPlugin "imageformats" "ico"
AddQtPlugin "imageformats" "jpeg"
AddQtPlugin "platforms" "windows"
AddQtPlugin "styles" "windowsvistastyle"
$archiveName = "$deploymentDir.zip"
& 7z a -mx=9 "$archiveName" "$deploymentDir"
Push-AppveyorArtifact "$archiveName"
test: off
artifacts:
- path: zeal-*.zip
deploy:
- provider: BinTray
username: trollixx
api_key:
secure: AsKi8j1sR34g/9+B22/dJ49X3Uie8TizgQD7lzNvW2/+deWq7oLyCQQUCrqPjOUY
subject: zealdocs
repo: windows-ci
package: $(ZEAL_PKG_NAME)
version: $(ZEAL_PKG_VERSION)
publish: true
override: true
on:
branch: stable
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig (https://editorconfig.org)
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_size = 4
indent_style = space
max_line_length = 100
trim_trailing_whitespace = true

[*.{xml,xml.in,yml}]
indent_size = 2
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
*.dll
*.dylib

# qmake
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.moc
moc_*.cpp
qrc_*.cpp
ui_*.h
Makefile*
*-build-*

# Qt Creator
*.autosave

Expand All @@ -30,6 +18,7 @@ Makefile*

# CMake
CMakeLists.txt.user
build/

# VS Code
/.vscode
Expand Down
14 changes: 0 additions & 14 deletions .shippable.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(PROJECT_COPYRIGHT "© 2015-2018 Oleg Shparber")
set(PROJECT_DESCRIPTION "A simple documentation browser.")
set(PROJECT_URL "https://zealdocs.org")

set(QT_MINIMUM_VERSION 5.5.1)
set(QT_MINIMUM_VERSION 5.9.5)

add_subdirectory(assets)
add_subdirectory(src)
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
[![Telegram Channel](https://img.shields.io/badge/follow-on%20telegram-179cde.svg?style=flat-square)](https://telegram.me/zealdocs)
[![Twitter](https://img.shields.io/badge/follow-on%20twitter-1da1f2.svg?style=flat-square)](https://twitter.com/zealdocs)

[![AppVeyor](https://img.shields.io/appveyor/ci/zealdocs/zeal/master.svg?style=flat-square)](https://ci.appveyor.com/project/zealdocs/zeal)
[![Coverity Scan](https://img.shields.io/coverity/scan/4271.svg?style=flat-square)](https://scan.coverity.com/projects/4271)

Zeal is a simple offline documentation browser inspired by [Dash](https://kapeli.com/dash).

![Screenshot](https://i.imgur.com/qBkZduS.png)

## Build Status

[![Coverity Scan](https://img.shields.io/coverity/scan/4271.svg?style=flat-square)](https://scan.coverity.com/projects/4271)

| OS | Build Status |
| -------- | ------------ |
| Linux | [![Shippable](https://img.shields.io/shippable/54ac2ce4d46935d5fbc19b84/master.svg?style=flat-square)](https://app.shippable.com/projects/54ac2ce4d46935d5fbc19b84) |
| Windows | [![AppVeyor](https://img.shields.io/appveyor/ci/zealdocs/zeal/master.svg?style=flat-square)](https://ci.appveyor.com/project/zealdocs/zeal) |

## Download

Get binary builds for Windows and Linux from the [download page](https://zealdocs.org/download.html).
Expand All @@ -32,7 +26,7 @@ After installing Zeal, go to *Tools->Docsets*, select the ones you want, and cli
### Required dependencies

* [CMake](https://cmake.org/).
* [Qt](https://www.qt.io/) version 5.5.1 or above. Required module: Qt WebKit Widgets.
* [Qt](https://www.qt.io/) version 5.9.5 or above. Required module: Qt WebKit Widgets.
* [libarchive](http://libarchive.org/).
* [SQLite](https://sqlite.org/).
* X11 platforms only: Qt X11 Extras and `xcb-util-keysyms`.
Expand Down Expand Up @@ -76,6 +70,13 @@ We want your feedback! Here's a list of different ways to contact developers and
* Finally, for private communications email us at [email protected].
* And do not forget to follow [@zealdocs](https://twitter.com/zealdocs) on Twitter!

If you feel generous and want to show some extra appreciation:

[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]

[buymeacoffee]: https://www.buymeacoffee.com/trollixx
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png

## 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).
3 changes: 1 addition & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Only C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Find includes in corresponding build directories.
Expand Down
10 changes: 5 additions & 5 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,23 @@ 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)
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);
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"));

#if QT_VERSION >= 0x050600
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

QScopedPointer<QApplication> qapp(new QApplication(argc, argv));
Expand Down Expand Up @@ -217,6 +216,7 @@ int main(int argc, char *argv[])
}

// Set application-wide window icon. All message boxes and other windows will use it by default.
qapp->setDesktopFileName(QStringLiteral("org.zealdocs.Zeal.desktop"));
qapp->setWindowIcon(QIcon::fromTheme(QStringLiteral("zeal"),
QIcon(QStringLiteral(":/zeal.ico"))));

Expand All @@ -236,7 +236,7 @@ int main(int argc, char *argv[])
});

if (!clParams.query.isEmpty()) {
QTimer::singleShot(0, [&app, clParams] {
QTimer::singleShot(0, app.data(), [&app, clParams] {
app->executeQuery(clParams.query, clParams.preventActivation);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,11 @@
<div class="hero-body">
<div class="container">
<div class="columns is-vcentered">
<div class="column has-text-centered">
<p class="title">Zeal
<span id="version" class="has-text-weight-light is-size-5"></span>
</p>
<p class="subtitle">Docs for everyone</p>
<div class="column">
<p class="title">File not found</p>
<p class="subtitle">Encountered a problem? Please <a onclick="zAppBridge.openShortUrl('report-bug')">report</a>!</p>
</div>
<div class="column">
<p class="subtitle is-5">Customize</p>
<div class="command-block" onclick="zAppBridge.triggerAction('openDocsetManager')">
<p class="title is-6">Docsets</p>
<p class="subtitle is-6">Install and update docsets</p>
</div>
<div class="command-block" onclick="zAppBridge.triggerAction('openPreferences')">
<p class="title is-6">Preferences</p>
<p class="subtitle is-6">Adjust application settings</p>
</div>
<p class="subtitle is-5">Get in touch</p>
<div class="command-block" onclick="zAppBridge.openShortUrl('gitter')">
<p class="title is-6">Gitter</p>
Expand Down Expand Up @@ -72,10 +61,6 @@
</div>
</div>
</section>

<script>
document.getElementById("version").textContent = zAppBridge.AppVersion;
</script>
</body>

</html>
2 changes: 1 addition & 1 deletion src/app/resources/browser/assets/css/welcome.min.css

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions src/app/resources/browser/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@
<span id="version" class="has-text-weight-light is-size-5"></span>
</p>
<p class="subtitle">Docs for everyone</p>
<div id="carboncontainer" style="margin-top: 75px;">
<div id="carbon" class="box">
<script async type="text/javascript" src="https://cdn.carbonads.com/carbon.js?zoneid=1673&serve=C6AILKT&placement=zealdocsforwindowsorg"
onerror="document.getElementById('carboncontainer').style.display = 'none';" id="_carbonads_js"></script>
</div>
</div>
</div>
<div class="column">
<p class="subtitle is-5">Customize</p>
Expand Down
Loading

0 comments on commit 718e1d7

Please sign in to comment.