Update Ubuntu Touch sdk to 20.04 #1353 (#1354)

This commit is contained in:
Jaifroid 2025-06-15 22:46:30 +01:00 committed by GitHub
parent 185cb9c669
commit 4a90691927
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 51 additions and 12 deletions

View File

@ -68,11 +68,12 @@ jobs:
cp -rf ./ubuntu_touch dist/ubuntu_touch
# Set up the environment
- name: Setup environment
- name: Setup Clickable for Ubuntu Touch
shell: bash
run: |
sudo apt-get update
sudo apt-get --yes install ./scripts/ubuntu_touch_packages/*.deb
sudo apt-get install -y python3-pip
pip3 install clickable-ut
# Runs the build scripts
- name: Run the build scripts to make extensions and packages

View File

@ -18,12 +18,28 @@ while getopts tdv: option; do
esac
done
echo "Packaging .click application for Ubuntu Touch, version $VERSION"
echo "Packaging .click application for Ubuntu Touch using Clickable, version $VERSION"
# We need to remove the *.woff* files because click considers they are forbidden binaries
rm -f "$BASEDIR/tmp/www/fonts"/*.woff*
# We need to remove these files because the --ignore option of click is not supported in the version of Trusty
rm -rf "$BASEDIR/tmp/webextension"
rm -f "$BASEDIR/tmp/manifest.webapp"
click build --no-validate "$BASEDIR/tmp"
mv kiwix*.click $BASEDIR/build/kiwix-ubuntu-touch-$VERSION.click
# Copy the clickable.yaml configuration file to the tmp directory
cp "$BASEDIR/ubuntu_touch/clickable.yaml" "$BASEDIR/tmp/"
# Show clickable version for debugging
echo "Clickable version:"
clickable --version
# Build with Clickable using the pure builder
echo "Building with Clickable (pure builder for web apps)..."
clickable build
# Find the generated click file
CLICK_FILE=$(find "$BASEDIR/tmp" -name "*.click" -type f | head -1)
if [ -n "$CLICK_FILE" ]; then
mv "$CLICK_FILE" "$BASEDIR/build/kiwix-ubuntu-touch-$VERSION.click"
echo "Successfully created $BASEDIR/build/kiwix-ubuntu-touch-$VERSION.click"
else
echo "Error: No .click file was generated"
echo "Contents of tmp directory:"
ls -la "$BASEDIR/tmp"
exit 1
fi

View File

@ -0,0 +1,22 @@
clickable_minimum_required: 8.0.0
framework: ubuntu-sdk-20.04
builder: pure
ignore:
- "*.woff"
- "*.woff2"
- "*.map"
- webextension
- manifest.webapp
- backgroundscript.js
- .git
- .gitignore
- .gitmodules
- .clickable
prebuild: |
echo "Prebuild: Cleaning up unwanted files..."
rm -f www/fonts/*.woff* || true
rm -rf webextension || true
rm -f manifest.webapp || true
echo "Prebuild complete"

View File

@ -6,5 +6,5 @@
"content_exchange",
"content_exchange_source"
],
"policy_version": 16.04
"policy_version": 20.04
}

View File

@ -3,7 +3,7 @@
"description": "Kiwix is an offline reader for content from Wikipedia, Project Gutenberg, TED Talks, Wikivoyage, Stackexchange, etc.",
"architecture": "all",
"maintainer": "Kiwix team <contact+ubuntutouch@kiwix.org>",
"framework": "ubuntu-sdk-16.04",
"framework": "ubuntu-sdk-20.04",
"version": "4.2.0",
"title": "Kiwix",
"hooks": {