Merge pull request #51 from Murmele/flatpak_pathspec_not_working

fix Indexer installation path
This commit is contained in:
Murmele 2021-12-01 11:59:06 +01:00 committed by GitHub
commit a0c384be2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 8 deletions

View File

@ -121,8 +121,7 @@ git_delta_t Patch::status() const
if (!d) {
// can occur, when nothing is staged
// so the staged patch is empty
git_delta_t delta;
return delta;
return GIT_DELTA_UNMODIFIED;
}
return git_patch_get_delta(d.data())->status;
}

View File

@ -41,14 +41,22 @@ if(APPLE)
else()
if(WIN32)
target_link_libraries(indexer Dbghelp.lib)
else()
elseif (NOT FLATAPK)
set_target_properties(indexer PROPERTIES
INSTALL_RPATH "$ORIGIN"
)
endif()
install(TARGETS indexer
DESTINATION .
COMPONENT ${GITTYUP_NAME}
)
if (FLATPAK)
# Install application.
install(TARGETS indexer
DESTINATION ./bin # otherwise the executable will not be found by flatpak
COMPONENT ${GITTYUP_NAME}
)
else()
install(TARGETS indexer
DESTINATION .
COMPONENT ${GITTYUP_NAME}
)
endif()
endif()

View File

@ -858,7 +858,16 @@ void RepoView::startIndexing()
args.prepend("--log");
QDir dir(QCoreApplication::applicationDirPath());
mIndexer.start(dir.filePath("indexer"), args);
#ifdef WIN32
auto indexer_cmd = dir.filePath("indexer.exe");
#else
auto indexer_cmd = dir.filePath("indexer");
#endif
QFileInfo check_file(indexer_cmd);
if (!check_file.isFile()) {
qDebug() << "No indexer found: " << indexer_cmd;
}
mIndexer.start(indexer_cmd, args);
}
void RepoView::cancelIndexing()