Skip to content

Commit ad6de6e

Browse files
author
Kasper Peeters
committed
Actually configure for appimage when we build it.
1 parent 580a63c commit ad6de6e

File tree

3 files changed

+16
-66
lines changed

3 files changed

+16
-66
lines changed

.github/workflows/appimage-modern.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ jobs:
182182
cmake -DCMAKE_INSTALL_PREFIX=/usr \
183183
-DCMAKE_BUILD_TYPE=Release \
184184
-DENABLE_MATHEMATICA=OFF \
185+
-DAPPIMAGE_MODE=ON \
185186
..
186187
187188
VERSION=\$(cat /workspace/build/VERSION)

CMakeLists.txt

Lines changed: 9 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -625,66 +625,15 @@ add_custom_target(uninstall
625625
# Provide target to build AppImage.
626626
#---------------------------------------------------------------------------
627627

628-
if(APPIMAGE_MODE)
629-
# We need linuxdeploy to create the AppImage. It is best to have this built
630-
# from source and installed locally. Make sure to first install deps by doing
631-
#
632-
# sudo apt install libcimg-dev libgtest-dev
633-
#
634-
# Then checkout appimagetool, linuxdeploy, linuxdeploy-plugin-appimage using
635-
#
636-
# git clone https://github.com/AppImage/appimagetool.git --recurse-submodules
637-
# git clone https://github.com/linuxdeploy/linuxdeploy.git --recurse-submodules
638-
# git clone https://github.com/linuxdeploy/linuxdeploy-plugin-appimage.git --recurse-submodules
639-
#
640-
# Do *not* forget the `--recurse-submodules` flag!
641-
#
642-
# Build `appimagetool` as usual, and for the other two use
643-
#
644-
# cd linuxdeploy && mkdir build && cd build
645-
# cmake -DBUILD_TESTING=OFF ..
646-
# make && sudo make install
647-
#
648-
# and ditto for the plugin,
649-
#
650-
# cd linuxdeploy && mkdir build && cd build
651-
# cmake -DBUILD_TESTING=OFF ..
652-
# make && sudo make install
653-
#
654-
# If you do not have it locally, the configure process will download an
655-
# AppImage for linuxdeploy, but this does *not* run inside a QEMU container.
656-
657-
print_header("Configuring AppImage build")
658-
find_program(LINUXDEPLOY linuxdeploy "${CMAKE_BINARY_DIR}")
659-
set(DEPLOY linuxdeploy-${CMAKE_SYSTEM_PROCESSOR}.AppImage)
660-
set(DEPLOY_URL https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/${DEPLOY})
661-
set(DEPLOY_GTK_URL https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh)
662-
if(${LINUXDEPLOY} MATCHES "LINUXDEPLOY-NOTFOUND")
663-
message(STATUS "The 'linuxdeploy' binary is not present, downloading one")
664-
message(STATUS "Generating AppImage using ${DEPLOY_URL}")
665-
if(NOT EXISTS "linuxdeploy")
666-
message(STATUS "Downloading...")
667-
file(DOWNLOAD ${DEPLOY_URL} ${CMAKE_BINARY_DIR}/linuxdeploy)
668-
execute_process(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/linuxdeploy)
669-
endif()
670-
set(LINUXDEPLOY ${CMAKE_BINARY_DIR}/linuxdeploy)
671-
else()
672-
message(STATUS "Found linuxdeploy at ${LINUXDEPLOY}")
673-
endif()
674-
if(NOT EXISTS "linuxdeploy-plugin-gtk.sh")
675-
file(DOWNLOAD ${DEPLOY_GTK_URL} ${CMAKE_BINARY_DIR}/linuxdeploy-plugin-gtk.sh)
676-
execute_process(COMMAND chmod u+x ${CMAKE_BINARY_DIR}/linuxdeploy-plugin-gtk.sh)
677-
endif()
678-
add_custom_target(appimage
679-
COMMAND mkdir -p AppDir/${Python_SITELIB}
680-
COMMAND cp -a ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/
681-
COMMAND chmod gou+x ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/AppRun
682-
COMMAND cp -a ${Python_SITELIB}/setuptools AppDir/${Python_SITELIB}/
683-
COMMAND cp -a ${Python_STDARCH}/* AppDir/${Python_STDARCH}/
684-
COMMAND ${LINUXDEPLOY} --appdir AppDir --plugin gtk --desktop-file AppDir/usr/share/applications/science.cadabra.cadabra2-gtk.desktop --output appimage
685-
COMMAND mv Cadabra_2-${CMAKE_SYSTEM_PROCESSOR}.AppImage Cadabra_${CADABRA_VERSION_SEM}_${CMAKE_SYSTEM_PROCESSOR}.AppImage
686-
)
687-
endif()
628+
# if(APPIMAGE_MODE)
629+
# add_custom_target(appimage
630+
# COMMAND mkdir -p AppDir/${Python_SITELIB}
631+
# COMMAND cp -a ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/
632+
# COMMAND chmod gou+x ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/AppRun
633+
# COMMAND cp -a ${Python_SITELIB}/setuptools AppDir/${Python_SITELIB}/
634+
# COMMAND cp -a ${Python_STDARCH}/* AppDir/${Python_STDARCH}/
635+
# )
636+
# endif()
688637

689638
if(WIN32)
690639
add_custom_target(windows-installer

core/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,9 +639,9 @@ if(NOT WIN32)
639639
)
640640
endif()
641641

642-
if(APPIMAGE_MODE)
643-
# Install sympy. Matplotlib would be nice, but that pulls in blas and fortran and zillions of other things,
644-
# which then don't link properly anymore either.
645-
install(CODE "execute_process(COMMAND echo \"Installing python things in \$ENV{DESTDIR}|${CMAKE_INSTALL_PREFIX}|${PYTHON_SITE_PATH}\")")
646-
install(CODE "execute_process(COMMAND pip3 install --target \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH} sympy matplotlib)")
647-
endif()
642+
# if(APPIMAGE_MODE)
643+
# # Install sympy. Matplotlib would be nice, but that pulls in blas and fortran and zillions of other things,
644+
# # which then don't link properly anymore either.
645+
# install(CODE "execute_process(COMMAND echo \"Installing python things in \$ENV{DESTDIR}|${CMAKE_INSTALL_PREFIX}|${PYTHON_SITE_PATH}\")")
646+
# install(CODE "execute_process(COMMAND pip3 install --target \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH} sympy matplotlib)")
647+
# endif()

0 commit comments

Comments
 (0)