Skip to content

Commit 94a388d

Browse files
committed
Prefix all executables with gittyup to support installation in path
1 parent 3e598ef commit 94a388d

File tree

7 files changed

+30
-27
lines changed

7 files changed

+30
-27
lines changed

pack/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,9 @@ if(WIN32)
311311
${PACKAGE_DIR}
312312
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/Gittyup.pdb
313313
${PACKAGE_DIR}
314-
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/indexer.exe
314+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gittyup-indexer.exe
315315
${PACKAGE_DIR}
316-
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/indexer.pdb
316+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/gittyup-indexer.pdb
317317
${PACKAGE_DIR})
318318

319319
add_dependencies(deploy package)

src/app/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ else()
165165
endif()
166166
endif()
167167

168-
add_dependencies(gittyup indexer relauncher)
168+
add_dependencies(gittyup gittyup-indexer gittyup-relauncher)
169169

170170
install(
171171
TARGETS gittyup
@@ -178,7 +178,7 @@ if(APPLE)
178178
get_filename_component(RPATH ${QT_FRAMEWORK} DIRECTORY)
179179

180180
# Fixup relauncher RPATH.
181-
set(RELAUNCHER ${CONTENTS_DIR}/MacOS/relauncher)
181+
set(RELAUNCHER ${CONTENTS_DIR}/MacOS/gittyup-relauncher)
182182
install(
183183
CODE "execute_process(COMMAND
184184
${CMAKE_INSTALL_NAME_TOOL} -delete_rpath \"${RPATH}\"
@@ -195,7 +195,7 @@ execute_process(COMMAND
195195
COMPONENT ${GITTYUP_NAME})
196196

197197
# Fixup indexer RPATH.
198-
set(INDEXER ${CONTENTS_DIR}/MacOS/indexer)
198+
set(INDEXER ${CONTENTS_DIR}/MacOS/gittyup-indexer)
199199
install(
200200
CODE "execute_process(COMMAND
201201
${CMAKE_INSTALL_NAME_TOOL} -delete_rpath \"${RPATH}\"

src/index/Indexer/CMakeLists.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
add_executable(
2-
indexer
2+
gittyup-indexer
33
main.cpp
44
indexer.cpp
55
diffgrabber.cpp
@@ -9,24 +9,26 @@ add_executable(
99
common.cpp
1010
lexerpool.cpp
1111
idstorage.cpp)
12-
target_link_libraries(indexer index)
13-
target_compile_definitions(indexer PRIVATE GITTYUP_VERSION="${GITTYUP_VERSION}")
12+
target_link_libraries(gittyup-indexer index)
13+
target_compile_definitions(gittyup-indexer
14+
PRIVATE GITTYUP_VERSION="${GITTYUP_VERSION}")
1415

15-
set_target_properties(indexer PROPERTIES RUNTIME_OUTPUT_DIRECTORY
16-
$<TARGET_FILE_DIR:gittyup>)
16+
set_target_properties(gittyup-indexer PROPERTIES RUNTIME_OUTPUT_DIRECTORY
17+
$<TARGET_FILE_DIR:gittyup>)
1718

1819
if(APPLE)
1920
set_target_properties(
20-
indexer PROPERTIES INSTALL_RPATH "/usr/local/qt;@loader_path/../Frameworks")
21+
gittyup-indexer PROPERTIES INSTALL_RPATH
22+
"/usr/local/qt;@loader_path/../Frameworks")
2123
else()
2224
if(WIN32)
23-
target_link_libraries(indexer Dbghelp.lib)
25+
target_link_libraries(gittyup-indexer Dbghelp.lib)
2426
elseif(NOT FLATAPK)
25-
set_target_properties(indexer PROPERTIES INSTALL_RPATH "$ORIGIN")
27+
set_target_properties(gittyup-indexer PROPERTIES INSTALL_RPATH "$ORIGIN")
2628
endif()
2729

2830
install(
29-
TARGETS indexer
31+
TARGETS gittyup-indexer
3032
DESTINATION ${CMAKE_INSTALL_BINDIR}
3133
COMPONENT ${GITTYUP_NAME})
3234
endif()

src/ui/RepoView.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -841,9 +841,9 @@ void RepoView::startIndexing() {
841841

842842
QDir dir(QCoreApplication::applicationDirPath());
843843
#ifdef WIN32
844-
auto indexer_cmd = dir.filePath("indexer.exe");
844+
auto indexer_cmd = dir.filePath("gittyup-indexer.exe");
845845
#else
846-
auto indexer_cmd = dir.filePath("indexer");
846+
auto indexer_cmd = dir.filePath("gittyup-indexer");
847847
#endif
848848
QFileInfo check_file(indexer_cmd);
849849
if (!check_file.isFile()) {

src/update/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ target_link_libraries(
1919

2020
set_target_properties(update PROPERTIES AUTOMOC ON)
2121

22-
add_executable(relauncher relauncher.cpp)
23-
target_link_libraries(relauncher Qt6::Core)
22+
add_executable(gittyup-relauncher relauncher.cpp)
23+
target_link_libraries(gittyup-relauncher Qt6::Core)
2424

25-
set_target_properties(relauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY
26-
$<TARGET_FILE_DIR:gittyup>)
25+
set_target_properties(gittyup-relauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY
26+
$<TARGET_FILE_DIR:gittyup>)
2727

2828
if(APPLE)
2929
set_target_properties(
30-
relauncher PROPERTIES INSTALL_RPATH
31-
"/usr/local/qt;@loader_path/../Frameworks")
30+
gittyup-relauncher PROPERTIES INSTALL_RPATH
31+
"/usr/local/qt;@loader_path/../Frameworks")
3232
elseif(UNIX)
33-
set_target_properties(relauncher PROPERTIES INSTALL_RPATH "$ORIGIN")
33+
set_target_properties(gittyup-relauncher PROPERTIES INSTALL_RPATH "$ORIGIN")
3434

3535
install(
36-
TARGETS relauncher
36+
TARGETS gittyup-relauncher
3737
DESTINATION ${CMAKE_INSTALL_BINDIR}
3838
COMPONENT ${GITTYUP_NAME})
3939
endif()

src/update/Updater.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ bool Updater::install(const DownloadRef &download, QString &error) {
338338
}
339339
p->deleteLater();
340340

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

344344
// Start the relaunch helper.
@@ -365,7 +365,8 @@ bool Updater::install(const DownloadRef &download, QString &error) {
365365
// Start the relaunch helper.
366366
QString app = QCoreApplication::applicationFilePath();
367367
QString pid = QString::number(QCoreApplication::applicationPid());
368-
if (!QProcess::startDetached(dir.filePath("relauncher"), {app, pid})) {
368+
if (!QProcess::startDetached(dir.filePath("gittyup-relauncher"),
369+
{app, pid})) {
369370
error = tr("Helper application failed to start");
370371
return false;
371372
}

src/update/Updater_mac.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ QString mountPoint() const
113113
QDir dir(QCoreApplication::applicationDirPath());
114114
QString app = QCoreApplication::applicationFilePath();
115115
QString pid = QString::number(QCoreApplication::applicationPid());
116-
if (!QProcess::startDetached(dir.filePath("relauncher"), {app, pid})) {
116+
if (!QProcess::startDetached(dir.filePath("gittyup-relauncher"), {app, pid})) {
117117
error = tr("Helper application failed to start");
118118
return false;
119119
}

0 commit comments

Comments
 (0)