Changeset - r24738:fcbbb366d074
[Not reviewed]
master
0 3 1
Owen Rudge - 4 years ago 2021-01-30 09:36:20
owen@owenrudge.net
Change: Convert .md to .rtf for Windows/Mac packages
4 files changed with 27 insertions and 1 deletions:
0 comments (0 inline, 0 general)
.github/workflows/release.yml
Show inline comments
 
@@ -458,12 +458,19 @@ jobs:
 
        name: internal-source
 

	
 
    - name: Unpack source
 
      run: |
 
        tar -xf source.tar.gz --strip-components=1
 

	
 
    - name: Install dependencies
 
      env:
 
        HOMEBREW_NO_AUTO_UPDATE: 1
 
        HOMEBREW_NO_INSTALL_CLEANUP: 1
 
      run: |
 
        brew install pandoc
 

	
 
    # The following step can be removed when the build VM is updated with a revision of
 
    # vcpkg dating from roughly 01/01/2021 or later. At that point, `doNotUpdateVcpkg`
 
    # can be set to `true` and the `vcpkgGitCommitId` can be removed.
 
    - name: Update vcpkg
 
      run: |
 
        cd /usr/local/share/vcpkg
 
@@ -635,12 +642,17 @@ jobs:
 

	
 
    - name: Unpack source
 
      shell: bash
 
      run: |
 
        tar -xf source.tar.gz --strip-components=1
 

	
 
    - name: Install dependencies
 
      shell: bash
 
      run: |
 
        choco install pandoc
 

	
 
    # "restore-cache" which is done by "run-vcpkg" uses Windows tar.
 
    # A git clone on windows marks a few files as read-only; when Windows tar
 
    # tries to extract the cache over this folder, it fails, despite the files
 
    # being identical. This failure shows up as an warning in the logs. We
 
    # avoid this by simply removing the read-only mark from the git folder.
 
    # In other words: this is a hack!
CMakeLists.txt
Show inline comments
 
@@ -334,7 +334,11 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 
    add_definitions(-D_SQ64)
 
endif()
 

	
 
include(CreateRegression)
 
create_regression()
 

	
 
if(APPLE OR WIN32)
 
    find_package(Pandoc)
 
endif()
 

	
 
include(InstallAndPackage)
cmake/FindPandoc.cmake
Show inline comments
 
new file 100644
 
if(NOT EXISTS ${PANDOC_EXECUTABLE})
 
    find_program(PANDOC_EXECUTABLE pandoc)
 
endif()
cmake/InstallAndPackage.cmake
Show inline comments
 
@@ -92,13 +92,20 @@ set(CPACK_PACKAGE_VENDOR "OpenTTD")
 
set(CPACK_PACKAGE_DESCRIPTION "OpenTTD")
 
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenTTD")
 
set(CPACK_PACKAGE_HOMEPAGE_URL "https://www.openttd.org/")
 
set(CPACK_PACKAGE_CONTACT "OpenTTD <info@openttd.org>")
 
set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenTTD")
 
set(CPACK_PACKAGE_CHECKSUM "SHA256")
 
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.md")
 

	
 
if((APPLE OR WIN32) AND EXISTS ${PANDOC_EXECUTABLE})
 
    execute_process(COMMAND ${PANDOC_EXECUTABLE} "${CMAKE_SOURCE_DIR}/COPYING.md" -s -o "${CMAKE_BINARY_DIR}/COPYING.rtf")
 
    set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/COPYING.rtf")
 
else()
 
    set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.md")
 
endif()
 

	
 
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
 
set(CPACK_MONOLITHIC_INSTALL YES)
 
set(CPACK_PACKAGE_EXECUTABLES "openttd;OpenTTD")
 
set(CPACK_STRIP_FILES YES)
 
set(CPACK_OUTPUT_FILE_PREFIX "bundles")
 

	
0 comments (0 inline, 0 general)