Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide build instructions for Windows and macOS #4

Open
ghost opened this issue Aug 4, 2018 · 13 comments
Open

Provide build instructions for Windows and macOS #4

ghost opened this issue Aug 4, 2018 · 13 comments

Comments

@ghost
Copy link

ghost commented Aug 4, 2018

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

@ivan
Copy link
Contributor

ivan commented Aug 4, 2018

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
Copy link
Contributor

ivan commented Nov 4, 2018

@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
Copy link
Owner

mvf commented Nov 5, 2018

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

@mvf
Copy link
Owner

mvf commented Nov 5, 2018

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:

  • Qt WebEngine uses a separate QtWebEngineProcess.exe, which also links against Qt
  • The largest chunk is Qt5WebEngineCore.dll at ~70MiB, and static linking won't downsize that too much
  • Qt doesn't ship static libs, so we'd have to build Qt (and Chromium) ourselves :hurtrealbad:
  • Deploying the shared version is directly supported by Qt and there might be unforeseen issues with a custom static version

@ivan
Copy link
Contributor

ivan commented Nov 5, 2018

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

@mvf
Copy link
Owner

mvf commented Nov 8, 2018

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.

@mvf mvf changed the title what about Windows and macos? Provide build instructions for Windows and macOS Jun 18, 2019
@PendragonLore
Copy link

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:

  • git clone https://github.com/mistydemeo/eb.git (I tried the one from https://github.com/aehlke/eb first, but booklist.h was missing) and cd into it
  • compile and install it with ./configure + make + sudo make install
  • brew install qt cmake
  • git clone this repository, and cd into it
  • compile and install with cmake -DCMAKE_BUILD_TYPE=Release . + make + sudo make install

@p2501mk
Copy link

p2501mk commented Sep 29, 2022

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

@mvf
Copy link
Owner

mvf commented Sep 29, 2022

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 😉).

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
Copy link

p2501mk commented Sep 29, 2022

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
Copy link
Owner

mvf commented Sep 29, 2022

I see, tough choice! 😅

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
Copy link

p2501mk commented Sep 29, 2022

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

@JeremyMain
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants