Skip to content

Commit

Permalink
serve fcitx:///file/foo/bar
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Jul 2, 2024
1 parent 35c4323 commit a387090
Show file tree
Hide file tree
Showing 4 changed files with 4,032 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
- name: Build
run: |
PKG_CONFIG_PATH=/tmp/fcitx5/lib/pkgconfig cmake -B build -G Ninja \
-DWKWEBVIEW_PROTOCOL="fcitx" \
-DWEBVIEW_WWW_PATH=".local/share/fcitx5/www" \
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
-DCMAKE_BUILD_TYPE=Release
cmake --build build
Expand Down
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ project(fcitx5-webview)
set(CMAKE_CXX_STANDARD 17)

option(BUILD_PREVIEW "Build preview app for development" ON)
set(WKWEBVIEW_PROTOCOL "" CACHE STRING "")
set(WEBVIEW_WWW_PATH "" CACHE STRING "")

if(NOT CMAKE_OSX_ARCHITECTURES)
set(CMAKE_OSX_ARCHITECTURES "${CMAKE_HOST_SYSTEM_PROCESSOR}")
Expand All @@ -14,7 +16,11 @@ find_package(PkgConfig REQUIRED)
pkg_check_modules(NlohmannJson REQUIRED IMPORTED_TARGET "nlohmann_json")

include_directories(pugixml/src)
include_directories(webview)

if(NOT "${WKWEBVIEW_PROTOCOL}" STREQUAL "")
add_definitions(-DWKWEBVIEW_PROTOCOL="${WKWEBVIEW_PROTOCOL}")
add_definitions(-DWEBVIEW_WWW_PATH="${WEBVIEW_WWW_PATH}")
endif()

file(GLOB HTML_SOURCES CONFIGURE_DEPENDS "page/*")
add_custom_command(
Expand Down
Loading

0 comments on commit a387090

Please sign in to comment.