Skip to content

Commit

Permalink
Merge branch 'br_386' into pinn2
Browse files Browse the repository at this point in the history
  • Loading branch information
procount committed Mar 23, 2023
2 parents f744594 + 6f72a95 commit f759744
Show file tree
Hide file tree
Showing 30 changed files with 776 additions and 590 deletions.
6 changes: 6 additions & 0 deletions history.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ PINN is a version of the NOOBS Operating System Installer for the Raspberry Pi w

## Change History

### V3.8.6

- **Updates** - Improved the update process to prevent overwriting of config files etc.
- **WifiDialog** - Resized the wifi dialog to fit on 800x480 sized displays.
- **Hyperpixel4** - Updated Hyperpixel4 drivers and config files for Pi4

### V3.8.5.3

- **Backups** - Fix ACL permissions when restoring backups
Expand Down
5 changes: 4 additions & 1 deletion recovery/config.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ifndef CONFIG_H
#define CONFIG_H


/* Version number displayed in the title bar */
#define VERSION_NUMBER "3.8.5.3"
#define VERSION_NUMBER "3.8.6"

/* Color of the background */
// #define BACKGROUND_COLOR Qt::white
Expand All @@ -26,10 +27,12 @@
* Multiple lists can be specified by space separating the URLs */
#define DEFAULT_REPO_SERVER "http://downloads.raspberrypi.org/os_list_v3.json"


/* Location of data for self-updating */
#define BUILD_URL "http://downloads.sourceforge.net/project/pinn/BUILD-DATA"
#define UPDATE_URL "http://downloads.sourceforge.net/project/pinn/pinn-lite.zip"
#define README_URL "http://downloads.sourceforge.net/project/pinn/README.md"

#define GROUP_URL "http://raw.githubusercontent.com/procount/pinn-os/master/os/overrides.json"
#define BUILD_CURRENT "/mnt/BUILD-DATA"
#define BUILD_NEW "/tmp/BUILD-DATA"
Expand Down
43 changes: 40 additions & 3 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4483,9 +4483,9 @@ void MainWindow::downloadUpdateComplete()
if (type=="UPDATE") //upgrade
{
qDebug() << "Time to update PINN!";
QProcess::execute("mount -o remount,rw /mnt");
QProcess::execute("unzip /tmp/pinn-lite.zip -o -x recovery.cmdline -d /mnt");
QProcess::execute("mount -o remount,ro /mnt");

updatePinn();

QProcess::execute(QString("rm ")+BUILD_IGNORE);
QProcess::execute("sync");

Expand Down Expand Up @@ -4554,6 +4554,43 @@ void MainWindow::downloadUpdateComplete()
}
}

void MainWindow::updatePinn()
{
//When PINN is updated, We don't need these files to be extracted
QString exclusions = " -x recovery.cmdline -x updatepinn -x exclude.txt";

QProcess::execute("mount -o remount,rw /mnt");

//First we'll extract these 2 files to /tmp to automate hte update process
QProcess::execute("unzip /tmp/pinn-lite.zip -o exclude.txt updatepinn -d /tmp");

if (QFile::exists("/tmp/exclude.txt"))
{
//exclude.txt can avoid extracting addtional files to RECOVERY that we don't want updating
QString contents = getFileContents("/tmp/exclude.txt");
QStringList fileList = contents.split("\n");
foreach (QString file, fileList)
{
//Add each filename to the list of file extraction exclusios
file=file.trimmed();
if (file.length()>0)
exclusions += " -x "+file;
}
}
//Extract all the files to Recovery, except our excluded set
QString cmd = "unzip /tmp/pinn-lite.zip -o" + exclusions + " -d /mnt";
QProcess::execute(cmd);

//In case we need to do some additional upgrade processing
if (QFile::exists("/tmp/updatepinn"))
{
QProcess::execute("chmod +x /tmp/updatepinn");
QProcess::execute("/tmp/updatepinn");
}

QProcess::execute("mount -o remount,ro /mnt");
}

void MainWindow::on_newVersion()
{

Expand Down
1 change: 1 addition & 0 deletions recovery/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class MainWindow : public QMainWindow
void copyConf(const QString &fconf);
void copyWpa();
void copyDhcp();
void updatePinn();
void on_newVersion();
QString menutext(int index);
void fullFAT();
Expand Down
42 changes: 21 additions & 21 deletions recovery/translation_ae.ts
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,9 @@ WARNING: This will erase all data on your SD card</oldsource>
<location filename="mainwindow.cpp" line="1301"/>
<location filename="mainwindow.cpp" line="1311"/>
<location filename="mainwindow.cpp" line="1941"/>
<location filename="mainwindow.cpp" line="4767"/>
<location filename="mainwindow.cpp" line="4842"/>
<location filename="mainwindow.cpp" line="4886"/>
<location filename="mainwindow.cpp" line="4804"/>
<location filename="mainwindow.cpp" line="4879"/>
<location filename="mainwindow.cpp" line="4923"/>
<source>Confirm</source>
<translation>تاكيد</translation>
</message>
Expand Down Expand Up @@ -873,15 +873,15 @@ Are you sure you want to initialise the drive?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="1073"/>
<location filename="mainwindow.cpp" line="4768"/>
<location filename="mainwindow.cpp" line="4805"/>
<source>Warning: Partial USB support. The following OSes can only be executed from USB when it is /dev/sda and may fail to boot or function correctly if that is not the case:
</source>
<oldsource>Warning: Partial USB support. The following OSes can only be installed to USB when it is /dev/sda and may fail to boot or function correctly if that is not the case:</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1073"/>
<location filename="mainwindow.cpp" line="4768"/>
<location filename="mainwindow.cpp" line="4805"/>
<source>

Do you want to continue?</source>
Expand Down Expand Up @@ -933,7 +933,7 @@ See debug log for details</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="1455"/>
<location filename="mainwindow.cpp" line="4990"/>
<location filename="mainwindow.cpp" line="5027"/>
<source>Backup OSes</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -1040,8 +1040,8 @@ Would you like to make this setting permanent?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="3245"/>
<location filename="mainwindow.cpp" line="4758"/>
<location filename="mainwindow.cpp" line="4796"/>
<location filename="mainwindow.cpp" line="4795"/>
<location filename="mainwindow.cpp" line="4833"/>
<source>Replace OSes</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -1154,49 +1154,49 @@ Do you want to continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4561"/>
<location filename="mainwindow.cpp" line="4598"/>
<source>PINN UPDATE</source>
<translation>PINN تحديث</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4562"/>
<location filename="mainwindow.cpp" line="4599"/>
<source>A new version of PINN is available</source>
<translation>يتوفر إصدار جديد من الشبكة PINN</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4563"/>
<location filename="mainwindow.cpp" line="4600"/>
<source>Do you want to download this version?</source>
<translation>هل تريد تحميل هذا الإصدار ؟</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4595"/>
<location filename="mainwindow.cpp" line="4632"/>
<source>Downloading Update</source>
<translation>تنزيل التحديث</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4595"/>
<location filename="mainwindow.cpp" line="4632"/>
<source>Press ESC to cancel</source>
<translation>اضغط هروب لالغاء الامر</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4759"/>
<location filename="mainwindow.cpp" line="4796"/>
<source>Error: No OSes selected
(Do not choose RISC OS or PINN)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4797"/>
<location filename="mainwindow.cpp" line="4834"/>
<source>Warning: No OSes selected
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4843"/>
<location filename="mainwindow.cpp" line="4880"/>
<source>Warning: this will backup the selected Operating System(s).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4887"/>
<location filename="mainwindow.cpp" line="4924"/>
<source>Warning: Unsupported Operating System(s) detected. PINN currently cannot backup the following OSes correctly:</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -1207,7 +1207,7 @@ Do you want to continue?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="1134"/>
<location filename="mainwindow.cpp" line="4787"/>
<location filename="mainwindow.cpp" line="4824"/>
<source> is not available.
Please provide it locally or connect to the internet.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -3222,17 +3222,17 @@ Break</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="130"/>
<location filename="wifisettingsdialog.ui" line="132"/>
<source>&amp;Show Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="146"/>
<location filename="wifisettingsdialog.ui" line="139"/>
<source>&amp;Virtual Keyboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="158"/>
<location filename="wifisettingsdialog.ui" line="162"/>
<source>&amp;Delete</source>
<translation type="unfinished"></translation>
</message>
Expand Down
42 changes: 21 additions & 21 deletions recovery/translation_ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@ AVISU: Esto desaniciará tolos datos na to tarxeta SD</translation>
<location filename="mainwindow.cpp" line="1301"/>
<location filename="mainwindow.cpp" line="1311"/>
<location filename="mainwindow.cpp" line="1941"/>
<location filename="mainwindow.cpp" line="4767"/>
<location filename="mainwindow.cpp" line="4842"/>
<location filename="mainwindow.cpp" line="4886"/>
<location filename="mainwindow.cpp" line="4804"/>
<location filename="mainwindow.cpp" line="4879"/>
<location filename="mainwindow.cpp" line="4923"/>
<source>Confirm</source>
<translation>Confirmar</translation>
</message>
Expand All @@ -827,15 +827,15 @@ Are you sure you want to initialise the drive?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="1073"/>
<location filename="mainwindow.cpp" line="4768"/>
<location filename="mainwindow.cpp" line="4805"/>
<source>Warning: Partial USB support. The following OSes can only be executed from USB when it is /dev/sda and may fail to boot or function correctly if that is not the case:
</source>
<oldsource>Warning: Partial USB support. The following OSes can only be installed to USB when it is /dev/sda and may fail to boot or function correctly if that is not the case:</oldsource>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1073"/>
<location filename="mainwindow.cpp" line="4768"/>
<location filename="mainwindow.cpp" line="4805"/>
<source>

Do you want to continue?</source>
Expand Down Expand Up @@ -895,7 +895,7 @@ See debug log for details</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="1455"/>
<location filename="mainwindow.cpp" line="4990"/>
<location filename="mainwindow.cpp" line="5027"/>
<source>Backup OSes</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -965,8 +965,8 @@ See debug log for details</oldsource>
</message>
<message>
<location filename="mainwindow.cpp" line="3245"/>
<location filename="mainwindow.cpp" line="4758"/>
<location filename="mainwindow.cpp" line="4796"/>
<location filename="mainwindow.cpp" line="4795"/>
<location filename="mainwindow.cpp" line="4833"/>
<source>Replace OSes</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -1079,49 +1079,49 @@ Do you want to continue?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4561"/>
<location filename="mainwindow.cpp" line="4598"/>
<source>PINN UPDATE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4562"/>
<location filename="mainwindow.cpp" line="4599"/>
<source>A new version of PINN is available</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4563"/>
<location filename="mainwindow.cpp" line="4600"/>
<source>Do you want to download this version?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4595"/>
<location filename="mainwindow.cpp" line="4632"/>
<source>Downloading Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4595"/>
<location filename="mainwindow.cpp" line="4632"/>
<source>Press ESC to cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4759"/>
<location filename="mainwindow.cpp" line="4796"/>
<source>Error: No OSes selected
(Do not choose RISC OS or PINN)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4797"/>
<location filename="mainwindow.cpp" line="4834"/>
<source>Warning: No OSes selected
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4843"/>
<location filename="mainwindow.cpp" line="4880"/>
<source>Warning: this will backup the selected Operating System(s).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="4887"/>
<location filename="mainwindow.cpp" line="4924"/>
<source>Warning: Unsupported Operating System(s) detected. PINN currently cannot backup the following OSes correctly:</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -1138,7 +1138,7 @@ Do you want to continue?</source>
</message>
<message>
<location filename="mainwindow.cpp" line="1134"/>
<location filename="mainwindow.cpp" line="4787"/>
<location filename="mainwindow.cpp" line="4824"/>
<source> is not available.
Please provide it locally or connect to the internet.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -3177,17 +3177,17 @@ Break</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="130"/>
<location filename="wifisettingsdialog.ui" line="132"/>
<source>&amp;Show Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="146"/>
<location filename="wifisettingsdialog.ui" line="139"/>
<source>&amp;Virtual Keyboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="wifisettingsdialog.ui" line="158"/>
<location filename="wifisettingsdialog.ui" line="162"/>
<source>&amp;Delete</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Loading

0 comments on commit f759744

Please sign in to comment.