chore: get working again on chrome and ready to distribute unpacked (#69)

Organize the plugin for submission, and restore its operation on Chrome. Unfortunately GeoGebra's files block submission, so further work will be needed to create a plugin installer.

Reviewed-on: #69
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2024-02-21 15:46:43 +00:00 committed by Glen Whitney
parent 0567da019f
commit c895f2d30f
6 changed files with 96 additions and 5 deletions

View file

@ -2,6 +2,7 @@ mkdir -p etc/deps/geotypes
mkdir -p etc/deps/x_ite/assets/components
mkdir -p etc/deps/x_ite/assets/images
// source code at https://github.com/geogebra/geogebra/releases/tag/5.2.823.0
curl 'https://download.geogebra.org/installers/5.2/geogebra-math-apps-bundle-5-2-823-0.zip' --output etc/deps/geo.zip
unzip -o -d etc/deps etc/deps/geo.zip
rm etc/deps/geo.zip

View file

@ -1,7 +1,16 @@
# Takes one parameter, the destination directory
mkdir -p $1/deps/x_ite/assets/images
mkdir -p $1/deps/x_ite/assets/components
cp etc/manifest.json etc/options.html $1
versionLine=$(grep version package.json5)
regex="'(.*)'"
if [[ $versionLine =~ $regex ]]
then
version=${BASH_REMATCH[1]}
fi
echo "Building plugin version $version"
sed "s/<<FROM_PACKAGE_JSON>>/$version/" etc/manifest.json > $1/manifest.json
cp etc/options.html $1
cp etc/deps/x_ite/x_ite.css $1/deps/x_ite
cp etc/deps/x_ite/assets/images/logo.128.png $1/deps/x_ite/assets/images
cp etc/deps/x_ite/x_ite.mjs $1/deps/x_ite
@ -30,4 +39,5 @@ mkdir -p $1/assets
cp public/assets/arch*.png $1/assets
cp public/assets/*Example.png $1/assets
# Wrap it all up
zip -r $1 $1
cd $1
zip -r ../$1 *