📘 We decided to use KDE Craft to get all binary dependencies of the Nextcloud files desktop client.
- Windows 10 or Windows 11
- The desktop client code
- Python 3
- PowerShell
- KDE Craft
- Microsoft Visual Studio 2022
- Inkscape
- A Nextcloud server
Tip
We highly recommend Nextcloud development environment on Docker Compose for testing/bug fixing/development.
- If you don't have Windows as your main system, you could try to run it as a virtual machine: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines/
- Open the
Visual Studio Installer
. - Click on
Modify
:
- Select
Desktop development with C++
:
- Install the latest version of Inkscape.
- You will need to install Python 3: https://www.python.org/downloads/windows/
- Set up KDE Craft as instructed in Get Involved/development/Windows - KDE Community Wiki.
- Use the default options, including Qt6 (since desktop 3.14, we are using Qt 6).
Important
C:\CraftRoot
is the path used by default by KDE Craft
.
When you are setting it up you may choose a different folder: you will need to
C:\CraftRoot
to the path you picked
- After following the instructions in Get Involved/development/Windows - KDE Community Wiki.
- Open
PowerShell
. - Run
craftenv.ps1
as described in the instructions above:
C:\CraftRoot\craft\craftenv.ps1
- Add the blueprints from this repository:
craft --add-blueprint-repository https://github.com/nextcloud/desktop-client-blueprints.git
$ craft craft
- Install all desktop client dependencies:
craft --install-deps nextcloud-client
- Make sure your environment variable
%PATH%
has no conflicting information to the environment you will use to compile the client. For instance, if you have installedOpenSSL
previously and have added it to%PATH%
, theOpenSSL
installed might be a different version than what was installed viaKDE Craft
. - To use the tools installed with Visual Studio, you need the following in your %PATH%:
- Open the
Command Prompt
(cmd.exe).
Important
The next steps has only been tested and proven to work when using Command Prompt
.
- Run:
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
Tip
Alternatively you can use the tools installed with KDE Craft
by adding them to %PATH%
in your current session:
set "PATH=C:\CraftRoot\bin;C:\CraftRoot\dev-utils\bin;%PATH%"
This will result in using the cmake
version downloaded with KDE Craft
.
- Clone the desktop client repository.
git clone https://github.com/nextcloud/desktop.git
- Create the build folder
<build-folder>
.
mkdir <build-folder>
- Go into the build folder.
cd <build-folder>
- Run cmake.
cmake ..\<desktop-cloned-repo> -G Ninja -DCMAKE_INSTALL_PREFIX=. -DCMAKE_PREFIX_PATH=C:\CraftRoot -DCMAKE_BUILD_TYPE=RelWithDebInfo
- Compile the desktop client
cmake --build .
Note
❓ If you have questions about it, you may use the forums at https://help.nextcloud.com to ask them.
🐛 If you find bugs with these steps, you may open a GH issue at https://github.com/nextcloud/desktop/issues.