Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Mar 27, 2024
1 parent 4dde63e commit f3d92d0
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion source/LibraryHolder/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set_target_properties(LibraryHolder PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(LibraryHolder
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${MAA_PRIVATE_INC} ${MAA_PUBLIC_INC})

target_link_libraries(LibraryHolder MaaUtils HeaderOnlyLibraries Boost::system)
target_link_libraries(LibraryHolder MaaUtils HeaderOnlyLibraries Boost::system ${OpenCV_LIBS})

add_dependencies(LibraryHolder MaaUtils)

Expand Down
6 changes: 3 additions & 3 deletions source/LibraryHolder/ControlUnit/ControlUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ bool check_version(const std::string& func_name)
LogInfo << typeid(ControlUnitT).name() << "Library version:" << version;

if (std::strcmp(version, MAA_VERSION) != 0) {
LogWarn << "ControlUnit and MaaFramework are not same version,"
<< "ControlUnit:" << version << "MaaFramework:" << MAA_VERSION;
LogWarn << "ControlUnit and MaaFramework are not same version," << "ControlUnit:" << version
<< "MaaFramework:" << MAA_VERSION;
}
return true;
}
Expand Down Expand Up @@ -219,4 +219,4 @@ std::shared_ptr<MAA_CTRL_UNIT_NS::ControlUnitAPI>
destroy_control_unit);
}

MAA_NS_END
MAA_NS_END
3 changes: 2 additions & 1 deletion source/MaaFramework/Instance/InstanceStatus.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "InstanceStatus.h"

#include "Utils/Logger.h"
#include "Utils/NoWarningCV.hpp"

MAA_NS_BEGIN

Expand Down Expand Up @@ -128,4 +129,4 @@ bool InstanceStatus::cv_mat_equal(const cv::Mat& lhs, const cv::Mat& rhs)
return eq2;
}

MAA_NS_END
MAA_NS_END
3 changes: 2 additions & 1 deletion source/MaaFramework/Resource/PipelineResMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "Utils/Codec.h"
#include "Utils/Logger.h"
#include "Utils/Platform.h"
#include "Utils/StringMisc.hpp"
#include "Vision/VisionTypes.h"

Expand Down Expand Up @@ -1417,4 +1418,4 @@ bool PipelineResMgr::parse_action_target(
return true;
}

MAA_RES_NS_END
MAA_RES_NS_END
1 change: 1 addition & 0 deletions source/MaaProjectInterface/CLI/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "MaaToolkit/MaaToolkitAPI.h"
#include "Utils/Runtime.h"
#include "Utils/Platform.h"

#include "interactor.h"

Expand Down
1 change: 1 addition & 0 deletions source/MaaToolkit/API/MaaToolkitConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Config/GlobalOptionConfig.h"
#include "Utils/Logger.h"
#include "Utils/Runtime.h"
#include "Utils/Platform.h"

MaaBool MaaToolkitInitOptionConfig(MaaStringView user_path, MaaStringView default_json)
{
Expand Down
3 changes: 2 additions & 1 deletion source/MaaToolkit/API/MaaToolkitExecAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "ExecAgent/ActionExecAgent.h"
#include "ExecAgent/RecognizerExecAgent.h"
#include "Utils/Logger.h"
#include "Utils/Platform.h"

using namespace MAA_TOOLKIT_NS;

Expand Down Expand Up @@ -136,4 +137,4 @@ MaaBool
MaaToolkitUnregisterCustomActionExecutor(MaaInstanceHandle handle, MaaStringView action_name)
{
return UnregisterExecutor(ExecutorType::Action, handle, action_name);
}
}
3 changes: 2 additions & 1 deletion source/MaaToolkit/AdbDevice/DeviceMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <future>

#include "ControlUnit/ControlUnitAPI.h"
#include "LibraryHolder/ControlUnit.h"
#include "Utils/Logger.h"

Expand Down Expand Up @@ -168,4 +169,4 @@ MaaAdbControllerType DeviceMgr::check_adb_controller_type(
return kInputType | kScreencapType;
}

MAA_TOOLKIT_NS_END
MAA_TOOLKIT_NS_END
1 change: 1 addition & 0 deletions source/MaaToolkit/ExecAgent/ExecAgentBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <mutex>
#include <string_view>
#include <thread>
#include <filesystem>

#include <meojson/json.hpp>

Expand Down
8 changes: 5 additions & 3 deletions source/include/LibraryHolder/ControlUnit.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#pragma once

#include "LibraryHolder.h"

#include <memory>

#include "ControlUnit/ControlUnitAPI.h"
#include "LibraryHolder.h"
#include "Utils/Platform.h"

MAA_CTRL_UNIT_NS_BEGIN
class ControlUnitAPI;
MAA_CTRL_UNIT_NS_END

MAA_NS_BEGIN

class AdbControlUnitLibraryHolder : public LibraryHolder<AdbControlUnitLibraryHolder>
Expand Down
3 changes: 2 additions & 1 deletion source/include/ProjectInterface/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
#include <unordered_map>
#include <vector>

#include <meojson/json.hpp>

#include "Conf/Conf.h"
#include "MaaFramework/MaaDef.h"
#include "Utils/JsonExt.hpp"

MAA_PROJECT_INTERFACE_NS_BEGIN

Expand Down

0 comments on commit f3d92d0

Please sign in to comment.