Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 02edd8ed rédigé par Kubat's avatar Kubat
Parcourir les fichiers

[build] Use linuxdeploy to create the AddDir and try to make an AppImage that works well...

parent 08ca836a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!2Rework build process
...@@ -68,8 +68,7 @@ packages/desktop/aegisub.desktop ...@@ -68,8 +68,7 @@ packages/desktop/aegisub.desktop
packages/desktop/aegisub.desktop.template packages/desktop/aegisub.desktop.template
packages/win_installer/vendor packages/win_installer/vendor
src/aegisub src/aegisub
Aegisub/aegisub Aegisub/
Aegisub/usr/bin/aegisub
src/libresrc/bitmap.cpp src/libresrc/bitmap.cpp
src/libresrc/bitmap.h src/libresrc/bitmap.h
src/libresrc/default_config.cpp src/libresrc/default_config.cpp
...@@ -79,6 +78,7 @@ svn-revision.h ...@@ -79,6 +78,7 @@ svn-revision.h
svn_revision svn_revision
tests/*.json tests/*.json
tests/run tests/run
tools/linuxdeploy
tools/osx-bundle-restart-helper tools/osx-bundle-restart-helper
tools/osx-bundle.sed tools/osx-bundle.sed
tools/repack-thes-dict tools/repack-thes-dict
......
#!/bin/sh
HERE=$(dirname $(readlink -f "$0"))
export LC_ALL="en_US.UTF-8"
export LD_LIBRARY_PATH="$HERE/usr/lib"
EXEC=$(grep -e '^Exec=.*' "$HERE"/*.desktop | head -n 1 | cut -d "=" -f 2 | cut -d " " -f 1)
ldd $(which $EXEC)
export PATH="$HERE/usr/bin"
exec $EXEC $@
Aegisub/aegisub-icon.png

4,91 ko

...@@ -138,3 +138,9 @@ BIN_ECHO = echo ...@@ -138,3 +138,9 @@ BIN_ECHO = echo
BIN_TOUCH = touch BIN_TOUCH = touch
BIN_LUA = @LUA@ BIN_LUA = @LUA@
BIN_WX_CONFIG = @WX_CONFIG_PATH@ BIN_WX_CONFIG = @WX_CONFIG_PATH@
################
# APPIMAGE TOOLS
################
TOOL_LINUXDEPLOY = $(TOM)tools/linuxdeploy
TOOL_APPIMAGE = $(TOP)tools/appimagetool.AppImage
...@@ -95,10 +95,9 @@ style: ...@@ -95,10 +95,9 @@ style:
tags: tags:
./tools/tags.bash ./tools/tags.bash
appimage: src/aegisub appimage: src/aegisub packages/desktop/Aegisub.desktop packages/desktop/aegisub.png
cp $^ Aegisub/usr/bin/aegisub $(TOOL_LINUXDEPLOY) --appdir Aegisub --desktop-file packages/desktop/Aegisub.desktop --icon-file packages/desktop/aegisub.png --executable src/aegisub
./tools/copy-libs.lua Aegisub/usr/bin/aegisub Aegisub/usr/lib $(TOOL_APPIMAGE) Aegisub
./tools/appimagetool.AppImage Aegisub
# The actual build rules # The actual build rules
.SUFFIXES: .SUFFIXES:
......
...@@ -76,9 +76,12 @@ You may also consider the following rules: ...@@ -76,9 +76,12 @@ You may also consider the following rules:
### Build an appimage ### Build an appimage
First download the appimagetool binary and save it to the [tools](tools) First, install `patchelf` (`apt install patchelf` or similar for your distro)
folder. If you don't do it manually, it will be done for you at some point by and [linuxdeploy](https://github.com/linuxdeploy/linuxdeploy). An AppImage of
the build scripts. linuxdeploy can be found [here](https://martinm.iiens.net/linuxdeploy). You
will also need to 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 ```bash
wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage \ wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage \
...@@ -94,6 +97,17 @@ make -j$(nproc) ...@@ -94,6 +97,17 @@ make -j$(nproc)
make appimage make appimage
``` ```
The command to build the AppImage is the following and is performed by the
`make appimage`:
```bash
linuxdeploy \
--appdir Aegisub \
--desktop-file packages/desktop/Aegisub.desktop \
--icon-file packages/desktop/aegisub.png \
--executable src/aegisub
```
### Windows ### Windows
Prerequisites: Prerequisites:
......
...@@ -190,15 +190,25 @@ AC_ARG_ENABLE([appimage], ...@@ -190,15 +190,25 @@ AC_ARG_ENABLE([appimage],
[AEGISUB_APPIMAGE_ENABLED=$enableval], [AEGISUB_APPIMAGE_ENABLED=$enableval],
[AEGISUB_APPIMAGE_ENABLED=no]) [AEGISUB_APPIMAGE_ENABLED=no])
AS_IF([test "x$AEGISUB_APPIMAGE_ENABLED" = "xyes"], [ AS_IF([test "x$AEGISUB_APPIMAGE_ENABLED" = "xyes"], [
# Download the AppImage creation tool, transforms the AppDir into an AppImage
AC_MSG_CHECKING([Downloading AppImage creation tool]) AC_MSG_CHECKING([Downloading AppImage creation tool])
wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-`arch`.AppImage \ wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-`arch`.AppImage -O tools/appimagetool.AppImage -o config.wget.log
-O tools/appimagetool.AppImage -o config.wget.log
chmod 00700 tools/appimagetool.AppImage chmod 00700 tools/appimagetool.AppImage
AS_IF([test $? -eq 0 ], [ AS_IF([test $? -eq 0 ], [
AC_MSG_RESULT([done]) AC_MSG_RESULT([done])
], [ ], [
AC_MSG_FAILURE([failed]) AC_MSG_FAILURE([failed])
]) ])
# Downlaod the AppDir management tool, create the AppDir
AC_MSG_CHECKING([Downloading LinuxDeploy creation tool])
wget https://martinm.iiens.net/linuxdeploy -O tools/linuxdeploy -a config.wget.log
chmod 00700 tools/linuxdeploy
AS_IF([test $? -eq 0 ], [
AC_MSG_RESULT([done])
], [
AC_MSG_FAILURE([failed])
])
], [ ], [
AC_MSG_NOTICE([Don't build with AppImage support]) AC_MSG_NOTICE([Don't build with AppImage support])
]) ])
......
...@@ -40,7 +40,8 @@ DISTCLEANFILES += \ ...@@ -40,7 +40,8 @@ DISTCLEANFILES += \
CLEANFILES += \ CLEANFILES += \
$(TOP)Aegisub/usr/bin/aegisub \ $(TOP)Aegisub/usr/bin/aegisub \
$(wildcard $(TOP)Aegisub/usr/lib/*) $(wildcard $(TOP)Aegisub/usr/lib/*) \
$(TOP)Aegisub-x86_64.AppImage \
define MKDIR_INSTALL define MKDIR_INSTALL
@$(BIN_MKDIR_P) $(dir $@) @$(BIN_MKDIR_P) $(dir $@)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Version=1.0 Version=1.0
Type=Application Type=Application
Name=Aegisub Name=Aegisub
Icon=aegisub-icon Icon=aegisub
GenericName=Subtitle Editor GenericName=Subtitle Editor
Comment=Create and edit subtitles for film and videos. Comment=Create and edit subtitles for film and videos.
Keywords=subtitles;video;audio;text Keywords=subtitles;video;audio;text
......
64x64.png
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter