mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: support AppImage (#3248)
* feat: add build deb shell script * feat: update release.yml * chore: add flatpak readme * feat: support appimage builder * feat: support appimage builder * Update release.yml
This commit is contained in:
10
frontend/scripts/linux_distribution/deb/AppFlowy.desktop
Normal file
10
frontend/scripts/linux_distribution/deb/AppFlowy.desktop
Normal file
@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=AppFlowy
|
||||
Icon=/usr/share/icons/hicolor/scalable/apps/appflowy.svg
|
||||
Exec=env GDK_GL=gles /usr/bin/AppFlowy %U
|
||||
Categories=Network;Productivity;
|
||||
Keywords=Notes
|
||||
DBusActivatable=true
|
||||
Implements=io.appflowy.AppFlowy;
|
||||
Terminal=false
|
8
frontend/scripts/linux_distribution/deb/DEBIAN/control
Normal file
8
frontend/scripts/linux_distribution/deb/DEBIAN/control
Normal file
@ -0,0 +1,8 @@
|
||||
Package: AppFlowy
|
||||
Version: [CHANGE_THIS]
|
||||
Depends: libkeybinder-3.0-0
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Priority: optional
|
||||
Maintainer: AppFlowy
|
||||
Description: An Open Source Alternative to Notion
|
8
frontend/scripts/linux_distribution/deb/DEBIAN/postinst
Executable file
8
frontend/scripts/linux_distribution/deb/DEBIAN/postinst
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
if [ -e /usr/bin/AppFlowy ]; then
|
||||
echo "Symlink already exists, skipping."
|
||||
else
|
||||
echo "Creating Symlink in /usr/bin/appflowy"
|
||||
ln -s /usr/lib/AppFlowy/AppFlowy /usr/bin/AppFlowy
|
||||
ln -s /usr/lib/AppFlowy/launcher.sh /usr/bin/AppFlowyLauncher.sh
|
||||
fi
|
5
frontend/scripts/linux_distribution/deb/DEBIAN/postrm
Executable file
5
frontend/scripts/linux_distribution/deb/DEBIAN/postrm
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
if [ -e /usr/bin/AppFlowy ]; then
|
||||
rm /usr/bin/AppFlowy
|
||||
rm /usr/bin/AppFlowyLauncher.sh
|
||||
fi
|
18
frontend/scripts/linux_distribution/deb/README.md
Normal file
18
frontend/scripts/linux_distribution/deb/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# Build AppFlowy for Debian
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- dpkg-deb
|
||||
- make sure you have built the app for Linux which is located in `frontend/appflowy_flutter/production/$VERSION/linux/Release/`
|
||||
|
||||
## Build
|
||||
|
||||
```bash
|
||||
cd frontend/
|
||||
sh scripts/linux_distribution/deb/build_deb.sh [LINUX_PRODUCTION_RELEASE_PATH] [VERSION] [PACKAGE_NAME]
|
||||
|
||||
# for example
|
||||
sh scripts/linux_distribution/deb/build_deb.sh appflowy_flutter/product/0.2.9/linux/Release 0.2.9 AppFlowy_0.2.9.deb
|
||||
```
|
||||
|
||||
The deb file will be located in '[LINUX_PRODUCTION_RELEASE_PATH]/[PACKAGE_NAME]'
|
42
frontend/scripts/linux_distribution/deb/build_deb.sh
Normal file
42
frontend/scripts/linux_distribution/deb/build_deb.sh
Normal file
@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
LINUX_RELEASE_PRODUCTION=$1
|
||||
VERSION=$2
|
||||
PACKAGE_NAME=$3
|
||||
|
||||
# Define package folders
|
||||
PACKAGE=$LINUX_RELEASE_PRODUCTION/package
|
||||
LIB=$PACKAGE/usr/lib
|
||||
APPLICATIONS=$PACKAGE/usr/share/applications
|
||||
DBUS_SERVICES=$PACKAGE/usr/share/dbus-1/services
|
||||
ICONS=$PACKAGE/usr/share/icons/hicolor/scalable/apps
|
||||
METAINFO=$PACKAGE/usr/share/metainfo
|
||||
DEBIAN=$PACKAGE/DEBIAN
|
||||
|
||||
# Create package folder
|
||||
mkdir -p $LIB
|
||||
mkdir -p $APPLICATIONS
|
||||
mkdir -p $DBUS_SERVICES
|
||||
mkdir -p $ICONS
|
||||
mkdir -p $METAINFO
|
||||
mkdir -p $DEBIAN
|
||||
|
||||
# Configure the package
|
||||
cp -R ./scripts/linux_distribution/deb/DEBIAN $PACKAGE
|
||||
chmod 0755 $DEBIAN/postinst
|
||||
chmod 0755 $DEBIAN/postrm
|
||||
grep -rl "\[CHANGE_THIS\]" $DEBIAN/control | xargs sed -i "s/\[CHANGE_THIS\]/$VERSION/"
|
||||
|
||||
cp -fR $LINUX_RELEASE_PRODUCTION/AppFlowy $LIB
|
||||
cp ./scripts/linux_distribution/packaging/launcher.sh $LIB/AppFlowy
|
||||
chmod +x $LIB/AppFlowy/launcher.sh
|
||||
|
||||
cp ./scripts/linux_distribution/deb/AppFlowy.desktop $APPLICATIONS
|
||||
cp ./scripts/linux_distribution/packaging/io.appflowy.AppFlowy.launcher.desktop $APPLICATIONS
|
||||
|
||||
cp ./scripts/linux_distribution/packaging/io.appflowy.AppFlowy.metainfo.xml $METAINFO
|
||||
cp ./scripts/linux_distribution/packaging/io.appflowy.AppFlowy.service $DBUS_SERVICES
|
||||
cp ./scripts/linux_distribution/packaging/appflowy.svg $ICONS
|
||||
|
||||
# Build the package
|
||||
dpkg-deb --build --root-owner-group -Z xz $PACKAGE $LINUX_RELEASE_PRODUCTION/$PACKAGE_NAME
|
Reference in New Issue
Block a user