Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add AppImage format build. #867

Closed
gavriva opened this issue Apr 2, 2017 · 7 comments
Closed

Please add AppImage format build. #867

gavriva opened this issue Apr 2, 2017 · 7 comments

Comments

@gavriva
Copy link

gavriva commented Apr 2, 2017

Hi,

I have been playing with terminix(tilix) for some time, tried some modifications, but each time it was a pain.
Just difficult to have several version of gsettings schema or resources. So I decided to pack it into AppImage.

http://appimage.org/

Below my simply script to create AppImage, I think it is better than use sudo ./install.sh during development at least.

#!/usr/bin/env bash

if [ ! -f tilix ]; then
    echo "The tilix executable does not exist, please run 'dub build --build=release' before using this script"
    exit 1
fi

if [ ! -f appimagetool-x86_64.AppImage ]; then
    wget https://github.com/probonopd/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
    chmod +x appimagetool-x86_64.AppImage
fi

# Check availability of required commands
COMMANDS="glib-compile-schemas glib-compile-resources msgfmt desktop-file-validate xdg-desktop-menu gtk-update-icon-cache gdk-pixbuf-pixdata"
PACKAGES="coreutils glib2 glib2 gettext desktop-file-utils xdg-utils gtk-update-icon-cache"
i=0
for COMMAND in $COMMANDS; do
    type $COMMAND >/dev/null 2>&1 || {
        j=0
        for PACKAGE in $PACKAGES; do
            if [ $i = $j ]; then
                break
            fi
            j=$(( $j + 1 ))
        done
        echo "Your system is missing command $COMMAND, please install $PACKAGE"
        exit 1
    }
    i=$(( $i + 1 ))
done


rm -rf tilix.app
mkdir -p tilix.app

echo "Copying and compiling schema..."
cp data/gsettings/com.gexperts.Tilix.gschema.xml tilix.app/
glib-compile-schemas tilix.app/

echo "Building and copy resources..."
cd data/resources
glib-compile-resources tilix.gresource.xml
cd -
mkdir -p tilix.app/data/tilix/resources
cp data/resources/tilix.gresource tilix.app/data/tilix/resources

mkdir -p tilix.app/data

#echo "Copying scripts..."
#cp -r data/scripts tilix.app/data

echo "Copying color schemes..."
mkdir -p tilix.app/data/tilix/schemes
cp -r data/schemes tilix.app/data/tilix

# Compile po files
echo "Copying and installing localization files"
for f in po/*.po; do
    echo "Processing $f"
    LOCALE=$(basename "$f" .po)
    msgfmt $f -o "${LOCALE}.mo"
    mkdir -p tilix.app/data/locale/${LOCALE}/LC_MESSAGES
    cp "${LOCALE}.mo" tilix.app/data/locale/${LOCALE}/LC_MESSAGES/tilix.mo
    rm -f "${LOCALE}.mo"
done

echo "#!/bin/sh
export GSETTINGS_SCHEMA_DIR=\$APPDIR
export XDG_DATA_DIRS=\${XDG_DATA_DIRS}:\$APPDIR/data
exec \$APPDIR/tilix \$@
" >tilix.app/AppRun
chmod 0555 tilix.app/AppRun

# Generate desktop file
msgfmt --desktop --template=data/pkg/desktop/com.gexperts.Tilix.desktop.in -d po -o tilix.app/tilix.desktop
if [ $? -ne 0 ]; then
    echo "Note that localizating appdata requires a newer version of xgettext, copying instead"
    cp data/pkg/desktop/com.gexperts.Tilix.desktop.in tilix.app/tilix.desktop
fi

#desktop-file-validate tilix.app/tilix.desktop

echo "Copy icon"
cp data/icons/hicolor/48x48/apps/com.gexperts.Tilix.png tilix.app/

cp tilix tilix.app/

./appimagetool-x86_64.AppImage tilix.app tilix.AppImage
@probonopd
Copy link

Thank you. By the way, also see #25

@gnunn1
Copy link
Owner

gnunn1 commented Apr 2, 2017

As I stated in #25, I don't have any interest in maintaining an appimage for tilix. Having said that, if you want to submit this script as a PR in an experimental/appimage folder I'd be fine with taking it there.

@bilelmoussaoui
Copy link
Contributor

@gnunn1 I think it's possible to create the AppImage automatically using travis! at least that's whaty the electron apps guys do

@probonopd
Copy link

Yes, sure, a lot of applications automatically build and upload AppImages using Travis CI.

@gnunn1
Copy link
Owner

gnunn1 commented Apr 2, 2017

@bil-elmoussaoui that would be fine as well, however the use case here is using an appimage for local development which would need a script.

I just want it clear that I'm not supporting appimage officially in the sense I will hunt down bugs specific to it. Basically the same stance I take with KDE, i3, etc or package specific issues.

@gnunn1
Copy link
Owner

gnunn1 commented Apr 2, 2017

Fixed sentence to read "I'm not officially supporting appimage..."

@gnunn1 gnunn1 closed this as completed Apr 3, 2017
@muzzol
Copy link

muzzol commented Aug 5, 2022

reviving this issue to ask if devs have changed their mind around it.

AppImage is a great format for systems where user can't install anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants