mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
@@ -7,6 +7,7 @@ set -euxo pipefail
|
||||
|
||||
export ARCH={{arch}}
|
||||
APPIMAGE_BUNDLE_XDG_OPEN=${APPIMAGE_BUNDLE_XDG_OPEN-0}
|
||||
APPIMAGE_BUNDLE_GSTREAMER=${APPIMAGE_BUNDLE_GSTREAMER-0}
|
||||
TRAY_LIBRARY_PATH=${TRAY_LIBRARY_PATH-0}
|
||||
|
||||
if [ "$ARCH" == "i686" ]; then
|
||||
@@ -51,12 +52,20 @@ ln -s "usr/share/applications/{{app_name}}.desktop" "{{app_name}}.desktop"
|
||||
|
||||
cd ..
|
||||
|
||||
wget -q -4 -N -O linuxdeploy-plugin-gtk.sh "https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh"
|
||||
if [[ "$APPIMAGE_BUNDLE_GSTREAMER" != "0" ]]; then
|
||||
gst_plugin="--plugin gstreamer"
|
||||
wget -q -4 -N -O linuxdeploy-plugin-gstreamer.sh "https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gstreamer/master/linuxdeploy-plugin-gstreamer.sh"
|
||||
chmod +x linuxdeploy-plugin-gstreamer.sh
|
||||
else
|
||||
gst_plugin=""
|
||||
fi
|
||||
|
||||
wget -q -4 -N -O linuxdeploy-plugin-gtk.sh https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
|
||||
wget -q -4 -N -O linuxdeploy-${ARCH}.AppImage https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${linuxdeploy_arch}.AppImage
|
||||
|
||||
chmod +x linuxdeploy-plugin-gtk.sh
|
||||
chmod +x linuxdeploy-${ARCH}.AppImage
|
||||
|
||||
OUTPUT="{{appimage_filename}}" ./linuxdeploy-${ARCH}.AppImage --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk --output appimage
|
||||
OUTPUT="{{appimage_filename}}" ./linuxdeploy-${ARCH}.AppImage --appimage-extract-and-run --appdir "{{app_name}}.AppDir" --plugin gtk ${gst_plugin} --output appimage
|
||||
rm -r "{{app_name}}.AppDir"
|
||||
mv "{{appimage_filename}}" $OUTDIR
|
||||
|
||||
@@ -118,6 +118,9 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": false,
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false
|
||||
},
|
||||
"deb": {
|
||||
"files": {}
|
||||
},
|
||||
@@ -245,6 +248,9 @@
|
||||
"description": "The bundler configuration.",
|
||||
"default": {
|
||||
"active": false,
|
||||
"appimage": {
|
||||
"bundleMediaFramework": false
|
||||
},
|
||||
"deb": {
|
||||
"files": {}
|
||||
},
|
||||
@@ -955,6 +961,17 @@
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"appimage": {
|
||||
"description": "Configuration for the AppImage bundle.",
|
||||
"default": {
|
||||
"bundleMediaFramework": false
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/AppImageConfig"
|
||||
}
|
||||
]
|
||||
},
|
||||
"deb": {
|
||||
"description": "Configuration for the Debian bundle.",
|
||||
"default": {
|
||||
@@ -1023,6 +1040,18 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"AppImageConfig": {
|
||||
"description": "Configuration for AppImage bundles.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bundleMediaFramework": {
|
||||
"description": "Include additional gstreamer dependencies needed for audio and video playback. This increases the bundle size by ~15-35MB depending on your build system.",
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"DebConfig": {
|
||||
"description": "Configuration for Debian (.deb) bundles.",
|
||||
"type": "object",
|
||||
|
||||
@@ -337,6 +337,9 @@ pub fn command(options: Options) -> Result<()> {
|
||||
}
|
||||
}
|
||||
}
|
||||
if config_.tauri.bundle.appimage.bundle_media_framework {
|
||||
std::env::set_var("APPIMAGE_BUNDLE_GSTREAMER", "1");
|
||||
}
|
||||
|
||||
let bundles = bundle_project(settings).with_context(|| "failed to bundle project")?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user