mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-01 23:38:30 -04:00
[misc] update version to 4.0
* With the removal of Windows 7 support, wrong platform archs in the check for updates (that has now been fixed) and switch to an x86_64 default MinGW binary, we have enough breaking changes to warrant a version bump for the major. So just do that. * Also fix a couple Coverity warnings and update a URL.
This commit is contained in:
parent
41ebb9d9ca
commit
d18260bec3
7 changed files with 45 additions and 40 deletions
26
src/iso.c
26
src/iso.c
|
@ -115,7 +115,7 @@ static const char* autorun_name = "autorun.inf";
|
|||
static const char* manjaro_marker = ".miso";
|
||||
static const char* pop_os_name = "pop-os";
|
||||
static const char* stupid_antivirus = " NOTE: This is usually caused by a poorly designed security solution. "
|
||||
"See https://goo.gl/QTobxX.\r\n This file will be skipped for now, but you should really "
|
||||
"See https://bit.ly/40qDtyF.\r\n This file will be skipped for now, but you should really "
|
||||
"look into using a *SMARTER* antivirus solution.";
|
||||
const char* old_c32_name[NB_OLD_C32] = OLD_C32_NAMES;
|
||||
static const int64_t old_c32_threshold[NB_OLD_C32] = OLD_C32_THRESHOLD;
|
||||
|
@ -322,7 +322,7 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t file_length, const
|
|||
// Apply various workarounds to Linux config files
|
||||
static void fix_config(const char* psz_fullpath, const char* psz_path, const char* psz_basename, EXTRACT_PROPS* props)
|
||||
{
|
||||
BOOL modified;
|
||||
BOOL modified = FALSE, patched;
|
||||
size_t nul_pos;
|
||||
char *iso_label = NULL, *usb_label = NULL, *src, *dst;
|
||||
|
||||
|
@ -341,20 +341,22 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
|
|||
// or 'layerfs-path=minimal.standard.live.squashfs' (see below)
|
||||
// somewhere in their kernel options and use 'persistent' as keyword.
|
||||
uprintf(" Added 'persistent' kernel option");
|
||||
modified = TRUE;
|
||||
// Also remove Ubuntu's "maybe-ubiquity" to avoid splash screen (GRUB only)
|
||||
if ((props->is_grub_cfg) && replace_in_token_data(src, "linux",
|
||||
"maybe-ubiquity", "", TRUE))
|
||||
uprintf(" Removed 'maybe-ubiquity' kernel option");
|
||||
} else if (replace_in_token_data(src, "linux", "layerfs-path=minimal.standard.live.squashfs",
|
||||
"persistent layerfs-path=minimal.standard.live.squashfs", TRUE) != NULL) {
|
||||
// Ubuntu 23.04 uses GRUB only with the above and does not use "maybe-ubiquity"
|
||||
uprintf(" Added 'persistent' kernel option");
|
||||
if (replace_in_token_data(src, "linux", "maybe-ubiquity", "", TRUE))
|
||||
uprintf(" Removed 'maybe-ubiquity' kernel option");
|
||||
modified = TRUE;
|
||||
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
|
||||
"boot=live", "boot=live persistence", TRUE) != NULL) {
|
||||
// Debian & derivatives are assumed to use 'boot=live' in
|
||||
// their kernel options and use 'persistence' as keyword.
|
||||
uprintf(" Added 'persistence' kernel option");
|
||||
modified = TRUE;
|
||||
}
|
||||
// Other distros can go to hell. Seriously, just check all partitions for
|
||||
// an ext volume with the right label and use persistence *THEN*. I mean,
|
||||
|
@ -379,12 +381,14 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
|
|||
iso_label = replace_char(img_report.label, ' ', "\\x20");
|
||||
usb_label = replace_char(img_report.usb_label, ' ', "\\x20");
|
||||
if ((iso_label != NULL) && (usb_label != NULL)) {
|
||||
modified = FALSE;
|
||||
patched = FALSE;
|
||||
for (int i = 0; i < ARRAYSIZE(cfg_token); i++) {
|
||||
if (replace_in_token_data(src, cfg_token[i], iso_label, usb_label, TRUE) != NULL)
|
||||
if (replace_in_token_data(src, cfg_token[i], iso_label, usb_label, TRUE) != NULL) {
|
||||
modified = TRUE;
|
||||
patched = TRUE;
|
||||
}
|
||||
}
|
||||
if (modified)
|
||||
if (patched)
|
||||
uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label);
|
||||
// Since version 8.2, and https://github.com/rhinstaller/anaconda/commit/a7661019546ec1d8b0935f9cb0f151015f2e1d95,
|
||||
// Red Hat derivatives have changed their CD-ROM detection policy which leads to the installation source
|
||||
|
@ -393,13 +397,15 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
|
|||
// netinst from regular is a pain. So, because I don't have all day to fix the mess that Red-Hat created when
|
||||
// they introduced a kernel option to decide where the source packages should be picked from we're just going
|
||||
// to *hope* that users didn't rename their ISOs and check whether it contains 'netinst' or not. Oh well...
|
||||
modified = FALSE;
|
||||
patched = FALSE;
|
||||
if (img_report.rh8_derivative && (strstr(image_path, "netinst") == NULL)) {
|
||||
for (int i = 0; i < ARRAYSIZE(cfg_token); i++) {
|
||||
if (replace_in_token_data(src, cfg_token[i], "inst.stage2", "inst.repo", TRUE) != NULL)
|
||||
if (replace_in_token_data(src, cfg_token[i], "inst.stage2", "inst.repo", TRUE) != NULL) {
|
||||
modified = TRUE;
|
||||
patched = TRUE;
|
||||
}
|
||||
}
|
||||
if (modified)
|
||||
if (patched)
|
||||
uprintf(" Patched %s: '%s' ➔ '%s'\n", src, "inst.stage2", "inst.repo");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue