Skip to content

Commit

Permalink
Modify documents
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Jul 25, 2023
1 parent 58ff602 commit 4673475
Show file tree
Hide file tree
Showing 12 changed files with 323 additions and 339 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
TOOSL_DIR: ${{github.workspace}}/.cache/tools
INSTALL_DIR: ${{github.workspace}}/.cache/install_${{matrix.BUILD_TYPE}}
FaceRecognizer_VERSION: v0.0.4
VCPKGGITCOMMITID: d765306b074717dea8dc1c4723e1b025acb61c2d
VCPKGGITCOMMITID: b7dba7f9aad09a56900f21cd78cfda1258e54e38
ANDROID_PLATFORM: android-23
ANDROID_NATIVE_API_LEVEL: 23
qt_modules: 'qtimageformats qtmultimedia qtscxml'
Expand Down Expand Up @@ -103,20 +103,31 @@ jobs:
modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/
cached: '${{ steps.cache-qt.outputs.cache-hit }}' # optional, default is false

- name: run-vcpkg
uses: lukka/[email protected]
with:
# Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port.
#setupOnly: # optional
#vcpkgGitURL: https://github.com/KangLin/vcpkg.git
vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
additionalCachedPaths: $VCPKG_ROOT/installed
vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv'
# - name: run-vcpkg
# uses: lukka/[email protected]
# with:
# # Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port.
# #setupOnly: # optional
# #vcpkgGitURL: https://github.com/KangLin/vcpkg.git
# vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}}
# vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
# # Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# # compute its hash and append this to the computed cache's key.
# appendedCacheKey: android_${{matrix.os}}-qt${{matrix.qt_version}}-${{matrix.VCPKG_TARGET_TRIPLET}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
# additionalCachedPaths: $VCPKG_ROOT/installed
# vcpkgTriplet: '${{ matrix.VCPKG_TARGET_TRIPLET }}'
# vcpkgArguments: 'openssl ffmpeg opencv opencv[contrib] dlib ncnn'

- name: run vcpkg
working-directory: ${{env.SOURCE_DIR}}
run: |
if [ ! -d vcpkg ]; then
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
git checkout -b ${{env.VCPKGGITCOMMITID}} ${{env.VCPKGGITCOMMITID}}
./bootstrap-vcpkg.sh
./vcpkg install --triplet=${{matrix.VCPKG_TARGET_TRIPLET}} openssl libyuv ffmpeg opencv[contrib]
fi
- name: git clone RabbitCommon
working-directory: ${{env.SOURCE_DIR}}
Expand All @@ -127,6 +138,7 @@ jobs:
working-directory: ${{github.workspace}}/build
env:
RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon
VCPKG_ROOT: ${{env.SOURCE_DIR}}/vcpkg
run: |
sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake
${Qt6_DIR}/bin/qt-cmake .. \
Expand All @@ -140,6 +152,7 @@ jobs:
-DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \
-DVCPKG_VERBOSE=ON \
-DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \
-DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_INSTALL_PREFIX=`pwd`/install
cmake --build . --config ${{matrix.BUILD_TYPE}} --target all
cmake --build . --config ${{matrix.BUILD_TYPE}} --target install
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
deploy:
if: ${{ startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
needs: [ubuntu, msvc, macos]
needs: [ubuntu, msvc, macos, mingw]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -49,6 +49,12 @@ jobs:
name: ${{ needs.msvc.outputs.name }}
path: ${{ env.artifact_path }}

- name: Download mingw
uses: actions/download-artifact@v3
with:
name: ${{ needs.mingw.outputs.name }}
path: ${{ env.artifact_path }}

- name: Download macos
uses: actions/download-artifact@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
qt_modules: ${{matrix.qt_modules}}
FaceRecognizer_VERSION: v0.0.4
artifact_name: build_macos
VCPKGGITCOMMITID: d765306b074717dea8dc1c4723e1b025acb61c2d
VCPKGGITCOMMITID: b7dba7f9aad09a56900f21cd78cfda1258e54e38

# Map the job outputs to step outputs
outputs:
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
# compute its hash and append this to the computed cache's key.
appendedCacheKey: vcpkg-macos-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv' # dlib ncnn
vcpkgArguments: 'openssl libyuv ffmpeg opencv opencv[contrib] dlib ncnn'

- name: Cache Qt
id: cache-qt
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,16 @@ jobs:
cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install
- name: Package
# if: ${{ matrix.BUILD_TYPE == 'Release' }}
if: ${{ matrix.BUILD_TYPE == 'Release' }}
working-directory: ${{github.workspace}}\build
run: |
move /Y install\plugins\*crypto*.dll install\bin
move /Y install\plugins\*ssl*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
copy /Y C:\msys64\mingw64\bin\*.dll install\bin
makensis Install.nsi
- name: Update artifact
#if: ${{ matrix.BUILD_TYPE == 'Release' }}
if: ${{ matrix.BUILD_TYPE == 'Release' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifact_name }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}}
CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}}
FaceRecognizer_VERSION: v0.0.4
VCPKGGITCOMMITID: d765306b074717dea8dc1c4723e1b025acb61c2d
VCPKGGITCOMMITID: b7dba7f9aad09a56900f21cd78cfda1258e54e38
qt_modules: qtwebengine ${{matrix.qt_modules}}
artifact_name: build_msvc

Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
# compute its hash and append this to the computed cache's key.
appendedCacheKey: cache-vcpkg-msvc-${{matrix.os}}-vc${{matrix.VCPKG_PLATFORM_TOOLSET}}-${{matrix.triplet}}-qt${{matrix.qt_version}}-${{matrix.BUILD_TYPE}}-${{env.VCPKGGITCOMMITID}}
vcpkgTriplet: '${{matrix.triplet}}'
vcpkgArguments: 'openssl libpng pixman libjpeg-turbo libyuv ffmpeg opencv opencv[contrib,default-features] dlib' # ncnn'
vcpkgArguments: 'openssl libyuv ffmpeg opencv opencv[contrib] dlib ncnn'

- name: build SeetaFace2
working-directory: ${{env.SOURCE_DIR}}
Expand Down Expand Up @@ -189,7 +189,6 @@ jobs:
copy /Y ${{env.INSTALL_DIR}}\bin\*.dll install\bin
copy /Y ${{env.INSTALL_DIR}}\lib\*.dll install\bin
copy /Y ${{env.RUNVCPKG_VCPKG_ROOT}}\installed\${{env.RUNVCPKG_VCPKG_TRIPLET_OUT}}\bin\*.dll install\bin
7z a FaceRecognizer_windows_${{env.FaceRecognizer_VERSION}}.zip .\install\*
makensis Install.nsi
copy /Y FaceRecognizer_${{env.FaceRecognizer_VERSION}}_Setup.exe FaceRecognizer_${{env.FaceRecognizer_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe
${{github.workspace}}\build\install\bin\FaceRecognizerApp.exe ^
Expand Down
30 changes: 4 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,28 +171,6 @@ if(BUILD_APP)
add_subdirectory(App)
endif(BUILD_APP)

# Create install runtime target
add_custom_target(install-runtime
COMMAND
"${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=Runtime
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_install.cmake"
)
# Create uninstall runtime target
add_custom_target(uninstall-runtime
COMMAND
"${CMAKE_COMMAND}" -DCMAKE_INSTALL_COMPONENT=Runtime
-P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
)
# Create will be delete files
CONFIGURE_FILE(
"${RabbitCommon_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
# Create unistall target
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_BINARY_DIR}/cmake_uninstall.cmake"
DEPENDS uninstall-runtime)

iF(WIN32)
INSTALL(FILES Install/Install.nsi DESTINATION "${CMAKE_BINARY_DIR}"
COMPONENT Runtime)
Expand All @@ -210,7 +188,7 @@ else()
INSTALL(FILES ${OTHER_FILES} DESTINATION "." COMPONENT Runtime)
endif()

message(STATUS "== Build shared library: ${BUILD_SHARED_LIBS}")
message(STATUS "== Build arch: ${BUILD_ARCH}")
message(STATUS "== Build application: ${BUILD_APP}")
message(STATUS "== Build automation download: ${ENABLE_DOWNLOAD_MODULE}")
message(STATUS "Build shared library: ${BUILD_SHARED_LIBS}")
message(STATUS "Build arch: ${BUILD_ARCH}")
message(STATUS "Build application: ${BUILD_APP}")
message(STATUS "Build automation download: ${ENABLE_DOWNLOAD_MODULE}")
6 changes: 3 additions & 3 deletions Src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ INSTALL(FILES ../Resource/db/database.sql
DESTINATION ${INSTALL_DATA_PREFIX}/db
COMPONENT Runtime)

message("== LIBYUV:${YUV_FOUND}")
message("== log4cplus:${log4cplus_FOUND}")
message("== Build PERFORMANCE:${BUILD_PERFORMANCE}")
message(STATUS "LIBYUV:${YUV_FOUND}")
message(STATUS "log4cplus:${log4cplus_FOUND}")
message(STATUS "Build PERFORMANCE:${BUILD_PERFORMANCE}")
4 changes: 2 additions & 2 deletions Src/Plugins/FFmpge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if(ANDROID)
else()
option(USE_FFMPEG "Use ffmpeg" ON)
endif()
message(STATUS "== Use ffmpeg: ${USE_FFMPEG}")
message(STATUS "Use ffmpeg: ${USE_FFMPEG}")
if(NOT USE_FFMPEG)
return()
endif()
Expand All @@ -13,7 +13,7 @@ if(NOT FFMPEG_FOUND)
return()
endif()

message("== FFMPGE:${FFMPEG_FOUND}")
message(STATUS "FFMPGE:${FFMPEG_FOUND}")

if(ANDROID)
INSTALL(FILES ${FFMPEG_LIBRARIES}
Expand Down
4 changes: 2 additions & 2 deletions Src/Plugins/LibFacedetection/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
option(USE_LIBFACEDETECTION "Use LibFacedetection" ON)
message(STATUS "== Use LibFacedetection: ${USE_LIBFACEDETECTION}")
message(STATUS "Use LibFacedetection: ${USE_LIBFACEDETECTION}")
if(NOT USE_LIBFACEDETECTION)
return()
endif()

project(PluginFaceLibFacedetection)

find_package(facedetection)
message("== Plugins libfacedetection:${facedetection_FOUND}")
message(STATUS "Plugins libfacedetection:${facedetection_FOUND}")
if(NOT facedetection_FOUND)
return()
endif()
Expand Down
2 changes: 1 addition & 1 deletion Src/Plugins/Seeta/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
option(USE_SEETA "Use SeetaFace" ON)
message(STATUS "== Use seetaface: ${USE_SEETA}")
message(STATUS "Use seetaface: ${USE_SEETA}")
if(NOT USE_SEETA)
return()
endif()
Expand Down
4 changes: 2 additions & 2 deletions Src/Plugins/ncnn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
option(USE_NCNN "Use ncnn" OFF)
message(STATUS "== Use ncnn: ${USE_NCNN}")
message(STATUS "Use ncnn: ${USE_NCNN}")
if(NOT USE_NCNN)
return()
endif()

project(PluginFaceNcnn)
find_package(ncnn)
message("== Plugins ncnn:${ncnn_FOUND}")
message(STATUS "Plugins ncnn:${ncnn_FOUND}")
if(NOT ncnn_FOUND)
return()
endif()
Expand Down
Loading

0 comments on commit 4673475

Please sign in to comment.