Use the kiwix.desktop file and the icon in the kiwix-desktop sources.
No need anymore to generate one or take a random image.
This commit is contained in:
parent
2024dae4c8
commit
0d3ea8eaa5
|
@ -3,10 +3,12 @@
|
|||
set -e
|
||||
|
||||
INSTALLDIR=${1:-$PWD/BUILD_native_dyn/INSTALL}
|
||||
APPDIR=${2:-$PWD/AppDir}
|
||||
SOURCEDIR=${2:-$PWD/SOURCE/kiwix-desktop}
|
||||
APPDIR=${3:-$PWD/AppDir}
|
||||
|
||||
#TODO We should have our icon
|
||||
ICONFILE=/usr/share/icons/hicolor/48x48/apps/gvim.png
|
||||
ICONFILE=$SOURCEDIR/resources/icons/kiwix/app_icon.svg
|
||||
DESKTOPFILE=$SOURCEDIR/kiwix.desktop
|
||||
|
||||
# Create structure
|
||||
mkdir -p $APPDIR/usr/{bin,lib,share} $APPDIR/usr/share/applications $APPDIR/usr/share/icons/hicolor/48x48/apps
|
||||
|
@ -17,19 +19,9 @@ cp $INSTALLDIR/lib/x86_64-linux-gnu/*.so* $APPDIR/usr/lib
|
|||
rm $APPDIR/usr/lib/libmagic.so*
|
||||
# Copy nss lib (to not conflict with host's ones)
|
||||
cp -a /usr/lib/x86_64-linux-gnu/nss $APPDIR/usr/lib
|
||||
cp $ICONFILE $APPDIR/usr/share/icons/hicolor/48x48/apps/kiwix-desktop.png
|
||||
# TODO we should have our .desktop
|
||||
tee $APPDIR/usr/share/applications/kiwix-desktop.desktop <<EOF > /dev/null
|
||||
[Desktop Entry]
|
||||
Name=Kiwix
|
||||
Exec=kiwix-desktop %F
|
||||
Icon=kiwix-desktop
|
||||
Type=Application
|
||||
Terminal=false
|
||||
StartupNotify=true
|
||||
NoDisplay=false
|
||||
Categories=Education;
|
||||
EOF
|
||||
cp $ICONFILE $APPDIR/usr/share/icons/hicolor/48x48/apps/kiwix-desktop.svg
|
||||
mkdir -p $APPDIR/usr/share/applications
|
||||
cp $DESKTOPFILE $APPDIR/usr/share/applications/kiwix.desktop
|
||||
|
||||
# Get linuxdeployqt
|
||||
wget https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
|
||||
|
@ -40,4 +32,4 @@ chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
|||
# Fix the RPATH of QtWebEngineProcess [TODO] Fill a issue ?
|
||||
patchelf --set-rpath '$ORIGIN/../lib' $APPDIR/usr/libexec/QtWebEngineProcess
|
||||
# Build the image.
|
||||
./linuxdeployqt-continuous-x86_64.AppImage $APPDIR/usr/share/applications/kiwix-desktop.desktop -verbose=3 -bundle-non-qt-libs -appimage #
|
||||
./linuxdeployqt-continuous-x86_64.AppImage $APPDIR/usr/share/applications/kiwix.desktop -verbose=3 -bundle-non-qt-libs -appimage
|
||||
|
|
|
@ -97,7 +97,7 @@ def run_kiwix_build(target, platform,
|
|||
|
||||
def create_app_image():
|
||||
command = ['kiwix-build/scripts/create_kiwix-desktop_appImage.sh',
|
||||
str(BASE_DIR/'INSTALL'), str(HOME/'AppDir')]
|
||||
str(BASE_DIR/'INSTALL'), str(HOME/'SOURCE'/'kiwix-desktop'), str(HOME/'AppDir')]
|
||||
print_message("Build AppImage of kiwix-desktop")
|
||||
subprocess.check_call(command, cwd=str(HOME))
|
||||
if make_release:
|
||||
|
|
Loading…
Reference in New Issue