From 2ab019f2014433651d80a7969bafc584b7a5b697 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 8 May 2024 23:35:55 -0500 Subject: [PATCH 1/3] add linux and windows secp256k1 build scripts in case coinlib's scripts aren't working TODO macos and ios (android?) --- scripts/linux/build_all.sh | 6 ++++-- scripts/windows/build_all.sh | 6 ++++-- scripts/windows/build_secp256k1.bat | 10 ++++++++++ scripts/windows/build_secp256k1.sh | 10 ++++++++++ scripts/windows/build_secp256k1_wsl.sh | 10 ++++++++++ 5 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 scripts/windows/build_secp256k1.bat create mode 100644 scripts/windows/build_secp256k1.sh create mode 100644 scripts/windows/build_secp256k1_wsl.sh diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index 2b6bd1ffd..d7c29e1b1 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -14,9 +14,11 @@ mkdir -p build ./build_secure_storage_deps.sh & (cd ../../crypto_plugins/flutter_liblelantus/scripts/linux && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_libepiccash/scripts/linux && ./build_all.sh ) & -(cd ../../crypto_plugins/flutter_libmonero/scripts/linux && ./build_monero_all.sh && ./build_sharedfile.sh ) & -set_rust_to_1720 & +(cd ../../crypto_plugins/flutter_libmonero/scripts/linux && ./build_monero_all.sh && ./build_sharedfile.sh ) +set_rust_to_1720 (cd ../../crypto_plugins/frostdart/scripts/linux && ./build_all.sh ) & +./build_secp256k1.sh + wait echo "Done building" diff --git a/scripts/windows/build_all.sh b/scripts/windows/build_all.sh index 1a585e276..c055cb6c3 100755 --- a/scripts/windows/build_all.sh +++ b/scripts/windows/build_all.sh @@ -9,9 +9,11 @@ set_rust_to_1671 mkdir -p build (cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) & (cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh ) & -(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) & -set_rust_to_1720 & +(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) +set_rust_to_1720 (cd ../../crypto_plugins/frostdart/scripts/windows && ./build_all.sh ) & +./build_secp256k1_wsl.sh + wait echo "Done building" diff --git a/scripts/windows/build_secp256k1.bat b/scripts/windows/build_secp256k1.bat new file mode 100644 index 000000000..9e7433032 --- /dev/null +++ b/scripts/windows/build_secp256k1.bat @@ -0,0 +1,10 @@ +if not exist "build" mkdir "build" +cd build +rem git clone https://github.com/bitcoin-core/secp256k1 +cd secp256k1 +rem cmake -G "Visual Studio 17 2022" -A x64 -S . -B build +cd build +rem cmake --build . +if not exist "..\..\..\..\build\" mkdir "..\..\..\..\build\" +xcopy src\Debug\libsecp256k1-2.dll "..\..\..\..\build\secp256k1.dll" /Y +cd ..\..\..\ diff --git a/scripts/windows/build_secp256k1.sh b/scripts/windows/build_secp256k1.sh new file mode 100644 index 000000000..6fdd9f58c --- /dev/null +++ b/scripts/windows/build_secp256k1.sh @@ -0,0 +1,10 @@ +mkdir -p build +cd build +git clone https://github.com/bitcoin-core/secp256k1 +cd secp256k1 +mkdir -p build && cd build +cmake .. +cmake --build . +mkdir -p ../../../../../build +cp src/libsecp256k1.so.2.2.1 "../../../../../build/libsecp256k1.so" +cd ../../../ diff --git a/scripts/windows/build_secp256k1_wsl.sh b/scripts/windows/build_secp256k1_wsl.sh new file mode 100644 index 000000000..b5d2e281f --- /dev/null +++ b/scripts/windows/build_secp256k1_wsl.sh @@ -0,0 +1,10 @@ +mkdir -p build +cd build +git clone https://github.com/bitcoin-core/secp256k1 +cd secp256k1 +mkdir -p build && cd build +cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-w64-mingw32.toolchain.cmake +cmake --build . +mkdir -p ../../../../../build +cp src/libsecp256k1-2.dll "../../../../../build/secp256k1.dll" +cd ../../../ From f1cccfea650e71dfcbfcd2a003d86449e414598d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Thu, 9 May 2024 00:10:27 -0500 Subject: [PATCH 2/3] unix line endings for WSL2 script, move to linux dir --- scripts/{windows => linux}/build_secp256k1.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename scripts/{windows => linux}/build_secp256k1.sh (100%) diff --git a/scripts/windows/build_secp256k1.sh b/scripts/linux/build_secp256k1.sh similarity index 100% rename from scripts/windows/build_secp256k1.sh rename to scripts/linux/build_secp256k1.sh From 66b14717aa2d593e8720b3d00aef826d8969fdad Mon Sep 17 00:00:00 2001 From: sneurlax Date: Wed, 8 May 2024 19:12:47 -0500 Subject: [PATCH 3/3] chmod +x build_secp256k1.sh --- scripts/linux/build_secp256k1.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/linux/build_secp256k1.sh diff --git a/scripts/linux/build_secp256k1.sh b/scripts/linux/build_secp256k1.sh old mode 100644 new mode 100755