-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offline Build Support #706
Comments
Thanks for your suggestion!
As I guess this is a rather rare use case (building with Flutter offline is likely not that easy?) we likely won't spend time on explicitly supporting this. But if anyone else is interested, please thumbs up the first comment! If it helps (maybe using some sort of CMake caching, or a proxy that caches dependencies?) you can look at the objectbox-dart/flutter_libs/linux/CMakeLists.txt Lines 61 to 64 in 8caf9ba
|
For the curious, here's how I achieved an offline linux build:
...
# include(FetchContent)
# FetchContent_Declare(
# objectbox-download
# URL https://github.com/objectbox/objectbox-c/releases/download/v${OBJECTBOX_VERSION}/objectbox-linux-${OBJECTBOX_ARCH}.tar.gz
# )
#
# FetchContent_GetProperties(objectbox-download)
# if(NOT objectbox-download_POPULATED)
# FetchContent_Populate(objectbox-download)
# endif()
include_directories(native)
# ----------------------------------------------------------------------
# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
# Note: do not link the ObjectBox C library; the Dart library looks for it in a lib subfolder
# where flutter build puts it when added below.
set(objectbox_flutter_libs_bundled_libraries
"${CMAKE_CURRENT_SOURCE_DIR}/native/lib/${CMAKE_SHARED_LIBRARY_PREFIX}objectbox${CMAKE_SHARED_LIBRARY_SUFFIX}"
PARENT_SCOPE
) I used the same basic process for an offline build on windows. |
Is there an existing issue?
Use case
I'm trying to build an app using object box on an air gapped Linux machine.
Proposed solution
Add configuration/documentation on how to manually download the required native libraries so the build process doesn't fail on unreachable network.
Describe alternatives you've considered
Vendoring the entire plugin and modifying the
flutter_libs/linux/CMakeLists.txt
to find required deps locally.Additional context
The text was updated successfully, but these errors were encountered: