mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
android build scripts:
- bug fix - refactoring
This commit is contained in:
parent
28808ecc70
commit
1753f63034
5 changed files with 15 additions and 5 deletions
|
@ -34,6 +34,6 @@ cp -a cardsets/* ${tmpdir}/data
|
|||
|
||||
echo '### eval version'
|
||||
|
||||
./version.py > ${tmpdir}/version.txt
|
||||
./version ${tmpdir} > ${tmpdir}/version.txt
|
||||
|
||||
echo '### end init'
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
set -eux
|
||||
|
||||
tmpdir=..
|
||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||
cardsets_file=${cardsets_dir}.tar.xz
|
||||
|
||||
echo '### prepare source'
|
||||
|
||||
|
@ -24,7 +22,7 @@ echo '### resize 4k images'
|
|||
|
||||
echo '### eval version'
|
||||
|
||||
./version.py > ${tmpdir}/version.txt
|
||||
./version ${tmpdir} > ${tmpdir}/version.txt
|
||||
|
||||
echo '### prepare buildozer'
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ loadmode=" "
|
|||
|
||||
rm -rf cardsets
|
||||
|
||||
if [ $loadmode == "forge" ]; then
|
||||
if [ "$loadmode" == "forge" ]; then
|
||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||
cardsets_file=${cardsets_dir}.tar.xz
|
||||
|
||||
|
@ -66,11 +66,14 @@ else
|
|||
done
|
||||
popd
|
||||
fi
|
||||
# cp -a ${cardsets_dir} ${cardsets_dir}-orig
|
||||
|
||||
ln -s ${cardsets_dir} cardsets
|
||||
fi
|
||||
|
||||
pushd cardsets
|
||||
echo '### resize big cardsets'
|
||||
|
||||
for i in cardset-*; do
|
||||
../resizecards $i
|
||||
done
|
||||
|
|
|
@ -75,6 +75,9 @@ yoffs = int(math.ceil(yoffs*scale))
|
|||
#print (cardw,cardh)
|
||||
#print (xoffs,yoffs)
|
||||
|
||||
first = True
|
||||
effw = cardw
|
||||
effh = cardh
|
||||
for fn in os.listdir(path=carddir):
|
||||
file = carddir+'/'+fn
|
||||
fileo = carddir+'/conv-'+fn
|
||||
|
@ -85,6 +88,10 @@ for fn in os.listdir(path=carddir):
|
|||
#print (cmd)
|
||||
os.system(cmd)
|
||||
os.system(cmd2)
|
||||
if first:
|
||||
effw,effh = img_size(file)
|
||||
#print ('eff-size:',effw,effh)
|
||||
first = False
|
||||
|
||||
if fn.endswith('.png') and fn.startswith('shadow'):
|
||||
w,h = img_size(file)
|
||||
|
@ -101,6 +108,8 @@ for fn in os.listdir(path=carddir):
|
|||
# 4: rewrite the config file.
|
||||
|
||||
print ('rescaled by',scale,':',carddir)
|
||||
cardw = effw
|
||||
cardh = effh
|
||||
lines_list[2] = str(cardw)+" "+str(cardh)+" "+str(cardd)
|
||||
lines_list[3] = str(xoffs)+" "+str(yoffs)+" "+str(sxoffs)+" "+str(syoffs)
|
||||
#print (lines_list)
|
||||
|
|
Loading…
Add table
Reference in a new issue