diff --git a/windows/conf/win_libs b/windows/conf/win_libs new file mode 100644 index 0000000000000000000000000000000000000000..7b48df0cba54ec5d8e260a20c3be2dfa24ba9d19 --- /dev/null +++ b/windows/conf/win_libs @@ -0,0 +1 @@ +LIBS="KERNEL32 USER32 SHELL32 WINMM GDI32 ADVAPI32 Ole32 Version Imm32 OleAut32 Shlwapi Bcrypt Crypt32 Secur32" diff --git a/windows/scripts/compile.sh b/windows/scripts/compile.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5b573a0ca78927940183a9e13335dd0a438d850d 100755 --- a/windows/scripts/compile.sh +++ b/windows/scripts/compile.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +DESTDIR=$1 +wd=$2 + +echo "[INF] Building cellframe-node" +cd $wd + +. prod_build/general/pre-build.sh + +export_variables "./prod_build/windows/conf/*" + +IFS=" " +for lib in $LIBS; do + new_lib=$(echo "$lib" | tr '[:upper:]' '[:lower:]') + echo "changing $lib to $new_lib" + sed -i "s/$lib/$new_lib/g" CMakeLists.txt + sed -i "s/$lib/$new_lib/g" cellframe-sdk/CMakeLists.txt + sed -i "s/$lib/$new_lib/g" cellframe-sdk/dap-sdk/net/server/enc_server/CMakeLists.txt + sed -i "s/$lib/$new_lib/g" cellframe-sdk/dap-sdk/net/server/http_server/CMakeLists.txt + sed -i "s/$lib/$new_lib/g" python-cellframe/cellframe-sdk/CMakeLists.txt + sed -i "s/$lib/$new_lib/g" python-cellframe/cellframe-sdk/dap-sdk/net/server/enc_server/CMakeLists.txt + sed -i "s/$lib/$new_lib/g" python-cellframe/cellframe-sdk/dap-sdk/net/server/http_server/CMakeLists.txt +done + +mkdir build && cd build && \ +x86_64-w64-mingw32.static-cmake .. && make -j$(nproc) && \ +mv cellframe-node*.exe $DESTDIR && make clean && cd .. && rm -r build || echo "error $?" && exit $?