Skip to content

Commit 51f39ae

Browse files
committed
chore: Remove download update powersync core binary filenames for Linux and Windows
1 parent 81c067d commit 51f39ae

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

packages/powersync_flutter_libs/linux/CMakeLists.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,19 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2323
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
2424

2525
# ----------------------------------------------------------------------
26-
# Download and add powersync prebuilt library.
26+
# Add powersync prebuilt library.
2727

2828
set(POWERSYNC_VERSION 0.1.6)
29+
set(CORE_FILE_NAME "libpowersync.so")
2930

3031
set(POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR})
3132
if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64")
32-
set(POWERSYNC_ARCH x64)
33+
set(CORE_FILE_NAME "libpowersync_x64.so")
3334
elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8")
34-
set(POWERSYNC_ARCH aarch64)
35+
set(CORE_FILE_NAME "libpowersync_aarch64.so")
3536
endif ()
3637

37-
set(POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/libpowersync.so")
38-
39-
file(DOWNLOAD
40-
"https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION}/libpowersync_${POWERSYNC_ARCH}.so"
41-
${POWERSYNC_FILE_PATH}
42-
)
38+
set(POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/${CORE_FILE_NAME}")
4339

4440
# ----------------------------------------------------------------------
4541

packages/powersync_flutter_libs/windows/CMakeLists.txt

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,19 @@ target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}
2424
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter flutter_wrapper_plugin)
2525

2626
# ----------------------------------------------------------------------
27-
# Download and add powersync prebuilt library.
28-
29-
set(POWERSYNC_VERSION 0.1.6)
27+
# Add powersync prebuilt library.
3028

3129
set(POWERSYNC_ARCH ${CMAKE_SYSTEM_PROCESSOR})
30+
set(CORE_FILE_NAME "powersync.dll")
31+
3232
if (${POWERSYNC_ARCH} MATCHES "x86_64" OR ${POWERSYNC_ARCH} MATCHES "AMD64")
33-
set(POWERSYNC_ARCH x64)
33+
set(CORE_FILE_NAME "powersync.dll")
3434
elseif (${POWERSYNC_ARCH} MATCHES "^arm64" OR ${POWERSYNC_ARCH} MATCHES "^armv8")
35-
set(POWERSYNC_ARCH aarch64)
35+
message(FATAL_ERROR "Unsupported architecture: ${POWERSYNC_ARCH}, please file a GitHub issue to add support.")
3636
endif ()
3737

3838
set(POWERSYNC_FILE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/powersync.dll")
3939

40-
file(DOWNLOAD
41-
"https://github.com/powersync-ja/powersync-sqlite-core/releases/download/v${POWERSYNC_VERSION}/powersync_${POWERSYNC_ARCH}.dll"
42-
${POWERSYNC_FILE_PATH}
43-
)
44-
4540
# ----------------------------------------------------------------------
4641

4742
# List of absolute paths to libraries that should be bundled with the plugin.

0 commit comments

Comments
 (0)