Skip to content

Commit 419cce8

Browse files
committed
0.13.0
1 parent ff9e649 commit 419cce8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2955
-2054
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
ObjectBox C and C++ API Changelog
22
=================================
33

4+
0.13.0 (2021-03-16)
5+
-------------------
6+
* split Sync symbols out of objectbox.h/pp into objectbox-sync.h/pp
7+
* add Sync server-time getter, listener and local-to-server diff info - to access server time info on clients
8+
* add Sync heartbeat interval configuration and an option to send one immediately
9+
* semi-internal: update Dart/Flutter SDK to v2.0
10+
411
0.12.0 (2021-02-05)
512
-------------------
613
* add Linux ARMv8 (aarch64) native binary library

CMakeLists.txt

+29-46
Original file line numberDiff line numberDiff line change
@@ -11,60 +11,43 @@ if (${CMAKE_VERSION} VERSION_LESS "3.11.0")
1111
else ()
1212
project(objectbox-download)
1313

14-
# Configuration updated for each release
15-
set(DL_VERSION 0.12.0)
16-
set(DL_CHANNEL testing)
17-
18-
# Platform detection and other setup
19-
set(DL_URL https://dl.bintray.com/objectbox/conan/objectbox/objectbox-c)
20-
21-
# ${CMAKE_SYSTEM_PROCESSOR} is invalid on Windows, see https://gitlab.kitware.com/cmake/cmake/-/issues/15170
22-
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
23-
if (CMAKE_SIZEOF_VOID_P MATCHES 8)
24-
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x86_64)
14+
if (DEFINED ENV{OBJECTBOX_ARTIFACT_URL})
15+
set(DL_URL $ENV{OBJECTBOX_ARTIFACT_URL})
16+
message(STATUS "Using pre-compiled ObjectBox library from the OBJECTBOX_ARTIFACT_URL environment variable: ${DL_URL}")
17+
else ()
18+
# Configuration updated for each release
19+
set(DL_VERSION 0.13.0)
20+
21+
# Platform detection and other setup
22+
set(DL_URL https://github.com/objectbox/objectbox-c/releases/download)
23+
24+
# ${CMAKE_SYSTEM_PROCESSOR} is invalid on Windows, see https://gitlab.kitware.com/cmake/cmake/-/issues/15170
25+
if (${CMAKE_SYSTEM_NAME} STREQUAL Windows)
26+
if (CMAKE_SIZEOF_VOID_P MATCHES 8)
27+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x64)
28+
else ()
29+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x86)
30+
endif ()
31+
elseif (${CMAKE_SYSTEM_PROCESSOR} STREQUAL x86_64)
32+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x64)
2533
else ()
26-
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-x86)
34+
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
2735
endif ()
28-
else ()
29-
set(DL_PLATFORM ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
30-
endif ()
31-
32-
if (${DL_PLATFORM} STREQUAL Linux-x86_64)
33-
set(DL_PACKAGE 4db1be536558d833e52e862fd84d64d75c2b3656)
34-
35-
elseif (${DL_PLATFORM} MATCHES "^Linux-aarch64")
36-
# Note: aarch64 is how a 64-bit ARMv8 is reported.
37-
# Also, we don't match armv8 because we haven't seen it yet and also that "-R" and "-M: variants are 32-bit.
38-
set(DL_PACKAGE b0bab81756b4971d42859e9b1bc6f8b3fa8e036e)
3936

40-
elseif (${DL_PLATFORM} MATCHES "^Linux-armv7")
41-
set(DL_PACKAGE d42930899c74345edc43f8b7519ec7645c13e4d8)
42-
set(DL_PLATFORM "Linux-armv7hf") # show what we actually download
43-
44-
elseif (${DL_PLATFORM} MATCHES "^Linux-armv6")
45-
set(DL_PACKAGE 4a625f0bd5f477eacd9bd35e9c44c834d057524b)
46-
set(DL_PLATFORM "Linux-armv6hf") # show what we actually download
47-
48-
elseif (${DL_PLATFORM} STREQUAL Darwin-x86_64)
49-
set(DL_PACKAGE 46f53f156846659bf39ad6675fa0ee8156e859fe)
50-
51-
elseif (${DL_PLATFORM} STREQUAL Windows-x86_64)
52-
set(DL_PACKAGE ca33edce272a279b24f87dc0d4cf5bbdcffbc187)
53-
54-
elseif (${DL_PLATFORM} STREQUAL Windows-x86)
55-
set(DL_PACKAGE 11e6a84a7894f41df553e7c92534c3bf26896802)
37+
if (${DL_PLATFORM} MATCHES "^Linux-armv7")
38+
set(DL_PLATFORM "Linux-armv7hf") # show what we actually download
39+
elseif (${DL_PLATFORM} MATCHES "^Linux-armv6")
40+
set(DL_PLATFORM "Linux-armv6hf") # show what we actually download
41+
endif ()
5642

57-
else ()
58-
message(FATAL_ERROR "Can't download pre-compiled ObjectBox library - platform not supported: ${DL_PLATFORM}")
43+
string(TOLOWER ${DL_PLATFORM} DL_PLATFORM)
44+
set(DL_URL ${DL_URL}/v${DL_VERSION}/objectbox-${DL_PLATFORM}.tar.gz)
45+
message(STATUS "Using pre-compiled ObjectBox library v${DL_VERSION} for ${DL_PLATFORM}: ${DL_URL}")
5946
endif ()
6047

6148
include(FetchContent)
62-
FetchContent_Declare(
63-
${PROJECT_NAME}
64-
URL ${DL_URL}/${DL_VERSION}/${DL_CHANNEL}/0/package/${DL_PACKAGE}/0/conan_package.tgz
65-
)
49+
FetchContent_Declare(${PROJECT_NAME} URL ${DL_URL})
6650

67-
message(STATUS "Using pre-compiled ObjectBox library version ${DL_CHANNEL}:${DL_VERSION} for ${DL_PLATFORM}")
6851
FetchContent_Populate(${PROJECT_NAME})
6952
message(STATUS "Pre-compiled ObjectBox library is saved in ${objectbox-download_SOURCE_DIR}")
7053

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ box.put({.text = "Buy milk"});
1111
1212
See [ObjectBox C and C++ docs](https://cpp.objectbox.io/) for API details.
1313
14-
**Latest version: 0.12.0** (2021-02-05).
14+
**Latest version: 0.13.0** (2021-03-16).
1515
See [changelog](CHANGELOG.md) for more details.
1616
1717
Feature Highlights
@@ -89,7 +89,7 @@ Besides new features, there may be breaking changes requiring modifications to y
8989
* Linux 64-bit
9090
* Linux ARMv6hf (e.g. Raspberry PI Zero)
9191
* Linux ARMv7hf (e.g. Raspberry PI 3/4)
92-
* Linux ARMv8/AArch64 (e.g. Raspberry PI 3/4 with an 64 bit OS like Ubuntu)
92+
* Linux ARMv8/AArch64 (e.g. Raspberry PI 3/4 with a 64 bit OS like Ubuntu)
9393
* MacOS 64-bit
9494
* Windows 32-bit
9595
* Windows 64-bit

download.sh

+34-38
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# ObjectBox libraries are hosted in a Conan repository on Bintray:
3+
# ObjectBox libraries are available as GitHub release artifacts.
44
# This script downloads the current version of the library and extracts/installs it locally.
55
# The download happens in a "download" directory.
66
# After download and extraction, the script asks if the lib should be installed in /usr/local/lib.
@@ -39,10 +39,9 @@ tty -s || quiet=true
3939

4040
# Note: optional arguments like "--quiet" shifts argument positions in the case block above
4141

42-
version=${1:-0.12.0}
43-
repoType=${2:-testing}
44-
os=${3:-$(uname)}
45-
arch=${4:-$(uname -m)}
42+
version=${1:-0.13.0}
43+
os=${2:-$(uname)}
44+
arch=${3:-$(uname -m)}
4645
echo "Base config: OS ${os} and arch ${arch}"
4746

4847
if [[ "$os" == MINGW* ]] || [[ "$os" == CYGWIN* ]]; then
@@ -51,22 +50,21 @@ if [[ "$os" == MINGW* ]] || [[ "$os" == CYGWIN* ]]; then
5150
fi
5251

5352
if [[ "$os" == "Darwin" ]]; then
54-
echo "Adjusted OS to Macos"
55-
os=Macos
53+
echo "Adjusted OS to Mac"
54+
os=Mac
5655
fi
5756

58-
if [[ $arch == "aarch64" ]]; then
59-
arch=armv8
60-
echo "Selected ${arch} architecture for download"
61-
elif [[ $arch == armv7* ]] && [[ $arch != "armv7" ]]; then
62-
arch=armv7
57+
if [[ $arch == "x86_64" ]]; then
58+
arch=x64
59+
elif [[ $arch == armv7* ]]; then
60+
arch=armv7hf
6361
echo "Selected ${arch} architecture for download (hard FP only!)"
64-
elif [[ $arch == armv6* ]] && [[ $arch != "armv6" ]]; then
65-
arch=armv6
62+
elif [[ $arch == armv6* ]]; then
63+
arch=armv6hf
6664
echo "Selected ${arch} architecture for download (hard FP only!)"
6765
fi
6866

69-
conf="${os}::${arch}"
67+
conf=$(echo "${os}-${arch}" | tr '[:upper:]' '[:lower:]') # convert to lowercase
7068
echo "Using configuration ${conf}"
7169

7270
# sudo might not be defined (e.g. when building a docker image)
@@ -78,7 +76,7 @@ fi
7876
# original location where we installed in previous versions of this script
7977
oldLibDir=
8078

81-
if [[ "$os" = "Macos" ]]; then
79+
if [[ "$os" = "Mac" ]]; then
8280
libFileName=libobjectbox.dylib
8381
libDirectory=/usr/local/lib
8482
elif [[ "$os" = "Windows" ]]; then
@@ -101,7 +99,7 @@ fi
10199

102100

103101
function printUsage() {
104-
echo "download.sh [\$1:version] [\$2:repo type] [\$3:os] [\$4:arch]"
102+
echo "download.sh [\$1:version] [\$2:os] [\$3:arch]"
105103
echo
106104
echo " Options (use at front only):"
107105
echo " --quiet: skipping asking to install to ${libDirectory}"
@@ -165,31 +163,29 @@ do
165163
esac
166164
done
167165

168-
HASHES="
169-
Linux::x86_64 4db1be536558d833e52e862fd84d64d75c2b3656
170-
Linux::armv6 4a625f0bd5f477eacd9bd35e9c44c834d057524b
171-
Linux::armv7 d42930899c74345edc43f8b7519ec7645c13e4d8
172-
Linux::armv8 b0bab81756b4971d42859e9b1bc6f8b3fa8e036e
173-
Windows::x86 11e6a84a7894f41df553e7c92534c3bf26896802
174-
Windows::x86_64 ca33edce272a279b24f87dc0d4cf5bbdcffbc187
175-
Macos::x86_64 46f53f156846659bf39ad6675fa0ee8156e859fe
176-
" #END_OF_HASHES
177-
hash=$( awk -v key="${conf}" '$1 == key {print $NF}' <<< "$HASHES" )
178-
if [ -z "$hash" ]; then
179-
echo "Error: the platform configuration ${conf} is unsupported."
180-
echo "You can select the configuration manually (use --help for details)"
166+
SUPPORTED_PLATFORMS="
167+
linux-x64
168+
linux-armv6
169+
linux-armv7
170+
linux-aarch64
171+
windows-x86
172+
windows-x64
173+
mac-x64
174+
" #SUPPORTED_PLATFORMS
175+
if [ -z "$( awk -v key="${conf}" '$1 == key {print $NF}' <<< "$SUPPORTED_PLATFORMS" )" ]; then
176+
echo "Warning: platform configuration ${conf} is not listed as supported."
177+
echo "Trying to continue with the download anyway, maybe the list is out of date."
178+
echo "If that doesn't work you can select the configuration manually (use --help for details)"
181179
echo "Possible values are:"
182-
awk '$0 {print " - " $1 }' <<< "$HASHES"
180+
awk '$0 {print " - " $1 }' <<< "$SUPPORTED_PLATFORMS"
183181
exit 1
184182
fi
185183

186-
baseName=libobjectbox-${version}-${hash}
187-
targetDir="${downloadDir}/${repoType}/${baseName}"
188-
archiveFile="${targetDir}.tgz"
189-
remoteRepo="https://dl.bintray.com/objectbox/conan/objectbox/objectbox-c"
190-
downloadUrl="${remoteRepo}/${version}/${repoType}/0/package/${hash}/0/conan_package.tgz"
191-
192-
echo "Downloading ObjectBox library version ${version} ${repoType} (${hash})..."
184+
targetDir="${downloadDir}/${version}-${conf}"
185+
archiveFile="${targetDir}.tar.gz"
186+
downloadUrl="https://github.com/objectbox/objectbox-c/releases/download/v${version}/objectbox-${conf}.tar.gz"
187+
echo "Resolved URL: ${downloadUrl}"
188+
echo "Downloading ObjectBox library version v${version} for ${conf}..."
193189
mkdir -p "$(dirname "${archiveFile}")"
194190

195191
# Support both curl and wget because their availability is platform dependent

doxygen/Changelog.md

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
ObjectBox C and C++ API Changelog
44
=================================
55

6+
0.13.0 (2021-03-16)
7+
-------------------
8+
* split Sync symbols out of objectbox.h/pp into objectbox-sync.h/pp
9+
* add Sync server-time getter, listener and local-to-server diff info - to access server time info on clients
10+
* add Sync heartbeat interval configuration and an option to send one immediately
11+
* semi-internal: update Dart/Flutter SDK to v2.0
12+
613
0.12.0 (2021-02-05)
714
-------------------
815
* add Linux ARMv8 (aarch64) native binary library

doxygen/Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "ObjectBox C and C++ API"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "0.12.0"
41+
PROJECT_NUMBER = "0.13.0"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

0 commit comments

Comments
 (0)