update
This commit is contained in:
@@ -6,9 +6,10 @@
|
|||||||
|
|
||||||
* \#21 [unit test] Complete WinFSP unit tests
|
* \#21 [unit test] Complete WinFSP unit tests
|
||||||
* \#65 [bug] Mount state is not being removed after unmount on Windows
|
* \#65 [bug] Mount state is not being removed after unmount on Windows
|
||||||
|
* \#66 [bug] UI fails to install plist if LaunchAgents directory does not exist
|
||||||
|
|
||||||
### Changes from v2.0.7-release
|
### Changes from v2.0.7-release
|
||||||
|
|
||||||
* Fixed Windows setup icon location
|
* Fixed Windows setup icon location
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ list(APPEND PROJECT_CXXFLAGS_LIST
|
|||||||
-Wunused
|
-Wunused
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (PROJECT_ENABLE_LIBBITCOIN_SYSTEM AND PROJECT_IS_DARWIN)
|
||||||
|
list(APPEND PROJECT_CXXFLAGS_LIST -Wno-enum-constexpr-conversion)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT PROJECT_IS_DARWIN)
|
if (NOT PROJECT_IS_DARWIN)
|
||||||
list(APPEND PROJECT_CXXFLAGS_LIST
|
list(APPEND PROJECT_CXXFLAGS_LIST
|
||||||
-Wduplicated-branches
|
-Wduplicated-branches
|
||||||
|
|||||||
@@ -95,9 +95,17 @@ if(PROJECT_ENABLE_BOOST)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(PROJECT_ENABLE_LIBBITCOIN_SYSTEM)
|
if(PROJECT_ENABLE_LIBBITCOIN_SYSTEM)
|
||||||
|
<<<<<<< HEAD
|
||||||
set(BOOST_CXX_STANDARD 20)
|
set(BOOST_CXX_STANDARD 20)
|
||||||
else()
|
else()
|
||||||
set(BOOST_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
set(BOOST_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
||||||
|
=======
|
||||||
|
set(BOOST_CXX_STANDARD 14)
|
||||||
|
set(BOOST_OPTIONS cxxflags=-Wno-enum-constexpr-conversion)
|
||||||
|
else()
|
||||||
|
set(BOOST_CXX_STANDARD ${CMAKE_CXX_STANDARD})
|
||||||
|
set(BOOST_OPTIONS define=BOOST_ASIO_HAS_STD_STRING_VIEW)
|
||||||
|
>>>>>>> 70cc850f10c2fcd1733ae05dce5c4503db3a11f3
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BOOST_BUILD_ARGS
|
set(BOOST_BUILD_ARGS
|
||||||
@@ -106,14 +114,21 @@ if(PROJECT_ENABLE_BOOST)
|
|||||||
address-model=64
|
address-model=64
|
||||||
architecture=${BOOST_ARCH}
|
architecture=${BOOST_ARCH}
|
||||||
cxxstd-dialect=gnu
|
cxxstd-dialect=gnu
|
||||||
|
<<<<<<< HEAD
|
||||||
cxxflags=-std=gnu++${BOOST_CXX_STANDARD}
|
cxxflags=-std=gnu++${BOOST_CXX_STANDARD}
|
||||||
cxxstd=${BOOST_CXX_STANDARD}
|
cxxstd=${BOOST_CXX_STANDARD}
|
||||||
define=BOOST_ASIO_HAS_STD_STRING_VIEW
|
define=BOOST_ASIO_HAS_STD_STRING_VIEW
|
||||||
define=BOOST_SYSTEM_NO_DEPRECATED
|
define=BOOST_SYSTEM_NO_DEPRECATED
|
||||||
link=${BOOST_LINK}
|
link=${BOOST_LINK}
|
||||||
linkflags=-std=gnu++${BOOST_CXX_STANDARD}
|
linkflags=-std=gnu++${BOOST_CXX_STANDARD}
|
||||||
|
=======
|
||||||
|
cxxstd=${BOOST_CXX_STANDARD}
|
||||||
|
define=BOOST_SYSTEM_NO_DEPRECATED
|
||||||
|
link=${BOOST_LINK}
|
||||||
|
>>>>>>> 70cc850f10c2fcd1733ae05dce5c4503db3a11f3
|
||||||
threading=multi
|
threading=multi
|
||||||
variant=${BOOST_BUILD_TYPE_LOWER}
|
variant=${BOOST_BUILD_TYPE_LOWER}
|
||||||
|
${BOOST_OPTIONS}
|
||||||
)
|
)
|
||||||
|
|
||||||
ExternalProject_Add(boost_project
|
ExternalProject_Add(boost_project
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ if(PROJECT_ENABLE_FUSE AND NOT PROJECT_IS_MINGW)
|
|||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if (PROJECT_IS_DARWIN)
|
if (PROJECT_IS_DARWIN)
|
||||||
find_library(OSXFUSE NO_CACHE NAMES OSXFUSE)
|
find_library(OSXFUSE NO_CACHE NAMES MACFUSE OSXFUSE)
|
||||||
if (NOT OSXFUSE)
|
if (NOT OSXFUSE)
|
||||||
message(FATAL_ERROR "FUSE for macOS not found (https://macfuse.github.io)")
|
message(FATAL_ERROR "FUSE for macOS not found (https://macfuse.github.io)")
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -81,5 +81,5 @@ RUN apk add \
|
|||||||
zstd-static \
|
zstd-static \
|
||||||
xz-static
|
xz-static
|
||||||
|
|
||||||
RUN ln -sf /usr/bin/aclocal-1.17 /usr/bin/aclocal-1.16
|
RUN ln -sf /usr/bin/aclocal-1.18 /usr/bin/aclocal-1.16
|
||||||
RUN ln -sf /usr/bin/automake-1.17 /usr/bin/automake-1.16
|
RUN ln -sf /usr/bin/automake-1.18 /usr/bin/automake-1.16
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#comment
|
#comment
|
||||||
|
<<<<<<< HEAD
|
||||||
FROM alpine:3.23
|
FROM alpine:3.23
|
||||||
|
=======
|
||||||
|
FROM --platform=linux/amd64 alpine:3.23
|
||||||
|
>>>>>>> 70cc850f10c2fcd1733ae05dce5c4503db3a11f3
|
||||||
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
|
MAINTAINER Scott E. Graves <scott.e.graves@protonmail.com>
|
||||||
CMD bash
|
CMD bash
|
||||||
|
|
||||||
@@ -81,5 +85,5 @@ RUN apk add \
|
|||||||
zstd-static \
|
zstd-static \
|
||||||
xz-static
|
xz-static
|
||||||
|
|
||||||
RUN ln -sf /usr/bin/aclocal-1.17 /usr/bin/aclocal-1.16
|
RUN ln -sf /usr/bin/aclocal-1.18 /usr/bin/aclocal-1.16
|
||||||
RUN ln -sf /usr/bin/automake-1.17 /usr/bin/automake-1.16
|
RUN ln -sf /usr/bin/automake-1.18 /usr/bin/automake-1.16
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ RUN apt-get install -y \
|
|||||||
fonts-droid-fallback \
|
fonts-droid-fallback \
|
||||||
gdb \
|
gdb \
|
||||||
git \
|
git \
|
||||||
lib32stdc++6 \
|
lib32stdc++6-x32-cross \
|
||||||
libglu1-mesa \
|
libglu1-mesa \
|
||||||
libstdc++6 \
|
libstdc++6 \
|
||||||
python3 \
|
python3 \
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
#comment
|
#comment
|
||||||
|
<<<<<<< HEAD
|
||||||
FROM alpine:3.23
|
FROM alpine:3.23
|
||||||
|
=======
|
||||||
|
FROM --platform=linux/amd64 alpine:3.23
|
||||||
|
>>>>>>> 70cc850f10c2fcd1733ae05dce5c4503db3a11f3
|
||||||
|
|
||||||
RUN apk update
|
RUN apk update
|
||||||
RUN apk upgrade
|
RUN apk upgrade
|
||||||
@@ -842,6 +846,7 @@ RUN if [ -f "/3rd_party/libevent-${MY_LIBEVENT_VERSION}-stable.tar.gz" ]; then \
|
|||||||
-DCMAKE_CXX_STANDARD=${MY_CXX_STANDARD} \
|
-DCMAKE_CXX_STANDARD=${MY_CXX_STANDARD} \
|
||||||
-DCMAKE_C_FLAGS="-include winsock2.h -include ws2tcpip.h -include iphlpapi.h" \
|
-DCMAKE_C_FLAGS="-include winsock2.h -include ws2tcpip.h -include iphlpapi.h" \
|
||||||
-DCMAKE_INSTALL_PREFIX=${MY_MINGW_DIR} \
|
-DCMAKE_INSTALL_PREFIX=${MY_MINGW_DIR} \
|
||||||
|
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=${MY_TOOLCHAIN_FILE_CMAKE} \
|
-DCMAKE_TOOLCHAIN_FILE=${MY_TOOLCHAIN_FILE_CMAKE} \
|
||||||
-DEVENT__DISABLE_OPENSSL=ON \
|
-DEVENT__DISABLE_OPENSSL=ON \
|
||||||
-DEVENT__DISABLE_SAMPLES=ON \
|
-DEVENT__DISABLE_SAMPLES=ON \
|
||||||
|
|||||||
@@ -323,6 +323,11 @@ using vlc_string_t = std::unique_ptr<char, vlc_string_deleter>;
|
|||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
#if defined(PROJECT_ENABLE_BOOST)
|
#if defined(PROJECT_ENABLE_BOOST)
|
||||||
|
#if defined(PROJECT_ENABLE_LIBBITCOIN_SYSTEM) && defined(PROJECT_IS_DARWIN)
|
||||||
|
#define BOOST_ASIO_HAS_STD_INVOKE_RESULT
|
||||||
|
#define BOOST_NO_CXX98_FUNCTION_BASE
|
||||||
|
#endif // defined(PROJECT_ENABLE_LIBBITCOIN_SYSTEM) &&
|
||||||
|
// defined(PROJECT_IS_DARWIN)
|
||||||
#include "boost/archive/text_iarchive.hpp"
|
#include "boost/archive/text_iarchive.hpp"
|
||||||
#include "boost/archive/text_oarchive.hpp"
|
#include "boost/archive/text_oarchive.hpp"
|
||||||
#include "boost/asio.hpp"
|
#include "boost/asio.hpp"
|
||||||
|
|||||||
@@ -311,11 +311,24 @@ auto use_getpwuid(uid_t uid, passwd_callback_t callback) -> result {
|
|||||||
#if defined(PROJECT_ENABLE_PUGIXML)
|
#if defined(PROJECT_ENABLE_PUGIXML)
|
||||||
auto generate_launchd_plist(const plist_cfg &cfg, bool overwrite_existing)
|
auto generate_launchd_plist(const plist_cfg &cfg, bool overwrite_existing)
|
||||||
-> bool {
|
-> bool {
|
||||||
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
auto file = utils::path::combine(cfg.plist_path, {cfg.label + ".plist"});
|
auto file = utils::path::combine(cfg.plist_path, {cfg.label + ".plist"});
|
||||||
if (utils::file::file{file}.exists() && not overwrite_existing) {
|
if (utils::file::file{file}.exists() && not overwrite_existing) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto parent_directory = utils::path::get_parent_path(file);
|
||||||
|
if (not utils::file::directory{parent_directory}.create_directory()) {
|
||||||
|
utils::error::handle_error(function_name,
|
||||||
|
utils::error::create_error_message({
|
||||||
|
"failed to create plist parent directory",
|
||||||
|
parent_directory,
|
||||||
|
std::to_string(errno),
|
||||||
|
}));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
pugi::xml_document doc;
|
pugi::xml_document doc;
|
||||||
auto decl = doc.append_child(pugi::node_declaration);
|
auto decl = doc.append_child(pugi::node_declaration);
|
||||||
decl.append_attribute("version") = "1.0";
|
decl.append_attribute("version") = "1.0";
|
||||||
@@ -370,26 +383,24 @@ auto generate_launchd_plist(const plist_cfg &cfg, bool overwrite_existing)
|
|||||||
|
|
||||||
#if defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
|
#if defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
|
||||||
auto launchctl_command(std::string_view label, launchctl_type type) -> int {
|
auto launchctl_command(std::string_view label, launchctl_type type) -> int {
|
||||||
|
auto launch_agents_dir = utils::path::combine("~", {
|
||||||
|
"Library",
|
||||||
|
"LaunchAgents",
|
||||||
|
});
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case launchctl_type::bootout:
|
case launchctl_type::bootout:
|
||||||
return system(
|
return system(
|
||||||
fmt::format("launchctl bootout gui/{} '{}' 1>/dev/null 2>&1", getuid(),
|
fmt::format("launchctl bootout gui/{} '{}' 1>/dev/null 2>&1", getuid(),
|
||||||
utils::path::combine("~",
|
utils::path::combine(launch_agents_dir,
|
||||||
{
|
{fmt::format("{}.plist", label)}))
|
||||||
"/Library/LaunchAgents",
|
|
||||||
fmt::format("{}.plist", label),
|
|
||||||
}))
|
|
||||||
.c_str());
|
.c_str());
|
||||||
|
|
||||||
case launchctl_type::bootstrap:
|
case launchctl_type::bootstrap:
|
||||||
return system(
|
return system(
|
||||||
fmt::format("launchctl bootstrap gui/{} '{}' 1>/dev/null 2>&1",
|
fmt::format("launchctl bootstrap gui/{} '{}' 1>/dev/null 2>&1",
|
||||||
getuid(),
|
getuid(),
|
||||||
utils::path::combine("~",
|
utils::path::combine(launch_agents_dir,
|
||||||
{
|
{fmt::format("{}.plist", label)}))
|
||||||
"/Library/LaunchAgents",
|
|
||||||
fmt::format("{}.plist", label),
|
|
||||||
}))
|
|
||||||
.c_str());
|
.c_str());
|
||||||
|
|
||||||
case launchctl_type::kickstart:
|
case launchctl_type::kickstart:
|
||||||
|
|||||||
Reference in New Issue
Block a user