Different IPFS binary on macOS
parent
e22ef56274
commit
2f7a17570a
|
@ -0,0 +1,12 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# By: Melroy van den Berg
|
||||||
|
# Description: Build macOS 64-bit production release using Drag & Drop installer
|
||||||
|
|
||||||
|
rm -rf build_prod_macos
|
||||||
|
mkdir build_prod_macos
|
||||||
|
cd build_prod_macos
|
||||||
|
|
||||||
|
cmake -G Ninja -DDOXYGEN:BOOL=FALSE -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
ninja &&
|
||||||
|
echo "INFO: Start Drag & Drop packaging for MacOS...";
|
||||||
|
cpack -C Release -G DragNDrop
|
|
@ -94,9 +94,13 @@ if(NOT UNITTEST)
|
||||||
target_compile_definitions(${PROJECT_TARGET} PRIVATE _WIN32)
|
target_compile_definitions(${PROJECT_TARGET} PRIVATE _WIN32)
|
||||||
endif()
|
endif()
|
||||||
# Define __linux__ for Unix platforms
|
# Define __linux__ for Unix platforms
|
||||||
if (UNIX)
|
if(UNIX)
|
||||||
target_compile_definitions(${PROJECT_TARGET} PRIVATE __linux__)
|
target_compile_definitions(${PROJECT_TARGET} PRIVATE __linux__)
|
||||||
endif()
|
endif()
|
||||||
|
# Define __APPLE__ for macOS platforms
|
||||||
|
if(APPLE)
|
||||||
|
target_compile_definitions(${PROJECT_TARGET} PRIVATE __APPLE__)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Add fallback for std filesystem in older GCC versions
|
# Add fallback for std filesystem in older GCC versions
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
|
|
|
@ -125,8 +125,10 @@ std::string IPFSDaemon::locateIPFSBinary()
|
||||||
{
|
{
|
||||||
std::string ipfsBinaryName = "ipfs";
|
std::string ipfsBinaryName = "ipfs";
|
||||||
std::string currentExecutablePath;
|
std::string currentExecutablePath;
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
ipfsBinaryName += ".exe";
|
ipfsBinaryName += ".exe";
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
ipfsBinaryName += "-darwin";
|
||||||
#endif
|
#endif
|
||||||
// Use the current executable directory (bin folder), to locate the go-ipfs binary (for both Linux and Windows)
|
// Use the current executable directory (bin folder), to locate the go-ipfs binary (for both Linux and Windows)
|
||||||
char* path = NULL;
|
char* path = NULL;
|
||||||
|
|
Loading…
Reference in New Issue