Nextcloud building

Hi all,

I am writing because I downloaded the Windows Nextcloud desktop git source code.

I changed some stuff (essentially icons, images) and just do not understand how to build/compile this code into a Windows executable (.exe or msi) so that a friend could install and test it on a Windows PC.

I have already tried a lot of things and nothing works for me since I am not a pro (like installing VS code extensions (C++, cmake…), Visual Studio 2019 with Cmake, Zlib, Onessl…)

It really is driving me crazy since I cannot find a suitable tutorial/video to achieve this.

The Nextcloud client building readme is absolutely not clear for me since I am an Amateur.

Does anybody know how to do it really the easy way?


Assuming you are referring to the Client:

Note: I’ve cross-compiled many CMake projects on Windows, but, Nextcloud isn’t one of them, so, take this for what it’s worth.

This is a big subject, especially on Windows as you’ll need to install and configure an MinGW tool-chain. Many now days are using the MSYS2 collection, but there’s other ways. You will also need CMake, either in your path natively, or from within the MinGW / MSYS2 environment itself.

This should get you going: Nexcloud Client - Windows Development Build

EDIT - After reading a bit more of the “General Build Insttructions”, I’m just gonna say, this is not an easy build. If you are unfamiliar with cross-compiling on Windows (or compiling big projects in general), expect a fair bit of frustration. I did a quick search but didn’t find many “Step-By-Step” MinGW how-too’s. There’s plenty around for *Nix, just not many on the Windows cross side.

EDIT-2: If you’re dead-set on running / building it on Windows, I’d try getting it built in WSL2 or a Linux VM first (VirtualBox, VMWare, etc). After you get a few iterations done there, then move over to MinGW cross compiling so you know what to expect.

Hi thanks for your answer.

Yes you are right, I am talking about the Nextcloud Client.

As i said, I changed the default NXC icons from the github desktop source code and now need to create a Windows installer so that other people may install my “custom” version.

You are absolutely right about the frustration, unfortunately!

I have already done so many Google search but there is not any specific how to or precise video to show me how to do that.

I learnt some web development recently but have never compiled anything in my life, so it is nearly impossible for me to do that.

I think the NXC readmes are fine for Advanced Programmers but absolutely not clear for me.

I will try anyway your advice and start trying on Ubuntu (on Virtualbox) and then through MinGW.

Thanks again!
I will try anyway your clues with

Well, looking at the System Build Requirements, you’re going to need several external library’s.

Your also going to need the Qt Open Source Installer and select the Qt 5.12 Tool Chain (GCC/C++ components) and pre-compiled libraries. One of the things that trips many up is the gcc/c++ compilers that you use to build the project must also be the same tool chain that built the libraries consumed by the project.

Getting those working together is the hard part, especially if you go the Visual Studio route rather than the MinGW command line. That makes my head hurt just thinking about it.

The Linux version (Ubuntu 20.04) is a one-liner to install all your build dependencies, which makes things much easier to deal with, at least for the tools anyway.

If it’s a UI application (which it looks to be), WSL won’t be what you want. You’re better off with a full Linux VM in that case.

On the bright side, it looks like they are using CPack and NSIS for your installer builder which is just a single CMake Target. But I’d focus on Linux for the time being.

Thanks for this extra information.

Indeed, I installed everything specified in the build requirements and that soon drove me crazy through Visual Studio 2019 with a lot of errors.

I will try with Ubuntu first, for sure.