Hi, this is my first time posting on here. I’ve got a question regarding compiling and installing the desktop client from github to work on it for a class. I’ve successfully installed all the correct dependencies, as you can see from when I run the command:
cmake -G "Visual Studio 17 2022" -A x64 .. -DCMAKE_INSTALL_PREFIX=C:\Users\Angel\Desktop\Git\NextCloudClientInstall -DCMAKE_BUILD_TYPE=Debug
This is the output:
-- Configuring done (114.6s)
-- Generating done (2.1s)
-- Build files have been written to: C:/Users/Angel/Desktop/Git/desktop/build
But when I try to run this command to install:
cmake --build . --config Debug --target install
I get so many errors that this is the last error I receive:
C:\msys64\ucrt64\include\stdio.h(1136,1): fatal error C1003: error count exceeds 100; stopping compilation [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj]
All of the errors are syntax errors and they all have [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj] at the end of them.
Here’s some examples of the errors I’m getting:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include\vcruntime.h(391,8): message : see declaration of 'uintptr_t' [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj]
C:\msys64\ucrt64\include\math.h(209,5): error C2065: '__asm__': undeclared identifier [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj]
C:\msys64\ucrt64\include\math.h(209,13): error C2146: syntax error: missing ';' before identifier '__volatile__' [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj]
C:\msys64\ucrt64\include\math.h(209,35): error C2143: syntax error: missing ')' before ':' [C:\Users\Angel\Desktop\Git\desktop\build\src\csync\nextcloud_csync.vcxproj]
I’m completely stuck on how to move forward with the installation, if anybody could help I would really appreciate it, thanks!
camila
October 23, 2023, 9:00am
2
Hello @Angel_Chavez ,
To be honest, we have not tried to use Visual Studio 2022.
Is it possible for you to use 2019?
We also have a new way to get all dependencies in one place:
https://github.com/nextcloud/desktop-client-blueprints
And that requires Visual Studio 2019.
Please, leave feedback in the GH repo if you can.
Hi,
Thanks for reaching out. I Installed Visual Studio 2019 and tried getting all the dependencies from craft. I also tried to use this link: GitHub - nextcloud/client-building: 🏗 Build scripts for the desktop client to install the client, but when I run “./build.bat” I eventually get this error:
[50/577] Automatic MOC for target nextcloudsync
ninja: build stopped: subcommand failed.
"*** Build FAILED: desktop Release Win64 (single-build-desktop.bat)"
"***** Build FAILED (build.bat)"
Should I only use craft for the dependencies and try to build using this guide? How to compile the desktop client · nextcloud/desktop Wiki · GitHub
Or am I doing something wrong?
camila
October 27, 2023, 8:49am
4
Hello
You only need to use the client-build scripts if you are going to create an installer.
Then you need to check the instructions in the README of the repo: GitHub - nextcloud/client-building: 🏗 Build scripts for the desktop client
Otherwise I would recommend to just add the Craft path to CMAKE_PREFIX_PATH to be able to build the client.
One last thing, I tried to run “cmake --build . --config Debug --target install” in the build folder for the client, but I received this message:
MSBuild version 17.7.2+d6990bcfa for .NET Framework
1>Checking Build System
Creating generated files from customstateprovider.idl
Microsoft (R) 32b/64b MIDLRT Compiler Engine Version 10.00.0231
Copyright (c) Microsoft Corporation. All rights reserved.
64 bit MIDLRT Processing C:\Users\Angel\Desktop\Git\desktop\src\libsync\vfs\cfapi\shellext\customstateprovider.idl
customstateprovider.idl
64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\winrt\winrtbase.idl
winrtbase.idl
64 bit MIDLRT Processing C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\winrt\midlbase.idl
midlbase.idl
Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.22621.0\windows.foundation.foundationcontract\4.0.0.0\windows.foundation.foundationcontract.winmd
Processing WinMD c:\program files (x86)\windows kits\10\references\10.0.22621.0\windows.storage.provider.cloudfilescontract\7.0.0.0\windows.storage.provider.cloudfilescontract.winmd
tool: C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\cppwinrt.exe
ver: 2.0.220110.5
in: C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\CustomStateProvider.winmd
ref: C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0\Windows.winmd
out: C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\
cout: C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\
time: 14ms
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/src/libsync/vfs/cfapi/shellext/CMakeLists.txt
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(249,5): warning MSB8065: Custom build for item "C:\Users\Angel\Desktop\Git\desktop\build\CMakeFiles\99459b0d29777e56a22e41b74844557b\CustomStateProvider.g.h.rule" succeeded, but specified output "c:\users\angel\desktop\git\desktop\build\src\libsync\vfs\cfapi\shellext\generated\customstateprovider.g.h" has not been created. This may cause incremental build to work incorrectly. [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CustomStateProviderImpl.vcxproj]
Automatic MOC for target nextcloud_csync
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/src/csync/CMakeLists.txt
mocs_compilation_Debug.cpp
checksums.cpp
checksumcalculator.cpp
filesystembase.cpp
ownsql.cpp
preparedsqlquerymanager.cpp
syncjournaldb.cpp
syncjournalfilerecord.cpp
utility.cpp
remotepermissions.cpp
vfs.cpp
pinstate.cpp
plugin.cpp
syncfilestatus.cpp
csync.cpp
csync_exclude.cpp
c_time.cpp
csync_vio_local_win.cpp
Generating Code...
Creating library C:/Users/Angel/Desktop/Git/desktop/build/src/csync/Debug/nextcloud_csync.lib and object C:/Users/Angel/Desktop/Git/desktop/build/src/csync/Debug/nextcloud_csync.exp
nextcloud_csync.vcxproj -> C:\Users\Angel\Desktop\Git\desktop\build\bin\Debug\nextcloud_csync.dll
Automatic MOC for target CfApiShellExtensions
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/src/libsync/vfs/cfapi/shellext/CMakeLists.txt
mocs_compilation_Debug.cpp
dllmain.cpp
C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\winrt/CfApiShellExtensions.h(7,35): error C2338: static_assert failed: 'Mismatched C++/WinRT headers.' [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\winrt/CfApiShellExtensions.h(8,1): warning C4005: 'CPPWINRT_VERSION': macro redefinition [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\cppwinrt\winrt/base.h(6,1): message : see previous definition of 'CPPWINRT_VERSION' [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
cfapishellintegrationclassfactory.cpp
customstateprovideripc.cpp
ipccommon.cpp
thumbnailprovider.cpp
thumbnailprovideripc.cpp
shellextensionutils.cpp
customstateprovider.cpp
C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\winrt/CfApiShellExtensions.h(7,35): error C2338: static_assert failed: 'Mismatched C++/WinRT headers.' [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\Generated\winrt/CfApiShellExtensions.h(8,1): warning C4005: 'CPPWINRT_VERSION': macro redefinition [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\cppwinrt\winrt/base.h(6,1): message : see previous definition of 'CPPWINRT_VERSION' [C:\Users\Angel\Desktop\Git\desktop\build\src\libsync\vfs\cfapi\shellext\CfApiShellExtensions.vcxproj]
Generating Code...
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/shell_integration/windows/NCUtil/CMakeLists.txt
CommunicationSocket.cpp
RemotePathChecker.cpp
StringUtil.cpp
Generating Code...
NCUtil.vcxproj -> C:\Users\Angel\Desktop\Git\desktop\build\shell_integration\windows\NCUtil\Debug\NCUtil.lib
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/shell_integration/windows/NCContextMenu/CMakeLists.txt
dllmain.cpp
NCClientInterface.cpp
NCContextMenu.cpp
NCContextMenuFactory.cpp
NCContextMenuRegHandler.cpp
Generating Code...
Creating library C:/Users/Angel/Desktop/Git/desktop/build/shell_integration/windows/NCContextMenu/Debug/NCContextMenu.lib and object C:/Users/Angel/Desktop/Git/desktop/build/shell_integration/windows/NCContextMenu/Debug/NCContextMenu.exp
NCContextMenu.vcxproj -> C:\Users\Angel\Desktop\Git\desktop\build\bin\Debug\NCContextMenu.dll
Building Custom Rule C:/Users/Angel/Desktop/Git/desktop/shell_integration/windows/NCOverlays/CMakeLists.txt
DllMain.cpp
NCOverlay.cpp
NCOverlayFactory.cpp
NCOverlayRegistrationHandler.cpp
Generating Code...
Creating library C:/Users/Angel/Desktop/Git/desktop/build/shell_integration/windows/NCOverlays/Debug/NCOverlays.lib and object C:/Users/Angel/Desktop/Git/desktop/build/shell_integration/windows/NCOverlays/Debug/NCOverlays.exp
NCOverlays.vcxproj -> C:\Users\Angel\Desktop\Git\desktop\build\bin\Debug\NCOverlays.dll
I don’t know where to go from here
camila
November 1, 2023, 11:17am
6
Angel_Chavez:
I received this message
what message? There is no error in the lines you pasted here.
How do you mean? The client seems to be building.