mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 04:45:43 +03:00
Fix build with UNICODE under windows, fix USE_INOTIFY initialization.
This commit is contained in:
parent
9c2224f8e9
commit
1ff94e86bd
2 changed files with 6 additions and 4 deletions
|
@ -25,7 +25,7 @@ find_package(Csync)
|
|||
find_package(INotify)
|
||||
|
||||
set(WITH_CSYNC CSYNC_FOUND)
|
||||
set(USE_INOTIFY INOTIFY_FOUND)
|
||||
set(USE_INOTIFY ${INOTIFY_FOUND})
|
||||
|
||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
|
@ -69,6 +69,8 @@ enable_testing()
|
|||
# but if that fails because cmake is too old, uncomment this here if you want to build
|
||||
# owncloud.
|
||||
# add_definitions(-DOWNCLOUD_CLIENT)
|
||||
add_definitions(-DUNICODE)
|
||||
add_definitions(-D_UNICODE)
|
||||
|
||||
# Handle Translations, pick all mirall_* files from trans directory.
|
||||
file( GLOB TRANS_FILES ${CMAKE_SOURCE_DIR}/translations/mirall_*.ts)
|
||||
|
|
|
@ -69,12 +69,12 @@ QString MirallConfigFile::excludeFile() const
|
|||
// Check alternative places...
|
||||
#ifdef Q_OS_WIN32
|
||||
/* For win32, try to copy the conf file from the directory from where the app was started. */
|
||||
char buf[MAX_PATH+1];
|
||||
TCHAR buf[MAX_PATH+1];
|
||||
int len = 0;
|
||||
|
||||
/* Get the path from where the application was started */
|
||||
len = GetModuleFileName(NULL, buf, MAX_PATH);
|
||||
QString exePath = QString::fromLocal8Bit(buf);
|
||||
len = GetModuleFileNameW(NULL, buf, MAX_PATH);
|
||||
QString exePath = QString::fromUtf16((ushort*)buf);
|
||||
exePath.remove("owncloud.exe");
|
||||
fi.setFile(exePath, exclFile );
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue