mirror of https://github.com/odrling/Aegisub
Add a script to generate an AppImage from aegisub
This commit is contained in:
parent
25f851be7d
commit
e90e3aa5da
|
@ -12,15 +12,19 @@ tests/*.json
|
||||||
tools/osx-bundle.sed
|
tools/osx-bundle.sed
|
||||||
tools/repack-thes-dict
|
tools/repack-thes-dict
|
||||||
tools/repack-thes-dict.dSYM
|
tools/repack-thes-dict.dSYM
|
||||||
|
*.AppImage
|
||||||
|
|
||||||
# IDE-specific
|
# IDE-specific
|
||||||
.nuget
|
.nuget
|
||||||
.vs
|
.vs
|
||||||
.kdev4/
|
.kdev4/
|
||||||
*.kdev4
|
*.kdev4
|
||||||
|
cscope.files
|
||||||
|
tags
|
||||||
|
|
||||||
# Platform-specific
|
# Platform-specific
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
AppImage
|
||||||
|
|
||||||
# Meson
|
# Meson
|
||||||
build*/
|
build*/
|
||||||
|
@ -37,8 +41,6 @@ subprojects/ffmpeg
|
||||||
subprojects/ffms2*
|
subprojects/ffms2*
|
||||||
subprojects/boost*
|
subprojects/boost*
|
||||||
|
|
||||||
# Build and tag files
|
# Build files
|
||||||
cscope.files
|
|
||||||
git_version.h
|
git_version.h
|
||||||
git_version.xml
|
git_version.xml
|
||||||
tags
|
|
||||||
|
|
|
@ -293,7 +293,7 @@ bool AegisubApp::OnInit() {
|
||||||
|
|
||||||
// Open main frame
|
// Open main frame
|
||||||
StartupLog("Create main window");
|
StartupLog("Create main window");
|
||||||
NewProjectContext();
|
NewProjectContext(); // XXX Criticals and errors generated on `Show();`, a widget has a width of -17 (GtkSpinButton)
|
||||||
|
|
||||||
// Version checker
|
// Version checker
|
||||||
StartupLog("Possibly perform automatic updates check");
|
StartupLog("Possibly perform automatic updates check");
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
URL_APPIMAGETOOL="https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-`arch`.AppImage"
|
||||||
|
URL_LINUXDEPLOY="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-`arch`.AppImage"
|
||||||
|
|
||||||
|
APPIMAGETOOL="tools/appimagetool-`arch`.AppImage"
|
||||||
|
LINUXDEPLOY="tools/linuxdeploy-`arch`.AppImage"
|
||||||
|
|
||||||
|
echo "You will need patchelf and wget." \
|
||||||
|
"The linuxdeploy and appimagetool dependencies will be downloaded." \
|
||||||
|
"Aegisub also needs to be in your path."
|
||||||
|
|
||||||
|
WGET=`which wget 2>/dev/null`
|
||||||
|
[ $? -ne 0 ] && exit 1
|
||||||
|
echo "wget: $WGET"
|
||||||
|
|
||||||
|
PATCHELF=`which patchelf 2>/dev/null`
|
||||||
|
[ $? -ne 0 ] && exit 1
|
||||||
|
echo "patchelf: $PATCHELF"
|
||||||
|
|
||||||
|
AEGISUB=`which aegisub 2>/dev/null`
|
||||||
|
[ $? -ne 0 ] && exit 1
|
||||||
|
echo "Aegisub: $AEGISUB"
|
||||||
|
|
||||||
|
# DL
|
||||||
|
[ -e "$APPIMAGETOOL" ] || { wget "$URL_APPIMAGETOOL" -O "$APPIMAGETOOL" || exit 1; }
|
||||||
|
[ -e "$LINUXDEPLOY" ] || { wget "$URL_LINUXDEPLOY" -O "$LINUXDEPLOY" || exit 1; }
|
||||||
|
|
||||||
|
chmod +x "$APPIMAGETOOL" "$LINUXDEPLOY"
|
||||||
|
|
||||||
|
# Setup & deploy
|
||||||
|
[ -d "AppImage/Aegisub" ] || { mkdir -p "AppImage/Aegisub" || exit 1; }
|
||||||
|
cp packages/desktop/aegisub.desktop.template.in AppImage/aegisub.desktop || exit 1;
|
||||||
|
cp packages/desktop/64x64.png AppImage/aegisub.png || exit 1;
|
||||||
|
sed -i -e 's/@AEGISUB_COMMAND@/aegisub/g' AppImage/aegisub.desktop || exit 1;
|
||||||
|
$LINUXDEPLOY \
|
||||||
|
--appdir AppImage/Aegisub \
|
||||||
|
--icon-file AppImage/aegisub.png \
|
||||||
|
--desktop-file AppImage/aegisub.desktop \
|
||||||
|
--executable "$AEGISUB" || exit 1;
|
||||||
|
$APPIMAGETOOL AppImage/Aegisub
|
Loading…
Reference in New Issue