Skip to content

Commit a417914

Browse files
committed
Use remote version of appimagetool
1 parent 985c927 commit a417914

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tests/data/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
message(STATUS "Generating test data AppImage")
22

3+
# Get appimagetool
4+
set(APPIMAGETOOL_BIN ${CMAKE_CURRENT_BINARY_DIR}/appimagetool)
5+
if(NOT EXISTS ${APPIMAGETOOL_BIN})
6+
message(STATUS "Downloading appimagetool for ${CMAKE_SYSTEM_PROCESSOR}")
7+
file(DOWNLOAD "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${CMAKE_SYSTEM_PROCESSOR}.AppImage" "${APPIMAGETOOL_BIN}" SHOW_PROGRESS)
8+
execute_process(COMMAND chmod +x ${APPIMAGETOOL_BIN})
9+
endif()
10+
message(STATUS "Using appimagetool: ${APPIMAGETOOL_BIN}")
11+
312
# Generate Echo AppImage with custom mime type package
413
set(APPIMAGE_NAME "echo.with.mimetype")
514
set(TARGET_APPDIR ${CMAKE_CURRENT_BINARY_DIR}/${APPIMAGE_NAME}.AppDir)
@@ -15,7 +24,5 @@ if(NOT EXISTS ${TARGET_APPDIR})
1524
file(COPY squashfs-root/usr DESTINATION ${TARGET_APPDIR})
1625

1726
message(STATUS "Creating ${APPIMAGE_NAME} AppImage")
18-
execute_process(
19-
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/appimagetool-x86_64.AppImage ${TARGET_APPDIR}
20-
${CMAKE_CURRENT_BINARY_DIR}/${APPIMAGE_NAME}.AppImage)
27+
execute_process(COMMAND ${APPIMAGETOOL_BIN} ${TARGET_APPDIR} ${CMAKE_CURRENT_BINARY_DIR}/${APPIMAGE_NAME}.AppImage)
2128
endif()

tests/data/squashfs-root/echo.desktop.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ Comment=Just echo.
77
Exec=echo %F
88
Icon=utilities-terminal
99
X-AppImage-Version=1234
10+
Categories=Utility;

0 commit comments

Comments
 (0)