1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00: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:
Pete Batard 2023-04-22 15:46:03 +01:00
parent 41ebb9d9ca
commit d18260bec3
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 45 additions and 40 deletions

View file

@ -32,8 +32,8 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- { sys: mingw64, env: x86_64 } - { sys: mingw64, env: x86_64, exe: rufus.exe }
- { sys: mingw32, env: i686 } - { sys: mingw32, env: i686, exe: rufus_x86.exe }
defaults: defaults:
run: run:
@ -76,22 +76,22 @@ jobs:
run: | run: |
./configure --disable-debug ${{ steps.set_alpha.outputs.option }} ${{ steps.set_beta.outputs.option }} ./configure --disable-debug ${{ steps.set_alpha.outputs.option }} ${{ steps.set_beta.outputs.option }}
make -j4 make -j4
mv ./src/rufus.exe . mv ./src/rufus.exe ./${{ matrix.exe }}
strip ./rufus.exe strip ./${{ matrix.exe }}
upx --lzma --best ./rufus.exe upx --lzma --best ./${{ matrix.exe }}
- name: Display SHA-256 - name: Display SHA-256
run: sha256sum ./rufus.exe run: sha256sum ./${{ matrix.exe }}
- name: Upload to VirusTotal - name: Upload to VirusTotal
if: ${{ github.event_name == 'push' }}
continue-on-error: true continue-on-error: true
if: ${{ matrix.env == 'i686' && github.event_name == 'push' }}
run: | run: |
curl --request POST --url https://www.virustotal.com/vtapi/v2/file/scan --form apikey=${{ secrets.VIRUSTOTAL_API_KEY }} --form file=@./rufus.exe curl --request POST --url https://www.virustotal.com/vtapi/v2/file/scan --form apikey=${{ secrets.VIRUSTOTAL_API_KEY }} --form file=@./${{ matrix.exe }}
curl --request POST --url https://www.virustotal.com/api/v3/monitor/items --header 'x-apikey: ${{ secrets.VIRUSTOTAL_API_KEY }}' --form path='/rufus.exe' --form file=@./rufus.exe curl --request POST --url https://www.virustotal.com/api/v3/monitor/items --header 'x-apikey: ${{ secrets.VIRUSTOTAL_API_KEY }}' --form path='/${{ matrix.exe }}' --form file=@./${{ matrix.exe }}
- name: Upload artifacts - name: Upload artifacts
if: ${{ matrix.env == 'i686' && github.event_name == 'push' }} if: ${{ github.event_name == 'push' }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: MinGW name: MinGW

20
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for rufus 3.23. # Generated by GNU Autoconf 2.71 for rufus 4.0.
# #
# Report bugs to <https://github.com/pbatard/rufus/issues>. # Report bugs to <https://github.com/pbatard/rufus/issues>.
# #
@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='rufus' PACKAGE_NAME='rufus'
PACKAGE_TARNAME='rufus' PACKAGE_TARNAME='rufus'
PACKAGE_VERSION='3.23' PACKAGE_VERSION='4.0'
PACKAGE_STRING='rufus 3.23' PACKAGE_STRING='rufus 4.0'
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
PACKAGE_URL='https://rufus.ie' PACKAGE_URL='https://rufus.ie'
@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures rufus 3.23 to adapt to many kinds of systems. \`configure' configures rufus 4.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1336,7 +1336,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of rufus 3.23:";; short | recursive ) echo "Configuration of rufus 4.0:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1428,7 +1428,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
rufus configure 3.23 rufus configure 4.0
generated by GNU Autoconf 2.71 generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc. Copyright (C) 2021 Free Software Foundation, Inc.
@ -1504,7 +1504,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by rufus $as_me 3.23, which was It was created by rufus $as_me 4.0, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw $ $0$ac_configure_args_raw
@ -2767,7 +2767,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='rufus' PACKAGE='rufus'
VERSION='3.23' VERSION='4.0'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@ -5309,7 +5309,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by rufus $as_me 3.23, which was This file was extended by rufus $as_me 4.0, which was
generated by GNU Autoconf 2.71. Invocation command line was generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -5365,7 +5365,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped' ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\ ac_cs_version="\\
rufus config.status 3.23 rufus config.status 4.0
configured by $0, generated by GNU Autoconf 2.71, configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View file

@ -1,4 +1,4 @@
AC_INIT([rufus], [3.23], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie]) AC_INIT([rufus], [4.0], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie])
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_SRCDIR([src/rufus.c])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])

View file

@ -1347,8 +1347,7 @@ BOOL GetDriveLabel(DWORD DriveIndex, char* letters, char** label)
if (DeviceIoControl(hPhysical, IOCTL_STORAGE_CHECK_VERIFY, NULL, 0, NULL, 0, &size, NULL)) if (DeviceIoControl(hPhysical, IOCTL_STORAGE_CHECK_VERIFY, NULL, 0, NULL, 0, &size, NULL))
AutorunLabel = get_token_data_file("label", AutorunPath); AutorunLabel = get_token_data_file("label", AutorunPath);
else if (GetLastError() == ERROR_NOT_READY) else if (GetLastError() == ERROR_NOT_READY)
uprintf("Ignoring 'autorun.inf' label for drive %c: %s", toupper(letters[0]), uprintf("Ignoring 'autorun.inf' label for drive %c: No media", toupper(letters[0]));
(HRESULT_CODE(GetLastError()) == ERROR_NOT_READY)?"No media":WindowsErrorString());
safe_closehandle(hPhysical); safe_closehandle(hPhysical);
if (AutorunLabel != NULL) { if (AutorunLabel != NULL) {
uprintf("Using 'autorun.inf' label for drive %c: '%s'", toupper(letters[0]), AutorunLabel); uprintf("Using 'autorun.inf' label for drive %c: '%s'", toupper(letters[0]), AutorunLabel);

View file

@ -115,7 +115,7 @@ static const char* autorun_name = "autorun.inf";
static const char* manjaro_marker = ".miso"; static const char* manjaro_marker = ".miso";
static const char* pop_os_name = "pop-os"; static const char* pop_os_name = "pop-os";
static const char* stupid_antivirus = " NOTE: This is usually caused by a poorly designed security solution. " 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."; "look into using a *SMARTER* antivirus solution.";
const char* old_c32_name[NB_OLD_C32] = OLD_C32_NAMES; const char* old_c32_name[NB_OLD_C32] = OLD_C32_NAMES;
static const int64_t old_c32_threshold[NB_OLD_C32] = OLD_C32_THRESHOLD; 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 // 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) 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; size_t nul_pos;
char *iso_label = NULL, *usb_label = NULL, *src, *dst; 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) // or 'layerfs-path=minimal.standard.live.squashfs' (see below)
// somewhere in their kernel options and use 'persistent' as keyword. // somewhere in their kernel options and use 'persistent' as keyword.
uprintf(" Added 'persistent' kernel option"); uprintf(" Added 'persistent' kernel option");
modified = TRUE;
// Also remove Ubuntu's "maybe-ubiquity" to avoid splash screen (GRUB only) // Also remove Ubuntu's "maybe-ubiquity" to avoid splash screen (GRUB only)
if ((props->is_grub_cfg) && replace_in_token_data(src, "linux", if ((props->is_grub_cfg) && replace_in_token_data(src, "linux",
"maybe-ubiquity", "", TRUE)) "maybe-ubiquity", "", TRUE))
uprintf(" Removed 'maybe-ubiquity' kernel option"); uprintf(" Removed 'maybe-ubiquity' kernel option");
} else if (replace_in_token_data(src, "linux", "layerfs-path=minimal.standard.live.squashfs", } else if (replace_in_token_data(src, "linux", "layerfs-path=minimal.standard.live.squashfs",
"persistent layerfs-path=minimal.standard.live.squashfs", TRUE) != NULL) { "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"); uprintf(" Added 'persistent' kernel option");
if (replace_in_token_data(src, "linux", "maybe-ubiquity", "", TRUE)) modified = TRUE;
uprintf(" Removed 'maybe-ubiquity' kernel option");
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append", } else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
"boot=live", "boot=live persistence", TRUE) != NULL) { "boot=live", "boot=live persistence", TRUE) != NULL) {
// Debian & derivatives are assumed to use 'boot=live' in // Debian & derivatives are assumed to use 'boot=live' in
// their kernel options and use 'persistence' as keyword. // their kernel options and use 'persistence' as keyword.
uprintf(" Added 'persistence' kernel option"); uprintf(" Added 'persistence' kernel option");
modified = TRUE;
} }
// Other distros can go to hell. Seriously, just check all partitions for // 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, // 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"); iso_label = replace_char(img_report.label, ' ', "\\x20");
usb_label = replace_char(img_report.usb_label, ' ', "\\x20"); usb_label = replace_char(img_report.usb_label, ' ', "\\x20");
if ((iso_label != NULL) && (usb_label != NULL)) { if ((iso_label != NULL) && (usb_label != NULL)) {
modified = FALSE; patched = FALSE;
for (int i = 0; i < ARRAYSIZE(cfg_token); i++) { 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; modified = TRUE;
patched = TRUE;
} }
if (modified) }
if (patched)
uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label); uprintf(" Patched %s: '%s' ➔ '%s'\n", src, iso_label, usb_label);
// Since version 8.2, and https://github.com/rhinstaller/anaconda/commit/a7661019546ec1d8b0935f9cb0f151015f2e1d95, // 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 // 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 // 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 // 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... // 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)) { if (img_report.rh8_derivative && (strstr(image_path, "netinst") == NULL)) {
for (int i = 0; i < ARRAYSIZE(cfg_token); i++) { 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; modified = TRUE;
patched = TRUE;
} }
if (modified) }
if (patched)
uprintf(" Patched %s: '%s' ➔ '%s'\n", src, "inst.stage2", "inst.repo"); uprintf(" Patched %s: '%s' ➔ '%s'\n", src, "inst.stage2", "inst.repo");
} }
} }

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326 IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.23.2027" CAPTION "Rufus 4.0.2028"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0 FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,23,2027,0 FILEVERSION 4,0,2028,0
PRODUCTVERSION 3,23,2027,0 PRODUCTVERSION 4,0,2028,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie" VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting" VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.23.2027" VALUE "FileVersion", "4.0.2028"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.23.exe" VALUE "OriginalFilename", "rufus-4.0.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.23.2027" VALUE "ProductVersion", "4.0.2028"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View file

@ -123,7 +123,7 @@ void GetBasicControlsWidth(HWND hDlg)
sz.cy = rc.bottom; sz.cy = rc.bottom;
// TODO: figure out the specifics of each Windows version // TODO: figure out the specifics of each Windows version
if (WindowsVersion.Version == WINDOWS_10) { if (WindowsVersion.Version >= WINDOWS_10) {
checkbox_internal_spacing = 10; checkbox_internal_spacing = 10;
dropdown_internal_spacing = 13; dropdown_internal_spacing = 13;
} }