1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-23 17:25:54 +01:00

Generate AppImage on GitHub Actions

Fixes #695. Supersedes #172. See https://appimage.org/.
This commit is contained in:
Peter Jonas
2021-06-16 15:19:48 +01:00
parent 2e0e3b4162
commit de2213ea2c
12 changed files with 542 additions and 13 deletions

View File

@@ -0,0 +1,27 @@
if(CPACK_EXTERNAL_ENABLE_STAGING)
set(appdir "${CPACK_TEMPORARY_DIRECTORY}")
else()
set(appdir "${CPACK_INSTALL_PREFIX}")
endif()
set(appimage "${CPACK_PACKAGE_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.AppImage")
set(CPACK_EXTERNAL_BUILT_PACKAGES "${appimage}")
if(DEFINED CPACK_AUDACITY_APPIMAGE_UPDATE_INFO)
set(ENV{AUDACITY_UPDATE_INFO} "${CPACK_AUDACITY_APPIMAGE_UPDATE_INFO}")
list(APPEND CPACK_EXTERNAL_BUILT_PACKAGES "${appimage}.zsync")
endif()
configure_file("${CPACK_AUDACITY_SOURCE_DIR}/linux/AppRun.sh" "${appdir}/AppRun" ESCAPE_QUOTES @ONLY)
configure_file("${CPACK_AUDACITY_SOURCE_DIR}/linux/check_dependencies.sh" "${appdir}/bin/check_dependencies" ESCAPE_QUOTES @ONLY)
configure_file("${CPACK_AUDACITY_SOURCE_DIR}/linux/ldd_recursive.pl" "${appdir}/bin/ldd_recursive" COPYONLY)
execute_process(
COMMAND "linux/create_appimage.sh" "${appdir}" "${appimage}"
WORKING_DIRECTORY "${CPACK_AUDACITY_SOURCE_DIR}"
RESULT_VARIABLE exit_status
)
if(NOT "${exit_status}" EQUAL "0")
message(FATAL_ERROR "Could not create AppImage. See output above for details.")
endif()