From dd5498a72988110c3eed739e9cb1c8c65fef0953 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 16:42:30 -0500 Subject: [PATCH 01/13] split copy_monero_deps.sh into git_versions.sh and copy_wownero_deps.sh --- scripts/android/build_all.sh | 2 ++ scripts/android/copy_monero_deps.sh | 19 +++---------------- scripts/android/copy_wownero_deps.sh | 11 +++++++++++ scripts/android/git_versions.sh | 11 +++++++++++ 4 files changed, 27 insertions(+), 16 deletions(-) create mode 100755 scripts/android/copy_wownero_deps.sh create mode 100755 scripts/android/git_versions.sh diff --git a/scripts/android/build_all.sh b/scripts/android/build_all.sh index 0eb4ff4809..d96c8da112 100755 --- a/scripts/android/build_all.sh +++ b/scripts/android/build_all.sh @@ -4,5 +4,7 @@ ./build_monero_all.sh ./build_wownero.sh ./build_wownero_seed.sh +./git_versions.sh ./copy_monero_deps.sh +./copy_wownero_deps.sh diff --git a/scripts/android/copy_monero_deps.sh b/scripts/android/copy_monero_deps.sh index 51d5036ec9..1a4ff15aeb 100755 --- a/scripts/android/copy_monero_deps.sh +++ b/scripts/android/copy_monero_deps.sh @@ -1,18 +1,8 @@ #!/bin/bash -echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt -VERSIONS_FILE=../../lib/git_versions.dart -EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart -if [ ! -f "$VERSIONS_FILE" ]; then - cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE -fi -COMMIT=$(git log -1 --pretty=format:"%H") -OS="ANDROID" -sed -i "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE WORKDIR="$(pwd)/"build CW_DIR="$(pwd)"/../../../flutter_libmonero CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android -CW_WOWNERO_EXTERNAL_DIR=${CW_DIR}/cw_wownero/ios/External/android CW_MONERO_EXTERNAL_DIR=${CW_DIR}/cw_monero/ios/External/android for arch in "aarch" "aarch64" "i686" "x86_64" do @@ -33,7 +23,7 @@ esac LIB_DIR=${CW_EXRTERNAL_DIR}/${ABI}/lib INCLUDE_DIR=${CW_EXRTERNAL_DIR}/${ABI}/include -LIBANBOUND_PATH=${PREFIX}/lib/libunbound.a +LIBUNBOUND_PATH=${PREFIX}/lib/libunbound.a mkdir -p $LIB_DIR mkdir -p $INCLUDE_DIR @@ -41,15 +31,12 @@ mkdir -p $INCLUDE_DIR cp -r ${PREFIX}/lib/* $LIB_DIR cp -r ${PREFIX}/include/* $INCLUDE_DIR -if [ -f "$LIBANBOUND_PATH" ]; then - cp $LIBANBOUND_PATH ${LIB_DIR}/monero +if [ -f "$LIBUNBOUND_PATH" ]; then + cp $LIBUNBOUND_PATH ${LIB_DIR}/monero fi done mkdir -p ${CW_MONERO_EXTERNAL_DIR}/include -mkdir -p ${CW_WOWNERO_EXTERNAL_DIR}/include cp $CW_EXRTERNAL_DIR/x86/include/monero/wallet2_api.h ${CW_MONERO_EXTERNAL_DIR}/include -cp $CW_EXRTERNAL_DIR/x86/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include -cp -R $CW_EXRTERNAL_DIR/x86/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include diff --git a/scripts/android/copy_wownero_deps.sh b/scripts/android/copy_wownero_deps.sh new file mode 100755 index 0000000000..fb6af99063 --- /dev/null +++ b/scripts/android/copy_wownero_deps.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +WORKDIR="$(pwd)/"build +CW_DIR="$(pwd)"/../../../flutter_libmonero +CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android +CW_WOWNERO_EXTERNAL_DIR=${CW_DIR}/cw_wownero/ios/External/android + +mkdir -p ${CW_WOWNERO_EXTERNAL_DIR}/include + +cp $CW_EXRTERNAL_DIR/x86/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include +cp -R $CW_EXRTERNAL_DIR/x86/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include diff --git a/scripts/android/git_versions.sh b/scripts/android/git_versions.sh new file mode 100755 index 0000000000..12204a4247 --- /dev/null +++ b/scripts/android/git_versions.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt +VERSIONS_FILE=../../lib/git_versions.dart +EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart +if [ ! -f "$VERSIONS_FILE" ]; then + cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE +fi +COMMIT=$(git log -1 --pretty=format:"%H") +OS="ANDROID" +sed -i "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE From d78e9a4d1db95a08dcc897fd85c3381b87541533 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 16:46:30 -0500 Subject: [PATCH 02/13] typofix --- scripts/android/copy_wownero_deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/android/copy_wownero_deps.sh b/scripts/android/copy_wownero_deps.sh index fb6af99063..d3d0d81305 100755 --- a/scripts/android/copy_wownero_deps.sh +++ b/scripts/android/copy_wownero_deps.sh @@ -2,10 +2,10 @@ WORKDIR="$(pwd)/"build CW_DIR="$(pwd)"/../../../flutter_libmonero -CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android +CW_EXTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android CW_WOWNERO_EXTERNAL_DIR=${CW_DIR}/cw_wownero/ios/External/android mkdir -p ${CW_WOWNERO_EXTERNAL_DIR}/include -cp $CW_EXRTERNAL_DIR/x86/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include -cp -R $CW_EXRTERNAL_DIR/x86/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include +cp $CW_EXTERNAL_DIR/x86/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include +cp -R $CW_EXTERNAL_DIR/x86/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include From d8057b32f5ca66664eef3ad490b39575163d0808 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 16:49:11 -0500 Subject: [PATCH 03/13] split copy_monero_deps.sh and copy_wownero_deps.sh for linux --- scripts/linux/copy_monero_deps.sh | 6 +---- scripts/linux/copy_wownero_deps.sh | 41 ++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 5 deletions(-) create mode 100755 scripts/linux/copy_wownero_deps.sh diff --git a/scripts/linux/copy_monero_deps.sh b/scripts/linux/copy_monero_deps.sh index 7871b7690a..fb21c86478 100755 --- a/scripts/linux/copy_monero_deps.sh +++ b/scripts/linux/copy_monero_deps.sh @@ -4,7 +4,6 @@ WORKDIR="$(pwd)/"build CW_DIR="$(pwd)"/../../../flutter_libmonero CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android CW_MONERO_EXTERNAL_DIR=${CW_DIR}/cw_monero/ios/External/android -CW_WOWNERO_EXTERNAL_DIR=${CW_DIR}/cw_wownero/ios/External/android if [ -z ${TYPES_OF_BUILD+x} ]; then TYPES_OF_BUILD=x86_64; fi for arch in $TYPES_OF_BUILD @@ -35,10 +34,7 @@ cp -r ${PREFIX}/include/* $INCLUDE_DIR mkdir -p ${CW_MONERO_EXTERNAL_DIR}/include -mkdir -p ${CW_WOWNERO_EXTERNAL_DIR}/include cp $PREFIX/include/monero/wallet2_api.h ${CW_MONERO_EXTERNAL_DIR}/include -cp $PREFIX/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include -cp -R $PREFIX/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include -done \ No newline at end of file +done diff --git a/scripts/linux/copy_wownero_deps.sh b/scripts/linux/copy_wownero_deps.sh new file mode 100755 index 0000000000..21b3992527 --- /dev/null +++ b/scripts/linux/copy_wownero_deps.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +WORKDIR="$(pwd)/"build +CW_DIR="$(pwd)"/../../../flutter_libmonero +CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android +CW_WOWNERO_EXTERNAL_DIR=${CW_DIR}/cw_wownero/ios/External/android +if [ -z ${TYPES_OF_BUILD+x} ]; then TYPES_OF_BUILD=x86_64; fi + +for arch in $TYPES_OF_BUILD +do + +PREFIX=${WORKDIR}/prefix_${arch} +ABI="" + +case $arch in + "aarch" ) + ABI="armeabi-v7a";; + "aarch64" ) + ABI="arm64-v8a";; + "i686" ) + ABI="x86";; + "x86_64" ) + ABI="x86_64";; +esac + +LIB_DIR=${CW_EXRTERNAL_DIR}/${ABI}/lib +INCLUDE_DIR=${CW_EXRTERNAL_DIR}/${ABI}/include + +mkdir -p $LIB_DIR +mkdir -p $INCLUDE_DIR + +cp -r ${PREFIX}/lib/* $LIB_DIR +cp -r ${PREFIX}/include/* $INCLUDE_DIR + + +mkdir -p ${CW_WOWNERO_EXTERNAL_DIR}/include + +cp $PREFIX/include/wownero/wallet2_api.h ${CW_WOWNERO_EXTERNAL_DIR}/include +cp -R $PREFIX/include/wownero_seed ${CW_WOWNERO_EXTERNAL_DIR}/include + +done From d73ee89bd10be6af7beacdbdf6bbf74217b8cf74 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 16:49:24 -0500 Subject: [PATCH 04/13] typofix --- scripts/linux/copy_monero_deps.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/linux/copy_monero_deps.sh b/scripts/linux/copy_monero_deps.sh index fb21c86478..4d1f439a78 100755 --- a/scripts/linux/copy_monero_deps.sh +++ b/scripts/linux/copy_monero_deps.sh @@ -2,7 +2,7 @@ WORKDIR="$(pwd)/"build CW_DIR="$(pwd)"/../../../flutter_libmonero -CW_EXRTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android +CW_EXTERNAL_DIR=${CW_DIR}/cw_shared_external/ios/External/android CW_MONERO_EXTERNAL_DIR=${CW_DIR}/cw_monero/ios/External/android if [ -z ${TYPES_OF_BUILD+x} ]; then TYPES_OF_BUILD=x86_64; fi @@ -23,8 +23,8 @@ case $arch in ABI="x86_64";; esac -LIB_DIR=${CW_EXRTERNAL_DIR}/${ABI}/lib -INCLUDE_DIR=${CW_EXRTERNAL_DIR}/${ABI}/include +LIB_DIR=${CW_EXTERNAL_DIR}/${ABI}/lib +INCLUDE_DIR=${CW_EXTERNAL_DIR}/${ABI}/include mkdir -p $LIB_DIR mkdir -p $INCLUDE_DIR From 41e6bb3cd77e44d145df3d2269ce6554fa147a45 Mon Sep 17 00:00:00 2001 From: julian-CStack Date: Tue, 21 Mar 2023 15:51:26 -0600 Subject: [PATCH 05/13] extricate wownero scripts --- scripts/ios/build_all.sh | 2 +- scripts/ios/build_monero_all.sh | 6 --- scripts/ios/build_shared.sh | 8 ++++ scripts/ios/build_wownero_all.sh | 6 --- scripts/ios/create_git_versions_file.sh | 11 +++++ scripts/ios/setup.sh | 55 +++---------------------- scripts/ios/setup_monero.sh | 26 ++++++++++++ scripts/ios/setup_wownero.sh | 26 ++++++++++++ 8 files changed, 78 insertions(+), 62 deletions(-) create mode 100644 scripts/ios/build_shared.sh create mode 100644 scripts/ios/create_git_versions_file.sh create mode 100644 scripts/ios/setup_monero.sh create mode 100644 scripts/ios/setup_wownero.sh diff --git a/scripts/ios/build_all.sh b/scripts/ios/build_all.sh index fbf0682e7f..d30724b423 100755 --- a/scripts/ios/build_all.sh +++ b/scripts/ios/build_all.sh @@ -1,6 +1,6 @@ #!/bin/sh -./install_missing_headers.sh +./build_shared.sh ./build_monero_all.sh ./build_wownero_all.sh ./setup.sh diff --git a/scripts/ios/build_monero_all.sh b/scripts/ios/build_monero_all.sh index b18460a2b9..5c60d542b8 100755 --- a/scripts/ios/build_monero_all.sh +++ b/scripts/ios/build_monero_all.sh @@ -1,10 +1,4 @@ #!/bin/sh . ./config.sh -./install_missing_headers.sh -./build_openssl.sh -./build_boost.sh -./build_sodium.sh -./build_unbound.sh -./build_zmq.sh ./build_monero.sh \ No newline at end of file diff --git a/scripts/ios/build_shared.sh b/scripts/ios/build_shared.sh new file mode 100644 index 0000000000..22bf171e96 --- /dev/null +++ b/scripts/ios/build_shared.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +./install_missing_headers.sh +./build_openssl.sh +./build_boost.sh +./build_sodium.sh +./build_unbound.sh +./build_zmq.sh \ No newline at end of file diff --git a/scripts/ios/build_wownero_all.sh b/scripts/ios/build_wownero_all.sh index f49026565f..d9a2265313 100755 --- a/scripts/ios/build_wownero_all.sh +++ b/scripts/ios/build_wownero_all.sh @@ -1,11 +1,5 @@ #!/bin/sh . ./config.sh -# already done with build_monero_all.sh -#./install_missing_headers.sh -#./build_openssl.sh -#./build_boost.sh -#./build_sodium.sh -#./build_zmq.sh ./build_wownero.sh ./build_wownero_seed.sh \ No newline at end of file diff --git a/scripts/ios/create_git_versions_file.sh b/scripts/ios/create_git_versions_file.sh new file mode 100644 index 0000000000..f99b27650b --- /dev/null +++ b/scripts/ios/create_git_versions_file.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt +VERSIONS_FILE=../../lib/git_versions.dart +EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart +if [ ! -f "$VERSIONS_FILE" ]; then + cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE +fi +COMMIT=$(git log -1 --pretty=format:"%H") +OS="IOS" +sed -i '' "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE diff --git a/scripts/ios/setup.sh b/scripts/ios/setup.sh index 51ad0cf6fa..219e5a4ead 100755 --- a/scripts/ios/setup.sh +++ b/scripts/ios/setup.sh @@ -1,52 +1,9 @@ #!/bin/sh . ./config.sh -echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt -VERSIONS_FILE=../../lib/git_versions.dart -EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart -if [ ! -f "$VERSIONS_FILE" ]; then - cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE -fi -COMMIT=$(git log -1 --pretty=format:"%H") -OS="IOS" -sed -i '' "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE -cd $EXTERNAL_IOS_LIB_DIR - -LIBRANDOMX_PATH=${EXTERNAL_IOS_LIB_DIR}/monero/librandomx.a - -if [ -f "$LIBRANDOMX_PATH" ]; then - cp $LIBRANDOMX_PATH ./wownero -fi - -libtool -static -o libboost.a ./libboost_*.a -libtool -static -o libwownero.a ./wownero/*.a -libtool -static -o libmonero.a ./monero/*.a - - -CW_WOWNERO_EXTERNAL_LIB=../../../../../cw_wownero/ios/External/ios/lib -CW_WOWNERO_EXTERNAL_INCLUDE=../../../../../cw_wownero/ios/External/ios/include -CW_MONERO_EXTERNAL_LIB=../../../../../cw_monero/ios/External/ios/lib -CW_MONERO_EXTERNAL_INCLUDE=../../../../../cw_monero/ios/External/ios/include - -mkdir -p $CW_MONERO_EXTERNAL_INCLUDE -mkdir -p $CW_WOWNERO_EXTERNAL_INCLUDE -mkdir -p $CW_WOWNERO_EXTERNAL_LIB -mkdir -p $CW_MONERO_EXTERNAL_LIB - - - -ln ./libboost.a ${CW_WOWNERO_EXTERNAL_LIB}/libboost.a -ln ./libcrypto.a ${CW_WOWNERO_EXTERNAL_LIB}/libcrypto.a -ln ./libssl.a ${CW_WOWNERO_EXTERNAL_LIB}/libssl.a -ln ./libsodium.a ${CW_WOWNERO_EXTERNAL_LIB}/libsodium.a -cp ./libwownero.a $CW_WOWNERO_EXTERNAL_LIB -cp ../include/wownero/* $CW_WOWNERO_EXTERNAL_INCLUDE -cp -r ../include/wownero_seed $CW_WOWNERO_EXTERNAL_INCLUDE - -ln ./libboost.a ${CW_MONERO_EXTERNAL_LIB}/libboost.a -ln ./libcrypto.a ${CW_MONERO_EXTERNAL_LIB}/libcrypto.a -ln ./libssl.a ${CW_MONERO_EXTERNAL_LIB}/libssl.a -ln ./libsodium.a ${CW_MONERO_EXTERNAL_LIB}/libsodium.a -ln ./libunbound.a ${CW_MONERO_EXTERNAL_LIB}/libunbound.a -cp ./libmonero.a $CW_MONERO_EXTERNAL_LIB -cp ../include/monero/* $CW_MONERO_EXTERNAL_INCLUDE \ No newline at end of file +cd IOS_SCRIPTS_DIR +./create_git_versions_file.sh +cd IOS_SCRIPTS_DIR +./setup_monero.sh +cd IOS_SCRIPTS_DIR +./setup_wownero.sh \ No newline at end of file diff --git a/scripts/ios/setup_monero.sh b/scripts/ios/setup_monero.sh new file mode 100644 index 0000000000..f122c604f5 --- /dev/null +++ b/scripts/ios/setup_monero.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +cd $EXTERNAL_IOS_LIB_DIR + +LIBRANDOMX_PATH=${EXTERNAL_IOS_LIB_DIR}/monero/librandomx.a + +if [ -f "$LIBRANDOMX_PATH" ]; then + cp $LIBRANDOMX_PATH ./wownero +fi + +libtool -static -o libboost.a ./libboost_*.a +libtool -static -o libmonero.a ./monero/*.a + +CW_MONERO_EXTERNAL_LIB=../../../../../cw_monero/ios/External/ios/lib +CW_MONERO_EXTERNAL_INCLUDE=../../../../../cw_monero/ios/External/ios/include + +mkdir -p $CW_MONERO_EXTERNAL_INCLUDE +mkdir -p $CW_MONERO_EXTERNAL_LIB + +ln ./libboost.a ${CW_MONERO_EXTERNAL_LIB}/libboost.a +ln ./libcrypto.a ${CW_MONERO_EXTERNAL_LIB}/libcrypto.a +ln ./libssl.a ${CW_MONERO_EXTERNAL_LIB}/libssl.a +ln ./libsodium.a ${CW_MONERO_EXTERNAL_LIB}/libsodium.a +ln ./libunbound.a ${CW_MONERO_EXTERNAL_LIB}/libunbound.a +cp ./libmonero.a $CW_MONERO_EXTERNAL_LIB +cp ../include/monero/* $CW_MONERO_EXTERNAL_INCLUDE \ No newline at end of file diff --git a/scripts/ios/setup_wownero.sh b/scripts/ios/setup_wownero.sh new file mode 100644 index 0000000000..94bf41ace5 --- /dev/null +++ b/scripts/ios/setup_wownero.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +cd $EXTERNAL_IOS_LIB_DIR + +LIBRANDOMX_PATH=${EXTERNAL_IOS_LIB_DIR}/monero/librandomx.a + +if [ -f "$LIBRANDOMX_PATH" ]; then + cp $LIBRANDOMX_PATH ./wownero +fi + +libtool -static -o libboost.a ./libboost_*.a +libtool -static -o libwownero.a ./wownero/*.a + +CW_WOWNERO_EXTERNAL_LIB=../../../../../cw_wownero/ios/External/ios/lib +CW_WOWNERO_EXTERNAL_INCLUDE=../../../../../cw_wownero/ios/External/ios/include + +mkdir -p $CW_WOWNERO_EXTERNAL_INCLUDE +mkdir -p $CW_WOWNERO_EXTERNAL_LIB + +ln ./libboost.a ${CW_WOWNERO_EXTERNAL_LIB}/libboost.a +ln ./libcrypto.a ${CW_WOWNERO_EXTERNAL_LIB}/libcrypto.a +ln ./libssl.a ${CW_WOWNERO_EXTERNAL_LIB}/libssl.a +ln ./libsodium.a ${CW_WOWNERO_EXTERNAL_LIB}/libsodium.a +cp ./libwownero.a $CW_WOWNERO_EXTERNAL_LIB +cp ../include/wownero/* $CW_WOWNERO_EXTERNAL_INCLUDE +cp -r ../include/wownero_seed $CW_WOWNERO_EXTERNAL_INCLUDE From 5469e1b237ceba6cbddc9b008b3bbc1005648b7e Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 16:57:11 -0500 Subject: [PATCH 06/13] add separate xmr and wow scripts in linux build_all script --- scripts/linux/build_all.sh | 6 ++++++ scripts/linux/build_monero_all.sh | 5 +---- scripts/linux/build_wownero_all.sh | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 scripts/linux/build_all.sh create mode 100755 scripts/linux/build_wownero_all.sh diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh new file mode 100755 index 0000000000..401214a377 --- /dev/null +++ b/scripts/linux/build_all.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +mkdir -p build +./build_monero_all.sh +./build_wownero_all.sh +./build_sharedfile.sh diff --git a/scripts/linux/build_monero_all.sh b/scripts/linux/build_monero_all.sh index 3f98077532..f5d86c5085 100755 --- a/scripts/linux/build_monero_all.sh +++ b/scripts/linux/build_monero_all.sh @@ -1,6 +1,6 @@ #!/bin/bash -mkdir build +mkdir -p build ./build_iconv.sh ./build_boost.sh ./build_openssl.sh @@ -8,7 +8,4 @@ mkdir build ./build_unbound.sh ./build_zmq.sh ./build_monero.sh -./build_wownero.sh -./build_wownero_seed.sh ./copy_monero_deps.sh -./build_sharedfile.sh \ No newline at end of file diff --git a/scripts/linux/build_wownero_all.sh b/scripts/linux/build_wownero_all.sh new file mode 100755 index 0000000000..9bc00db286 --- /dev/null +++ b/scripts/linux/build_wownero_all.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +./build_wownero.sh +./build_wownero_seed.sh +./copy_wownero_deps.sh From 96502bc95ae4b844538dec849f1413d18f7fe4f1 Mon Sep 17 00:00:00 2001 From: julian-CStack Date: Tue, 21 Mar 2023 16:00:05 -0600 Subject: [PATCH 07/13] missing git versions --- scripts/ios/build_all.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ios/build_all.sh b/scripts/ios/build_all.sh index d30724b423..114b23488b 100755 --- a/scripts/ios/build_all.sh +++ b/scripts/ios/build_all.sh @@ -3,5 +3,6 @@ ./build_shared.sh ./build_monero_all.sh ./build_wownero_all.sh +./create_git_versions_file.sh ./setup.sh From 5aafdec6cff664b9b55935a088c21973ae745d0f Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 17:01:02 -0500 Subject: [PATCH 08/13] use build_shared.sh in emulation of ios pattern --- scripts/linux/build_all.sh | 1 + scripts/linux/build_monero_all.sh | 7 ------- scripts/linux/build_shared.sh | 8 ++++++++ 3 files changed, 9 insertions(+), 7 deletions(-) create mode 100755 scripts/linux/build_shared.sh diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index 401214a377..a03241f597 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -1,6 +1,7 @@ #!/bin/bash mkdir -p build +./build_shared.sh ./build_monero_all.sh ./build_wownero_all.sh ./build_sharedfile.sh diff --git a/scripts/linux/build_monero_all.sh b/scripts/linux/build_monero_all.sh index f5d86c5085..e4bdc017cb 100755 --- a/scripts/linux/build_monero_all.sh +++ b/scripts/linux/build_monero_all.sh @@ -1,11 +1,4 @@ #!/bin/bash -mkdir -p build -./build_iconv.sh -./build_boost.sh -./build_openssl.sh -./build_sodium.sh -./build_unbound.sh -./build_zmq.sh ./build_monero.sh ./copy_monero_deps.sh diff --git a/scripts/linux/build_shared.sh b/scripts/linux/build_shared.sh new file mode 100755 index 0000000000..36c9b053a3 --- /dev/null +++ b/scripts/linux/build_shared.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +./build_iconv.sh +./build_boost.sh +./build_openssl.sh +./build_sodium.sh +./build_unbound.sh +./build_zmq.sh From 40f01eef8427db98e3b6d894d2ab29321a378bb5 Mon Sep 17 00:00:00 2001 From: julian-CStack Date: Tue, 21 Mar 2023 16:03:54 -0600 Subject: [PATCH 09/13] make scripts executable --- scripts/ios/build_shared.sh | 0 scripts/ios/create_git_versions_file.sh | 0 scripts/ios/setup_monero.sh | 0 scripts/ios/setup_wownero.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/ios/build_shared.sh mode change 100644 => 100755 scripts/ios/create_git_versions_file.sh mode change 100644 => 100755 scripts/ios/setup_monero.sh mode change 100644 => 100755 scripts/ios/setup_wownero.sh diff --git a/scripts/ios/build_shared.sh b/scripts/ios/build_shared.sh old mode 100644 new mode 100755 diff --git a/scripts/ios/create_git_versions_file.sh b/scripts/ios/create_git_versions_file.sh old mode 100644 new mode 100755 diff --git a/scripts/ios/setup_monero.sh b/scripts/ios/setup_monero.sh old mode 100644 new mode 100755 diff --git a/scripts/ios/setup_wownero.sh b/scripts/ios/setup_wownero.sh old mode 100644 new mode 100755 From 312dac0e482ed98dc8193f4337e1ed18100c3a06 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 17:04:25 -0500 Subject: [PATCH 10/13] move shared libs to their own build script monkey see monkey do --- scripts/android/build_all.sh | 3 ++- scripts/android/{build_monero_all.sh => build_shared.sh} | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) rename scripts/android/{build_monero_all.sh => build_shared.sh} (88%) diff --git a/scripts/android/build_all.sh b/scripts/android/build_all.sh index d96c8da112..7878d9a48a 100755 --- a/scripts/android/build_all.sh +++ b/scripts/android/build_all.sh @@ -1,7 +1,8 @@ #!/bin/sh ./install_ndk.sh -./build_monero_all.sh +./build_shared.sh +./build_monero.sh ./build_wownero.sh ./build_wownero_seed.sh ./git_versions.sh diff --git a/scripts/android/build_monero_all.sh b/scripts/android/build_shared.sh similarity index 88% rename from scripts/android/build_monero_all.sh rename to scripts/android/build_shared.sh index 2f1bb1b033..0363873145 100755 --- a/scripts/android/build_monero_all.sh +++ b/scripts/android/build_shared.sh @@ -5,4 +5,3 @@ ./build_sodium.sh & ./build_zmq.sh & wait -./build_monero.sh From 8620293cfef9cef29cf643b49d692e577bd7cab6 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 17:04:50 -0500 Subject: [PATCH 11/13] git_versions.sh -> create_git_versions_file.sh *standardization* --- scripts/android/build_all.sh | 2 +- .../android/{git_versions.sh => create_git_versions_file.sh} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename scripts/android/{git_versions.sh => create_git_versions_file.sh} (100%) diff --git a/scripts/android/build_all.sh b/scripts/android/build_all.sh index 7878d9a48a..f060f3cee2 100755 --- a/scripts/android/build_all.sh +++ b/scripts/android/build_all.sh @@ -5,7 +5,7 @@ ./build_monero.sh ./build_wownero.sh ./build_wownero_seed.sh -./git_versions.sh +./create_git_versions_file.sh ./copy_monero_deps.sh ./copy_wownero_deps.sh diff --git a/scripts/android/git_versions.sh b/scripts/android/create_git_versions_file.sh similarity index 100% rename from scripts/android/git_versions.sh rename to scripts/android/create_git_versions_file.sh From 94db42884e0a24ab9463cc9e9562b76d95a7e364 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 17:12:38 -0500 Subject: [PATCH 12/13] separate git versions file creation into its own script --- scripts/linux/build_all.sh | 1 + scripts/linux/build_sharedfile.sh | 11 +---------- scripts/linux/create_git_versions_file.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) mode change 100755 => 100644 scripts/linux/build_sharedfile.sh create mode 100755 scripts/linux/create_git_versions_file.sh diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index a03241f597..24ab607c69 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -4,4 +4,5 @@ mkdir -p build ./build_shared.sh ./build_monero_all.sh ./build_wownero_all.sh +./create_git_versions_file.sh ./build_sharedfile.sh diff --git a/scripts/linux/build_sharedfile.sh b/scripts/linux/build_sharedfile.sh old mode 100755 new mode 100644 index 9eb2684b87..4266abb723 --- a/scripts/linux/build_sharedfile.sh +++ b/scripts/linux/build_sharedfile.sh @@ -1,15 +1,7 @@ #!/bin/sh . ./config.sh -echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt -VERSIONS_FILE=../../lib/git_versions.dart -EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart -if [ ! -f "$VERSIONS_FILE" ]; then - cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE -fi -COMMIT=$(git log -1 --pretty=format:"%H") -OS="LINUX" -sed -i "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE + cd build mkdir monero_build mkdir wownero_build @@ -25,4 +17,3 @@ cd $WOWNERO_BUILD cmake ../../cmakefiles/wownero/${TYPES_OF_BUILD} make -j$(nproc) cp libcw_wownero.so ../ - diff --git a/scripts/linux/create_git_versions_file.sh b/scripts/linux/create_git_versions_file.sh new file mode 100755 index 0000000000..3249b80b51 --- /dev/null +++ b/scripts/linux/create_git_versions_file.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. ./config.sh +echo ''$(git log -1 --pretty=format:"%H")' '$(date) >> build/git_commit_version.txt +VERSIONS_FILE=../../lib/git_versions.dart +EXAMPLE_VERSIONS_FILE=../../lib/git_versions_example.dart +if [ ! -f "$VERSIONS_FILE" ]; then + cp $EXAMPLE_VERSIONS_FILE $VERSIONS_FILE +fi +COMMIT=$(git log -1 --pretty=format:"%H") +OS="LINUX" +sed -i "/\/\*${OS}_VERSION/c\\/\*${OS}_VERSION\*\/ const ${OS}_VERSION = \"$COMMIT\";" $VERSIONS_FILE From b3d3934657478d23d5a8ee0e48e1888635d5031d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 21 Mar 2023 17:16:01 -0500 Subject: [PATCH 13/13] separate .so-building scripts --- scripts/linux/build_all.sh | 3 ++- scripts/linux/build_monerolib.sh | 12 ++++++++++++ .../{build_sharedfile.sh => build_wownerolib.sh} | 8 +------- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100755 scripts/linux/build_monerolib.sh rename scripts/linux/{build_sharedfile.sh => build_wownerolib.sh} (56%) mode change 100644 => 100755 diff --git a/scripts/linux/build_all.sh b/scripts/linux/build_all.sh index 24ab607c69..2cbb856ead 100755 --- a/scripts/linux/build_all.sh +++ b/scripts/linux/build_all.sh @@ -5,4 +5,5 @@ mkdir -p build ./build_monero_all.sh ./build_wownero_all.sh ./create_git_versions_file.sh -./build_sharedfile.sh +./build_monerolib.sh +./build_wownerolib.sh diff --git a/scripts/linux/build_monerolib.sh b/scripts/linux/build_monerolib.sh new file mode 100755 index 0000000000..374f3aa836 --- /dev/null +++ b/scripts/linux/build_monerolib.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +. ./config.sh + +cd build +mkdir monero_build +MONERO_BUILD=$(pwd)/monero_build + +cd $MONERO_BUILD +cmake ../../cmakefiles/monero/${TYPES_OF_BUILD} +make -j$(nproc) +cp libcw_monero.so ../ diff --git a/scripts/linux/build_sharedfile.sh b/scripts/linux/build_wownerolib.sh old mode 100644 new mode 100755 similarity index 56% rename from scripts/linux/build_sharedfile.sh rename to scripts/linux/build_wownerolib.sh index 4266abb723..0080502860 --- a/scripts/linux/build_sharedfile.sh +++ b/scripts/linux/build_wownerolib.sh @@ -3,17 +3,11 @@ . ./config.sh cd build -mkdir monero_build mkdir wownero_build -MONERO_BUILD=$(pwd)/monero_build WOWNERO_BUILD=$(pwd)/wownero_build -cd $MONERO_BUILD -cmake ../../cmakefiles/monero/${TYPES_OF_BUILD} -make -j$(nproc) -cp libcw_monero.so ../ - cd $WOWNERO_BUILD cmake ../../cmakefiles/wownero/${TYPES_OF_BUILD} make -j$(nproc) cp libcw_wownero.so ../ +