Skip to content

JayTwoLab/hello-world-app-image

Repository files navigation

hello-world-app-image

English

  • Rocky Linux 8.10 x64 CLI 환경에서 CMake C++ 프로젝트를 .AppImage로 만드는 압축 요약본입니다.

1. 필수 도구 설치

  • Rocky/Redhat
sudo dnf groupinstall "Development Tools" -y
sudo dnf install cmake wget fuse fuse-libs desktop-file-utils ImageMagick -y
  • Ubuntu
sudo apt update 
sudo apt install build-essential cmake wget fuse desktop-file-utils imagemagick -y

2. 프로젝트 필수 파일 준비

  • CMakeLists.txt: 하단에 install(TARGETS 프로그램명 DESTINATION bin) 필수 포함.
  • myapp.desktop: 메타데이터 파일 (Terminal=true 설정).
  • myapp.png: 올바른 포맷의 아이콘 생성.
convert -size 128x128 xc:blue myapp.png

3. 패키징 도구 다운로드

wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage

chmod +x linuxdeploy-x86_64.AppImage

4. 빌드 및 설치 (AppDir 생성)

mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install DESTDIR=../AppDir
cd ..

5. AppImage 최종 생성

export APPIMAGE_EXTRACT_AND_RUN=1

./linuxdeploy-x86_64.AppImage \
  --appdir AppDir \
  --output appimage \
  --desktop-file myapp.desktop \
  --icon-file myapp.png
  • 완료되면 현재 디렉토리에 실행 가능한 MyCliApp-x86_64.AppImage 파일이 생성됩니다.
./MyCliApp-x86_64.AppImage

Hello from Rocky Linux 8 AppImage!

About

Hello world for .AppImage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors