- Python 100%
|
|
||
|---|---|---|
| .github | ||
| libs/libp11 | ||
| LICENSES | ||
| nextcloud-client | ||
| .gitignore | ||
| AUTHORS.md | ||
| CONTRIBUTING.md | ||
| README.md | ||
🖥️ Nextcloud Desktop Client blueprints
📘 We decided to use KDE Craft to get all binary dependencies of the Nextcloud files desktop client.
System requirements
- Windows 10, Windows 11, macOS 13 Ventura (or newer) or Linux
- 🔽 Inkscape (to generate icons)
- Developer tools: cmake, clang/gcc/g++:
- Qt6 since 3.14, Qt5 for earlier versions
- OpenSSL
- 🔽 QtKeychain
- SQLite
- Xcode (only on macOS)
Optional recommendations:
Tip
We highly recommend Nextcloud development environment on Docker Compose for testing/bug fixing/development.
▶️ https://juliushaertl.github.io/nextcloud-docker-dev/
How to set up Windows 11 for developemtn
If you don't have Windows as your main system, you could try to run it as a virtual machine.
Set up Microsoft Visual Studio:
Set up KDE Craft
- You will need to install Python 3: https://www.python.org/downloads/windows/
- Set up KDE Craft as instructed in Setting up Craft.
- We recommend to use the default options, including Qt6 (since desktop 3.14, we are using Qt 6).
Important
C:\CraftRootis the path used by default byKDE Crafton Windows.
On Linux and macOS,CraftRootis set at the user's home:~/CraftRoot. In the instructions below we will use<CraftRoot>to be replaced according to your operating system and set up.
How to use the desktop client blueprints
- After following the instructions in Setting up Craft.
- Open
PowerShellon Windows, or any terminal in other systems. - Run
craftenv.ps1as described in the instructions above:
<CraftRoot>\craft\craftenv.ps1
- Add the blueprints from this repository:
craft --add-blueprint-repository https://github.com/nextcloud/desktop-client-blueprints.git
- Update craft:
$ craft craft
- Install all desktop client dependencies:
craft --install-deps nextcloud-client
Compiling the desktop client
Windows
- 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 installedOpenSSLpreviously and have added it to%PATH%, theOpenSSLinstalled 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 Craftby adding them to%PATH%in your current session:set "PATH=<CraftRoot>\bin;<CraftRoot>\dev-utils\bin;%PATH%"You also need to set the Qt path for plugins via an environment variable
set "QT_PLUGIN_PATH=<CraftRoot>\bin\plugins"This will result in using the
cmakeversion downloaded withKDE 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=<CraftRoot> -DBUILD_TESTING=ON -DNEXTCLOUD_DEV=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
- Compile the desktop client
cmake --build .
Linux and macOS
After cloning the desktop client code:
- 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> -DCMAKE_INSTALL_PREFIX=. -DCMAKE_PREFIX_PATH=<CraftRoot> -DBUILD_TESTING=ON -DNEXTCLOUD_DEV=ON -DCMAKE_BUILD_TYPE=Debug
- Compile the desktop client
make install
Tip
In case of seeing this error when running
cmake:The following required packages were not found: - libp11Try the following - it should work for any missing dependency:
- Verify that
libp11.pcis actually in theCraftRootfolder, usually it is found at<CraftRoot>/lib/pkgconfig.- Check which
libp11cmakeis finding by running in the build folder:pkg-config --libs libp11- If it is finding another version of
libp11in your system instead of theCraftRootone, you can either: 3.1 Remove the secondlibp11installed or 3.2 Pointcmaketo the correct one:export PKG_CONFIG_PATH=<CraftRoot>/lib/pkgconfig
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.