Skip to content
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

libzedmd 0.9.1 #57

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ if(BUILD_SHARED)
target_link_directories(dmdutil_shared PUBLIC
third-party/build-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum sockpp pupdmd)
target_link_libraries(dmdutil_shared PUBLIC zedmd serum sockpp pupdmd)
elseif(PLATFORM STREQUAL "android")
target_link_directories(dmdutil_shared PUBLIC
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum sockpp pupdmd)
target_link_libraries(dmdutil_shared PUBLIC zedmd serum sockpp pupdmd)
endif()

if(PLATFORM STREQUAL "win" AND ARCH STREQUAL "x64")
Expand Down
6 changes: 0 additions & 6 deletions include/DMDUtil/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,8 @@ class DMDUTILAPI Config
void SetZeDMDDevice(const char* port) { m_zedmdDevice = port; }
bool IsZeDMDDebug() const { return m_zedmdDebug; }
void SetZeDMDDebug(bool debug) { m_zedmdDebug = debug; }
int GetZeDMDRGBOrder() const { return m_zedmdRgbOrder; }
void SetZeDMDRGBOrder(int rgbOrder) { m_zedmdRgbOrder = rgbOrder; }
int GetZeDMDBrightness() const { return m_zedmdBrightness; }
void SetZeDMDBrightness(int brightness) { m_zedmdBrightness = brightness; }
bool IsZeDMDSaveSettings() const { return m_zedmdSaveSettings; }
void SetZeDMDSaveSettings(bool saveSettings) { m_zedmdSaveSettings = saveSettings; }
bool IsZeDMDWiFiEnabled() const { return m_zedmdWiFiEnabled; }
void SetZeDMDWiFiEnabled(bool WiFiEnabled) { m_zedmdWiFiEnabled = WiFiEnabled; }
const char* GetZeDMDWiFiAddr() const { return m_zedmdWiFiAddr.c_str(); }
Expand Down Expand Up @@ -102,9 +98,7 @@ class DMDUTILAPI Config
bool m_zedmd;
std::string m_zedmdDevice;
bool m_zedmdDebug;
int m_zedmdRgbOrder;
int m_zedmdBrightness;
bool m_zedmdSaveSettings;
bool m_zedmdWiFiEnabled;
std::string m_zedmdWiFiAddr;
bool m_dmdServer;
Expand Down
38 changes: 2 additions & 36 deletions platforms/android/arm64-v8a/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=d9ef6f7833ee9c6917c5cd85a917b935e15bbc8b
LIBZEDMD_SHA=794508521a83c1e90e31b9f24b11b574b42c93fe
LIBSERUM_SHA=b0cc2a871d9d5b6395658c56c65402ae388eb78c
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182

if [[ $(uname) == "Linux" ]]; then
NUM_PROCS=$(nproc)
Expand All @@ -17,11 +15,9 @@ else
fi

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo " NUM_PROCS: ${NUM_PROCS}"
echo ""

Expand All @@ -37,27 +33,6 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to 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_SYSTEM_NAME=Android \
-DCMAKE_SYSTEM_VERSION=30 \
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
-DCMAKE_INSTALL_RPATH="\$ORIGIN" \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp build/*.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..

#
# build libzedmd and copy to external
#
Expand All @@ -76,6 +51,7 @@ cmake \
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp -r third-party/include/sockpp ../../third-party/include/
cp third-party/include/FrameUtil.h ../../third-party/include/
cp -a third-party/runtime-libs/android/arm64-v8a/*.so ../../third-party/runtime-libs/android/arm64-v8a/
cp build/libzedmd.so ../../third-party/runtime-libs/android/arm64-v8a/
cp -r test ../../
Expand Down Expand Up @@ -118,13 +94,3 @@ 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 ..

#
# copy libframeutil
#

curl -sL https://github.com/ppuc/libframeutil/archive/${LIBFRAMEUTIL_SHA}.zip -o libframeutil.zip
unzip libframeutil.zip
cd libframeutil-$LIBFRAMEUTIL_SHA
cp include/* ../../third-party/include
cd ..
34 changes: 2 additions & 32 deletions platforms/ios-simulator/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,17 @@
set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=d9ef6f7833ee9c6917c5cd85a917b935e15bbc8b
LIBZEDMD_SHA=794508521a83c1e90e31b9f24b11b574b42c93fe
LIBSERUM_SHA=b0cc2a871d9d5b6395658c56c65402ae388eb78c
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182

NUM_PROCS=$(sysctl -n hw.ncpu)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand All @@ -30,25 +28,6 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_SYSROOT=iphonesimulator \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=17.0 \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp build/*.a ../../third-party/build-libs/ios-simulator/arm64/
cd ..

#
# build libzedmd and copy to external
#
Expand All @@ -67,6 +46,7 @@ cmake \
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp -r third-party/include/sockpp ../../third-party/include/
cp third-party/include/FrameUtil.h ../../third-party/include/
cp -a third-party/build-libs/ios-simulator/arm64/*.a ../../third-party/build-libs/ios-simulator/arm64/
cp build/libzedmd.a ../../third-party/build-libs/ios-simulator/arm64/
cp -r test ../../
Expand Down Expand Up @@ -110,13 +90,3 @@ cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp build/libpupdmd.a ../../third-party/build-libs/ios-simulator/arm64/
cd ..

#
# copy libframeutil
#

curl -sL https://github.com/ppuc/libframeutil/archive/${LIBFRAMEUTIL_SHA}.zip -o libframeutil.zip
unzip libframeutil.zip
cd libframeutil-$LIBFRAMEUTIL_SHA
cp include/* ../../third-party/include
cd ..
35 changes: 2 additions & 33 deletions platforms/ios/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=d9ef6f7833ee9c6917c5cd85a917b935e15bbc8b
LIBZEDMD_SHA=794508521a83c1e90e31b9f24b11b574b42c93fe
LIBSERUM_SHA=b0cc2a871d9d5b6395658c56c65402ae388eb78c
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182

NUM_PROCS=$(sysctl -n hw.ncpu)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand All @@ -30,24 +26,6 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to external
#

curl -sL https://github.com/likle/cargs/archive/${CARGS_SHA}.zip -o cargs.zip
unzip cargs.zip
cd cargs-${CARGS_SHA}
cmake \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_DEPLOYMENT_TARGET=17.0 \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp include/cargs.h ../../third-party/include/
cp build/*.a ../../third-party/build-libs/ios/arm64/
cd ..

#
# build libzedmd and copy to external
#
Expand All @@ -66,6 +44,7 @@ cmake \
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp -r third-party/include/sockpp ../../third-party/include/
cp third-party/include/FrameUtil.h ../../third-party/include/
cp -a third-party/build-libs/ios/arm64/*.a ../../third-party/build-libs/ios/arm64/
cp build/libzedmd.a ../../third-party/build-libs/ios/arm64/
cp -r test ../../
Expand Down Expand Up @@ -109,13 +88,3 @@ cmake --build build -- -j${NUM_PROCS}
cp src/pupdmd.h ../../third-party/include/
cp build/libpupdmd.a ../../third-party/build-libs/ios/arm64/
cd ..

#
# copy libframeutil
#

curl -sL https://github.com/ppuc/libframeutil/archive/${LIBFRAMEUTIL_SHA}.zip -o libframeutil.zip
unzip libframeutil.zip
cd libframeutil-$LIBFRAMEUTIL_SHA
cp include/* ../../third-party/include
cd ..
34 changes: 3 additions & 31 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=d9ef6f7833ee9c6917c5cd85a917b935e15bbc8b
LIBZEDMD_SHA=794508521a83c1e90e31b9f24b11b574b42c93fe
LIBSERUM_SHA=b0cc2a871d9d5b6395658c56c65402ae388eb78c
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182

NUM_PROCS=$(nproc)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand All @@ -30,22 +26,6 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to 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/
cp -a build/*.so ../../third-party/runtime-libs/linux/aarch64/
cd ..

#
# build libzedmd and copy to external
#
Expand All @@ -64,7 +44,9 @@ cmake \
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp third-party/include/libserialport.h ../../third-party/include/
cp third-party/include/cargs.h ../../third-party/include/
cp -r third-party/include/sockpp ../../third-party/include/
cp third-party/include/FrameUtil.h ../../third-party/include/
cp -a third-party/runtime-libs/linux/aarch64/*.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -a build/*.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -r test ../../
Expand Down Expand Up @@ -109,13 +91,3 @@ 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 ..

#
# copy libframeutil
#

curl -sL https://github.com/ppuc/libframeutil/archive/${LIBFRAMEUTIL_SHA}.zip -o libframeutil.zip
unzip libframeutil.zip
cd libframeutil-$LIBFRAMEUTIL_SHA
cp include/* ../../third-party/include
cd ..
34 changes: 3 additions & 31 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

set -e

CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=d9ef6f7833ee9c6917c5cd85a917b935e15bbc8b
LIBZEDMD_SHA=794508521a83c1e90e31b9f24b11b574b42c93fe
LIBSERUM_SHA=b0cc2a871d9d5b6395658c56c65402ae388eb78c
LIBPUPDMD_SHA=124f45e5ddd59ceb339591de88fcca72f8c54612
LIBFRAMEUTIL_SHA=30048ca23d41ca0a8f7d5ab75d3f646a19a90182

NUM_PROCS=$(nproc)

echo "Building libraries..."
echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo " LIBFRAMEUTIL_SHA: ${LIBFRAMEUTIL_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand All @@ -30,22 +26,6 @@ rm -rf external
mkdir external
cd external

#
# build cargs and copy to 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/
cp -a build/*.so ../../third-party/runtime-libs/linux/x64/
cd ..

#
# build libzedmd and copy to external
#
Expand All @@ -64,7 +44,9 @@ cmake \
cmake --build build -- -j${NUM_PROCS}
cp src/ZeDMD.h ../../third-party/include/
cp third-party/include/libserialport.h ../../third-party/include/
cp third-party/include/cargs.h ../../third-party/include/
cp -r third-party/include/sockpp ../../third-party/include/
cp third-party/include/FrameUtil.h ../../third-party/include/
cp -a third-party/runtime-libs/linux/x64/*.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -a build/*.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -r test ../../
Expand Down Expand Up @@ -108,13 +90,3 @@ 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 ..

#
# copy libframeutil
#

curl -sL https://github.com/ppuc/libframeutil/archive/${LIBFRAMEUTIL_SHA}.zip -o libframeutil.zip
unzip libframeutil.zip
cd libframeutil-$LIBFRAMEUTIL_SHA
cp include/* ../../third-party/include
cd ..
Loading