Skip to content

Commit

Permalink
added pupdmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Mar 28, 2024
1 parent 0694d2c commit f06b6af
Show file tree
Hide file tree
Showing 16 changed files with 299 additions and 28 deletions.
28 changes: 18 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,30 +96,30 @@ if(BUILD_SHARED)
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
if(ARCH STREQUAL "x64")
target_link_libraries(dmdutil_shared PUBLIC cargs64 zedmd64 serum64 libserialport64 sockpp64 ws2_32)
target_link_libraries(dmdutil_shared PUBLIC cargs64 zedmd64 serum64 libserialport64 sockpp64 pupdmd64 ws2_32)
else()
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum libserialport sockpp ws2_32)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum libserialport sockpp pupdmd ws2_32)
endif()
elseif(PLATFORM STREQUAL "macos")
target_link_directories(dmdutil_shared PUBLIC
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum serialport sockpp)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum serialport sockpp pupdmd)
elseif(PLATFORM STREQUAL "linux")
target_link_directories(dmdutil_shared PUBLIC
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum serialport sockpp)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum serialport sockpp pupdmd)
elseif(PLATFORM STREQUAL "ios" OR PLATFORM STREQUAL "tvos")
target_link_directories(dmdutil_shared PUBLIC
third-party/build-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum sockpp)
target_link_libraries(dmdutil_shared PUBLIC cargs 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)
target_link_libraries(dmdutil_shared PUBLIC cargs zedmd serum sockpp pupdmd)
endif()

if(PLATFORM STREQUAL "win" AND ARCH STREQUAL "x64")
Expand Down Expand Up @@ -169,6 +169,8 @@ if(BUILD_SHARED)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp64.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp64.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd64.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd64.dll" "$<TARGET_FILE_DIR:dmdserver>"
)
else()
add_custom_command(TARGET dmdserver POST_BUILD
Expand All @@ -182,6 +184,8 @@ if(BUILD_SHARED)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd.dll" "$<TARGET_FILE_DIR:dmdserver>"
)
endif()
elseif(PLATFORM STREQUAL "macos")
Expand Down Expand Up @@ -229,20 +233,20 @@ if(BUILD_STATIC)
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
if(ARCH STREQUAL "x64")
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs64 zedmd64 serum64 libserialport64 sockpp64 ws2_32)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs64 zedmd64 serum64 libserialport64 sockpp64 pupdmd64 ws2_32)
else()
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum libserialport sockpp ws2_32)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum libserialport sockpp pupdmd ws2_32)
endif()
elseif(PLATFORM STREQUAL "macos")
target_link_directories(dmdutil_test_s PUBLIC
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum serialport sockpp)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum serialport sockpp pupdmd)
elseif(PLATFORM STREQUAL "linux")
target_link_directories(dmdutil_test_s PUBLIC
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum serialport sockpp)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static cargs zedmd serum serialport sockpp pupdmd)
endif()

if(POST_BUILD_COPY_EXT_LIBS)
Expand All @@ -259,6 +263,8 @@ if(BUILD_STATIC)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp64.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd64.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
else()
add_custom_command(TARGET dmdutil_test_s POST_BUILD
Expand All @@ -272,6 +278,8 @@ if(BUILD_STATIC)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
endif()
elseif(PLATFORM STREQUAL "macos")
Expand Down
6 changes: 6 additions & 0 deletions dmdserver.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ Port = 6789
AltColor = 1
# Overwrite the AltColorPath sent by the client and set it to a fixed value.
AltColorPath =
# Set to 1 if Pup DMD frame matching should be used, 0 if not.
Pup = 1
# Overwrite the PupPath sent by the client and set it to a fixed value.
PupPath =
# Set to 1 if PUP DMD frame matching should respect the exact colors, 0 if not.
PupExactColorMatch = 0

[ZeDMD]
# Set to 1 if ZeDMD is attached.
Expand Down
9 changes: 9 additions & 0 deletions include/DMDUtil/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ class DMDUTILAPI Config
void SetAltColor(bool altColor) { m_altColor = altColor; }
void SetAltColorPath(const char* path) { m_altColorPath = path; }
const char* GetAltColorPath() const { return m_altColorPath.c_str(); }
bool IsPup() const { return m_pup; }
void SetPup(bool pup) { m_pup = pup; }
void SetPupPath(const char* path) { m_pupPath = path; }
const char* GetPupPath() const { return m_pupPath.c_str(); }
bool IsPupExactColorMatch() const { return m_pupExactColorMatch; }
void SetPupExactColorMatch(bool exactColorMatch) { m_pupExactColorMatch = exactColorMatch; }
void SetIgnoreUnknownFramesTimeout(int framesTimeout) { m_framesTimeout = framesTimeout; }
void SetMaximumUnknownFramesToSkip(int framesToSkip) { m_framesToSkip = framesToSkip; }
int GetIgnoreUnknownFramesTimeout() { return m_framesTimeout; }
Expand Down Expand Up @@ -62,6 +68,9 @@ class DMDUTILAPI Config
static Config* m_pInstance;
bool m_altColor;
std::string m_altColorPath;
bool m_pup;
std::string m_pupPath;
bool m_pupExactColorMatch;
int m_framesTimeout;
int m_framesToSkip;
bool m_zedmd;
Expand Down
18 changes: 14 additions & 4 deletions include/DMDUtil/DMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#endif

class ZeDMD;
namespace PUPDMD
{
class DMD;
}

namespace DMDUtil
{
Expand Down Expand Up @@ -107,11 +111,12 @@ class DMDUTILAPI DMD
uint32_t length = 0;
};

struct AltColorHeader
struct PathsHeader
{
char header[9] = "AltColor";
char header[6] = "Paths";
char name[DMDUTIL_MAX_NAME_SIZE] = {0};
char path[DMDUTIL_MAX_PATH_SIZE] = {0};
char altColorPath[DMDUTIL_MAX_PATH_SIZE] = {0};
char pupPath[DMDUTIL_MAX_PATH_SIZE] = {0};
};
#pragma pack(pop) // Reset to default packing

Expand All @@ -121,6 +126,7 @@ class DMDUTILAPI DMD
bool HasHDDisplay() const;
void SetRomName(const char* name);
void SetAltColorPath(const char* path);
void SetPupPath(const char* path);
void DumpDMDTxt();
void DumpDMDRaw();
LevelDMD* CreateLevelDMD(uint16_t width, uint16_t height, bool sam);
Expand Down Expand Up @@ -149,7 +155,7 @@ class DMDUTILAPI DMD
void UpdateData(const uint8_t* pData, int depth, uint16_t width, uint16_t height, uint8_t r, uint8_t g, uint8_t b,
Mode mode, bool buffered = false);
void AdjustRGB24Depth(uint8_t* pData, uint8_t* pDstData, int length, uint8_t* palette, uint8_t depth);
void handleTrigger(uint32_t id);
void handleTrigger(uint16_t id);

void DmdFrameThread();
void LevelDMDThread();
Expand All @@ -158,13 +164,16 @@ class DMDUTILAPI DMD
void ZeDMDThread();
void DumpDMDTxtThread();
void DumpDMDRawThread();
void PupDMDThread();

uint8_t m_updateBufferQueuePosition = 0;
char m_romName[DMDUTIL_MAX_NAME_SIZE] = {0};
char m_altColorPath[DMDUTIL_MAX_PATH_SIZE] = {0};
char m_pupPath[DMDUTIL_MAX_PATH_SIZE] = {0};
AlphaNumeric* m_pAlphaNumeric;
Serum* m_pSerum;
ZeDMD* m_pZeDMD;
PUPDMD::DMD* m_pPupDMD;
std::vector<LevelDMD*> m_levelDMDs;
std::vector<RGB24DMD*> m_rgb24DMDs;
std::vector<ConsoleDMD*> m_consoleDMDs;
Expand All @@ -177,6 +186,7 @@ class DMDUTILAPI DMD
std::thread* m_pDmdFrameThread;
std::thread* m_pDumpDMDTxtThread;
std::thread* m_pDumpDMDRawThread;
std::thread* m_pPupDMDThread;
std::shared_mutex m_dmdSharedMutex;
std::condition_variable_any m_dmdCV;
std::mutex m_serumMutex;
Expand Down
15 changes: 15 additions & 0 deletions platforms/android/arm64-v8a/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=42d95ed6f1fe2065ecbd247502d177d7e5eb7e4c
LIBSERUM_SHA=b69d2b436bc93570a2e7e78d0946cd3c43f7aed5
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f
LIBPUPDMD_SHA=63cae52ccae975fb509f7f992a5503be43b08456

if [[ $(uname) == "Linux" ]]; then
NUM_PROCS=$(nproc)
Expand All @@ -20,6 +21,7 @@ echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand Down Expand Up @@ -103,3 +105,16 @@ cmake -DSOCKPP_BUILD_SHARED=ON \
cmake --build build -- -j${NUM_PROCS}
cp build/libsockpp.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..

#
# build libpupdmd and copy to external
#

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 --build build -- -j${NUM_PROCS}
cp build/libpupdmd.so ../../third-party/runtime-libs/android/arm64-v8a/
cd ..
15 changes: 15 additions & 0 deletions platforms/ios/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=42d95ed6f1fe2065ecbd247502d177d7e5eb7e4c
LIBSERUM_SHA=b69d2b436bc93570a2e7e78d0946cd3c43f7aed5
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f
LIBPUPDMD_SHA=63cae52ccae975fb509f7f992a5503be43b08456

NUM_PROCS=$(sysctl -n hw.ncpu)

Expand All @@ -14,6 +15,7 @@ echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand Down Expand Up @@ -89,3 +91,16 @@ cmake -DSOCKPP_BUILD_SHARED=OFF \
cmake --build build -- -j${NUM_PROCS}
cp build/libsockpp.a ../../third-party/build-libs/ios/arm64/
cd ..

#
# build libpupdmd and copy to external
#

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 --build build -- -j${NUM_PROCS}
cp build/libpupdmd.a ../../third-party/build-libs/ios/arm64/
cd ..
15 changes: 15 additions & 0 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=42d95ed6f1fe2065ecbd247502d177d7e5eb7e4c
LIBSERUM_SHA=b69d2b436bc93570a2e7e78d0946cd3c43f7aed5
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f
LIBPUPDMD_SHA=63cae52ccae975fb509f7f992a5503be43b08456

NUM_PROCS=$(nproc)

Expand All @@ -14,6 +15,7 @@ echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand Down Expand Up @@ -86,3 +88,16 @@ cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..

#
# build libpupdmd and copy to external
#

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 --build build -- -j${NUM_PROCS}
cp -a build/libpupdmd.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..
15 changes: 15 additions & 0 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=42d95ed6f1fe2065ecbd247502d177d7e5eb7e4c
LIBSERUM_SHA=b69d2b436bc93570a2e7e78d0946cd3c43f7aed5
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f
LIBPUPDMD_SHA=63cae52ccae975fb509f7f992a5503be43b08456

NUM_PROCS=$(nproc)

Expand All @@ -14,6 +15,7 @@ echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand Down Expand Up @@ -86,3 +88,16 @@ cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..

#
# build libpupdmd and copy to external
#

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 --build build -- -j${NUM_PROCS}
cp -a build/libpupdmd.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..
15 changes: 15 additions & 0 deletions platforms/macos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CARGS_SHA=5949a20a926e902931de4a32adaad9f19c76f251
LIBZEDMD_SHA=42d95ed6f1fe2065ecbd247502d177d7e5eb7e4c
LIBSERUM_SHA=b69d2b436bc93570a2e7e78d0946cd3c43f7aed5
SOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f
LIBPUPDMD_SHA=63cae52ccae975fb509f7f992a5503be43b08456

NUM_PROCS=$(sysctl -n hw.ncpu)

Expand All @@ -14,6 +15,7 @@ echo " CARGS_SHA: ${CARGS_SHA}"
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
echo " SOCKPP_SHA: ${SOCKPP_SHA}"
echo " LIBPUPDMD_SHA: ${LIBPUPDMD_SHA}"
echo ""

if [ -z "${BUILD_TYPE}" ]; then
Expand Down Expand Up @@ -90,3 +92,16 @@ cmake -DSOCKPP_BUILD_SHARED=ON \
cmake --build build -- -j${NUM_PROCS}
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cd ..

#
# build libpupdmd and copy to external
#

curl -sL https://github.com/ppuc/libpupdmd/archive/${LIBPUDMD_SHA}.zip -o libpupdmd.zip
unzip libpupdmd.zip
cd libpupdmd-$LIBPUDMD_SHA
cp src/pupdmd.h ../../third-party/include/
cmake -DPLATFORM=macos -DARCH=arm64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cd ..
Loading

0 comments on commit f06b6af

Please sign in to comment.