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 Support #309

Open
enko opened this issue Mar 18, 2018 · 40 comments
Open

Windows Support #309

enko opened this issue Mar 18, 2018 · 40 comments

Comments

@enko
Copy link

@enko enko commented Mar 18, 2018

This ticket should serve as a kind of meta ticket, to track the efforts needed to bring dino to windows. I have automated the build in #304, so we can put out builds without any problems.

From my small assessment there are two high priority that needs a fix before any other work for the windows port can be done:

  • is_24h_format from helper.vala crashes dino. From my limited knowledge of GTK, this seems to be ok to crash since there is no gnome-functionality on windows?
  • Notifications are broken upstream. As a possible fix, just disable the notifications on windows, till a proper backend lands in GTK?

On the chat there was a discussion if dino should look native, I think it should, but the first priority should be that it does not crash or behaves funny. Then there should be put energy into making dino look native.

@Echolon
Copy link
Contributor

@Echolon Echolon commented Mar 18, 2018

I think it should be native, too. Is this only a question of GUI? Or are there other related issues if we decide for one or another? I mean, if people don't like it - fork it, do it the other way.... or?

@Echolon
Copy link
Contributor

@Echolon Echolon commented Mar 18, 2018

Vote native

@Echolon
Copy link
Contributor

@Echolon Echolon commented Mar 18, 2018

Vote against native

@DeSaurus
Copy link

@DeSaurus DeSaurus commented Mar 25, 2018

Someone made a dummy win32 notification backend for GNotification
https://bugzilla.gnome.org/show_bug.cgi?id=776583#c7
I hope this gets fixed soon

@LuccoJ
Copy link

@LuccoJ LuccoJ commented Mar 29, 2018

I think a "vote" for/against "native" when it hasn't been determined what "native" means just before the vote is not useful.

@Echolon
Copy link
Contributor

@Echolon Echolon commented Mar 29, 2018

@LuccoJ HI, guess you are probably right. Thought it's clear - may someone help out with a good definition?

Anyway, the vote so far made clear that this is polarizing topic. That's an evaluation, too.

@ghost ghost mentioned this issue Apr 8, 2018
@Echolon
Copy link
Contributor

@Echolon Echolon commented Apr 24, 2018

@enko Hi, any updates so far? If there are issues, maybe someone else could help?

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented Feb 15, 2019

Just FYI, Dino works on WSL with a vcXsrv after intalling all dependencies.
At first it crashed on load, but was fixed after running "sudo dpkg-reconfigure tzdata".

@Echolon
Copy link
Contributor

@Echolon Echolon commented Feb 15, 2019

@LAGonauta Thanks for your info. Any extra info we might need to know? If you can exactly document how you make it run, that would be great!

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented Feb 16, 2019

Sure:
After fresh install of WSL Ubuntu 18.04

Update installation:

sudo apt update && sudo apt upgrade

Install dependencies:

sudo apt install build-essential ninja-build cmake valac libgee-0.8-dev libsqlite3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libsoup2.4-dev libgpgme-dev libqrencode-dev libgcrypt20-dev dbus-x11

Clone and build:

sudo apt install git
git clone https://github.com/dino/dino/
cd dino && ./configure
make

Configure timezone data:

sudo dpkg-reconfigure tzdata

Install X server:

https://sourceforge.net/projects/vcxsrv/
After installation, run Xlaunch on multi-window mode.

Run:

Go back to WSL and run dino:

export DISPLAY=:0
export LIBGL_ALWAYS_INDIRECT=1
build/dino

Optional dependency:

sudo apt install fonts-emojione

It is not perfect as for some reason the window does not behave as a normal window on Windows (probably because of the decorations), however all the rest seems to be working fine. Definitely prettier than Gajim :P

@YtvwlD
Copy link

@YtvwlD YtvwlD commented Feb 16, 2019

Do you really need to build dino yourself in this case or could you just add the repository?

@Echolon
Copy link
Contributor

@Echolon Echolon commented Feb 16, 2019

@LAGonauta I guess that NOT for Microsoft Windows, right?

This is what the issue is about

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented Feb 16, 2019

Yes, it is Microsoft Windows:
https://docs.microsoft.com/en-us/windows/wsl/install-win10

EDIT:
Of course it can't be distributed, may may help debugging.

@Echolon
Copy link
Contributor

@Echolon Echolon commented Feb 16, 2019

Ahh, Win7 was my last MS system years ago, never used Win10 for all reasons ;)

@enko experienced big isses with the MS visual studio compling an .exe. Do you (or anyone else) know people with more experience with this? @LAGonauta

However, thanks for your post!

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented Feb 8, 2020

dino!

With some help from cacahuete from Dino MUC I was able to compile with MSYS2, as shown in the image above 😀
I disabled CSD as it is strange on Windows and not compatible with AeroSnap, but it is working.
Current patch: (for some reason I had to instantiate those classes when compiling on MSYS2)
instance.txt

Notifications are not crashing thanks to the changes in glib 👍

Current build script, based #304:

#!/bin/bash

cd dino && \
    ./configure --with-libsignal-in-tree && \
    make -j5 && \
    cd build && \
    mkdir -p dist && \
    cp *.exe *.dll dist && \
    cd dist && \
    ldd dino.exe | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    mkdir -p ./share/icons && cp -r /mingw64/share/icons ./share/ && \
    mkdir -p ./share/themes && cp -r /mingw64/share/themes ./share/ && \
    mkdir -p ./share/glib-2.0/schemas && cp -r /mingw64/share/glib-2.0/schemas ./share/glib-2.0/ && \
    mkdir -p ./lib/gdk-pixbuf-2.0/ && cp -r /mingw64/lib/gdk-pixbuf-2.0 ./lib/ && \
    mkdir -p ./lib/gio/ && cp -r /mingw64/lib/gio ./lib/ && \
    mkdir -p ./plugins/ && mv -f http-files.dll omemo.dll openpgp.dll ./plugins/ && \
    find . -iname "*.dll" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh

It seems that Vala or GTK3 loads most modules dynamically, and ldd is not able to find them, thus we must copy them manually. There are still some libraries to be copied, as OMEMO and OpenPGP are not working. OMEMO works, but GPGME is segfaulting. (remove openpgp.dll for now from the plugin folder for Dino to work) Image preview, and opening links/attachments are also not working.

@licaon-kter
Copy link
Contributor

@licaon-kter licaon-kter commented Feb 9, 2020

Since MAM might be hiding some stuff, I'll post my findings here too, with @LAGonauta build...

It can't find the plugins...
dinowinplugins
...so I create that and put those 3 files there and OMEMO and http_upload are working 🎉

Now for PGP...
dinopgperror

...and I have the one from www.gpg4win.org installed but it's in C:\Program Files (x86)\GnuPG\bin\ I can move stuff around... put it in C:\Program Files (x86)\GNU\GnuPG\ yet
dingpgme
...ok copy that .exe in the Dino folder... aaaaannnd.... crash... :(

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented May 4, 2020

Branch with my tweaks: https://github.com/LAGonauta/dino/tree/master-windows-changes
Newest install dependencies script:

#!/bin/bash
pacman -S --needed \
       mingw64/mingw-w64-x86_64-gcc \
       mingw64/mingw-w64-x86_64-cmake \
       mingw64/mingw-w64-x86_64-ninja \
       mingw64/mingw-w64-x86_64-libsoup \
       mingw64/mingw-w64-x86_64-gtk3 \
       mingw64/mingw-w64-x86_64-sqlite3 \
       mingw64/mingw-w64-x86_64-gobject-introspection \
       mingw64/mingw-w64-x86_64-glib2 \
       mingw64/mingw-w64-x86_64-glib-networking \
       mingw64/mingw-w64-x86_64-libgcrypt \
       mingw64/mingw-w64-x86_64-libgee \
       mingw64/mingw-w64-x86_64-pkg-config \
       mingw64/mingw-w64-x86_64-vala \
       mingw64/mingw-w64-x86_64-gsettings-desktop-schemas \
       mingw64/mingw-w64-x86_64-qrencode

Newest build script:

#!/bin/bash

cd dino && \
    ./configure --with-libsignal-in-tree --no-debug --release && \
    make -j5 && \
    cd build && \
    mkdir -p dist && \
    strip -s dino.exe *.dll && \
    cp *.exe *.dll dist && \
    cd dist && \
    ldd dino.exe | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    mkdir -p ./share/icons && cp -r /mingw64/share/icons ./share/ && \
    mkdir -p ./share/themes && cp -r /mingw64/share/themes ./share/ && \
    mkdir -p ./share/glib-2.0/schemas && cp -r /mingw64/share/glib-2.0/schemas ./share/glib-2.0/ && \
    mkdir -p ./lib/gdk-pixbuf-2.0/ && cp -r /mingw64/lib/gdk-pixbuf-2.0 ./lib/ && \
    mkdir -p ./lib/gio/ && cp -r /mingw64/lib/gio ./lib/ && \
    mkdir -p ./plugins/ && mv -f http-files.dll openpgp.dll omemo.dll ./plugins/ && \
    find . -iname "*.dll" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh

@gsantner
Copy link

@gsantner gsantner commented May 13, 2020

Any chance this gets merged to upstream dino repo, so there will be zip or installer exe available for Dino on Windows?

The biggest amount of friends & family uses Windows and there is no really viable xmpp client at the moment for windows.

@stevenroose
Copy link

@stevenroose stevenroose commented May 17, 2020

@LAGonauta How do you get the mingw64/... packages? It seems that I have to add some database that I don't have.

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented May 17, 2020

Those commands are exclusive to MSYS2:
https://www.msys2.org/

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented May 18, 2020

New install dependencies script, adding ntldd as ldd did not always return all dependencies:

#!/bin/bash
pacman -S --needed \
       mingw64/mingw-w64-x86_64-gcc \
       mingw64/mingw-w64-x86_64-cmake \
       mingw64/mingw-w64-x86_64-enchant \
       mingw64/mingw-w64-x86_64-ninja \
       mingw64/mingw-w64-x86_64-libsoup \
       mingw64/mingw-w64-x86_64-gtk3 \
       mingw64/mingw-w64-x86_64-sqlite3 \
       mingw64/mingw-w64-x86_64-gobject-introspection \
       mingw64/mingw-w64-x86_64-glib2 \
       mingw64/mingw-w64-x86_64-glib-networking \
       mingw64/mingw-w64-x86_64-libgcrypt \
       mingw64/mingw-w64-x86_64-libgee \
       mingw64/mingw-w64-x86_64-gpgme \
       mingw64/mingw-w64-x86_64-pkg-config \
       mingw64/mingw-w64-x86_64-vala \
       mingw64/mingw-w64-x86_64-gsettings-desktop-schemas \
       mingw64/mingw-w64-x86_64-qrencode \
       mingw64/mingw-w64-x86_64-libsignal-protocol-c \
       mingw64/mingw-w64-x86_64-ntldd-git

New build script that uses make install to be easier to maintain:

cd dino && \
    ./configure --program-prefix=${PWD}/dist --no-debug --release --disable-fast-vapi && \
    make -j5 && \
    make install && \
    cd dist && \
    cp /mingw64/bin/gdbus.exe ./bin && \
    cp /mingw64/bin/gspawn-win64-helper.exe ./bin && \
    cp -r /mingw64/share/xml ./share && \
    cp -r /mingw64/lib/enchant-2 ./lib && \
    mkdir -p ./lib/gdk-pixbuf-2.0/ && cp -r /mingw64/lib/gdk-pixbuf-2.0 ./lib/ && \
    mkdir -p ./lib/gio/ && cp -r /mingw64/lib/gio ./lib/ && \
    mkdir -p ./share/icons && cp -r /mingw64/share/icons ./share/ && \
    mkdir -p ./share/locale && cp -r /mingw64/share/locale ./share/ && \
    mkdir -p ./share/glib-2.0/schemas && cp -r /mingw64/share/glib-2.0/schemas ./share/glib-2.0/ && \
    rm -r ./include && 
    find . -iname "*.dll.a" -exec rm {} + && \
    find . -iname "*.exe" -exec ntldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    find . -iname "*.dll" -exec ntldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    find . -iname "*.exe" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    find . -iname "*.dll" -exec ldd {} + | grep mingw64 | awk '{print "cp /mingw64/bin/"$1" ."}' | sh && \
    find . -iname "*.exe" -exec strip -s {} + && \
    find . -iname "*.dll" -exec strip -s {} + && \
    mv *.dll ./bin
@sonicnkt
Copy link

@sonicnkt sonicnkt commented Jun 11, 2020

Anyway you could release a precompiled built for testing?

Im currently in the process of upgrading our xmpp system in our organisation (move to prosody and new client). We have a mixed environment with windows linux and mac clients but i would love to deploy a single desktop client to all users. Dino seems to be a great solution as it has all features i would like to use built in, the only problem atm is the missing windows support.

Any timeline on when this will be merged and prebuilt packages available? 0.2 Milestone?

Currently we are using pidgin but since more users want to be able to use more than one device with all messages synced this wont be a solution for much longer.

@Echolon
Copy link
Contributor

@Echolon Echolon commented Jun 11, 2020

@sonicnkt better use anything than Pidgin. If the prebuilds are not gonna make it, evtl. have a look at Gajim, Converse.js or UWPX (Alpha)

@sonicnkt
Copy link

@sonicnkt sonicnkt commented Jun 11, 2020

Yeah i set this up a few years ago and it had a clean ui and worked for everything we needed back then. Today it wont cut it anymore.

Didnt really like gajim as well i will take a look at UWPX but im not sure this will work on all clients as we are using win10 LTSB/LTSC releases. The Sideload installer is quite huge with 300MB 😱

I know this is getting a bit off topic but how does converse handle large file transfers? we are using xmpp alot to transfer huge files p2p internally.

@langrafik
Copy link

@langrafik langrafik commented Jun 29, 2020

Can anyone just build .exe installer for Dino please?))

@mdosch
Copy link

@mdosch mdosch commented Jul 10, 2020

@langrafik
Afaik the Dino devs will release windows builds once it is considered good enough.

Till this is achieved you can have a look here where someone makes Dino able to compile on Windows. If you managed to build it you can easily create an installer by using NSIS (see my proof-of-concept).

@Deluvi
Copy link

@Deluvi Deluvi commented Oct 6, 2020

Hey everyone! For those who just wants to try out Dino on Windows, I have set up a CI based on Github actions so you don't have to: LAGonauta#3. The PR is currently a draft but it is usable (that's my main XMPP client on Windows atm).
The CI outputs a Windows .exe installer for every release I perform. You can get the most fresh builds there: https://github.com/Deluvi/dino/releases (And maybe someday here: https://github.com/LAGonauta/dino/releases and eventually, with my best hope, here https://github.com/dino/dino/releases 😄)
It is not an official release in any shape or form, just something I hacked over the week-end. It's more of a demo of what LAGonauta achieved in his compatibility tweaks PR: a working version of Dino on Windows!

@licaon-kter
Copy link
Contributor

@licaon-kter licaon-kter commented Oct 6, 2020

@Deluvi why to PR this CI workflow here?

@Deluvi
Copy link

@Deluvi Deluvi commented Oct 7, 2020

To be clear, I am doing my PR on top of LAGonauta's PR. I don't think my PR should be merged before his PR is upstreamed on Dino in order to keep his PR scoped: I will probably rebase my CI PR on the upstream repository.

However, Dino will need a Windows CI eventually. The state of package managers on Windows requires, unfortunately, the upstream developers to ship their own Windows build unlike Linux distributions. How this build will be performed is a needed conversation with the maintainers if we wants Dino to be shipped efficiently on Windows.

As an example, Transmission[1] and Inkscape[2] both uses appveyor to automatically builds their own Windows installer. Afterwards, those installers are picked up by the packages managers (such as Chocolatey) to be installed, no builds are performed by the maintainers of the choco packages[3][4].

I am in no way expert on that field, but it seems that, according to my examples, upstream Dino's maintainers will need to provide an official Windows build if we want to support that platform. A CI build would ease the burden of the maintainers to not build themselves manually the installer for each release while accepting contributions of improvement of the Windows build and ensuring the Windows build will not break in a future version.

[1]: Link of the CI workflow file, Link of latest release build
[2]: Link of the CI workflow file, Link of latest release build
[3]: Link to the Transmission's choco script
[4]: Link to the Inkscape's choco script

@wiktor-k
Copy link
Contributor

@wiktor-k wiktor-k commented Oct 7, 2020

@Deluvi From my memory Dino devs explicitly said they want to officially ship Dino through official Windows Store only and that's what's keeping the lags PR from being merged (you may want to double check this with official dino channel).

@mdosch
Copy link

@mdosch mdosch commented Oct 7, 2020

@wiktor-k
Copy link
Contributor

@wiktor-k wiktor-k commented Oct 7, 2020

AFAIK In Windows Store you publish MSIX packages and that's used by Windows Store to install the app on end-user system. This is not the same as a regular exe installer app. For example see the app manifest files at https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-manual-conversion I'm not an expert in this matter though :)

@fiaxh
Copy link
Member

@fiaxh fiaxh commented Oct 7, 2020

From my memory Dino devs explicitly said they want to officially ship Dino through official Windows Store only and that's what's keeping the lags PR from being merged

No, that's not our position. Not everyone wants to use the Windows Store and thus it defitively makes sense to also provide Windows builds ourselves via the Dino Website.

That being said, we want to provide a well working Dino build, and not some "mostly ok-ish" version. One important example are notifications, which (to my knowledge) are currently not working on Windows.

@LAGonauta
Copy link
Contributor

@LAGonauta LAGonauta commented Oct 7, 2020

From my memory Dino devs explicitly said they want to officially ship Dino through official Windows Store only and that's what's keeping the lags PR from being merged

No, that's not our position and I doubt we ever said so. Not everyone wants to use the Windows Store and thus it defitively makes sense to also provide Windows builds ourselves via the Dino Website.

That being said, we want to provide a well working Dino build, and not some "mostly ok-ish" version. One important example are notifications, which (to my knowledge) are currently not working on Windows.

Yes, currently the only notification available is the taskbar flashing. Will only be fixed after this issue is closed:
https://gitlab.gnome.org/GNOME/glib/-/issues/1234

I suppose it would be possible to make something up as a temporary Dino plugin that adds native Windows notification (could be something similar to https://github.com/dino/dino/tree/master/plugins/notification-sound), however I do not know if anyone is willing to do that. I have however in my personal backlog adding notification sound through OpenAL, but currently it is at the bottom of it.


UPDATE:
There are now experimental OpenAL and Windows Notifications plugins for Dino

@guysoft
Copy link

@guysoft guysoft commented Jan 14, 2021

It sounds like there is a working build without notifications.
How about just pushing that so there is something to work with? It might make others (including myself) find the time to take a look and fix that specific problem.
Otherwise this might hang here for another 3 more years. It seems like its pretty close now. @Deluvi Noted that its usable daily at this point.

@licaon-kter
Copy link
Contributor

@licaon-kter licaon-kter commented Jan 14, 2021

@guysoft better join the group and test test test xmpp:dino-win@chat.diebesban.de?join

@guysoft
Copy link

@guysoft guysoft commented Jan 14, 2021

In, can't see you

@licaon-kter
Copy link
Contributor

@licaon-kter licaon-kter commented Jan 14, 2021

@guysoft I'm not testing :) ask the friendly members

@trymeouteh
Copy link

@trymeouteh trymeouteh commented Feb 16, 2021

+1 for Windows version

@shkarimpour
Copy link

@shkarimpour shkarimpour commented May 19, 2021

+1

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

Successfully merging a pull request may close this issue.

None yet