mvf / qolibri

Continuation of the qolibri EPWING dictionary/book reader
GNU General Public License v2.0
169 stars 13 forks source link

Provide build instructions for Windows and macOS #4

Open ghost opened 5 years ago

ghost commented 5 years ago

Is it possible to build it and if yes, would you kindly provide a tutorial?

ivan commented 5 years ago

Good question. The original qolibri did work on both, and I doubt the new commits have broken much, if anything. But unfortunately I will be unable to investigate this any time soon. Contributed build steps for either platform would be greatly appreciated. Because it is a Qt5 app, on Windows some of the steps might resemble the qBittorrent build.

ivan commented 5 years ago

@mvf since you have a working Windows build, could you please add it to the 2.1.0 release? Once you accept to be a collaborator, you can hit Edit on 2.1.0 on https://github.com/ludios/qolibri/releases. I don't particularly care if it's a .zip file with DLLs or a self-contained .exe at this point, anything is a lot better than nothing for the Japanese learners on Windows.

mvf commented 5 years ago

@ivan Thanks for the invite, I'll look into it when I get home.

mvf commented 5 years ago

I have added an archive with shared Windows binaries to the 2.1.0 release (64-bits only for now, 32-bits should follow soon™). I would have preferred a static build, but that doesn't seem feasible in this case:

ivan commented 5 years ago

Awesome, thanks. The build is working fine on my Windows 10 1803. I added a link from the README.

mvf commented 5 years ago

I'm afraid 32-bit Windows builds will have to wait. There is no pre-built 32-bit Qt WebEngine and building it looks just painful. Official 32-bit builds are planned again for 5.12: QTBUG-63708.

PendragonLore commented 4 years ago

I don't know how useful this can be since I'm not even sure this is fully correct, but here are the steps I took to compile qolibri on macOS High Sierra, assuming make has already been installed:

p2501mk commented 1 year ago

Dumb question maybe, but would a compile be working on an m1 Mac? Has anyone tried this?

mvf commented 1 year ago

I have cross-compiled for Apple Silicon but haven't actually run the app on an M1 Mac yet (still on Intel waiting for the M2 Mini :wink:).

qolibri HEAD should build on M1 using the steps above. Just make sure Brew installs Qt >=6.2 (seems to be at 6.3.1 ATM, so should be fine).

p2501mk commented 1 year ago

Thank you for replying! I'm trying to decide between a powerful Chromebook and a Macbook Air M1 for Japanese studies, and Qolibri is one item on my pro/con list.. -_-;;

mvf commented 1 year ago

I see, tough choice! :sweat_smile:

From a qolibri PoV you should be good either way: 2.1.4 should already run on M1 Macs via Rosetta. Future releases will support M1 natively (universal binary). ChromeOS should be able to run the Linux version via Crostini.

p2501mk commented 1 year ago

Tough choice indeed :) I'm leaning M1 for silence. And yea Rosetta is nice and all, but I'd prefer native software..

JeremyMain commented 7 months ago

Adding some detail for building on Mac specifically for Apple Silicon

use brew to install cmake, qt as noted above after brew has finished installing, there are a few suggested items to add to your ~/.zshrc

export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/qt@5/lib"
export CPPFLAGS="-I/opt/homebrew/opt/qt@5/include"

be sure to start a new 'zsh' to pickup the environment variables.

clone the qolibr repository, make a build directory and cd into it. Next run cmake .. to configure and then make

I was getting a fatal error: 'eb/eb.h' file not found

At this point I was hunting around for the EB_LIBRARY sources, and based on the suggestion by @PendragonLore I cloned the https://github.com/mistydemeo/eb.git project and followed his build and install guidance.

Then, I copied the 'eb' directory which contains eb.h found in (mistydemeo)/eb/ into the (qolibri-2.1.4)/src/ directory.

finally from the build directory, run cmake .. and then make to build the Apple silicon build. The Apple silicon build version of the application will be found in the build directory.

Using 'Activity Monitor' I have confirmed that it is now Apple and not Intel.