Skip to content
Merged
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
26 changes: 18 additions & 8 deletions .github/workflows/libdmdutil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
fail-fast: false
matrix:
include:
- { os: windows-2025, platform: win, arch: x64 }
- { os: windows-2025, platform: win, arch: x86 }
- { os: windows-2025-vs2026, platform: win, arch: x64 }
- { os: windows-2025-vs2026, platform: win, arch: x86 }
- { os: windows-2025, platform: win-mingw, arch: x64 }
- { os: macos-15, platform: macos, arch: arm64 }
- { os: macos-15, platform: macos, arch: x64 }
Expand All @@ -68,13 +68,13 @@ jobs:
run: |
if [[ "${{ matrix.arch }}" == "x64" ]]; then
/c/msys64/usr/bin/bash.exe -l -c "pacman -S --noconfirm \
make diffutils \
make diffutils autoconf automake libtool \
mingw-w64-ucrt-x86_64-gcc \
mingw-w64-ucrt-x86_64-libwinpthread \
mingw-w64-ucrt-x86_64-cmake"
else
/c/msys64/usr/bin/bash.exe -l -c "pacman -S --noconfirm \
make diffutils \
make diffutils autoconf automake libtool \
mingw-w64-i686-gcc \
mingw-w64-i686-libwinpthread \
mingw-w64-i686-cmake"
Expand Down Expand Up @@ -104,13 +104,13 @@ jobs:
./platforms/${{ matrix.platform }}/${{ matrix.arch }}/external.sh
if [[ "${{ matrix.arch }}" == "x64" ]]; then
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-DPLATFORM=${{ matrix.platform }} \
-DARCH=${{ matrix.arch }} \
-B build
else
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-A Win32 \
-DPLATFORM=${{ matrix.platform }} \
-DARCH=${{ matrix.arch }} \
Expand Down Expand Up @@ -200,14 +200,24 @@ jobs:
run: |
mkdir tmp
if [[ "${{ matrix.arch }}" == "x64" ]]; then
LIBS=(dmdutil64 cargs64 zedmd64 serum64 libusb64-1.0 libserialport64 sockpp64 pupdmd64 vni64)
LIBS=(dmdutil64 cargs64 zedmd64 serum64 libusb64-1.0 sockpp64 pupdmd64 vni64)
else
LIBS=(dmdutil cargs zedmd serum libusb-1.0 libserialport sockpp pupdmd vni)
LIBS=(dmdutil cargs zedmd serum libusb-1.0 sockpp pupdmd vni)
fi
for LIB in "${LIBS[@]}"; do
cp "build/Release/${LIB}.lib" tmp
cp "build/Release/${LIB}.dll" tmp
done
if [[ "${{ matrix.arch }}" == "x64" ]]; then
cp build/Release/libserialport64.lib tmp
cp build/Release/libserialport64-0.dll tmp
else
cp build/Release/libserialport.lib tmp
cp build/Release/libserialport-0.dll tmp
fi
cp build/Release/libgcc_s_*.dll tmp
cp build/Release/libstdc++-6.dll tmp
cp build/Release/libwinpthread-1.dll tmp
cp build/Release/dmdserver.exe tmp
cp build/Release/dmdserver_test.exe tmp
cp build/Release/dmdutil_static.lib tmp
Expand Down
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,14 @@ if(POST_BUILD_COPY_EXT_LIBS AND (PLATFORM STREQUAL "win" OR PLATFORM STREQUAL "w
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libusb64-1.0.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libusb64-1.0.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport64.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64-0.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp64.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp64.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd64.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd64.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libgcc_s_seh-1.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libstdc++-6.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libwinpthread-1.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
)
if(ENABLE_VNI)
add_custom_command(TARGET copy_ext_libs POST_BUILD
Expand All @@ -383,11 +386,14 @@ if(POST_BUILD_COPY_EXT_LIBS AND (PLATFORM STREQUAL "win" OR PLATFORM STREQUAL "w
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libusb-1.0.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libusb-1.0.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport-0.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/pupdmd.lib" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/pupdmd.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libgcc_s_dw2-1.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libstdc++-6.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libwinpthread-1.dll" "$<TARGET_FILE_DIR:dmdutil_shared>"
)
if(ENABLE_VNI)
add_custom_command(TARGET copy_ext_libs POST_BUILD
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,25 +321,25 @@ Options:

Requires [MSYS2](https://www.msys2.org/) dependencies:
```shell
pacman -S make diffutils mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libwinpthread mingw-w64-ucrt-x86_64-cmake
pacman -S make diffutils autoconf automake libtool mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libwinpthread mingw-w64-ucrt-x86_64-cmake
```

```shell
platforms/win/x64/external.sh
cmake -G "Visual Studio 17 2022" -DPLATFORM=win -DARCH=x64 -B build
cmake -G "Visual Studio 18 2026" -DPLATFORM=win -DARCH=x64 -B build
cmake --build build --config Release
```

#### Windows x86 (MSVC)

Requires [MSYS2](https://www.msys2.org/) dependencies:
```shell
pacman -S make diffutils mingw-w64-i686-gcc mingw-w64-i686-libwinpthread mingw-w64-i686-cmake
pacman -S make diffutils autoconf automake libtool mingw-w64-i686-gcc mingw-w64-i686-libwinpthread mingw-w64-i686-cmake
```

```shell
platforms/win/x86/external.sh
cmake -G "Visual Studio 17 2022" -A Win32 -DPLATFORM=win -DARCH=x86 -B build
cmake -G "Visual Studio 18 2026" -A Win32 -DPLATFORM=win -DARCH=x86 -B build
cmake --build build --config Release
```

Expand Down
2 changes: 1 addition & 1 deletion include/DMDUtil/DMDUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#define DMDUTIL_VERSION_MAJOR 0 // X Digits
#define DMDUTIL_VERSION_MINOR 13 // Max 2 Digits
#define DMDUTIL_VERSION_PATCH 1 // Max 2 Digits
#define DMDUTIL_VERSION_PATCH 2 // Max 2 Digits

#define _DMDUTIL_STR(x) #x
#define DMDUTIL_STR(x) _DMDUTIL_STR(x)
Expand Down
8 changes: 4 additions & 4 deletions platforms/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

set -e

LIBZEDMD_SHA=a9e856e7cd3fdb3a2a9bd994bd382f68a0b5da18
LIBSERUM_SHA=55939dfe645f6a2e01785bec2cf6d723bf62def4
LIBPUPDMD_SHA=1e2becff70450e0dd52dbaef767f89728d7957cd
LIBVNI_SHA=aec04d88f70c3ef642df9f68c4b41c9418fdf704
LIBZEDMD_SHA=24044222a83ffed33f93d9f0a0baa68fe9fa5a47
LIBSERUM_SHA=a8cc5ae322e6ecc00b9537bacba2210dc929ccd1
LIBPUPDMD_SHA=4a1123220e6dce73c87cc584494df2ac82cb6f4c
LIBVNI_SHA=99a4ce0c844af75604546d8a4d0a2f98a485e2db
LIBUSB_SHA=15a7ebb4d426c5ce196684347d2b7cafad862626

if [ -z "${BUILD_TYPE}" ]; then
Expand Down
45 changes: 30 additions & 15 deletions platforms/win/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

set -e

if [ -z "${MSYS2_PATH}" ]; then
MSYS2_PATH="/c/msys64"
fi

echo "MSYS2_PATH: ${MSYS2_PATH}"
echo ""

source ./platforms/config.sh

echo "Building libraries..."
Expand All @@ -24,18 +31,23 @@ curl -sL https://github.com/libusb/libusb/archive/${LIBUSB_SHA}.tar.gz -o libusb
tar xzf libusb-${LIBUSB_SHA}.tar.gz
mv libusb-${LIBUSB_SHA} libusb
cd libusb
sed -i.bak 's/LIBRARY.*libusb-1.0/LIBRARY libusb64-1.0/' libusb/libusb-1.0.def
# remove patch after this is fixed: https://github.com/libusb/libusb/issues/1649#issuecomment-2940138443
cp ../../platforms/win/x64/libusb/libusb_dll.vcxproj msvc
msbuild.exe msvc/libusb_dll.vcxproj \
-p:TargetName=libusb64-1.0 \
-p:Configuration=${BUILD_TYPE} \
-p:Platform=x64 \
-p:PlatformToolset=v143
sed -i.bak 's/libusb-1\.0/libusb64-1.0/g' libusb/Makefile.am
sed -i.bak 's/libusb_1_0/libusb64_1_0/g' libusb/Makefile.am
mv libusb/libusb-1.0.def libusb/libusb64-1.0.def
mv libusb/libusb-1.0.rc libusb/libusb64-1.0.rc
sed -i.bak 's/libusb-1\.0/libusb64-1.0/g' libusb/libusb64-1.0.def
sed -i.bak 's/libusb-1\.0/libusb64-1.0/g' libusb/libusb64-1.0.rc
CURRENT_DIR="$(pwd)"
MSYSTEM=UCRT64 "${MSYS2_PATH}/usr/bin/bash.exe" -l -c "
cd \"${CURRENT_DIR}\" &&
./autogen.sh &&
./configure --enable-shared &&
make -j\$(nproc)
"
mkdir -p ../../third-party/include/libusb-1.0
cp libusb/libusb.h ../../third-party/include/libusb-1.0
cp build/v143/x64/${BUILD_TYPE}/libusb_dll/../dll/libusb64-1.0.lib ../../third-party/build-libs/win/x64
cp build/v143/x64/${BUILD_TYPE}/libusb_dll/../dll/libusb64-1.0.dll ../../third-party/runtime-libs/win/x64
cp libusb/.libs/libusb64-1.0.dll.a ../../third-party/build-libs/win/x64/libusb64-1.0.lib
cp libusb/.libs/libusb64-1.0.dll ../../third-party/runtime-libs/win/x64/
cd ..

#
Expand All @@ -48,7 +60,7 @@ mv libzedmd-${LIBZEDMD_SHA} libzedmd
cd libzedmd
BUILD_TYPE=${BUILD_TYPE} platforms/win/x64/external.sh
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-DPLATFORM=win \
-DARCH=x64 \
-DBUILD_SHARED=ON \
Expand All @@ -64,9 +76,12 @@ cp third-party/include/libserialport.h ../../third-party/include/
cp third-party/build-libs/win/x64/cargs64.lib ../../third-party/build-libs/win/x64/
cp third-party/runtime-libs/win/x64/cargs64.dll ../../third-party/runtime-libs/win/x64/
cp third-party/build-libs/win/x64/libserialport64.lib ../../third-party/build-libs/win/x64/
cp third-party/runtime-libs/win/x64/libserialport64.dll ../../third-party/runtime-libs/win/x64/
cp third-party/runtime-libs/win/x64/libserialport64-0.dll ../../third-party/runtime-libs/win/x64/
cp third-party/build-libs/win/x64/sockpp64.lib ../../third-party/build-libs/win/x64/
cp third-party/runtime-libs/win/x64/sockpp64.dll ../../third-party/runtime-libs/win/x64/
cp third-party/runtime-libs/win/x64/libgcc_s_seh-1.dll ../../third-party/runtime-libs/win/x64/
cp third-party/runtime-libs/win/x64/libstdc++-6.dll ../../third-party/runtime-libs/win/x64/
cp third-party/runtime-libs/win/x64/libwinpthread-1.dll ../../third-party/runtime-libs/win/x64/
cp build/${BUILD_TYPE}/zedmd64.lib ../../third-party/build-libs/win/x64/
cp build/${BUILD_TYPE}/zedmd64.dll ../../third-party/runtime-libs/win/x64/
cp -r test ../../
Expand All @@ -81,7 +96,7 @@ tar xzf libserum-${LIBSERUM_SHA}.tar.gz
mv libserum-${LIBSERUM_SHA} libserum
cd libserum
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-DPLATFORM=win \
-DARCH=x64 \
-DBUILD_SHARED=ON \
Expand All @@ -107,7 +122,7 @@ tar xzf libpupdmd-${LIBPUPDMD_SHA}.tar.gz
mv libpupdmd-${LIBPUPDMD_SHA} libpupdmd
cd libpupdmd
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-DPLATFORM=win \
-DARCH=x64 \
-DBUILD_SHARED=ON \
Expand All @@ -128,7 +143,7 @@ tar xzf libvni-${LIBVNI_SHA}.tar.gz
mv libvni-${LIBVNI_SHA} libvni
cd libvni
cmake \
-G "Visual Studio 17 2022" \
-G "Visual Studio 18 2026" \
-DPLATFORM=win \
-DARCH=x64 \
-DBUILD_SHARED=ON \
Expand Down
66 changes: 0 additions & 66 deletions platforms/win/x64/libusb/libusb_dll.vcxproj

This file was deleted.

Loading
Loading