Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ jobs:
export QT_ROOT_DIR=$QTDIR

rm -rf ./AppDir/usr/include/
strip ./AppDir/usr/bin/cmark ./AppDir/usr/bin/gittyup ./AppDir/usr/bin/indexer ./AppDir/usr/bin/relauncher
strip ./AppDir/usr/bin/cmark ./AppDir/usr/bin/gittyup ./AppDir/usr/bin/gittyup-indexer ./AppDir/usr/bin/gittyup-relauncher

wget -c https://github.com/$(wget -q https://github.com/probonopd/go-appimage/releases/expanded_assets/continuous -O - | grep "appimagetool-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
chmod +x appimagetool-*.AppImage
Expand Down
4 changes: 2 additions & 2 deletions pack/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ if(WIN32)
${PACKAGE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/Gittyup.pdb
${PACKAGE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/indexer.exe
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gittyup-indexer.exe
${PACKAGE_DIR}
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/indexer.pdb
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gittyup-indexer.pdb
${PACKAGE_DIR})

add_dependencies(deploy package)
Expand Down
6 changes: 3 additions & 3 deletions src/app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ else()
endif()
endif()

add_dependencies(gittyup indexer relauncher)
add_dependencies(gittyup gittyup-indexer gittyup-relauncher)

install(
TARGETS gittyup
Expand All @@ -178,7 +178,7 @@ if(APPLE)
get_filename_component(RPATH ${QT_FRAMEWORK} DIRECTORY)

# Fixup relauncher RPATH.
set(RELAUNCHER ${CONTENTS_DIR}/MacOS/relauncher)
set(RELAUNCHER ${CONTENTS_DIR}/MacOS/gittyup-relauncher)
install(
CODE "execute_process(COMMAND
${CMAKE_INSTALL_NAME_TOOL} -delete_rpath \"${RPATH}\"
Expand All @@ -195,7 +195,7 @@ execute_process(COMMAND
COMPONENT ${GITTYUP_NAME})

# Fixup indexer RPATH.
set(INDEXER ${CONTENTS_DIR}/MacOS/indexer)
set(INDEXER ${CONTENTS_DIR}/MacOS/gittyup-indexer)
install(
CODE "execute_process(COMMAND
${CMAKE_INSTALL_NAME_TOOL} -delete_rpath \"${RPATH}\"
Expand Down
20 changes: 11 additions & 9 deletions src/index/Indexer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_executable(
indexer
gittyup-indexer
main.cpp
indexer.cpp
diffgrabber.cpp
Expand All @@ -9,24 +9,26 @@ add_executable(
common.cpp
lexerpool.cpp
idstorage.cpp)
target_link_libraries(indexer index)
target_compile_definitions(indexer PRIVATE GITTYUP_VERSION="${GITTYUP_VERSION}")
target_link_libraries(gittyup-indexer index)
target_compile_definitions(gittyup-indexer
PRIVATE GITTYUP_VERSION="${GITTYUP_VERSION}")

set_target_properties(indexer PROPERTIES RUNTIME_OUTPUT_DIRECTORY
$<TARGET_FILE_DIR:gittyup>)
set_target_properties(gittyup-indexer PROPERTIES RUNTIME_OUTPUT_DIRECTORY
$<TARGET_FILE_DIR:gittyup>)

if(APPLE)
set_target_properties(
indexer PROPERTIES INSTALL_RPATH "/usr/local/qt;@loader_path/../Frameworks")
gittyup-indexer PROPERTIES INSTALL_RPATH
"/usr/local/qt;@loader_path/../Frameworks")
else()
if(WIN32)
target_link_libraries(indexer Dbghelp.lib)
target_link_libraries(gittyup-indexer Dbghelp.lib)
elseif(NOT FLATAPK)
set_target_properties(indexer PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(gittyup-indexer PROPERTIES INSTALL_RPATH "$ORIGIN")
endif()

install(
TARGETS indexer
TARGETS gittyup-indexer
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${GITTYUP_NAME})
endif()
9 changes: 5 additions & 4 deletions src/index/Indexer/indexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ static LONG WINAPI exceptionFilter(PEXCEPTION_POINTERS info) {

wchar_t fileName[MAX_PATH];
const wchar_t *s = L"%s\\%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp";
StringCchPrintf(fileName, MAX_PATH, s, dir, "indexer", GITTYUP_VERSION,
localTime.wYear, localTime.wMonth, localTime.wDay,
localTime.wHour, localTime.wMinute, localTime.wSecond,
GetCurrentProcessId(), GetCurrentThreadId());
StringCchPrintf(fileName, MAX_PATH, s, dir, "gittyup-indexer",
GITTYUP_VERSION, localTime.wYear, localTime.wMonth,
localTime.wDay, localTime.wHour, localTime.wMinute,
localTime.wSecond, GetCurrentProcessId(),
GetCurrentThreadId());

HANDLE dumpFile =
CreateFile(fileName, GENERIC_READ | GENERIC_WRITE,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/RepoView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -841,9 +841,9 @@ void RepoView::startIndexing() {

QDir dir(QCoreApplication::applicationDirPath());
#ifdef WIN32
auto indexer_cmd = dir.filePath("indexer.exe");
auto indexer_cmd = dir.filePath("gittyup-indexer.exe");
#else
auto indexer_cmd = dir.filePath("indexer");
auto indexer_cmd = dir.filePath("gittyup-indexer");
#endif
QFileInfo check_file(indexer_cmd);
if (!check_file.isFile()) {
Expand Down
16 changes: 8 additions & 8 deletions src/update/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ target_link_libraries(

set_target_properties(update PROPERTIES AUTOMOC ON)

add_executable(relauncher relauncher.cpp)
target_link_libraries(relauncher Qt6::Core)
add_executable(gittyup-relauncher relauncher.cpp)
target_link_libraries(gittyup-relauncher Qt6::Core)

set_target_properties(relauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY
$<TARGET_FILE_DIR:gittyup>)
set_target_properties(gittyup-relauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY
$<TARGET_FILE_DIR:gittyup>)

if(APPLE)
set_target_properties(
relauncher PROPERTIES INSTALL_RPATH
"/usr/local/qt;@loader_path/../Frameworks")
gittyup-relauncher PROPERTIES INSTALL_RPATH
"/usr/local/qt;@loader_path/../Frameworks")
elseif(UNIX)
set_target_properties(relauncher PROPERTIES INSTALL_RPATH "$ORIGIN")
set_target_properties(gittyup-relauncher PROPERTIES INSTALL_RPATH "$ORIGIN")

install(
TARGETS relauncher
TARGETS gittyup-relauncher
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${GITTYUP_NAME})
endif()
5 changes: 3 additions & 2 deletions src/update/Updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ bool Updater::install(const DownloadRef &download, QString &error) {
}
p->deleteLater();

auto relauncher_cmd = dir.filePath("relauncher");
auto relauncher_cmd = dir.filePath("gittyup-relauncher");
Debug("Relauncher command: " << relauncher_cmd);

// Start the relaunch helper.
Expand All @@ -365,7 +365,8 @@ bool Updater::install(const DownloadRef &download, QString &error) {
// Start the relaunch helper.
QString app = QCoreApplication::applicationFilePath();
QString pid = QString::number(QCoreApplication::applicationPid());
if (!QProcess::startDetached(dir.filePath("relauncher"), {app, pid})) {
if (!QProcess::startDetached(dir.filePath("gittyup-relauncher"),
{app, pid})) {
error = tr("Helper application failed to start");
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/update/Updater_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ QString mountPoint() const
QDir dir(QCoreApplication::applicationDirPath());
QString app = QCoreApplication::applicationFilePath();
QString pid = QString::number(QCoreApplication::applicationPid());
if (!QProcess::startDetached(dir.filePath("relauncher"), {app, pid})) {
if (!QProcess::startDetached(dir.filePath("gittyup-relauncher"), {app, pid})) {
error = tr("Helper application failed to start");
return false;
}
Expand Down
Loading