Граф коммитов

3256 Коммитов

Автор SHA1 Сообщение Дата
anaaru 6d699e6094
Updating mstelemetry portfile for windows (#810)
Got clienttelemetry.lib to build with MSVC v142 platform toolset.

Co-authored-by: Anand Arumugam <anaaru@microsoft.com>
Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-19 19:30:54 -07:00
Matthew Koscumb 795e0f1dd3
Set the NOMINMAX Macro in the Build (#857)
* Set the NOMINMAX macro for msbuild targets

* Set the NOMINMAX macro for CMake based builds.

* Get rid of #ifdefs and #undefs for min and max

* Use <PreprocessorDefinitions> to add the NOMINMAX macro, rather than <AdditionalOptions>

* Missed one <AdditionalOptions> blob.

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-19 15:02:18 -07:00
Sahil Ashar 70a16574de
Illegal Character Causing Build Errors in MSVC (#872) 2021-05-18 16:34:07 -05:00
Sid Dahiya f08443ee69
Modules commit update. (#869)
* Modules commit update.

* Disable test failing on Mac

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-13 14:21:24 -07:00
sreejabanerjee 3d50d29956
Adding read me file for Apple podspec (#826)
* adding read me file for Apple podspec

* addressed feedback

* addressed feedback

Co-authored-by: sreejabanerjee <sreejabanerjee@gmail.com>
Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-13 14:20:05 -07:00
dipatid 1eaca26f59
set canUseSDk flag to false before pause transmission (#868) 2021-05-13 12:39:32 -07:00
jevery23 b4acb91123
Add mat/config.h include to PayloadDecoder.cpp as it is causing undesired behavior in MS Edge. (#867)
* Add mat/config.h include.

* Remove change to modules file.

* Move include to first in order.
2021-05-12 21:15:04 -07:00
Sid Dahiya f14f9ba603
Module, Tests, and VS Solution files updates (#865)
* Add DefaultDataViewerFuncTests.

* VS auto-updated files

VS is continuously generates these files, checking them in as well.

* Revert "VS auto-updated files"

This reverts commit f3662f6507.

* Cleaner fix for Clienttelemetry.vcxitems.filters

* Module commit update
2021-05-12 16:49:13 -07:00
Sid Dahiya 75a55321e9
Rev version to 3.5.131.1 (#864) 2021-05-12 07:20:01 -07:00
Sid Dahiya 2b9c151c1b
Add Multiple LogManager support for Privacy Guard (#850)
* Add PrivacyGuardHelper

The class manages the PrivacyGuard shared_ptr.shared_ptr. This is needed to allow for logmanger-specific integration.

* Add checks for module before including PG.

* Update modules commit to module-master

* Fix build breaks and address comments.

* Correctly use the shared_ptr

* Fix missing methods for ILogManager

- Added tests
- Renamed PrivacyGuardState to PrivacyGuardHelper.

* Remove `/*static*/` where it's not used.

* Simplify the PG registration for LogManager

* Revert "Remove `/*static*/` where it's not used."

This reverts commit 3cf8f12242.

* Revert "Add PrivacyGuardState"

This reverts commit 42996be631.

# Conflicts:
#	lib/android_build/maesdk/src/main/java/com/microsoft/applications/events/LogManagerProvider.java
#	lib/jni/LogManager_jni.cpp
#	lib/jni/PrivacyGuard_jni.cpp

* Revert more changes.

* Cleanup LogManager and tests

* Minor rename of methods.

* Improve the test for PG on Multiple LogManager

* Minor refactoring.

* Add Java implementation for PG InitConfig

* Fix Mac build break for Android

Add support for multi-user scenarios
Point modules to newer commit with PG Module changes.

* Update modules and JNI.

* Try fix build break.

* Disable Android test for PG

Remove all the #ifs I added to make the test work.

* Fix PrivacyGuard_JNI compilation

* Remove deprecated CDC fields from Java.

* Update Obj-C Wrapper.

* Add ObjC InitConfig files.

* ObjC Wrapper updates.

* Update modules commit.

* Modules repo commit update.

* Pair programming and Xcode FTW

* Java Updates

* Address ObjC comments.

* Update main.mm to initialize the NSMutableArrays before using them.

* fix typo

* Update PG test

* Update InitConfig to use a C'tor for required values.

* Fix a typo on ObjC Wrapper

* Update Modules commit point to master tip.

Co-authored-by: David Brown <dabrow@microsoft.com>
2021-05-11 17:33:25 -07:00
Jason Bray a9ac12166c
Re-enable SQLite tests and fix init/shutdown for multiple log managers (#792)
Previously with multiple log managers, all log managers needed skipSqliteInitAndShutdown, and SQLite needed to be initialized independently. Otherwise, even with careful sequencing of creating and shutting down log managers, operations like `recreate` could call shutdown, improperly tearing down SQLite while other log managers are active.

This ensures that `sqlite3_shutdown` isn't called if there are any other SDK instances of SQLite in the same memory space. I don't expect this to cause any issues, because shutting down SQLite is generally unnecessary. Added a related test, and re-enabled all the other tests 🙂

This change also fixes an issue where `MockIRuntimeConfig` could persist some state between tests.

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
Co-authored-by: jevery23 <joevery@microsoft.com>
2021-05-07 14:17:23 -07:00
Max Golovanov 564c3cc4d0
Ensure headers are included once (#843) 2021-05-07 00:02:21 -07:00
dipatid a7638b5838
updated version to 3.5.127.1 (#861)
Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-06 23:33:32 -07:00
Max Golovanov e1ffdd8dc2
Update cpp-start-windows.md (#860)
* Update cpp-start-windows.md

Remove BETA and clarify some 101 instructions.

* Update cpp-start-windows.md

Add more steps

* Update cpp-start-windows.md

* Update docs/cpp-start-windows.md

Co-authored-by: Reiley Yang <reyang@microsoft.com>

* Update docs/cpp-start-windows.md

Co-authored-by: Reiley Yang <reyang@microsoft.com>

* Update docs/cpp-start-windows.md

Co-authored-by: Reiley Yang <reyang@microsoft.com>

* Update docs/cpp-start-windows.md

Co-authored-by: Reiley Yang <reyang@microsoft.com>

Co-authored-by: Reiley Yang <reyang@microsoft.com>
2021-05-06 23:20:02 -07:00
Hiroshi Nagata 6532612f27
ID in /etc/os-release on openSUSE contains quotes (#859)
* ID in /etc/os-release on openSUSE contains quotes

* Patch the contents of cache and avoid file re-read

* Check for npos
2021-05-06 17:21:41 -07:00
dipatid ed6667bcc6
[iOS Wrapper] Added applicationWillTerminate notification Handler in ODWLogger.mm (#847)
* Added applicationWillTerminate notification observer

* Added appWillTerminte notification handler to not allow use of SDK after the notification fires

* Minor corrections

* used compiler flags for iOS

* Added [ODWLogManager applicationWillTerminate] class method instead of listening to notification in SDK

* Addded pause transmission and flushAndTearDown calls in appWillTerminate method.

* correctin in api call

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-05-06 09:19:51 -07:00
Matthew Koscumb 670b8cdb05
The win32-dll project doesn't need to rebuild all the .cpp files in ClientTelemetry.vcxitems (et al), rather it should consume what's produced by win32-lib. (#852) 2021-05-05 14:07:42 -07:00
Matthew Koscumb eb779d0880
Consolidate MSBuild Scripts (#851)
* Consolidate msbuild and test logic into separate batch files, so helper scripts don't need to duplicate too much.

* Use tools\vcvars.cmd, rather than directly linking against the VS2017 cmd.

* Add the ability to specifiy custom properties to RunMsBuild.bat

* Move build-all.bat to use RunMsBuild.bat, remove references to non-existant vcvars-ext.bat
2021-05-05 12:07:08 -07:00
jevery23 59889aa4cc
Fix error: ctmacros.hpp file not found with <angled> include (#855)
* Fix error: ctmacros.hpp file not found with <angled> include; use quotes instead

* Update template file too.

Co-authored-by: Hiroshi Nagata <hirosn@microsoft.com>
2021-05-04 13:48:42 -07:00
jevery23 8b8b7b7238
Workaround for undefined RRF_SUBKEY_WOW6464KEY regkey (#853)
Co-authored-by: Jason Bray <jasbray@microsoft.com>
2021-05-04 10:13:40 -07:00
jevery23 cc2dca9f91
Add support for custom r: device IDs (#854)
* Workaround for undefined RRF_SUBKEY_WOW6464KEY regkey

* Add support for custom r: device IDs

* Revert "Workaround for undefined RRF_SUBKEY_WOW6464KEY regkey"

This reverts commit edad4f3366.

Co-authored-by: Jason Bray <jasbray@microsoft.com>
2021-05-04 09:07:24 -07:00
Sid Dahiya b6c48c170e
Update version to v3.5.117 (#846) 2021-04-27 16:03:59 -07:00
Sid Dahiya 454d1246cf
Update Modules commit (#844)
* Update Modules commit

Also fix Macro redefinition that is breaking gcc.
2021-04-27 15:01:26 -07:00
Max Golovanov ba73efd441
Rename build-windows-vs2017.yaml to build-windows-vs2017.yaml.off (#842)
Temporarily disable Visual Studio 2017 "full" build loop.
2021-04-26 13:36:06 -07:00
Max Golovanov 23e6b0b53d
Fix for no-offline storage build (#841) 2021-04-26 10:35:11 -07:00
Max Golovanov ee358c3268
Update json.hpp to v3.9.1 (#839)
* Update json.hpp

Integrate the latest Released version of json.hpp from https://github.com/nlohmann/json/releases/tag/v3.9.1

* Update spellcheck.yml

Turn off spell-checker for json.hpp (external code)

* Update LogConfiguration.cpp

Fix an issue with new json.hpp

* Add missing braces
2021-04-23 20:10:49 -07:00
Matthew Koscumb 5a3b7ef368
Stop Unit and Func tests from recompiling all of the files that constitute clienttelemetry.lib (#838)
* Make UnitTests.vcxproj consume the .lib file produced by win32-lib, not recompile each file.

* Make FuncTests.vcxproj consume the .lib file produced by win32-lib, not recompile each file.
2021-04-23 17:52:25 -07:00
Max Golovanov 884ac26573
Fix PayloadDecoder broken for win32-mini-lib flavor (#807)
* Fix PayloadDecoder broken for win32-mini-lib flavor

* Update setup-buildtools.cmd

Temporary fix for GitHub Action runner issue
2021-04-19 15:09:41 -07:00
Matthew Koscumb 27d226c6f4
Enable Warning as Error on GCC and Clang builds for symmetry with MSVC. (#797)
* Enable Warning as Error on GCC and Clang builds for symmetry with Windows.

* Fix -Wreorder issues in HttpClient_Curl.hpp

* Default assign variables using in-class initializer per CppStandardGuidelines C.48

* Disable -Wtype-limits on clang in parity with MSVC

* Handle GCC separately from Clang for manipulating the warning state.

* Undo a clang-format change.

* Exec is used on non-Apple platforms, however this means that the method fires -Wunused-function on Apple platforms. Locally supress that warning.

* Suppress missing field initializer warning around tm, as I'm not 100% what the most correct fix is here.

* Avoid multi-line comment continuation in -Wcomment

* GCC throws -Wunknown-pragmas on #pragma clang, surround invocations with #ifdef __clang__

* Remove unused local variable, as it's not necessary for the test.

* Suppress -Wobjc-missing-super warnings in third_party code.

* Fix a -Wformat-security warning by treating the message string as an argument.

* Fix error: comparison between ‘const enum Microsoft::Applications::Events::EventProperty::<unnamed>’ and ‘const enum evt_prop_t’ [-Werror=enum-compare]

* Rather than %@, use %s for c-style strings.

* The two types here aren't safely default comparable, cast to underlying types.

* Rather than raising an exception directly, call ODWLogger raiseException

* Wrap #pragma warning with _MSC_VER ifdefs.

* No need for an NSString when NSException prefers a string literal.

* Fix -Wreorder issues in HttpResponseDecoderTests

* Fix error: 'ShadowBondSplicer::addRecord' hides overloaded virtual function [-Werror,-Woverloaded-virtual] by renaming the helper to addCsRecord

* Fix unused local variable warnings by removing the unused locals.

* Fix error: local variable 'output' will be copied despite being returned by name [-Werror,-Wreturn-std-move]. Note that this won't be necessary with guaranteed NVRO in C++17, yay!

* Remove unused locals in MetaStatsTests::GenerateStartEvent

* Fix -Wswitch error on non-Android.

* Fix error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] in OfflineStorageTests_Room.cpp

* More unsigned-signed comparison warning fixes.

* howMany is used in a lambda capture, but clang thinks it isn't used. Odd.

* The unused-lambda-capture warning appears to be a Clang9 bug, don't disable this warning for GCC

* More signed-unsigned comparison fixes.

* Fix signed-unsigned comparison warning in TransmissionPolicyManagerTests. Used long long since that's the return type of std::chrono::duration::milliseconds::count()

* Don't need the long long, default int is fine.

* Fix -wsign-compare in TransmitProfilesTests.cpp

* Missed assigning isAborted to false, std::atomic<T> will zero init its details, but not the T (until C++20).

* Fix -Wdeprecated-copy by defining the copy and move constructors for the Variant type.

* Add copy and move c'tors and assignment operators to the GUID_t type.

* Add copy and move constructors and assignment operators on time_ticks_t

* Fix -Wformat-truncation on GCC 9.3.0 in Pal.cpp by suppressing the warning on this line. This appears to be a false positive.

* INSTANTIATE_TEST_CASE_P is deprecated, using INSTANTIATE_TEST_SUITE_P

* Clang also defines __GNUC__, so since this warning is  a GCC only issue suppress the warning when !defined __clang__

* Missed closing #endif in PAL.cpp

* Some versions of GTest deprecate INSTANTIATE_TEST_CASE_P and others do not, the 1DS SDK should unify on a single version of GTest that's part of the repo, or via a package manager. That's not going to be part of this changelist, so simply suppress this warning.

Co-authored-by: Max Golovanov <maxgolov@microsoft.com>
2021-04-13 15:15:14 -07:00
Vitalii Herasimov 7e26c3964a
Add CentOS8 and Debian10 support (#820)
* Add CentOS8

* Add Debian10 dockerfile

* CR #1
2021-04-12 12:52:03 -07:00
Sagar Punhani 15c500ab2a
Fix bool check for objc (#824)
Co-authored-by: Sagar Punhani <sagar7p@gmail.com>
2021-04-09 13:27:56 -07:00
ragovi-ms 503a926941
[Android] Added optional native android build (#817)
* Added building native code as optional in gradle

* Added target level include directories
2021-04-07 22:32:13 +05:30
Martin Harriman 7594d9a83f
Java LogManagerImpl (#818)
Add error checking in the getLogger method. Some applications are
seeing Java exceptions (no such field) from the nativeGetLogger method.

Co-authored-by: Martin Harriman <maharrim@microsoft.com>
2021-04-06 16:43:29 -07:00
Tommy Meisel a924650883
Prepare for release 3.5.89 (#815)
Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-03-30 18:58:08 -07:00
Tommy Meisel fcc59f1930
[ObjC] Add function to set host (#816)
* add function to set host

* fix build

* add getter, unit test

Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-03-30 18:32:23 -07:00
Tommy Meisel a58dd9c971
Fix ODWLogConfiguration.set function (#814)
* update setWithValue, add unit test

* fix tests

Co-authored-by: Tommy Meisel <thmeisel@microsoft.com>
2021-03-30 12:11:01 -07:00
Max Golovanov 3d48e213cb
Merge pull request #806 from microsoft/maxgolov/sqlite3_upgrade
Upgrade sqlite to v3.34.1
2021-03-23 19:51:46 -07:00
Max Golovanov 7b2ae20cb7
Merge branch 'master' into maxgolov/sqlite3_upgrade 2021-03-23 15:41:25 -07:00
Martin Harriman f9718ae02d
Merge pull request #813 from microsoft/maharrim/keep-jni
Annotate JNI-accessed class and fields
2021-03-23 15:05:01 -07:00
Martin Harriman 4f2750eb0b
Merge branch 'master' into maharrim/keep-jni 2021-03-23 13:13:35 -07:00
Max Golovanov 902bd9bff5
Merge branch 'master' into maxgolov/sqlite3_upgrade 2021-03-23 12:11:02 -07:00
Max Golovanov fc5b462d9f
Merge pull request #812 from microsoft/maxgolov/codeql_fix
Fix CodeQL warnings
2021-03-23 12:10:14 -07:00
Matthew Koscumb a5f64ab9a6
Merge branch 'master' into maxgolov/sqlite3_upgrade 2021-03-23 11:35:01 -07:00
Martin Harriman 9406a19cab
Merge branch 'master' into maxgolov/codeql_fix 2021-03-23 10:05:45 -07:00
Martin Harriman 5b4716e362
Merge branch 'master' into maharrim/keep-jni 2021-03-23 10:05:03 -07:00
rybest 1a905784d0
Targeted fix to enable the arm64 static library build (#809)
* Targeted fix to enable the arm64 static library build

* Code review fixes for solution :
Revert change to remove SampleCppUTC
Revert changes to fix Debug.vs2015.MT-sqlite targets that are not used by build-win.ps1
2021-03-23 09:44:08 -07:00
Martin Harriman 01ee531236 Annotate JNI-accessed class and fields 2021-03-22 17:49:51 -07:00
Max Golovanov 4370b63350 It has to be `HasConfig` and not `count` 2021-03-22 15:41:13 -07:00
Max Golovanov fa4cedfcc4 Merge branch 'master' of https://github.com/microsoft/cpp_client_telemetry into maxgolov/sqlite3_upgrade 2021-03-22 15:21:04 -07:00
Max Golovanov dd8b906b17
Merge branch 'master' into maxgolov/codeql_fix 2021-03-22 15:19:46 -07:00