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

Windows build #115

Open
jhspetersson opened this issue Jul 9, 2019 · 55 comments
Open

Windows build #115

jhspetersson opened this issue Jul 9, 2019 · 55 comments
Labels
help wanted Extra attention is needed

Comments

@jhspetersson
Copy link

Great project! Please, provide Windows binaries if possible.

@johnfactotum
Copy link
Owner

Should be possible. Are there currently binaries available for GJS and WebKitGTK? I imagine having to compile those two wouldn't be fun, especially the latter.

I don't currently have access to Windows, though, so there's no way I can work on this. Would appreciate any help if anyone's interested in this.

@johnfactotum johnfactotum added the help wanted Extra attention is needed label Jul 9, 2019
@itprojects
Copy link
Contributor

@johnfactotum AppImage (#115) should be able to do it, for newer versions that have the linux submodule. See discussion here.

@johnfactotum
Copy link
Owner

Using WSL is just cheating, no? Well, I suppose that's one way to do it. But it would be much better if it can be run natively on Windows and macOS. GTK is still cross-platform, after all, even if that's not their main focus now.

Actually, I've been thinking, if GJS+WebKit apps can be easily run on Windows and macOS, then it'd even become a viable alternative to Electron for developers. If you bundle one of those high quality GTK themes that emulates Windows or macOS UI, then it'd even look very native on those platforms.

@itprojects
Copy link
Contributor

If only we had an AppImage for Bionic...

@itprojects
Copy link
Contributor

@probonopd What do you think about this discussion? Can you make a test AppImage for Bionic (or higher), so that we can check cross-OS compatibility?

@probonopd
Copy link

I don't get what a Windows build has to do with AppImage. I also don't get why an AppImage built on trusty or xenial (as we recommend) would not work just fine on bionic.

@itprojects
Copy link
Contributor

Trusty is not a supported version anymore. Xenial's support is not enough to meet basic requirements.

@probonopd
Copy link

Xenial's support is not enough to meet basic requirements.

What do you mean by that and what does this have to do with a "Windows build"?

@bilelmoussaoui
Copy link

Providing Windows builds while using WebKitGTK is impossible currently. The easiest way to create a windows bundle is by using MinGW, but they don't package WebKitGTK, it's a big, could cause security risks, take too much time to build and so on dependency. If you ever get WebkitGTK maintainers to officially support the MinGW package, the rest is just a matter of packaging it.

@opusforlife2
Copy link

Has the situation improved any, after a year?

@make-42
Copy link

make-42 commented Oct 23, 2020

Same question.

@BlackWingedKing
Copy link

BlackWingedKing commented Oct 26, 2020

Hi, @johnfactotum any update? This issue is labeled help wanted. I would like to work on this. Is it possible to provide a roadmap?

@BlackWingedKing
Copy link

BlackWingedKing commented Oct 26, 2020

I was able to run on windows using wsl2 following this and building from the source. This also helped me solve some issues faced.
update: Unable to open the books.

image

@Include-sys
Copy link

@BlackWingedKing Are you able to open books? Because I couldn't.

@BlackWingedKing
Copy link

BlackWingedKing commented Oct 28, 2020

Hey @Include-sys
I'm not able to open the books. Sorry I should have checked it before posting

@Include-sys
Copy link

@BlackWingedKing Btw, I compiled it without sandboxing support and it works.

image

@BlackWingedKing
Copy link

BlackWingedKing commented Oct 28, 2020

@Include-sys that's very cool
Can you list down the steps you have followed here?

I mean command or process to remove sandboxing support?

@Include-sys
Copy link

@BlackWingedKing

In /src/main.js at line 38,
webContext.set_sandbox_enabled(true)
I changed it to false,
webContext.set_sandbox_enabled(false)

Then builded and installed, and it worked.

@BlackWingedKing
Copy link

Thank you @Include-sys

@hegerdes
Copy link

Just an idea:
Is it worth looking to get WebKitGTK working in WebAssably and run the whole app inside an electron instance?

or has anyone tried the WinCairo port?

@sergeevabc
Copy link

Could someone be so kind to share a working build that will run on Windows 7?

@ghost
Copy link

ghost commented Mar 24, 2021

Wish if there be a windows native version, This software is good , amazing , useful

@citrus77
Copy link

citrus77 commented Apr 30, 2021

Obviously it isn't quite as nice as having a native build, but I've been following this for a while and wanted to verify that the Linux version is working fairly well on the latest WSL2.

All I had to do is install the latest dev channel build of Windows, enable and update WSL, install Ubuntu in WSL, and install Foliate on Ubuntu.

Issues doing it this way: a little slow to load, generic Tux icon instead of app icon, Windows Explorer won't associate Foliate with EPUB files. No problem accessing the Windows file system to get to my books, though.

Foliate

@itprojects
Copy link
Contributor

@darrian77 Can you publish detailed instuctions for Windows users (as a comment in this thread).

@citrus77
Copy link

citrus77 commented Apr 30, 2021

Sure.

Install Windows 10 Insider Preview build 21362 or higher. To do this you have to enroll in the Windows Insider program and select the Dev channel.

Open the Start menu and search (just start typing) for "turn Windows features on or off" (about when you get to "turn Windows" it should appear as the top result). Turn on Virtual Machine Platform and Windows Subsystem for Linux.
windowsfeatures

Reboot.

Open the Windows Store, search for and install the Linux distribution of your choice. I use and recommend Ubuntu. Additionally, I recommend the Ubuntu on Windows Community Preview, which you can only get at this link since it won't show up in a Store search.

https://www.microsoft.com/en-us/p/ubuntu-on-windows-community-preview/9p9q5zh1hrr0?rtc=1&activetab=pivot:overviewtab

Open the command prompt or powershell as administrator and type wsl --update

Update the WSL2 kernel by installing the package. If you're on a x64 machine use
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
and if you're using an ARM64 machine use
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_arm64.msi

Open Ubuntu (or your distro) in the start menu. This will launch Linux in the command prompt, which will then download files if needed and then guide you through the initial setup, where you can choose your username and password for Linux.

After setting up the environment, get updates, install additional packages. You can use any file manager, and I'm not sure if x11-apps are strictly required, but it made sense to install it.

sudo apt update
sudo apt upgrade
sudo apt install nautilus
sudo apt install x11-apps

Install Foliate.

sudo add-apt-repository ppa:apandada1/foliate
sudo apt update
sudo apt install foliate

Foliate should show up as a shortcut in the Start Menu in a folder named after the Linux distro you installed.

For more detailed instructions on setting up WSL2 with GUI, or WSLg, check this link https://github.com/microsoft/wslg

@itprojects
Copy link
Contributor

itprojects commented Apr 30, 2021

@johnfactotum Given that these instructions produce the much coveted Windows Build, without added costs (to the foliate developer/s), are you willing to add the instructions to a README_WINDOWS.md file and close this bug ?

@shadyalfred
Copy link

shadyalfred commented Sep 15, 2021

I built Foliate from source, and disabled sand boxing, but whenever I try to open a book it shows this error

(WebKitWebProcess:110): Gdk-ERROR **: 18:58:17.966: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'GLXBadFBConfig'.
  (Details: serial 172 error_code 163 request_code 149 (GLX) minor_code 21)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

I am using VcXsrv tho, not WSLg

Update:
Never mind, disabling Native opengl and exporting LIBGL_ALWAYS_INDIRECT=0 fixed it

@citrus77
Copy link

@ShaadiAlfred would you mind sharing your builds?

@shadyalfred
Copy link

@darrian77 I'm not sure how. You mean like the binary in my /usr/bin directory?

@citrus77
Copy link

@darrian77 I'm not sure how. You mean like the binary in my /usr/bin directory?

This is the thread for Windows builds, so I thought you'd actually built a Windows executable. If that's not the case then nvm. /usr/bin sounds like you just built the Linux version.

@Darthagnon
Copy link

I was doing some research on WebkitGTK for Windows, and came across this Stack Overflow thread which led to this archived website with instructions on how to compile WebkitGTK for Windows. Just thought I'd share what I've found so far, as this seems to be the main thing preventing Foliate from working natively.

@RuthlessRuler
Copy link

Are there any plans to build a native Windows Binary for this app? It would be awesome to have it working in windows w/o WSL etc.

@itprojects
Copy link
Contributor

Making a native Windows Binary app is equivalent to re-engineering the app from scratch, for Windows only.

Such activity will require too much time and support, but Foliate already works in Windows with WSL.

Therefore, it's very unlikely that it will happen.

@johnfactotum
Copy link
Owner

johnfactotum commented Dec 17, 2021

Making a native Windows Binary app is equivalent to re-engineering the app from scratch,

To clarity, either someone maintains WebKitGTK for Windows, or there needs to be a non-WebKitGTK version of Foliate.

Note that non-WebKitGTK doesn't necessarily mean non-GTK. Perhaps it would be possible to embed Chromium as an alternative. I have no idea how to do that, but if that can be done, then you only need to change the parts related to WebKitGTK and wouldn't need to re-build everything from scratch.

for Windows only.

To be fair, if there should ever be a non-WebKitGTK version of Foliate, it will almost certainly be cross-platform, not Windows only.

Furthermore, if there should ever be a non-GTK version of Foliate, it will almost certainly be something that can run directly in any browser, as a single plain web page (or PWA, if you like). Such a web page can either be run directly (if the platform supports it) or we can wrap it either with the native toolkits of each platform or a cross-platform toolkit.

Such a version probably wouldn't be too hard to implement. The one big hurdle is probably how to handle storing and syncing data. Once the filesystem-related Web APIs are better supported by browsers, it should be easy to write web apps that store data just like native apps (I think). Otherwise you'd probably use something like PouchDB to handle storing and syncing data. (Aside: actually, storing data in PouchDB might not be a bad idea even for the current GTK app; but I guess that's a separate issue.)

@Moonbase59
Copy link

Moonbase59 commented Jan 3, 2022

Since—apart from Calibre’s reader app—Foliate currently seems the most usable Open Source e-reader for desktops, I do think it would profit from being available for Windows (and maybe MacOS) users, too.

I don’t have a Mac and haven’t been using Windows for 10+ years, but I’m assuming Foliate could be built on a Mac using HomeBrew, and having it under WSL for Windows is the second best solution after a native Windows app.

Most users I know of (including me) nowadays often look for cross-platform solutions first, thus avoiding the need of re-learning when changing platforms. So if this could be done in the long run, it’d be just great, and certainly worth it. Also, Foliate doesn’t suffer from the resource and performance problems an app has that needs to be run on a limited hardware platform, like an actual e-reader—modern desktops and laptops should have enough power to allow for a little overhead, like Epub.js, Electron or whatever.

We surely do need a good e-reading app for use on the desktop/laptop.

Just my 2¢.

@Br41ni4c
Copy link

Foliate should show up as a shortcut in the Start Menu in a folder named after the Linux distro you installed.

Is this method still working? @citrus77 Cause it's not showing up on my start menu and i don't know how to open it
But it seems to be installed on my distro

@citrus77
Copy link

citrus77 commented Jan 19, 2022

It does still work, but may or may not create a start menu entry depending on the build of Windows and WSL and possibly the distro that are installed. I'm not sure how to manually create a shortcut, but you can launch Foliate from the linux bash prompt and can probably create a batch file to execute it.

@citrus77
Copy link

Screenshot 2022-10-28 015452
This is still running through WSL, and not a native build, but here it is on the Surface Pro 9 (SQ3). Still working great, and the instructions haven't changed from what I posted earlier.

@citrus77
Copy link

Since we still don't have a native build, WSL instructions have changed as follows assuming you are on Windows 11:
-When enabling Windows features, only check Virtual Machine Platform
-Install the Windows Subsystem for Linux from the Microsoft Store app
-No longer any need to install WSLg or update your WSL kernel; the Store will install the latest version of WSL
-Simply the latest release of Ubuntu from the Store
-X11-apps are no longer necessary, if they ever were

@ironwheal
Copy link

Considering the aggregate of features and UX, this seems to be the best EPUB reader out there, so native Win 10/11 builds would be very welcome. The most close alternative I could find on the platform is Freda, but it's non-free, unstable and very damn slow on older hardware.

@tigerinus
Copy link

Yes, a Windows version would be great.

@teamcoltra
Copy link

Just an update on this: Myself and a contractor I've hired for this project are taking this on. We are in the opening stages of planning but my intention is to build it for React Native for Windows / MacOS. I was thinking of also developing a React Native + Electron port for Linux but considering this project exists and mine is going to have to be a bit more forked I don't want to split things up too much.

It's a shame that there aren't many fully cross platform Javascript platforms. Electron is basically it but it also adds a lot of weight.

@wiiznokes
Copy link

You may want to look into tauri. There is also this tool to make a .msi package easelly https://github.com/crabnebula-dev/cargo-packager.

What alternative would you guys advise for windows ?

@Saidiislam
Copy link

I switched to Windows and have been missing this amazing software ever since. Alexandria comes the closest as an alternative, but I badly need a Windows version.

@mokurin000
Copy link

We may have to port foliate to Electron/Tauri, to work on Windows: tauri-apps/webkit2gtk-rs#39

WebkitGTK+ doesn't build on WIndows

@rahaaatul
Copy link

Any update for windows build?

@kamihatsu
Copy link

Maybe we can do a fork and write Electron app for windows?

@rango886
Copy link

rango886 commented Nov 29, 2024

I've developed an Electron version of Foliate!!!
https://github.com/rango886/foliate-electron/releases/tag/push
It is developed based on foliate-js https://github.com/johnfactotum/foliate-js

I add some convenient features for it

  • Press the p key to switch the page turning mode(pageup pagedown)
  • Press the s key to switch the scrolling mode
  • Move the mouse to the left to automatically pop up the toc
  • Move the mouse to the bottom and automatically pop up the progress bar
  • Remember the size and position of the last window opened

NVIDIA_Share_hQANhrd8Fg
vMIpFdZlE7
PrqPj7MRpL
YkSRZHVUoa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests