Skip to content

Commit

Permalink
Android
Browse files Browse the repository at this point in the history
- Build procedure adapted to load cardsets from PySolFC-Cardsets.
  (hopefully a temporary change)
  • Loading branch information
lufebe16 committed Oct 19, 2023
1 parent b966794 commit c867b2b
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 20 deletions.
31 changes: 31 additions & 0 deletions buildozer/minimal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
cardset-2000
cardset-blaren-7x7
cardset-crystal-mahjongg
cardset-dashavatara-ganjifa
cardset-dashavatara-ganjifa-xl
cardset-dojouji-3x3
cardset-dondorf
cardset-eternal-dragon-10x10
cardset-gnome-mahjongg-1
cardset-hanafuda-200-years
cardset-hexadeck
cardset-hofamterspiel-9x9
cardset-hokusai-6x6
cardset-knave-of-hearts-4x4
cardset-louie-mantia-hanafuda
cardset-matching
cardset-matching-xl
cardset-matrix
cardset-mid-winter-eve-8x8
cardset-mughal-ganjifa
cardset-mughal-ganjifa-xl
cardset-neo
cardset-neo-hex
cardset-neo-tarock
cardset-next-matrix
cardset-oxymoron
cardset-standard
cardset-tuxedo
cardset-uni-mahjongg
cardset-victoria-falls-5x5
cardset-vienna-2k
81 changes: 61 additions & 20 deletions buildozer/mkcards
Original file line number Diff line number Diff line change
@@ -1,32 +1,73 @@
#!/bin/bash
set -eux

cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
cardsets_file=${cardsets_dir}.tar.xz
#loadmode="forge"
loadmode=""

rm -rf cardsets

echo '### prepare cardsets'
if [ $loadmode == "forge" ]; then
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
cardsets_file=${cardsets_dir}.tar.xz

if [ ! -f ${cardsets_file} ]; then
echo '### downloading cardsets'
wget https://netix.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/minimal/${cardsets_file}
fi
echo '### prepare cardsets'

if [ ! -d ${cardsets_dir} ]; then
echo '### extracting cardsets'
tar -xf ${cardsets_file}
fi
if [ ! -f ${cardsets_file} ]; then
echo '### downloading cardsets'
wget https://netix.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/minimal/${cardsets_file}
fi

if [ ! -d ${cardsets_dir} ]; then
echo '### extracting cardsets'
tar -xf ${cardsets_file}
fi

echo '### processing cardsets'
(
cd ${cardsets_dir}
../../scripts/cardconv gif png
for i in cardset-*-png; do
rm -rf `basename $i -png`
done
)

ln -s ${cardsets_dir} cardsets

else
cardsets_dir=PySolFC-Cardsets

if [ ! -d ${cardsets_dir} ]; then
echo '### downloading cardset repo'

echo '### processing cardsets'
(
cd ${cardsets_dir}
../../scripts/cardconv gif png
for i in cardset-*-png; do
rm -rf `basename $i -png`
done
)
mkdir ${cardsets_dir}
pushd ${cardsets_dir}

ln -s ${cardsets_dir} cardsets
mkdir repo
pushd repo
git init
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git
git fetch --depth 1 origin ae08657f931328439c5697165503a6360a75a7a6
git checkout -q FETCH_HEAD
popd

echo '### choose a minimal set'

for d in $(cat ../minimal.txt)
do
mv repo/${d} .
done
rm repo -rf

echo '### processing cardsets'

../../scripts/cardconv gif png
for i in cardset-*-png; do
rm -rf `basename $i -png`
done
popd
fi

ln -s ${cardsets_dir} cardsets
fi

echo '### end cardsets'

1 comment on commit c867b2b

@joeraz
Copy link
Collaborator

@joeraz joeraz commented on c867b2b Oct 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm - a new cardsets package will be released on SourceForge prior to the next PySol release.

Please sign in to comment.