mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Overhaul README.md
This commit is contained in:
parent
9f65f3c1f8
commit
4b4175574b
194
README.md
194
README.md
|
@ -2,95 +2,117 @@
|
|||
[![Windows](https://github.com/xiaoyifang/goldendict/actions/workflows/windows.yml/badge.svg)](https://github.com/xiaoyifang/goldendict/actions/workflows/windows.yml) [![Ubuntu](https://github.com/xiaoyifang/goldendict/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/xiaoyifang/goldendict/actions/workflows/ubuntu.yml)
|
||||
[![macos](https://github.com/xiaoyifang/goldendict/actions/workflows/macos.yml/badge.svg)](https://github.com/xiaoyifang/goldendict/actions/workflows/macos.yml)
|
||||
|
||||
## Introduction
|
||||
# GoldenDict
|
||||
|
||||
<b>GoldenDict</b> is a feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd/AARD/MDict/SDict) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained, and allowing you to type in words without any accents or correct case.
|
||||
A feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd/AARD/MDict/SDict) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained, and allowing you to type in words without any accents or correct case.
|
||||
|
||||
## Requirements
|
||||
## Installation
|
||||
|
||||
This code has been run and tested on Windows 10/11, Ubuntu Linux, Mac OS X.
|
||||
### Windows and macOS
|
||||
|
||||
### External Deps
|
||||
Download latest [stable](https://github.com/xiaoyifang/goldendict/releases/latest) version or daily [pre-release builds](https://github.com/xiaoyifang/goldendict/releases).
|
||||
|
||||
* Make, GCC, Git
|
||||
* Qt framework. Minimum required version is 5.15 and support the latest QT version 6.X
|
||||
* Qt Creator IDE is recommended for development
|
||||
* Various libraries on Linux (png, zlib, etc)
|
||||
* On Mac and Windows all the libraries are already included in the repository
|
||||
`.exe` for Windows users and `.dmg` for macOS users.
|
||||
|
||||
### Linux
|
||||
|
||||
#### Installing External Deps on Ubuntu Linux for Qt5
|
||||
The download links above includes `.Appimage` for Linux users.
|
||||
|
||||
sudo apt-get install git pkg-config build-essential qt5-qmake \
|
||||
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
|
||||
qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev \
|
||||
libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-dev \
|
||||
libqt5svg5-dev libqt5x11extras5-dev qttools5-dev \
|
||||
qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libqt5webchannel5-dev qtwebengine5-dev
|
||||
Archlinux users can also use community maintained [goldendict-webengine-git](https://aur.archlinux.org/packages/goldendict-webengine-git).
|
||||
|
||||
openSUSE ships an old version of this fork.
|
||||
|
||||
Helps are needed to deliver this fork to other distros!
|
||||
|
||||
## Build from source
|
||||
|
||||
### Dependencies
|
||||
|
||||
* C++17 compiler
|
||||
* Qt 5.15 or latest QT version 6.X
|
||||
* Various libraries on Linux, see below
|
||||
* On Mac and Windows all the libraries are included in the repository
|
||||
* Qt Creator is recommended for development
|
||||
|
||||
Steps below are using qt5, and you may use qt6 by replacing `5` with `6`.
|
||||
|
||||
#### Ubuntu
|
||||
|
||||
```
|
||||
sudo apt-get install git pkg-config build-essential qt5-qmake \
|
||||
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
|
||||
qtdeclarative5-dev libxtst-dev liblzo2-dev libbz2-dev \
|
||||
libavutil-dev libavformat-dev libtiff5-dev libeb16-dev \
|
||||
libqt5svg5-dev libqt5x11extras5-dev qttools5-dev \
|
||||
qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins libqt5webchannel5-dev qtwebengine5-dev
|
||||
```
|
||||
|
||||
#### Fedora 35
|
||||
|
||||
### Fedora 35
|
||||
```
|
||||
sudo dnf install git pkg-config libzstd-devel opencc-devel xz-devel xz-lzma-compat\
|
||||
libvorbis-devel zlib-devel hunspell-devel lzo-devel bzip2-devel \
|
||||
libao-devel ffmpeg-devel libtiff-devel eb-devel qt5-qtx11extras-devel libXtst-devel \
|
||||
libxkbcommon-devel qt5-qtbase qt5-qttools qt5-qtsvg-devl qt5-qtwebengine-devel qt5-qtmultimedia-devl
|
||||
|
||||
ffmpeg-devel libtiff-devel eb-devel qt5-qtx11extras-devel libXtst-devel \
|
||||
libxkbcommon-devel qt5-qtbase qt5-qttools qt5-qtsvg-devl qt5-qtwebengine-devel qt5-qtmultimedia-devel
|
||||
```
|
||||
|
||||
## How to build
|
||||
### Build steps
|
||||
|
||||
First, clone this repository, e.g.:
|
||||
Clone this repository:
|
||||
```
|
||||
git clone https://github.com/xiaoyifang/goldendict.git
|
||||
```
|
||||
|
||||
git clone https://github.com/xiaoyifang/goldendict.git
|
||||
#### Linux build
|
||||
|
||||
```
|
||||
cd goldendict && qmake-qt5 && make
|
||||
```
|
||||
|
||||
### Linux (fedora)
|
||||
And then invoke `qmake-qt5` and `make`:
|
||||
#### macOS build
|
||||
|
||||
cd goldendict && qmake-qt5 && make
|
||||
|
||||
### ArchLinux
|
||||
|
||||
on archlinux based os, you can use `yay` to install the community goldendict-webengine-git .
|
||||
|
||||
#(Manjaro distribution)
|
||||
pacman -S --needed git base-devel yay
|
||||
|
||||
yay -S goldendict-webengine-git
|
||||
|
||||
### macOS
|
||||
```
|
||||
brew install qt # or use official offline installer
|
||||
qmake CONFIG+=release CONFIG+=zim_support CONFIG+=chinese_conversion_support QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
|
||||
qmake CONFIG+=release CONFIG+=zim_support CONFIG+=chinese_conversion_support QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
|
||||
make
|
||||
make install
|
||||
```
|
||||
### Windows
|
||||
|
||||
Alternatively, you might want to load `goldendict.pro` file from within Qt Creator, especially on Windows.
|
||||
#### Windows build
|
||||
|
||||
the source code has offered precompile x64 windows libs on winlibs/lib/msvc. you can build your own version either.
|
||||
|
||||
### Building with Chinese conversion support
|
||||
To build with Visual Studio.
|
||||
check this [how to build with visual studio](howto/how%20to%20build%20and%20debug%20with%20VS2019.md)
|
||||
|
||||
To add Chinese conversion support you need at first install libopencc-dev package:
|
||||
Alternatively, you might want to load `goldendict.pro` file from within Qt Creator.
|
||||
|
||||
sudo apt-get install libopencc-dev
|
||||
### Build Configurations
|
||||
|
||||
Then pass `"CONFIG+=chinese_conversion_support"` to `qmake`
|
||||
**Notice**: All additional configs for `qmake` that must be combined in one of pass config options to `qmake`:
|
||||
```
|
||||
qmake-qt5 "CONFIG+=release" "CONFIG+=zim_support" "CONFIG+=chinese_conversion_support"
|
||||
```
|
||||
|
||||
qmake "CONFIG+=chinese_conversion_support"
|
||||
To ensure the changes applied, you may want to use `make clean` before `make`.
|
||||
|
||||
### Building with Zim dictionaries support
|
||||
#### Building with Chinese conversion support
|
||||
|
||||
To add Zim and Slob formats support you need at first install lzma-dev and zstd-dev packages:
|
||||
To add Chinese conversion support you need at first install libopencc-dev package, then pass `"CONFIG+=chinese_conversion_support"` to `qmake`.
|
||||
|
||||
sudo apt-get install liblzma-dev libzstd-dev
|
||||
```
|
||||
sudo apt-get install libopencc-dev
|
||||
```
|
||||
|
||||
Then pass `"CONFIG+=zim_support"` to `qmake`
|
||||
#### Building with Zim dictionaries support
|
||||
|
||||
qmake "CONFIG+=zim_support"
|
||||
To add Zim and Slob formats support you need at first install lzma-dev and zstd-dev packages, then pass `"CONFIG+=zim_support"` to `qmake`
|
||||
|
||||
### Building without extra tiff handler( DEPRECATED )
|
||||
```
|
||||
sudo apt-get install liblzma-dev libzstd-dev
|
||||
```
|
||||
|
||||
#### Building without extra tiff handler( DEPRECATED )
|
||||
|
||||
**deprecated: qt has offered b/w tiff support which means this options should always _enabled_. intend to remove in the future.**
|
||||
|
||||
|
@ -98,77 +120,55 @@ If you have problem building with libtiff5-dev package, you can pass
|
|||
`"CONFIG+=no_extra_tiff_handler"` to `qmake` in order to disable extra tiff support
|
||||
(without such extra support some b/w tiff images will not be displayed):
|
||||
|
||||
qmake "CONFIG+=no_extra_tiff_handler"
|
||||
|
||||
### Building without Epwing format support
|
||||
#### Building without Epwing format support
|
||||
|
||||
If you have problem building with libeb-dev package, you can pass
|
||||
`"CONFIG+=no_epwing_support"` to `qmake` in order to disable Epwing format support
|
||||
|
||||
qmake "CONFIG+=no_epwing_support"
|
||||
#### Building without internal audio players
|
||||
|
||||
### Building without internal audio players
|
||||
|
||||
If you have problem building with FFmpeg/libao (for example, Ubuntu older than 12.04), you can pass
|
||||
`"CONFIG+=no_ffmpeg_player"` to `qmake` in order to disable FFmpeg+libao internal audio player back end:
|
||||
|
||||
qmake "CONFIG+=no_ffmpeg_player"
|
||||
If you have problem building with FFmpeg (for example, very old linux distro), you can pass
|
||||
`"CONFIG+=no_ffmpeg_player"` to `qmake` in order to disable FFmpeg internal audio player back end.
|
||||
|
||||
If you have problem building with Qt5 Multimedia or experience GStreamer run-time errors (for example, Ubuntu 14.04), you can pass
|
||||
`"CONFIG+=no_qtmultimedia_player"` to `qmake` in order to disable Qt Multimedia internal audio player back end:
|
||||
`"CONFIG+=no_qtmultimedia_player"` to `qmake` in order to disable Qt Multimedia internal audio player back end.
|
||||
|
||||
qmake "CONFIG+=no_qtmultimedia_player"
|
||||
|
||||
<b>NB:</b> All additional settings for `qmake` that you need must be combined in one `qmake` launch, for example:
|
||||
|
||||
qmake "CONFIG+=zim_support" "CONFIG+=no_extra_tiff_handler" "CONFIG+=no_ffmpeg_player"
|
||||
|
||||
|
||||
Then, invoke `make clean` before `make` because the setting change:
|
||||
|
||||
make clean && make
|
||||
|
||||
### Building with xapian
|
||||
#### Building with xapian
|
||||
|
||||
build xapian from source, download and extract the xapian-core source code.
|
||||
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
./configure
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
On Windows,follow the instructions in the xapian-core/INSTALL Visual Studio parts.(**xapian does not support to use the Debug lib in Windows. have to debug in release version mode using xapian's release lib**).
|
||||
A precompiled version of xapian lib has provided in winlibs
|
||||
|
||||
use `CONFIG+=use_xapian` to enable this feature. when enabled ,xapian will be used to support as the the fulltext's backend engine.
|
||||
|
||||
qmake "CONFIG+=use_xapian"
|
||||
```
|
||||
qmake "CONFIG+=use_xapian"
|
||||
```
|
||||
|
||||
### Building under Windows with MS Visual Studio
|
||||
## Contributing
|
||||
|
||||
the source code has offered precompile x64 windows libs on winlibs/lib/msvc. you can build your own version either.
|
||||
All kinds of help like answering questions, bug reporting, testing translation and coding are welcomed.
|
||||
|
||||
To build with Visual Studio.
|
||||
check this [how to build with visual studio](howto/how%20to%20build%20and%20debug%20with%20VS2019.md)
|
||||
To start coding, the easiest way is load the `goldendict.pro` file to Qt Creator, make some changes then press the run button.
|
||||
|
||||
## Support
|
||||
|
||||
## Installation
|
||||
Bug reporting: [GoldenDict issue tracker](https://github.com/goldendict/goldendict/issues)
|
||||
|
||||
Installation is an optional step since the built binary can be used as-is without installation. But you can properly install via:
|
||||
|
||||
make install
|
||||
|
||||
<b>NB:</b> Don't do that on Windows!
|
||||
|
||||
You can uninstall via:
|
||||
|
||||
make uninstall
|
||||
General discussions: [discussions](https://github.com/xiaoyifang/goldendict/discussions)
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the <b>GNU GPLv3+</b> license, a copy of which can be found in the `LICENSE.txt` file.
|
||||
|
||||
## Support
|
||||
## History
|
||||
|
||||
The original project was developed at <http://goldendict.org/> and <https://github.com/goldendict/goldendict>.
|
||||
|
||||
Users looking for support should file an issue in the official [GoldenDict issue tracker](https://github.com/goldendict/goldendict/issues),
|
||||
or even better: submit a [pull request](https://github.com/goldendict/goldendict/pulls) if you have a fix available.
|
||||
General questions should be asked on the [official GoldenDict forum](http://goldendict.org/forum/).
|
||||
|
|
Loading…
Reference in a new issue