Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## Requirements

This code has been run and tested on Windows XP/Vista/7, Ubuntu Linux, Mac OS X.
This code has been run and tested on Windows XP/Vista/7, Ubuntu Linux, macOS Ventura (M2 CPU).

### External Deps

* Make, GCC, Git
* Qt framework. Minimum required version is 4.6. But Qt 4.7 or 4.8 is recommended.
* 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
* On Windows all the libraries are already included in the repository

### Installing External Deps on Ubuntu Linux

Expand All @@ -30,7 +30,11 @@ This code has been run and tested on Windows XP/Vista/7, Ubuntu Linux, Mac OS X.
libqt5webkit5-dev libqt5svg5-dev libqt5x11extras5-dev qttools5-dev \
qttools5-dev-tools qtmultimedia5-dev libqt5multimedia5-plugins

## How to build
### Installing External Deps on macOS (tested on Ventura)

brew install tiff libao vorbis ffmpeg hunspell xz lzo libogg opencc zstd qt@5

## How to build on Linux and Windows

First, clone this repository, e.g.:

Expand All @@ -46,6 +50,29 @@ finding it at a path like `/usr/lib/x86_64-linux-gnu/qt5/bin/qmake`.
Alternatively, you might want to load `goldendict.pro` file from within Qt Creator, especially on Windows.

Note: To compile with `libhunspell` older than 1.5 pass `"CONFIG+=old_hunspell"` to `qmake`.
## How to build on macOS Ventura 13.1 (succeeded on a Macbook Air M2)
The old `*.dylib` files included in the `maclibs` directory are outdated (for x86), so they've been removed.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these old files work with older architectures or Mac versions? If so, can the maclibs/ directory stay? Depending on the detected Mac version or on a new CONFIG variable, goldendict.pro could either use maclibs/ or rely on homebrew.

Any dependent libraries are either using the version come with the OS, or installed by homebrew.

The packages install by Homebrew are (may not be complete):
```
brew install tiff libao vorbis ffmpeg hunspell xz lzo libogg opencc zstd qt@5
```

NOTE: The current version of `qt` is Qt6, which I've been unable to compile successfully. So you either not to
install the `qt` package, but install `qt@5` or do the following:
```
brew unlink qt && brew link qt@5
```

After all the requirements have been met, compile the App by:
```
qmake "CONFIG+=use_qtwebengine" "CONFIG+=no_epwing_support"
make -j8
```
If you are **lucky**, a `GoldenDict.app` could be found in the code's root directory. Move it to `/Applications`
(or by `make install` maybe, haven't tried it).


### Building with Chinese conversion support

Expand Down
19 changes: 9 additions & 10 deletions goldendict.pro
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ win32 {
# QMAKE_CXXFLAGS_RELEASE += /GL # slows down the linking significantly
LIBS += -lshell32 -luser32 -lsapi -lole32
Debug: LIBS+= -lhunspelld
Release: LIBS+= -lhunspell
Release: LIBS+= -lhunspell-1.6.1
HUNSPELL_LIB = hunspell
} else {
CONFIG(gcc48) {
Expand Down Expand Up @@ -239,25 +239,24 @@ mac {
-lvorbisfile \
-lvorbis \
-logg \
-lhunspell-1.6.1 \
-lhunspell-1.7.0 \
-llzo2
INCLUDEPATH += /opt/homebrew/include
LIBS += -L/opt/homebrew/lib -framework AppKit -framework Carbon
!CONFIG( no_ffmpeg_player ) {
LIBS += -lao \
-lswresample-gd \
-lavutil-gd \
-lavformat-gd \
-lavcodec-gd
-lswresample \
-lavutil \
-lavformat \
-lavcodec
}
INCLUDEPATH = $${PWD}/maclibs/include
LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon
OBJECTIVE_SOURCES += lionsupport.mm \
machotkeywrapper.mm \
macmouseover.mm \
speechclient_mac.mm
ICON = icons/macicon.icns
QMAKE_INFO_PLIST = myInfo.plist
QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks & \
cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ & \
mkdir -p GoldenDict.app/Contents/MacOS/locale & \
cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/ & \
mkdir -p GoldenDict.app/Contents/MacOS/help & \
Expand Down Expand Up @@ -616,7 +615,7 @@ CONFIG( chinese_conversion_support ) {
Release: LIBS += -lopencc
} else {
mac {
LIBS += -lopencc.2
LIBS += -lopencc
} else {
LIBS += -lopencc
}
Expand Down
139 changes: 0 additions & 139 deletions maclibs/include/ao/ao.h

This file was deleted.

39 changes: 0 additions & 39 deletions maclibs/include/ao/os_types.h

This file was deleted.

51 changes: 0 additions & 51 deletions maclibs/include/ao/plugin.h

This file was deleted.

Loading