Skip to content

Commit

Permalink
Merge branch 'develop' into KDESKTOP-1355-Renaming-a-folder-on-remote…
Browse files Browse the repository at this point in the history
…-side-should-trigger-an-explore-directory
  • Loading branch information
ClementKunz committed Dec 6, 2024
2 parents 7c69635 + 33c7d8e commit cf713d2
Show file tree
Hide file tree
Showing 193 changed files with 4,452 additions and 2,279 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Grant building script execute permission
run : chmod +x ./infomaniak-build-tools/linux/build-ci-amd64.sh
- name: Build kDrive desktop
run : ./infomaniak-build-tools/linux/build-ci-amd64.sh
run : ./infomaniak-build-tools/linux/build-ci-amd64.sh -u

- name: Grant tests script execute permission
run : chmod +x ./infomaniak-build-tools/run-tests.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Grant building script execute permission
run : chmod +x ./infomaniak-build-tools/linux/build-ci-amd64.sh
- name: Build kDrive desktop
run : ./infomaniak-build-tools/linux/build-ci-amd64.sh release
run : ./infomaniak-build-tools/linux/build-ci-amd64.sh -t release

- name: Grant packaging script execute permission
run : chmod +x ./infomaniak-build-tools/linux/package-ci-amd64.sh
Expand Down
2 changes: 2 additions & 0 deletions extensions/windows/cfapi/Common/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void Utilities::initPipeName(const wchar_t *appName) {
wchar_t userName[DEFAULT_BUFLEN];
GetUserName(userName, &len);
s_pipeName = std::wstring(L"\\\\.\\pipe\\") + std::wstring(appName) + L"-" + std::wstring(userName, len);
TRACE_DEBUG(L"Init pipe: name = %ls", s_pipeName.c_str());
}

bool Utilities::connectToPipeServer() {
Expand All @@ -157,6 +158,7 @@ bool Utilities::connectToPipeServer() {
return false;
}

TRACE_DEBUG(L"Open pipe: name = %ls", s_pipeName.c_str());
while (true) {
s_pipe = CreateFile(s_pipeName.data(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (s_pipe != INVALID_HANDLE_VALUE) {
Expand Down
1 change: 1 addition & 0 deletions extensions/windows/cfapi/Vfs/cloudprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ bool CloudProvider::start(wchar_t *namespaceCLSID, DWORD *namespaceCLSIDSize) {
TRACE_ERROR(L"Error in CloudProviderRegistrar::registerWithShell!");
return false;
}
TRACE_DEBUG(L"CloudProviderRegistrar::registerWithShell done: syncRootID = %ls", _synRootID.c_str());

// Hook up callback methods for transferring files between client and server
TRACE_DEBUG(L"Calling connectSyncRootTransferCallbacks");
Expand Down
10 changes: 10 additions & 0 deletions extensions/windows/cfapi/Vfs/cloudproviderregistrar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ std::wstring CloudProviderRegistrar::registerWithShell(ProviderInfo *providerInf
winrt::StorageProviderSyncRootInfo info;
info.Id(syncRootID);

#ifndef NDEBUG
// Silent WINRT_ASSERT(!is_sta())
int reportMode = _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
#endif
auto folder = winrt::StorageFolder::GetFolderFromPathAsync(providerInfo->folderPath()).get();
#ifndef NDEBUG
// Restore old report mode
_CrtSetReportMode(_CRT_ASSERT, reportMode);
#endif

info.Path(folder);

info.DisplayNameResource(providerInfo->folderName());
Expand Down Expand Up @@ -178,6 +187,7 @@ std::wstring CloudProviderRegistrar::registerWithShell(ProviderInfo *providerInf

bool CloudProviderRegistrar::unregister(std::wstring syncRootID) {
try {
TRACE_DEBUG(L"StorageProviderSyncRootManager::Unregister: syncRootID = %ls", syncRootID.c_str());
winrt::StorageProviderSyncRootManager::Unregister(syncRootID);
} catch (winrt::hresult_error const &ex) {
TRACE_ERROR(L"WinRT error caught : hr %08x - %s!", static_cast<HRESULT>(winrt::to_hresult()), ex.message().c_str());
Expand Down
1 change: 1 addition & 0 deletions extensions/windows/cfapi/Vfs/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ DLL_EXP int __cdecl vfsStart(const wchar_t *driveId, const wchar_t *userId, cons
if (s_cloudProviders.size() == 0) {
if (!Utilities::connectToPipeServer()) {
TRACE_ERROR(L"Error in connectToPipeServer!");
delete cloudProvider;
return E_ABORT;
}
}
Expand Down
1 change: 1 addition & 0 deletions extensions/windows/cfapi/Vfs/placeholders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ bool Placeholders::create(const PCWSTR fileId, const PCWSTR relativePath, const
cloudEntry.FsMetadata.BasicInfo.ChangeTime = Utilities::fileTimeToLargeInteger(findData->ftLastWriteTime);

if ((findData->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0) {
cloudEntry.Flags |= CF_PLACEHOLDER_CREATE_FLAG_DISABLE_ON_DEMAND_POPULATION;
cloudEntry.FsMetadata.FileSize.QuadPart = 0;
} else {
cloudEntry.FsMetadata.FileSize.QuadPart = ((ULONGLONG) findData->nFileSizeHigh << 32) + findData->nFileSizeLow;
Expand Down
29 changes: 19 additions & 10 deletions infomaniak-build-tools/kDrive-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,27 @@
<!DOCTYPE html>
<html>
<body>
<h1>Release notes - kDrive 3.6.6</h1>
<h1>Release notes - kDrive 3.6.7</h1>
<h2><b>New features</b></h2>
<ul>
<li>Change the update mechanism to allow progressive delivery of a new version</li>
</ul>
<h2><b>Bug fixes</b></h2>
<ul>
<li>Fixed a sync issue occurring on files whose name contains a special character</li>
<li>Corrected behaviour in the event of disconnection</li>
<li>Fixed issue where an empty file list is retrieved in case of poor network connection</li>
<li>Fixed an issue causing many conflicting files when using specific software</li>
<li>Fixed a sync issue generating infinite loop</li>
<li>Windows - Code optimization to reduce duration of steps 1 and 2</li>
<li>macOS - Fixed unwanted popup message on session logout</li>
<li>Fixed several crashes related to logging</li>
<li>Fixed several crashes related to sync pausing</li>
<li>Resolution of a file synchronization problem affecting the Office suite in particular</li>
<li>Fixed new file wrongly downloaded in LiteSync mode</li>
<li>Fixed missing share links entries in contextual menu</li>
<li>Consolidation of error management during the propagation step</li>
<li>Do not block application startup if local sync folder is missing</li>
<li>Fixed wrongly blacklisted files</li>
<li>Fixed broken sync on FAT systems</li>
<li>Fixed startup issue in case of unknown proxy type</li>
<li>Fixed migration issues</li>
<li>Fixed status in case of abort during upload</li>
<li>Exclude files and folders with name length above 255 characters</li>
<li>Win - Fixed issue on symkinks and junctions</li>
<li>Fixed CSV parsing error leading to incomplete remote snapshot</li>
<li>Improved handling of access denied errors</li>
</ul>
</body>
</html>
74 changes: 63 additions & 11 deletions infomaniak-build-tools/linux/build-ci-amd64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,68 @@

set -xe

BUILDTYPE="Debug"
if [[ $1 == 'release' ]]; then
BUILDTYPE="Release";
program_name="$(basename "$0")"

function display_help {
echo "$program_name [-h] [-t build-type] [-u unit-tests]"
echo " Build the desktop-kDrive application for Linux Amd64 with the specified build type ."
echo "where:"
echo "-h Show this help text."
echo "-t <build-type>"
echo " Set the type of the build. Defaults to 'debug'. The valid values are: 'debug' or 'release'."
echo "-u <unit-tests>"
echo " Activate the build of unit tests. Without this flag, unit tests will not be built."
}


unit_tests=0
build_type="debug"

while :
do
case "$1" in
-t | --build-type)
build_type="$2"
shift 2
;;
-u | --unit-tests)
unit_tests=1
shift 1
;;
-h | --help)
display_help
exit 0
;;
--) # End of all options
shift
break
;;
-*)
echo "Error: Unknown option: $1" >&2
exit 1
;;
*) # No more options
break
;;
esac
done


if [[ $build_type == "release" ]]; then
build_type="Release"
elif [[ $build_type == "debug" ]]; then
build_type="Debug"
fi

echo "Build type: $build_type"
echo "Unit tests build flag: $unit_tests"


export QT_BASE_DIR="~/Qt/6.2.3"
export QTDIR="$QT_BASE_DIR/gcc_64"
export BASEPATH=$PWD
export CONTENTDIR="$BASEPATH/build-linux"
export BUILDDIR="$CONTENTDIR/build"
export build_dir="$CONTENTDIR/build"
export APPDIR="$CONTENTDIR/app"

extract_debug () {
Expand All @@ -39,7 +91,7 @@ extract_debug () {
}

mkdir -p $APPDIR
mkdir -p $BUILDDIR
mkdir -p $build_dir

export QMAKE=$QTDIR/bin/qmake
export PATH=$QTDIR/bin:$QTDIR/libexec:$PATH
Expand All @@ -50,14 +102,14 @@ export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
export SUFFIX=""

# Build client
cd $BUILDDIR
mkdir -p $BUILDDIR/client
cd $build_dir
mkdir -p $build_dir/client

CMAKE_PARAMS=()

export KDRIVE_DEBUG=0

cmake -B$BUILDDIR -H$BASEPATH \
cmake -B$build_dir -H$BASEPATH \
-DOPENSSL_ROOT_DIR=/usr/local \
-DOPENSSL_INCLUDE_DIR=/usr/local/include \
-DOPENSSL_CRYPTO_LIBRARY=/usr/local/lib64/libcrypto.so \
Expand All @@ -66,11 +118,11 @@ cmake -B$BUILDDIR -H$BASEPATH \
-DCMAKE_BUILDTYPE=$BUILDTYPE \
-DCMAKE_PREFIX_PATH=$BASEPATH \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBIN_INSTALL_DIR=$BUILDDIR/client \
-DBIN_INSTALL_DIR=$build_dir/client \
-DKDRIVE_VERSION_SUFFIX=$SUFFIX \
-DKDRIVE_THEME_DIR="$BASEPATH/infomaniak" \
-DKDRIVE_VERSION_BUILD="$(date +%Y%m%d)" \
-DBUILD_UNIT_TESTS=1 \
-DBUILD_UNIT_TESTS=$unit_tests \
"${CMAKE_PARAMS[@]}" \

make -j$(nproc)
Expand All @@ -80,4 +132,4 @@ extract_debug ./bin kDrive_client

make DESTDIR=$APPDIR install

cp $BASEPATH/sync-exclude-linux.lst $BUILDDIR/bin/sync-exclude.lst
cp $BASEPATH/sync-exclude-linux.lst $build_dir/bin/sync-exclude.lst
31 changes: 12 additions & 19 deletions infomaniak-build-tools/macos/build-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ export PATH=$QTDIR/bin:$PATH
# Set Infomaniak Theme
KDRIVE_DIR="$SRCDIR/infomaniak"

# Path to Sparkle installation
SPARKLE_DIR="$HOME/Library/Frameworks"
# Set build dir
BUILDDIR="$PWD/build-macos/client"

# Set install dir
INSTALLDIR="$PWD/build-macos/client/install"

# Prepare directory
# Create install dir if needed
mkdir -p build-macos/client
mkdir -p build-macos/install
INSTALLDIR="$PWD/build-macos/install"
BUILDDIR="$PWD/build-macos/client"
mkdir -p build-macos/client/install

# Backup the existing .app if there is one
if [ -d "$INSTALLDIR/$APPNAME-old.app" ]; then
rm -rf "$INSTALLDIR/$APPNAME-old.app"
fi
Expand All @@ -57,40 +59,31 @@ if [ -d "$INSTALLDIR/$APPNAME.app" ]; then
cp -a "$INSTALLDIR/$APPNAME.app" "$INSTALLDIR/$APPNAME-old.app"
fi

pushd "$BUILDDIR"

# Prepare additional cmake arguments
if [ -z "$KDRIVE_VERSION_BUILD" ]; then
KDRIVE_VERSION_BUILD="$(date +%Y%m%d)"
fi

# Prepare cmake arguments
CMAKE_PARAMS=(-DKDRIVE_VERSION_BUILD="$KDRIVE_VERSION_BUILD")

if [ -n "$TEAM_IDENTIFIER" -a -n "$SIGN_IDENTITY" ]; then
CMAKE_PARAMS+=(-DSOCKETAPI_TEAM_IDENTIFIER_PREFIX="$TEAM_IDENTIFIER.")
fi

if [ -n "$APPLICATION_SERVER_URL" ]; then
CMAKE_PARAMS+=(-DAPPLICATION_SERVER_URL="$APPLICATION_SERVER_URL")
fi
# Configure
pushd "$BUILDDIR"

# Configure infomaniakdrive
cmake \
-DCMAKE_OSX_DEPLOYMENT_TARGET="$MACOSX_DEPLOYMENT_TARGET" \
-DCMAKE_INSTALL_PREFIX="$INSTALLDIR" \
-DCMAKE_BUILD_TYPE=Release \
-DSPARKLE_LIBRARY="$SPARKLE_DIR/Sparkle.framework" \
-DOPENSSL_ROOT_DIR="/usr/local/" \
-DOPENSSL_INCLUDE_DIR="/usr/local/include/" \
-DOPENSSL_CRYPTO_LIBRARY="/usr/local/lib/libcrypto.dylib" \
-DOPENSSL_SSL_LIBRARY="/usr/local/lib/libssl.dylib" \
-DKDRIVE_THEME_DIR="$KDRIVE_DIR" \
-DQTDIR="$QTDIR" \
-DBUILD_UNIT_TESTS=1 \
"${CMAKE_PARAMS[@]}" \
"$SRCDIR"

# Build kDrive sources
make -j6 install
make -j6 all install

popd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!--
~ Infomaniak kDrive - Desktop
~ Copyright (C) 2023-2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<!DOCTYPE html>
<html>
<body>
<h1>Versionshinweise - kDrive 3.6.7</h1>
<h2><b>Neue Funktionen</b></h2>
<ul>
<li>&Auml;nderung des Aktualisierungsmechanismus, um die schrittweise Bereitstellung einer neuen Version zu erm&ouml;glichen</li>
</ul>
<h2><b>Fehlerbehebungen</b></h2>
<ul>
<li>Behebung eines Dateisynchronisationsproblems, das insbesondere die Office-Suite betrifft</li>
<li>Neue Datei wurde im LiteSync-Modus f&auml;lschlicherweise heruntergeladen</li>
<li>Fehlende Eintr&auml;ge f&uuml;r Freigabelinks im Kontextmen&uuml; behoben</li>
<li>Konsolidierung des Fehlermanagements w&auml;hrend der Ausbreitungsphase</li>
<li>Start der Anwendung nicht blockieren, wenn der lokale Synchronisierungsordner fehlt</li>
<li>Falsch auf die schwarze Liste gesetzte Dateien korrigiert</li>
<li>Fehlerhafte Synchronisierung auf FAT-Systemen behoben</li>
<li>Startproblem im Falle eines unbekannten Proxy-Typs behoben</li>
<li>Behobene Migrationsprobleme</li>
<li>Status bei Abbruch w&auml;hrend des Uploads korrigiert</li>
<li>Ausschlie&szlig;en von Dateien und Ordnern mit einer Namensl&auml;nge von mehr als 255 Zeichen</li>
<li>Fehler bei der CSV-Analyse behoben, der zu einem unvollst&auml;ndigen Remote-Snapshot f&uuml;hrte</li>
<li>Verbesserte Behandlung von Fehlern bei verweigertem Zugriff</li>
</ul>
</body>
</html>
Loading

0 comments on commit cf713d2

Please sign in to comment.