diff --git a/scripts/build-win-prod.sh b/scripts/build-win-prod.sh index dfa30db7..c8e6b072 100755 --- a/scripts/build-win-prod.sh +++ b/scripts/build-win-prod.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash # By: Melroy van den Berg # Description: Build Windows 64-bit production release - rm -rf build_prod_win -mkdir build_prod_win +x86_64-w64-mingw32.static-cmake -GNinja -DDOXYGEN:BOOL=FALSE -DCMAKE_BUILD_TYPE=Release -B build_prod_win +x86_64-w64-mingw32.static-cmake --build ./build_prod_win --config Release +# Build packages cd build_prod_win - -x86_64-w64-mingw32.static-cmake -G Ninja -DDOXYGEN:BOOL=FALSE -DCMAKE_BUILD_TYPE=Release .. && -ninja && -cpack -C Release -G NSIS +# For some reason it couldn't find the makensis binary, hence the -D option +cpack -D CPACK_NSIS_EXECUTABLE=/usr/bin/makensis -C Release -G NSIS diff --git a/scripts/build-win.sh b/scripts/build-win.sh index 30553ce9..84845446 100755 --- a/scripts/build-win.sh +++ b/scripts/build-win.sh @@ -1,18 +1,10 @@ #!/usr/bin/env bash # By: Melroy van den Berg # Description: Development build Windows 64-bit - -if [ ! -d "build_win" ]; then - echo "Creating build directory..." - mkdir build_win -fi - if [ -z "$(ls build_win)" ]; then echo "INFO: Run cmake & ninja" - cd build_win - x86_64-w64-mingw32.static-cmake -G Ninja .. + x86_64-w64-mingw32.static-cmake -GNinja -B build_win else echo "INFO: Only run ninja..." - cd build_win fi -ninja +x86_64-w64-mingw32.static-cmake --build ./build_win diff --git a/src/ipfs-daemon.cc b/src/ipfs-daemon.cc index 2f7fa7bc..0b517a79 100644 --- a/src/ipfs-daemon.cc +++ b/src/ipfs-daemon.cc @@ -111,7 +111,7 @@ int IPFSDaemon::get_pid() const if (pid_ == 0) return 0; #ifdef _WIN32 - return GetProcessId(pid); + return GetProcessId(pid_); #else return pid_; #endif