Skip to content

Commit

Permalink
p3.9.1 Update Italian language. Change update process
Browse files Browse the repository at this point in the history
1st new preupdate
2nd new preupdate
Fix removal of qpdup dialog if update failed
  • Loading branch information
bovirus authored and procount committed May 13, 2024
1 parent aa11679 commit 7afff7f
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 39 deletions.
2 changes: 1 addition & 1 deletion recovery/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


/* Version number displayed in the title bar */
#define VERSION_NUMBER "3.9"
#define VERSION_NUMBER "3.9.1"

/* Color of the background */
// #define BACKGROUND_COLOR Qt::white
Expand Down
1 change: 1 addition & 0 deletions recovery/initdrivethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ bool InitDriveThread::restoreBootFiles()
TRACE
bool status = QProcess::execute("cp -a /tmp/mnt /") == 0;
QProcess::execute("rm -rf /tmp/mnt");
QProcess::execute("sync");
return status;
}

Expand Down
9 changes: 9 additions & 0 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,14 @@ void MainWindow::doReinstall()
_qpdup->show();

int error = updatePinn();

if (_qpdup)
{
_qpdup->hide();
_qpdup->deleteLater();
_qpdup = NULL;
}

if (!error)
{
//Reboot back into PINN
Expand Down Expand Up @@ -4705,6 +4713,7 @@ int MainWindow::updatePinn()
}

InitDriveThread::restoreBootFiles();

}

QProcess::execute("mount -o remount,ro /mnt");
Expand Down
26 changes: 13 additions & 13 deletions recovery/translation_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2663,55 +2663,55 @@ Verifica la password</translation>
<name>adjustSizes</name>
<message>
<source>Adjust size of OSes</source>
<translation type="unfinished"></translation>
<translation>Regola dimensioni sistemi operativi</translation>
</message>
<message>
<source>Nominal (MB)</source>
<translation type="unfinished"></translation>
<translation>Nominale (MB)</translation>
</message>
<message>
<source>Extra (MB)</source>
<translation type="unfinished"></translation>
<translation>Extra (MB)</translation>
</message>
<message>
<source>Total (MB)</source>
<translation type="unfinished"></translation>
<translation>Totale (MB)</translation>
</message>
<message>
<source>Clear</source>
<translation type="unfinished"></translation>
<translation>Azzera</translation>
</message>
<message>
<source>Balance</source>
<translation type="unfinished"></translation>
<translation>Bilancia</translation>
</message>
<message>
<source>(*) non-expanding</source>
<translation type="unfinished"></translation>
<translation>(*) non espandibile</translation>
</message>
<message>
<source>Capacity: 0MB</source>
<translation type="unfinished"></translation>
<translation>Capacità: 0MB</translation>
</message>
<message>
<source>Free: 0MB </source>
<translation type="unfinished"></translation>
<translation>Disponibili: 0 MB </translation>
</message>
<message>
<source>Used: 0MB</source>
<translation type="unfinished"></translation>
<translation>Usati: 0MB</translation>
</message>
<message>
<source>Used</source>
<translation type="unfinished"></translation>
<translation>Usati</translation>
</message>
<message>
<source>Free</source>
<translation type="unfinished"></translation>
<translation>Disponibili</translation>
</message>
<message>
<source>Capacity</source>
<translation type="unfinished"></translation>
<translation>Capacità</translation>
</message>
</context>
<context>
Expand Down
47 changes: 22 additions & 25 deletions sdcontent/preupdate
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,34 @@ mntsize=`df | grep /mnt | sed 's|\s\+|,|g' | cut -d ',' -f 2`

cd /mnt

if [ -f recovery.rfs ]; then
cp recovery.cmdline /tmp/cmdline.txt
else
cp cmdline.txt /tmp/cmdline.txt
fi
cp config.txt /tmp/config.bak

#REMOVE ALL BOOT FILES!
rm -rf *

#Restore saved settings
cp /tmp/cmdline.txt /mnt
cp /tmp/cmdline.txt /mnt/cmdline.bak
cp /tmp/config.bak /mnt

#if partition is still 63M, use the new wallpaper to save space
if [ $mntsize -lt $orgsize ]; then
unzip /tmp/pinn-lite.zip wallpaper2.jpg
mv wallpaper2.jpg wallpaper.jpg
echo "wallpaper.jpg" >>/tmp/exclude.txt
echo "cmdline.txt" >>/tmp/exclude.txt
sync
fi

if [ -f recovery.rfs ]; then

#if we have not changed to the new names yet, rename them so we do not run out of space when we unzip
mv fixup4rc.dat fixup4.dat
mv fixup_rc.dat fixup.dat
mv recover4.elf start4.elf
mv recovery.elf start.elf
mv recovery.img kernel.img
mv recovery7.img kernel7.img
mv recovery7l.img kernel7l.img
mv recovery.cmdline cmdline.txt

rm recovery.rfs
rm changefirmware
rm firmware.tar.gz

fi

#Backup these configurations, just in case
mv config.txt config.bak
cp cmdline.txt cmdline.bak


#Update the new configurations with saved info
#Use new configuration
unzip -o /tmp/pinn-lite.zip config.txt

#Update the cmdline with saved info
#Just change the ramdisk_size
sed -i -e 's|runinstaller||' cmdline.txt
sed -i -e "s|ramdisk_size=32768|ramdisk_size=65536|" cmdline.txt
Expand All @@ -56,9 +50,12 @@ while read a; do
done < /tmp/exclude.txt
pi5minsize=$(expr 1520 + $(unzip -l /tmp/pinn-lite.zip $exclude |tail -n1 | sed 's|\s\+| |g'| sed 's|^ ||' | cut -d ' ' -f 1) / 1024)

freesize=`df | grep /mnt | sed 's|\s\+|,|g' | cut -d ',' -f 4`


sync

if [ $mntsize -lt $pi5minsize ]; then
if [ $freesize -lt $pi5minsize ]; then
echo "Partition size Too small"
exit 1
fi
Expand Down

0 comments on commit 7afff7f

Please sign in to comment.