Skip to content

Commit

Permalink
fix: 【ARM64】【LOONG64】if not AMD64 platform, do not show ai search config
Browse files Browse the repository at this point in the history
Description: 【ARM64】【LOONG64】if not AMD64 platform, do not show ai search config

Log:

Bug: BUG-295519
  • Loading branch information
lichaofan2008 committed Dec 18, 2024
1 parent 8322b59 commit dd06ca4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/grand-search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ set(BIN_NAME ${SEARCH_BIN_NAME})
# 集成测试标签
ADD_DEFINITIONS(-DENABLE_ACCESSIBILITY)

if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "mips"
OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "aarch64"
OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "sw"
OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64"
)
message(${CMAKE_SYSTEM_PROCESSOR} ": disable ai search")
else()
message(${CMAKE_SYSTEM_PROCESSOR} ": enable ai search")
ADD_DEFINITIONS(-DENABLE_AI_SEARCH)
endif()

# 依赖包
find_package(PkgConfig REQUIRED)
find_package(DtkWidget REQUIRED)
Expand Down
5 changes: 5 additions & 0 deletions src/grand-search/gui/searchconfig/indexwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ IndexWidget::IndexWidget(QWidget *parent)
m_mainLayout->addWidget(m_intelligent);
m_mainLayout->addSpacing(10);
m_mainLayout->addWidget(m_blackListWidget);

#ifndef ENABLE_AI_SEARCH
// 目前非amd64架构,用不了AI搜索
m_intelligent->setVisible(false);
#endif
}

bool IndexWidget::onCloseEvent()
Expand Down

0 comments on commit dd06ca4

Please sign in to comment.