Skip to content

Commit 30ac62f

Browse files
committed
package & install path fix
1 parent e847a08 commit 30ac62f

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,8 @@ if(TARGET_OS STREQUAL "windows")
18441844
endif()
18451845

18461846
if(NOT DEV)
1847-
install(DIRECTORY ${PROJECT_BINARY_DIR}/data DESTINATION share/${PROJECT_NAME} COMPONENT data)
1847+
install(DIRECTORY ${CPACK_DIRS} DESTINATION share/${PROJECT_NAME} COMPONENT data)
1848+
install(FILES ${CPACK_FILES} DESTINATION share/${PROJECT_NAME} COMPONENT data)
18481849

18491850
set(EXTRA_ARGS DESTINATION . COMPONENT portable EXCLUDE_FROM_ALL)
18501851
install(TARGETS ${CPACK_TARGETS} ${EXTRA_ARGS})
@@ -1864,8 +1865,7 @@ if(NOT DEV)
18641865
MACOSX_BUNDLE_ICON_FILE "${PROJECT_SOURCE_DIR}/other/icons/${TARGET_SERVER}.icns"
18651866
)
18661867
else()
1867-
install(TARGETS ${TARGET_CLIENT} DESTINATION . COMPONENT Runtime)
1868-
install(TARGETS ${TARGET_SERVER} DESTINATION . COMPONENT Runtime)
1868+
install(TARGETS ${CPACK_TARGETS} DESTINATION bin COMPONENT Runtime)
18691869
endif()
18701870

18711871
set(FIXUP_BUNDLE_SCRIPT "${CMAKE_BINARY_DIR}/.install_deps.cmake")

src/engine/shared/storage.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,13 @@ class CStorage : public IStorage
262262
// 4) check for all default locations
263263
{
264264
const char *aDirs[] = {
265+
"/usr/share/teeworlds-archive/data",
266+
"/usr/share/games/teeworlds-archive/data",
267+
"/usr/local/share/teeworlds-archive/data",
268+
"/usr/local/share/games/teeworlds-archive/data",
269+
"/usr/pkg/share/teeworlds-archive/data",
270+
"/usr/pkg/share/games/teeworlds-archive/data",
271+
"/opt/teeworlds-archive/data",
265272
"/usr/share/teeworlds/data",
266273
"/usr/share/games/teeworlds/data",
267274
"/usr/local/share/teeworlds/data",

0 commit comments

Comments
 (0)