Commit graph

349 commits

Author SHA1 Message Date
Ruffalo Lavoisier
cbb65ed61c rpi-imager_ko: add message for 'unmounting drive' 2023-04-13 16:43:08 +09:00
Floris Bos
23b0bf6b32 Linux udisks2: force kernel to rescan MBR before ejection
Otherwise it may still be doing it during ejection, resulting
in read IO errors in dmesg, which are harmless by themselves
but may confuse users.

Also tell udisks2 not to analyze disk by setting 'HintAuto'
property on BlockDevice object to 'false'
2023-03-30 16:26:26 +02:00
Floris Bos
9e882b31c4 Add Russian translation to CMakelists.txt 2023-03-24 15:51:09 +01:00
Floris Bos
83e2d22a9a Linux: only eject through udisks2 when we have DBus 2023-03-24 15:41:15 +01:00
maxnet
0790003d6d
Merge pull request #549 from OlesyaGerasimenko/qml
Add Russian translation
2023-03-24 15:39:26 +01:00
maxnet
7ba382f454
Merge pull request #560 from bovirus/qml
Add on top left after program name program version
2023-03-24 15:38:42 +01:00
Floris Bos
dc6ef75333 udisks2: add support for 'safely removing storage'
mountutils lacks implemention of ejecting storage on Linux.
Add that to our own code (not to mountutils as it is hard to
do DBus calls from there).
2023-03-24 15:33:54 +01:00
Floris Bos
b93fe29617 Apply advanced settings prompt: offer "no" without clear options
By request.
When prompted if previous settings should be applied, offer a
"no" button that only applies this time, and does not clear
settings.
2023-03-24 14:26:43 +01:00
Floris Bos
0378751295 Windows: update libcurl dependency
Update bundled libcurl.
Only used on Windows. On Linux and OSX we use system libraries.
2023-03-24 14:13:35 +01:00
Floris Bos
a97de5c703 drivelist/mountutils remove package.json
We are only cherry picking the C++ files from the drivelist and
mountutils dependencies and are not using the node.js stuff
that lives inside same directories.

package.json (that is not being used) mentions node dependencies
with version numbers that contain known vulnerabilties
and that seems to make some uncomfortable.

Delete files to avoid confusion.

Closes #556
2023-03-24 14:08:58 +01:00
Floris Bos
50b017332f Update dependencies libarchive/zlib/liblzma/zstd
Update various bundled dependencies to handle archive formats.
(Only used on Windows and OSX. On Linux system libraries are used)
2023-03-24 14:05:29 +01:00
Floris Bos
ed15fcda46 CMakeLists.txt: add support for Qt 6 / Apple universal builds 2023-03-22 17:57:08 +01:00
Floris Bos
43911005a2 FAT editing: handle root directory without end-of-dir marker
Fixes customizing Homebridge image.
2023-03-22 17:54:22 +01:00
Floris Bos
65f6a07fae FAT editing: fix creating files that are multiple of cluster size
Closes #568
2023-03-22 16:42:10 +01:00
Floris Bos
493869e47a Embedded: ensure /var/run exists for use by dhcpcd 2023-03-20 15:20:48 +01:00
Floris Bos
03f4924b8c Embedded: bump rpi-firmware version 2023-03-20 15:20:24 +01:00
Floris Bos
c8a05b995f Make code Qt 6 compatible / raises minimum Qt 5 version to 5.14
In addition to replacing Qt5 with Qt6 in CMakeLists.txt
two small changes to the code are needed to make things build
on Qt 6 (which in turn is needed for Apple M1/M2 support).

The cost of this change is that when building on Qt 5, at least
version 5.14 is needed.
Certain older but still used Linux distributions such as
Ubuntu 10.04 LTS still use 5.12, so revert this commit if you
are building on those...
2023-03-20 14:42:48 +01:00
maxnet
08599d082c
Merge pull request #567 from onuralpszr/cstdint_fix
fix: header import cstdint
2023-03-19 21:44:35 +01:00
Onuralp SEZER
569a70671b
fix: header import cstdint
Signed-off-by: Onuralp SEZER <thunderbirdtr@fedoraproject.org>
2023-03-19 23:18:20 +03:00
Floris Bos
6dc2f3e58e Refactor WLAN PSK retrieval code
- Reduce platform specific code in ImageWriter class,
  and move that to seperate classes.
- Use API calls to get current SSID on Windows and Linux instead
  of launching command line utilities.
2023-03-10 18:37:22 +01:00
Floris Bos
ebaf2ef6a1 qml advanced options: do not render HTML when displaying username
QML text labels by default support a small subset of HTML
formatting (e.g. <b> and <a href>)
Disable this.

Closes #564
2023-03-10 15:50:27 +01:00
bovirus
3094d5f316
Update rpi-imager.nsi.in
Add Product Version info in installer exe file properties.
2023-03-04 15:51:45 +01:00
bovirus
623641fc3f
Add on top left after progran name program version
It's useful to check in any window of instalelr whick is the evrsion that yoiur are installing.
2023-03-04 15:46:24 +01:00
OlesyaGerasimenko
766a3bc19f
Add Russian translation 2023-02-02 15:52:05 +03:00
Floris Bos
d972d5b87b Windows WLAN PSK retrieval: unescape XML
Assuming unescaping standard XML entities is sufficient.
(Skipping numerical unicode XML entities for now, as
there is not a proper standardized way to
represent non-ascii characters in a PSK anyway)

Ref #541
2023-01-25 14:37:24 +01:00
maxnet
6d69ff0797
Merge pull request #529 from martignoni/qml
Update French localisation and fix some strings
2023-01-25 13:47:57 +01:00
Nicolas Martignoni
7e3b689fa5
Update one more string 2022-12-29 17:00:56 +01:00
Nicolas Martignoni
05afedc1f6
Update a French string 2022-12-29 16:58:37 +01:00
Nicolas Martignoni
d8731a9487
Update French localisation and fix some strings 2022-12-29 16:53:02 +01:00
Floris Bos
a403df4385 Advanced settings FAT modification: fix expanding directory
When no more directory entries are available in the existing
cluster(s) of a directory on FAT32, we allocate an
extra cluster.
Make sure to zero out that new cluster, as disk checking utilities
may not stop reading when reaching an end of directory marker but
read the rest of cluster as well.
So there must not be any garbage data from a previously deleted file
in the sector there.

Also add checks to prevent getting in an endless loop on
encoutering circular "next cluster" references.
2022-11-20 18:44:22 +01:00
Floris Bos
2694f3976a Remove excess new line from "Header:" download debug output 2022-11-20 17:47:54 +01:00
Floris Bos
d600f36bc4 Advanced settings FAT modification: add GPT partition support 2022-11-20 14:46:58 +01:00
Floris Bos
05f1c4dbb5 Add integration tests
Tests if repository json files conform to the json schema.
If all resources (images/icons/website URLs) they mention actually
exists.

And can also test writing images and the FAT modification code.
2022-11-19 23:49:43 +01:00
Floris Bos
fce80b2a67 FAT code: also look at short file names and not just long names 2022-11-19 23:46:11 +01:00
maxnet
cc88408dae
Merge pull request #492 from rejas/de
Update de lang
2022-11-15 01:23:46 +01:00
Floris Bos
5fa3fbe8dc Switch to using FAT classes for advanced settings
- No longer relies on operating system for mounting FAT partition
  when applying 'advanced settings'
- change '__attribute__ ((packed))' to '#pragma pack()' as the
  mingw version we are using for Windows has a bug with the former
2022-11-15 01:15:08 +01:00
Floris Bos
ebc6edc0c3 Advanced settings: use current username instead of Pi as default
Instead of using 'pi' as default, try to get the username of
the current user from the OS.

May not always work. (e.g. some Windows users may not have
setup a username themselves, but may be using a default user
created by the PC vendor).

Closes #497
2022-11-15 01:10:46 +01:00
Floris Bos
e74efdca04 French: change telecharge
Closes #449
2022-11-14 21:45:07 +01:00
Floris Bos
c3237625bf Fix behavior on pressing "X" in advanced options dialog
In the "advanced settings" dialog, if "X" instead of
"apply settings" is clicked, it is seen as "cancel" and
no settings are applied.

If there do are saved settings, make sure to ask the
user on pressing "write" if they do want the saved settings
applied, instead of applying no settings.
2022-11-14 21:41:51 +01:00
Floris Bos
142ddfc037 Add classes for mounting FAT16/32 without help from OS
Minimal implementation for reading/writing files in the root
directory of a FAT16/FAT32 file system.

Can read/write from raw disk devices, and no longer relies on
operating system support for mounting the file system.

Currently assumes Imager will always be run on 'little endian'
architectures such as Intel and ARM (at least under Linux).
If there is a use-case for big-endian (anybody still using Sparc?)
this may be revisited later.
2022-11-14 21:41:20 +01:00
Floris Bos
30225187bd OSX: fix unmounting drives that have APFS volumes
- If a drive is formatted APFS it will have a seperate disk
devices for physical drive (e.g. /dev/disk2) and volumes
(e.g. /dev/disk3).
Need to unmount all, or opening the device for
writing will subsequently fail.
(User will see an "Error running authopen" error in Imager
in that case).

- Also do not show APFS volumes seperately in the disk
selection dialog. List mount points under physical drive
instead.

Closes #501
2022-11-07 03:36:32 +01:00
Floris Bos
9d4665dbca Advanced settings: fix escaping single quotes
Ref #486
2022-10-15 15:21:39 +02:00
Floris Bos
957c78f8a3 Fix copyright file
dependencies -> src/dependencies
mention sha256crypt being public domain
2022-10-11 16:15:49 +02:00
maxnet
c8d576abdc
Merge pull request #491 from waveform80/manpage
Add a man-page for rpi-imager
2022-10-11 15:24:35 +02:00
Dave Jones
abca857b67 Fix speling 2022-10-04 11:10:29 +01:00
veeck
18addaccc2 Update de lang 2022-10-03 23:06:42 +02:00
Dave Jones
153bac698a Add a man-page for rpi-imager 2022-09-28 00:39:48 +01:00
Floris Bos
ce0b02b823 Prevent user from entering invalid characters in hostname field
Implemented as "validator" which will cause that if an user
presses a key that is not allowed, it will not register.
Saves having to add an error message that would need to be
translated to different languages.

Closes #474
2022-08-18 20:07:26 +02:00
Floris Bos
9c95398210 Ensure buffering is used when writing uncompressed images
Just feed them through the libarchive workflow as well.
Prevents issues on Windows/osx when writing uncompressed images
that come from the Internet.

Ref #473
2022-08-18 15:37:37 +02:00
Floris Bos
2c00c64aba Revert "Add new regulatory-domain parameter to cloud-init files"
Existing Ubuntu version does not like new regulatory-domain
parameter being present.
This reverts commit 31252bf1c4.
2022-08-18 15:21:09 +02:00