diff options
author | Maxime Schmitt <maxime.schmitt91@gmail.com> | 2024-02-24 15:18:41 +0100 |
---|---|---|
committer | Maxime Schmitt <maxime.schmitt91@gmail.com> | 2024-02-24 15:18:41 +0100 |
commit | 3a69c2d060298cd6f92cb09db944eded98be1c23 (patch) | |
tree | a87468cde60242b9094b0e75871ca951f14be11a | |
parent | 7906a062c76f498cbfeea5b312ee1baa765f56d2 (diff) |
AppImage build instruction & script
-rw-r--r-- | AppImage/README.md | 8 | ||||
-rwxr-xr-x | AppImage/make_appimage.sh | 27 | ||||
-rwxr-xr-x | AppImage/make_appimage_ubuntu_1804_docker.sh | 45 |
3 files changed, 30 insertions, 50 deletions
diff --git a/AppImage/README.md b/AppImage/README.md new file mode 100644 index 0000000..7d2a2b1 --- /dev/null +++ b/AppImage/README.md @@ -0,0 +1,8 @@ +# Build the AppImage + +```bash +podman pull ubuntu:18.04 +podman run --interactive --tty --rm --volume $PWD:/nvtop ubuntu:18.04 +cd nvtop +./AppImage/make_appimage.sh +```
\ No newline at end of file diff --git a/AppImage/make_appimage.sh b/AppImage/make_appimage.sh index a57bad6..63afa90 100755 --- a/AppImage/make_appimage.sh +++ b/AppImage/make_appimage.sh @@ -1,28 +1,45 @@ #!/usr/bin/env bash +install_deps() { + apt-get update + apt-get install -y gcc g++ libncurses5-dev libncursesw5-dev libdrm-dev wget file libudev-dev +} + configure_nvtop() { - cmake -S .. -B nvtop_build -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DCMAKE_INSTALL_PREFIX=/usr + cmake ../.. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DINTEL_SUPPORT=ON -DUSE_LIBUDEV_OVER_LIBSYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr } build_nvtop() { - cmake --build nvtop_build + cmake --build . } install_nvtop_AppDir() { - DESTDIR=../AppDir cmake --build nvtop_build --target install + DESTDIR=../AppDir cmake --build . --target install } get_linuxdeploy() { wget -nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage chmod u+x linuxdeploy-x86_64.AppImage + ./linuxdeploy-x86_64.AppImage --appimage-extract +} + +get_cmake() { + wget -nc https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz + tar zxf cmake-3.18.0.tar.gz + ./cmake-3.18.0/bootstrap --prefix=/usr && make && make install } create_AppImage() { + install_deps + get_cmake + mkdir nvtop_build + cd nvtop_build configure_nvtop build_nvtop install_nvtop_AppDir + cd .. get_linuxdeploy - ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage + ./squashfs-root/AppRun --appdir AppDir --output appimage --exclude-library="*udev*" } -create_AppImage
\ No newline at end of file +create_AppImage diff --git a/AppImage/make_appimage_ubuntu_1804_docker.sh b/AppImage/make_appimage_ubuntu_1804_docker.sh deleted file mode 100755 index 63afa90..0000000 --- a/AppImage/make_appimage_ubuntu_1804_docker.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -install_deps() { - apt-get update - apt-get install -y gcc g++ libncurses5-dev libncursesw5-dev libdrm-dev wget file libudev-dev -} - -configure_nvtop() { - cmake ../.. -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON -DINTEL_SUPPORT=ON -DUSE_LIBUDEV_OVER_LIBSYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr -} - -build_nvtop() { - cmake --build . -} - -install_nvtop_AppDir() { - DESTDIR=../AppDir cmake --build . --target install -} - -get_linuxdeploy() { - wget -nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage - chmod u+x linuxdeploy-x86_64.AppImage - ./linuxdeploy-x86_64.AppImage --appimage-extract -} - -get_cmake() { - wget -nc https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0.tar.gz - tar zxf cmake-3.18.0.tar.gz - ./cmake-3.18.0/bootstrap --prefix=/usr && make && make install -} - -create_AppImage() { - install_deps - get_cmake - mkdir nvtop_build - cd nvtop_build - configure_nvtop - build_nvtop - install_nvtop_AppDir - cd .. - get_linuxdeploy - ./squashfs-root/AppRun --appdir AppDir --output appimage --exclude-library="*udev*" -} - -create_AppImage |