diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 3a702c56..2f4caad5 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -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 diff --git a/scripts/package_ubuntu_touch_app.sh b/scripts/package_ubuntu_touch_app.sh index 846eb91d..f3bc4e3c 100755 --- a/scripts/package_ubuntu_touch_app.sh +++ b/scripts/package_ubuntu_touch_app.sh @@ -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 diff --git a/scripts/ubuntu_touch_packages/click-reviewers-tools_0.44_16.04.1_all.deb b/scripts/ubuntu_touch_packages/click-reviewers-tools_0.44_16.04.1_all.deb deleted file mode 100644 index 8b03a3c2..00000000 Binary files a/scripts/ubuntu_touch_packages/click-reviewers-tools_0.44_16.04.1_all.deb and /dev/null differ diff --git a/scripts/ubuntu_touch_packages/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb b/scripts/ubuntu_touch_packages/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb deleted file mode 100644 index 14f86581..00000000 Binary files a/scripts/ubuntu_touch_packages/click_0.4.43+16.04.20170613-0ubuntu1_amd64.deb and /dev/null differ diff --git a/scripts/ubuntu_touch_packages/gir1.2-click-0.4_0.4.43+16.04.20170613-0ubuntu1_amd64.deb b/scripts/ubuntu_touch_packages/gir1.2-click-0.4_0.4.43+16.04.20170613-0ubuntu1_amd64.deb deleted file mode 100644 index 7031f158..00000000 Binary files a/scripts/ubuntu_touch_packages/gir1.2-click-0.4_0.4.43+16.04.20170613-0ubuntu1_amd64.deb and /dev/null differ diff --git a/scripts/ubuntu_touch_packages/libclick-0.4-0_0.4.43+16.04.20170613-0ubuntu1_amd64.deb b/scripts/ubuntu_touch_packages/libclick-0.4-0_0.4.43+16.04.20170613-0ubuntu1_amd64.deb deleted file mode 100644 index 11113d03..00000000 Binary files a/scripts/ubuntu_touch_packages/libclick-0.4-0_0.4.43+16.04.20170613-0ubuntu1_amd64.deb and /dev/null differ diff --git a/scripts/ubuntu_touch_packages/python3-click-package_0.4.43+16.04.20170613-0ubuntu1_amd64.deb b/scripts/ubuntu_touch_packages/python3-click-package_0.4.43+16.04.20170613-0ubuntu1_amd64.deb deleted file mode 100644 index 2cba2347..00000000 Binary files a/scripts/ubuntu_touch_packages/python3-click-package_0.4.43+16.04.20170613-0ubuntu1_amd64.deb and /dev/null differ diff --git a/ubuntu_touch/clickable.yaml b/ubuntu_touch/clickable.yaml new file mode 100644 index 00000000..208cf518 --- /dev/null +++ b/ubuntu_touch/clickable.yaml @@ -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" diff --git a/ubuntu_touch/kiwix.apparmor b/ubuntu_touch/kiwix.apparmor index efb61102..37d6aaf3 100644 --- a/ubuntu_touch/kiwix.apparmor +++ b/ubuntu_touch/kiwix.apparmor @@ -6,5 +6,5 @@ "content_exchange", "content_exchange_source" ], - "policy_version": 16.04 + "policy_version": 20.04 } diff --git a/ubuntu_touch/manifest.json b/ubuntu_touch/manifest.json index d170072c..d755145b 100644 --- a/ubuntu_touch/manifest.json +++ b/ubuntu_touch/manifest.json @@ -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 ", - "framework": "ubuntu-sdk-16.04", + "framework": "ubuntu-sdk-20.04", "version": "4.2.0", "title": "Kiwix", "hooks": {