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'
|
echo '### eval version'
|
||||||
|
|
||||||
./version.py > ${tmpdir}/version.txt
|
./version ${tmpdir} > ${tmpdir}/version.txt
|
||||||
|
|
||||||
echo '### end init'
|
echo '### end init'
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
tmpdir=..
|
tmpdir=..
|
||||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
|
||||||
cardsets_file=${cardsets_dir}.tar.xz
|
|
||||||
|
|
||||||
echo '### prepare source'
|
echo '### prepare source'
|
||||||
|
|
||||||
|
@ -24,7 +22,7 @@ echo '### resize 4k images'
|
||||||
|
|
||||||
echo '### eval version'
|
echo '### eval version'
|
||||||
|
|
||||||
./version.py > ${tmpdir}/version.txt
|
./version ${tmpdir} > ${tmpdir}/version.txt
|
||||||
|
|
||||||
echo '### prepare buildozer'
|
echo '### prepare buildozer'
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ loadmode=" "
|
||||||
|
|
||||||
rm -rf cardsets
|
rm -rf cardsets
|
||||||
|
|
||||||
if [ $loadmode == "forge" ]; then
|
if [ "$loadmode" == "forge" ]; then
|
||||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||||
cardsets_file=${cardsets_dir}.tar.xz
|
cardsets_file=${cardsets_dir}.tar.xz
|
||||||
|
|
||||||
|
@ -66,11 +66,14 @@ else
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
# cp -a ${cardsets_dir} ${cardsets_dir}-orig
|
||||||
|
|
||||||
ln -s ${cardsets_dir} cardsets
|
ln -s ${cardsets_dir} cardsets
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd cardsets
|
pushd cardsets
|
||||||
|
echo '### resize big cardsets'
|
||||||
|
|
||||||
for i in cardset-*; do
|
for i in cardset-*; do
|
||||||
../resizecards $i
|
../resizecards $i
|
||||||
done
|
done
|
||||||
|
|
|
@ -75,6 +75,9 @@ yoffs = int(math.ceil(yoffs*scale))
|
||||||
#print (cardw,cardh)
|
#print (cardw,cardh)
|
||||||
#print (xoffs,yoffs)
|
#print (xoffs,yoffs)
|
||||||
|
|
||||||
|
first = True
|
||||||
|
effw = cardw
|
||||||
|
effh = cardh
|
||||||
for fn in os.listdir(path=carddir):
|
for fn in os.listdir(path=carddir):
|
||||||
file = carddir+'/'+fn
|
file = carddir+'/'+fn
|
||||||
fileo = carddir+'/conv-'+fn
|
fileo = carddir+'/conv-'+fn
|
||||||
|
@ -85,6 +88,10 @@ for fn in os.listdir(path=carddir):
|
||||||
#print (cmd)
|
#print (cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
os.system(cmd2)
|
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'):
|
if fn.endswith('.png') and fn.startswith('shadow'):
|
||||||
w,h = img_size(file)
|
w,h = img_size(file)
|
||||||
|
@ -101,6 +108,8 @@ for fn in os.listdir(path=carddir):
|
||||||
# 4: rewrite the config file.
|
# 4: rewrite the config file.
|
||||||
|
|
||||||
print ('rescaled by',scale,':',carddir)
|
print ('rescaled by',scale,':',carddir)
|
||||||
|
cardw = effw
|
||||||
|
cardh = effh
|
||||||
lines_list[2] = str(cardw)+" "+str(cardh)+" "+str(cardd)
|
lines_list[2] = str(cardw)+" "+str(cardh)+" "+str(cardd)
|
||||||
lines_list[3] = str(xoffs)+" "+str(yoffs)+" "+str(sxoffs)+" "+str(syoffs)
|
lines_list[3] = str(xoffs)+" "+str(yoffs)+" "+str(sxoffs)+" "+str(syoffs)
|
||||||
#print (lines_list)
|
#print (lines_list)
|
||||||
|
|
Loading…
Add table
Reference in a new issue