Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Remove references to obsolete media download targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikogenvik committed Oct 30, 2023
1 parent 013e47e commit dbda5f0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 61 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ jobs:
mkdir -p ~/install/usr
cmake --preset $PROFILE_CONAN . -DCMAKE_INSTALL_PREFIX=~/install/usr
- name: Download media
if: runner.os != 'Windows'
shell: bash
run: cmake --build --preset $PROFILE_CONAN --target media-download

- name: Build
shell: bash
run: cmake --build --preset $PROFILE_CONAN
Expand Down
53 changes: 0 additions & 53 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,6 @@ install(FILES ${SOUND_DEFINITION_FILES} DESTINATION ${CMAKE_INSTALL_FULL_DATADIR
# man files
install(FILES docs/man/man1/ember.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)

set(MEDIA_DIR media-${MEDIA_VERSION})
set(MEDIAREPO_DIR ${PROJECT_SOURCE_DIR}/mediarepo)
set(MEDIAREPO_PROCESSED_DIR ${CMAKE_BINARY_DIR}/ember-media-${MEDIA_VERSION})

find_package(Subversion)
find_package(Python3 COMPONENTS Interpreter)
find_program(RSYNC_CMD NAMES rsync)
Expand All @@ -390,55 +386,6 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
)
endif ()

add_custom_target(media-download)
if (RSYNC_CMD)
add_custom_command(
TARGET media-download
COMMAND ${CMAKE_COMMAND} -E echo "I will now use rsync to install the media from amber.worldforge.org into ${MEDIA_DIR}."
COMMAND ${CMAKE_COMMAND} -E make_directory ${MEDIA_DIR}
COMMAND rsync -rtzu --delete amber.worldforge.org::ember-media/ember-media-${MEDIA_VERSION}/ ${MEDIA_DIR}
COMMAND ${CMAKE_COMMAND} -E echo "Copying ${MEDIA_DIR}/media to ${CMAKE_INSTALL_FULL_DATADIR}/ember/media."
COMMAND ${CMAKE_COMMAND} -E copy_directory ${MEDIA_DIR}/media ${CMAKE_INSTALL_FULL_DATADIR}/ember/media
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
)
else (RSYNC_CMD)
add_custom_command(
TARGET media-download
COMMAND ${CMAKE_COMMAND} -E echo "Could not find the Rsync command. The target 'media-download' is disabled."
)
endif (RSYNC_CMD)


add_custom_target(mediarepo-checkout)
if (Subversion_FOUND)
add_custom_command(
TARGET mediarepo-checkout
COMMAND ${CMAKE_COMMAND} -E echo "Using Subversion to checkout https://svn.worldforge.org:886/svn/media/trunk to ${MEDIAREPO_DIR}/trunk."
COMMAND ${CMAKE_COMMAND} -E make_directory ${MEDIAREPO_DIR}
COMMAND ${Subversion_SVN_EXECUTABLE} co https://svn.worldforge.org:886/svn/media/trunk ${MEDIAREPO_DIR}/trunk
)
else (Subversion_FOUND)
add_custom_command(
TARGET mediarepo-checkout
COMMAND ${CMAKE_COMMAND} -E echo "Could not find the Subversion command 'svn'. The target 'mediarepo-checkout' is disabled."
)
endif (Subversion_FOUND)

add_custom_target(mediarepo-process)
if (Python3_Interpreter_FOUND)
add_custom_command(
TARGET mediarepo-process
COMMAND ${CMAKE_COMMAND} -E echo "Processing media in ${MEDIAREPO_DIR}/trunk and placing it in ${MEDIAREPO_PROCESSED_DIR}."
COMMAND ${Python3_EXECUTABLE} ${CMAKE_BINARY_DIR}/scripts/make_dist_media.py ${MEDIAREPO_DIR}/trunk ${MEDIAREPO_PROCESSED_DIR}
)
else (Python3_Interpreter_FOUND)
add_custom_command(
TARGET mediarepo-process
COMMAND ${CMAKE_COMMAND} -E echo "Could not find the Python command 'python'. The target 'mediarepo-process' is disabled."
)
endif (Python3_Interpreter_FOUND)

# Doxygen support, exports a "dox" target.

find_package(Doxygen)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ The simplest way to install all required dependencies is by using [Conan](https:
conan remote add worldforge https://artifactory.ogenvik.org/artifactory/api/conan/conan
conan install . --build missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
cmake --preset conan-release -DCMAKE_INSTALL_PREFIX=./build/install/release
cmake --build --preset conan-release -j --target all --target install --target media-download
cmake --build --preset conan-release -j --target all --target install
```

Alternatively you can use the [Hammer](http://wiki.worldforge.org/wiki/Hammer_Script "The Hammer script") tool to
compile Ember.
This is script provided by the Worldforge project which will download and install all of the required libraries and
components used by Worldforge.

The ```make media-download``` target will fetch all of the needed media files from the net. Rsync is required.

### Tests

The test suite can be built and run using the ```check``` target. For example:
Expand Down

0 comments on commit dbda5f0

Please sign in to comment.