Skip to content

Commit

Permalink
chore: cleanup external scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jsm174 committed Mar 29, 2024
1 parent 58072e1 commit c0a2c0c
Show file tree
Hide file tree
Showing 7 changed files with 236 additions and 93 deletions.
41 changes: 30 additions & 11 deletions platforms/android/arm64-v8a/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ cd external
curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cp include/cargs.h ../../third-party/include/
cmake -DBUILD_SHARED_LIBS=ON \
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=30 \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
Expand All @@ -53,7 +53,8 @@ cmake -DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp build/libcargs.so ../../third-party/runtime-libs/android/arm64-v8a/
cp include/cargs.h ../../third-party/include/
cp build/*.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..

#
Expand All @@ -63,10 +64,16 @@ cd ..
curl -sL https://github.com/PPUC/libzedmd/archive/${LIBZEDMD_SHA}.zip -o libzedmd.zip
unzip libzedmd.zip
cd libzedmd-$LIBZEDMD_SHA
cp src/ZeDMD.h ../../third-party/include/
platforms/android/arm64-v8a/external.sh
cmake -DPLATFORM=android -DARCH=arm64-v8a -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=android \
-DARCH=arm64-v8a \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp build/libzedmd.so ../../third-party/runtime-libs/android/arm64-v8a/
cp -r test ../../
cd ..
Expand All @@ -78,9 +85,15 @@ cd ..
curl -sL https://github.com/zesinger/libserum/archive/${LIBSERUM_SHA}.zip -o libserum.zip
unzip libserum.zip
cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=android -DARCH=arm64-v8a -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=android \
-DARCH=arm64-v8a \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/serum-decode.h ../../third-party/include/
cp build/libserum.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..

Expand All @@ -92,8 +105,8 @@ curl -sL https://github.com/fpagliughi/sockpp/archive/${SOCKPP_SHA}.zip -o sockp
unzip sockpp.zip
cd sockpp-$SOCKPP_SHA
patch -p1 < ../../platforms/android/arm64-v8a/sockpp/001.patch
cp -r include/sockpp ../../third-party/include/
cmake -DSOCKPP_BUILD_SHARED=ON \
cmake \
-DSOCKPP_BUILD_SHARED=ON \
-DSOCKPP_BUILD_STATIC=OFF \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=30 \
Expand All @@ -103,6 +116,7 @@ cmake -DSOCKPP_BUILD_SHARED=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -r include/sockpp ../../third-party/include/
cp build/libsockpp.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..

Expand All @@ -113,8 +127,13 @@ cd ..
curl -sL https://github.com/ppuc/libpupdmd/archive/${LIBPUPDMD_SHA}.zip -o libpupdmd.zip
unzip libpupdmd.zip
cd libpupdmd-$LIBPUPDMD_SHA
cp src/pupdmd.h ../../third-party/include/
cmake -DPLATFORM=android -DARCH=arm64-v8a -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake -DPLATFORM=android \
-DARCH=arm64-v8a \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp build/libpupdmd.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..
45 changes: 32 additions & 13 deletions platforms/ios/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ cd external
curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
mkdir build
cd build
cmake ..
make
cp libcargs.a ../../../third-party/build-libs/ios/arm64/
cp *.a ../../../third-party/build-libs/ios/arm64/
cd ../..

#
Expand All @@ -52,10 +52,16 @@ cd ../..
curl -sL https://github.com/PPUC/libzedmd/archive/${LIBZEDMD_SHA}.zip -o libzedmd.zip
unzip libzedmd.zip
cd libzedmd-$LIBZEDMD_SHA
cp src/ZeDMD.h ../../third-party/include/
platforms/ios/arm64/external.sh
cmake -DPLATFORM=ios -DARCH=arm64 -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=ios \
-DARCH=arm64 \
-DBUILD_SHARED=OFF \
-DBUILD_STATIC=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp build/libzedmd.a ../../third-party/build-libs/ios/arm64/
cp -r test ../../
cd ..
Expand All @@ -67,9 +73,15 @@ cd ..
curl -sL https://github.com/zesinger/libserum/archive/${LIBSERUM_SHA}.zip -o libserum.zip
unzip libserum.zip
cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=ios -DARCH=arm64 -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=ios \
-DARCH=arm64 \
-DBUILD_SHARED=OFF \
-DBUILD_STATIC=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/serum-decode.h ../../third-party/include/
cp build/libserum.a ../../third-party/build-libs/ios/arm64/
cd ..

Expand All @@ -80,15 +92,16 @@ cd ..
curl -sL https://github.com/fpagliughi/sockpp/archive/${SOCKPP_SHA}.zip -o sockpp.zip
unzip sockpp.zip
cd sockpp-$SOCKPP_SHA
cp -r include/sockpp ../../third-party/include/
cmake -DSOCKPP_BUILD_SHARED=OFF \
cmake \
-DSOCKPP_BUILD_SHARED=OFF \
-DSOCKPP_BUILD_STATIC=ON \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_DEPLOYMENT_TARGET=16.0 \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -r include/sockpp ../../third-party/include/
cp build/libsockpp.a ../../third-party/build-libs/ios/arm64/
cd ..

Expand All @@ -99,8 +112,14 @@ cd ..
curl -sL https://github.com/ppuc/libpupdmd/archive/${LIBPUPDMD_SHA}.zip -o libpupdmd.zip
unzip libpupdmd.zip
cd libpupdmd-$LIBPUPDMD_SHA
cp src/pupdmd.h ../../third-party/include/
cmake -DPLATFORM=ios -DARCH=arm64 -DBUILD_SHARED=OFF -DBUILD_STATIC=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=ios \
-DARCH=arm64 \
-DBUILD_SHARED=OFF \
-DBUILD_STATIC=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp build/libpupdmd.a ../../third-party/build-libs/ios/arm64/
cd ..
49 changes: 35 additions & 14 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ cd external
curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
cp -a libcargs.so* ../../../third-party/runtime-libs/linux/aarch64/
cd ../..
cp -a build/*.so ../../third-party/runtime-libs/linux/aarch64/
cd ..

#
# build libzedmd and copy to external
Expand All @@ -52,10 +53,16 @@ cd ../..
curl -sL https://github.com/PPUC/libzedmd/archive/${LIBZEDMD_SHA}.zip -o libzedmd.zip
unzip libzedmd.zip
cd libzedmd-$LIBZEDMD_SHA
cp src/ZeDMD.h ../../third-party/include/
platforms/linux/aarch64/external.sh
cmake -DPLATFORM=linux -DARCH=aarch64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=aarch64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp third-party/include/libserialport.h ../../third-party/include/
ln -s $(ls -v third-party/runtime-libs/linux/aarch64/libserialport.so.* | tail -n 1 | xargs basename) third-party/runtime-libs/linux/aarch64/libserialport.so
cp -a third-party/runtime-libs/linux/aarch64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
Expand All @@ -70,9 +77,15 @@ cd ..
curl -sL https://github.com/zesinger/libserum/archive/${LIBSERUM_SHA}.zip -o libserum.zip
unzip libserum.zip
cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=aarch64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=aarch64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/serum-decode.h ../../third-party/include/
cp -a build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..

Expand All @@ -83,9 +96,11 @@ cd ..
curl -sL https://github.com/fpagliughi/sockpp/archive/${SOCKPP_SHA}.zip -o sockpp.zip
unzip sockpp.zip
cd sockpp-$SOCKPP_SHA
cp -r include/sockpp ../../third-party/include/
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -r include/sockpp ../../third-party/include/
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..

Expand All @@ -96,8 +111,14 @@ cd ..
curl -sL https://github.com/ppuc/libpupdmd/archive/${LIBPUPDMD_SHA}.zip -o libpupdmd.zip
unzip libpupdmd.zip
cd libpupdmd-$LIBPUPDMD_SHA
cp src/pupdmd.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=aarch64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=aarch64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp -a build/libpupdmd.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..
49 changes: 35 additions & 14 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,14 @@ cd external
curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
make
cp -a libcargs.so* ../../../third-party/runtime-libs/linux/x64/
cd ../..
cp -a build/*.so ../../third-party/runtime-libs/linux/x64/
cd ..

#
# build libzedmd and copy to external
Expand All @@ -52,10 +53,16 @@ cd ../..
curl -sL https://github.com/PPUC/libzedmd/archive/${LIBZEDMD_SHA}.zip -o libzedmd.zip
unzip libzedmd.zip
cd libzedmd-$LIBZEDMD_SHA
cp src/ZeDMD.h ../../third-party/include/
platforms/linux/x64/external.sh
cmake -DPLATFORM=linux -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=x64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp third-party/include/libserialport.h ../../third-party/include/
ln -s $(ls -v third-party/runtime-libs/linux/x64/libserialport.so.* | tail -n 1 | xargs basename) third-party/runtime-libs/linux/x64/libserialport.so
cp -a third-party/runtime-libs/linux/x64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/x64/
Expand All @@ -70,9 +77,15 @@ cd ..
curl -sL https://github.com/zesinger/libserum/archive/${LIBSERUM_SHA}.zip -o libserum.zip
unzip libserum.zip
cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=x64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/serum-decode.h ../../third-party/include/
cp -a build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..

Expand All @@ -83,9 +96,11 @@ cd ..
curl -sL https://github.com/fpagliughi/sockpp/archive/${SOCKPP_SHA}.zip -o sockpp.zip
unzip sockpp.zip
cd sockpp-$SOCKPP_SHA
cp -r include/sockpp ../../third-party/include/
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -r include/sockpp ../../third-party/include/
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..

Expand All @@ -96,8 +111,14 @@ cd ..
curl -sL https://github.com/ppuc/libpupdmd/archive/${LIBPUPDMD_SHA}.zip -o libpupdmd.zip
unzip libpupdmd.zip
cd libpupdmd-$LIBPUPDMD_SHA
cp src/pupdmd.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake \
-DPLATFORM=linux \
-DARCH=x64 \
-DBUILD_SHARED=ON \
-DBUILD_STATIC=OFF \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp -a build/libpupdmd.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..
Loading

0 comments on commit c0a2c0c

Please sign in to comment.