Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Don't assume qdbus is in PATH (#677)
Browse files Browse the repository at this point in the history
* Bump vcpkg to a34c873a9717a888f58dc05268dea15592c2f0ff

* Don't assume qdbus is in PATH

Co-authored-by: Christophe Marin <christophe@krop.fr>

* Bump vcpkg to ad3bae57455a3c3ce528fcd47d8e8027d0498add

* Bump vcpkg to b4a3d89125e45bc8f80fb94bef9761d4f4e14fb9

* Bump run-vcpkg to v11.5

---------

Co-authored-by: Christophe Marin <christophe@krop.fr>
  • Loading branch information
Shatur and krop committed May 16, 2024
1 parent 226221f commit f50c0b7
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 17 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
sudo apt-get install extra-cmake-modules libqt5x11extras5-dev qttools5-dev qtmultimedia5-dev libkf5wayland-dev libtesseract-dev ninja-build
- name: Install vcpkg
uses: lukka/run-vcpkg@v11.4
uses: lukka/run-vcpkg@v11.5
if: runner.os == 'Windows'
with:
vcpkgJsonGlob: vcpkg.json
Expand All @@ -85,11 +85,6 @@ jobs:
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

# See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4766#note_1091927
- name: Downgrade CMake
if: runner.os == 'Windows'
uses: lukka/get-cmake@v3.21.2

- name: Build
run: |
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release -D WITH_PORTABLE_MODE=ON -DCMAKE_INSTALL_PREFIX=install ${{ matrix.extra-cmake-arguments }}
Expand Down
15 changes: 14 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,22 @@ if(WITH_PORTABLE_MODE)
endif()

if(UNIX AND NOT APPLE)
# -DQT_BIN_DIR=/path/to/qt/executables can be passed to CMake directly
if(NOT DEFINED QT_BIN_DIR)
if(ECM_VERSION VERSION_LESS 5.93)
include(ECMQueryQmake)
query_qmake(QT_BIN_DIR QT_INSTALL_BINS)
else()
include(ECMQueryQt)
ecm_query_qt(QT_BIN_DIR QT_INSTALL_BINS)
endif()
endif()

configure_file(data/${DESKTOP_FILE}.in ${CMAKE_CURRENT_BINARY_DIR}/data/${DESKTOP_FILE} @ONLY)

install(TARGETS ${PROJECT_NAME})
install(FILES ${QM_FILES} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/${PROJECT_NAME}/translations)
install(FILES data/${DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/data/${DESKTOP_FILE} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
install(FILES data/${METAINFO_FILE} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo)

ecm_install_icons(ICONS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,62 +24,62 @@ X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot
X-Purism-FormFactor=Workstation;Mobile;

[Desktop Action TranslateSelectedText]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateSelection
Name=Translate selected text
Name[fi_FI]=Käännä valittu teksti
Name[pt_PT]=Traduzir o texto selecionado
Name[ru_RU]=Перевести выделенный текст
X-KDE-Shortcuts=Ctrl+Alt+E

[Desktop Action SpeakSelection]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow speakSelection
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow speakSelection
Name=Speak selected text
Name[fi_FI]=Puhu valittu teksti
Name[pt_PT]=Falar o texto selecionado
Name[ru_RU]=Озвучить выделенный текст
X-KDE-Shortcuts=Ctrl+Alt+S

[Desktop Action SpeakTranslatedSelection]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow speakTranslatedSelection
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow speakTranslatedSelection
Name=Speak translation of selected text
Name[fi_FI]=Puhu valitun tekstin käännös
Name[pt_PT]=Falar a tradução do texto selecionado
Name[ru_RU]=Озвучить перевод выделенного текста
X-KDE-Shortcuts=Ctrl+Alt+F

[Desktop Action StopSpeaking]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow stopSpeaking
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow stopSpeaking
Name=Stop text speaking
Name[fi_FI]=Lopeta tekstin puhuminen
Name[pt_PT]=Parar de falar o texto
Name[ru_RU]=Остановить озвучивание текста
X-KDE-Shortcuts=Ctrl+Alt+G

[Desktop Action Open]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow open
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow open
Name=Show main window
Name[fi_FI]=Näytä pääikkuna
Name[pt_PT]=Mostrar janela principal
Name[ru_RU]=Показать главное окно
X-KDE-Shortcuts=Ctrl+Alt+C

[Desktop Action CopyTranslatedSelection]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow copyTranslatedSelection
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow copyTranslatedSelection
Name=Translate selected text and copy to clipboard
Name[fi_FI]=Käännä valittu teksti ja kopioi leikepöydälle
Name[pt_PT]=Traduzir texto selecionado e copiar para a área de transferência
Name[ru_RU]=Перевести выделенный текст и скопировать в буфер обмена

[Desktop Action RecognizeScreenArea]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow recognizeScreenArea
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow recognizeScreenArea
Name=Recognize text in screen area
Name[fi_FI]=Tunnista teksti näytön alueelta
Name[pt_PT]=Reconhecer texto na área do ecrã
Name[ru_RU]=Распознать текст в области экрана
X-KDE-Shortcuts=Ctrl+Alt+I

[Desktop Action TranslateScreenArea]
Exec=qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateScreenArea
Exec=@QT_BIN_DIR@/qdbus io.crow_translate.CrowTranslate /io/crow_translate/CrowTranslate/MainWindow translateScreenArea
Name=Translate text in screen area
Name[fi_FI]=Käännä teksti näytön alueelta
Name[pt_PT]=Traduzir texto na área do ecrã
Expand Down
2 changes: 1 addition & 1 deletion src/qonlinetranslator
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "crow-translate",
"version-string": "latest",
"builtin-baseline": "a42af01b72c28a8e1d7b48107b33e4f286a55ef6",
"builtin-baseline": "66a252f70eebdd744c02d7ab8c1cc6fe123c70ee",
"dependencies": [
{
"name": "tesseract"
Expand Down

0 comments on commit f50c0b7

Please sign in to comment.