From 24367ef90681594e854559e93b7fa429a867686f Mon Sep 17 00:00:00 2001 From: Kubat <mael.martin31@gmail.com> Date: Tue, 20 Oct 2020 17:03:54 +0200 Subject: [PATCH] [misc] Update documentation to build aegisub as an AppImage Also add the --enable-appimage that will download the appimage creation tool --- .gitignore | 1 + README.md | 23 +++++++++++++++++++++++ appimage/.gitkeep | 0 configure.ac | 20 ++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 appimage/.gitkeep diff --git a/.gitignore b/.gitignore index a72e0bd5b..75b7f9586 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.App +*.AppImage *.[oadi] *.ass *.avi diff --git a/README.md b/README.md index 02d724023..499266b09 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,15 @@ On debian buster, the packages are the following: - libboost-thread-dev - astyle +### Build the binary + Once all the dependencies are installed, run: ```bash autoreconf ./configure --enable-debug --with-libpulse make -j$(nproc) +make install ``` You may also consider the following rules: @@ -71,6 +74,26 @@ You may also consider the following rules: - `make tags` to build the ctags and cscope databases - `make style` to format your code with the right style +### Build an appimage + +First download the appimagetool binary and save it to the [tools](tools) +folder. If you don't do it manually, it will be done for you at some point by +the build scripts. + +```bash +wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage \ + -O tools/appimagetool.AppImage +``` + +Then, build normally aegisub, but with the appimage options: + +```bash +autoreconf +./configure --enable-debug --with-libpulse --enable-appimage +make -j$(nproc) +make appimage +``` + ### Windows Prerequisites: diff --git a/appimage/.gitkeep b/appimage/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/configure.ac b/configure.ac index 2c1e2d9f5..cc202d8ea 100644 --- a/configure.ac +++ b/configure.ac @@ -182,6 +182,26 @@ AC_CHECK_HEADERS([sys/time.h]) AC_ARG_ENABLE(sanity-checks, AS_HELP_STRING([--disable-sanity-checks],[Skip verifying that found libraries work.])) +############################# +# Build with appimage support +############################# +AC_ARG_ENABLE([appimage], + [AS_HELP_STRING([--enable-appimage], [Build Aegisub as an AppImage. Defaults to no])], + [AEGISUB_APPIMAGE_ENABLED=$enableval], + [AEGISUB_APPIMAGE_ENABLED=no]) +AS_IF([test "x$AEGISUB_APPIMAGE_ENABLED" = "xyes"], [ + AC_MSG_CHECKING([Downloading AppImage creation tool]) + wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage \ + -O tools/appimagetool.AppImage -o config.wget.log + AS_IF([test $? -eq 0 ], [ + AC_MSG_RESULT([done]) + ], [ + AC_MSG_FAILURE([failed]) + ]) +], [ + AC_MSG_NOTICE([Don't build with AppImage support]) +]) + ############################## # Program Support and Features ############################## -- GitLab