Commit Graph

47 Commits

Author SHA1 Message Date
Pete Batard dd8314b2f0
[ui] add runtime UEFI media validation as a selectable advanced option
* Also add Ctrl-A as a new cheat-mode to toggle the use of Rufus MBR (which is enabled by default)
  which replaces the previous UI checkbox. The Disk ID field is now completely removed as we now
  use the default values for XP and non XP installs, and will expect people with multiple disks to
  disconnect all except the one where they plan to install Windows.
2024-04-02 17:18:06 +01:00
Pete Batard 5eae8a6441
[cmp] Enable extraction of zip archives outside of ISO copy mode
* This enables the use of Ctrl-SELECT to also extract files from a .zip
  when using non-bootable, DOS, UEFI-NTFS, etc.
* Also clean up some uprintf line terminations and some additional code.
* Also fix some Coverity and MinGW warnings.
2024-03-12 17:41:27 +00:00
Pete Batard 0df68b6af9
[misc] further Windows 7 specifics removals
* Also remove some unused code in stdlg.c
* Note that virtdisk appears to be a vulnerable library, so we go
  through delay loading yet again...
2023-04-28 17:46:05 +01:00
Pete Batard d18260bec3
[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.
2023-04-22 15:46:03 +01:00
Pete Batard e5f90282ed
[misc] improve Windows version detection
* Also use actual Windows major.minor when checking for updates
2023-04-17 13:33:05 +01:00
Pete Batard 3cd6d18ef8
[ui] fix 'Image option'/'Persistent partition size' title not toggling when switching ISOs 2022-11-07 17:42:54 +00:00
Pete Batard a0d669232c
[ui] add a new selection dialog for Windows 11 setup customization
* This moves the extended Windows 11 options (bypass TPM & Secure Boot) away from
  "Image options" into a new explicit dialog, along with supplementary customization
  such as enabling offline account (for Windows 11 22H2) and skipping all data
  collection questions.
* This customization is now enacted through an unattend.xml file rather than offline
  registry manipulation, so that this *should* also work with the Windows Store version.
* Also update arch detection and rework/reorganize upcoming translation changes.
* Note: The 'Remove "unsupported hardware" desktop watermark' option is *UNTESTED*.
2022-06-23 13:34:24 +01:00
Pete Batard d8af83dd14
[core] use Linux Data GUID for ext GPT partitions
* Also add an IS_EXT() macro
2022-06-08 19:37:24 +01:00
Pete Batard 036f6260c5
[ui] fix regression in conditional expression and use %c always
* This fixes the regression introduced in c28f9bc491.
* 'if ((a && !b) || (!a && b))' can not always be simplified as 'if (a != b)' when the types for 'a' and 'b' are not straight booleans.
* Closes #1862
* Also drop the use of '%C' in printf() expression, as it is intended to print wide characters and not turn a char to uppercase.
2022-01-31 16:55:42 +00:00
Pete Batard f6ac559f4d
[iso] don't link with version.lib to prevent DLL sideloading issues
* This is part of #1838, where we need to sort the version.dll sideloading problem for MinGW.
* A subsequent patch will be applied to MSVC, to more generally delay the loading of DLLs.
* Also fix a typo with an assert expression.
2022-01-05 16:49:06 +00:00
Pete Batard c28f9bc491
[misc] fix PVS-Studio warnings 2022-01-05 12:57:26 +01:00
Dimitri Papadopoulos d840083a32
[misc] fix typos found by codespell
* 3rd party software was left out.
* Most changes are in code comments, but one user-visible string has also been fixed.
* Closes #1817
2021-11-16 18:53:52 +00:00
Pete Batard 957ec183c9
[ui] improve progress report when disabling Windows 11 installation restrictions
* Also fix Image Options content being lost when switching language.
2021-10-09 16:18:45 +01:00
Pete Batard b043db33e6
[core] add option to bypass TPM 2.0/Secure Boot/RAM requirements for Windows 11 ISOs
* If 'Extended Windows 11 Installation' mode is selected, the system registry hive of
  'sources\boot.wim' is patched to add the Setup\LabConfig registry keys that bypass
  the TPM 2.0/Secure Boot/8GB+ RAM Windows 11 system requirements.
2021-10-08 19:24:10 +01:00
Pete Batard 4f97cdfdc3
[ui] increase projected size to prevent persistence overflow
* If users set the persistent size to max, we may run into a situation
  where projected size (which is always a rough estimation) is too low.
* When persistence is in use, we increase the projected size by 10%, to
  ensure that the above scenario cannot happen.
* Also work around potential issues with Windows APIs when the application
  is launched from the root of a drive.
2021-06-10 17:18:40 +01:00
Pete Batard c9e71de898
[ui] disable drag and drop during drive creation
* Closes #1672
* Also fix Rufus MBR not being selected when switching partition scheme to MBR
* Also fix users being prompted twice for ISO → ESP
2021-04-08 17:29:13 +01:00
Pete Batard bb291df342
[appstore] disable update related elements and enable Fido always
* The check for update is not necessary or even desirable for the AppStore
  version, since the Windows Store takes care of updating the app.
2021-02-08 21:02:01 +00:00
Pete Batard 9c71ac25d5
[badblocks] use 0x55 and 0xAA for less than 2 passes checks
* Should be more effective at detecting errors than 0x00 and 0xFF.
2020-11-10 17:24:52 +00:00
Pete Batard e6ac3782fe
[ext2fs] set a minimum ext partition size of 256 MB
* Not gonna bother with computing the effective minimum size so 256 MB will have to do.
* Closes #1576
2020-10-02 13:58:15 +01:00
Pete Batard 6f5ea5f88f
[efi] add RISC-V support
* Also fix Coverity warnings
2020-07-29 19:32:32 +01:00
Pete Batard 34b1d8a3ca
[core] enable the direct provision of install.wim/install.esd for Windows To Go
* Also remove the use of 'unattend.xml' to disable the recovery environment (use bcdedit instead)
* Also some code cleanup and refactoring
2020-07-19 22:35:30 +01:00
Pete Batard 4617f91e3b
[misc] introduce hImageOption and ComboBox_GetCurItemData() to simplify code
* Also add retry to ms-sys' write_sectors()
2020-07-17 21:51:15 +01:00
Pete Batard 0dc13e5283
[ui] fix missing labels for accessibility
* Closes #1467
* Also ensure that previous element is set when repositioning a
  control to preserve tabbing order
* Also fix x64 version being able to download x86 BETA
2020-07-02 22:55:01 +01:00
Pete Batard 94a2699640
[ui] perform ISO download feature check in a background thread 2020-06-13 13:17:35 +01:00
Tsarevich Dmitry 121257c584
[misc] fix PVS-Studio static analyzer warnings
* Surround macro params to ensure expected results
* Fix copy-paste errors
* Fix a potential buffer overflow in SetSectionHeaders()
* Add const modifier where relevant
* Use GetWindowLongPtr() everywhere
* Use proper sprintf format for unsigned int
* Use %s for printf-like funcs (https://www.viva64.com/en/w/v618/print/)
* Closes #1464
2020-02-28 17:08:11 +00:00
Pete Batard 1b02181f74
[ui] fix percent not being displayed on slow format 2019-09-21 22:39:00 +01:00
Pete Batard 38ba8d366c
[ui] use GNU wget's algorithms for rate/ETA display 2019-09-07 12:12:28 +01:00
Pete Batard e11113f802
[ui] fix stale progress bar during standalone ext2/ext3 format
* Also rename the FormatXXX function calls
2019-08-23 16:58:36 +01:00
Pete Batard af95de8198
[ui] add experimental optional display of transfer speed and time remaining
* You can use <Alt> to switch modes during an operation that supports it (e.g. Checksum
  computation, DD image writing or zeroing, save to VHD, download, etc.
* IMPORTANT: This is *NOT* available for all operations. Especially, if you were hoping
  to get transfer speed or ETA during ISO or WIM extraction, you *WILL* be disappointed.
* Also harmonize the code in checksum.c
2019-08-20 18:06:07 +01:00
Pete Batard 0186949255
[ui] prevent the toolbars from disappearing
* Seriously, who at Microsoft devised this utterly broken TB_GETIDEALSIZE call?
2019-07-05 12:24:50 +01:00
Pete Batard 24e8307d9a
[ui] update progress bar position for screen readers
* Make sure to call the original winproc on PBM_SETPOS and friends.
* Closes #1289
2019-06-14 13:02:35 +01:00
Pete Batard f6687e729b
[ui] fix unwanted persistence unit overlay
* Also fix a typo and make sure to quote more paths when invoking Fido.
2019-06-05 17:00:21 +01:00
Pete Batard 1c39a80d72
[core] partial overhaul of the partitioning and formatting facilities
* Add VDS formatting support (through an Alt-V cheat mode)
* Add partition index support
* Improve(?) Windows To Go support by following Microsoft recommended partition order
* Code refactoring & cleanup
2019-04-25 18:58:55 +01:00
Pete Batard 4b38483a68
[ext2fs] improve persistence partition creation's progress report
* Closes #691
2019-04-19 13:24:20 +01:00
Pete Batard 9610e3a63b
[misc] refactor some global variables' names so we can reinstate -Wshadow
* Also remove no longer used _coverity.cmd and update .gitignore
2019-04-13 15:29:27 +01:00
Pete Batard 28c1d6eb31
[core] display a notice about Legacy in the protective MBR for GPT
* This should help Windows users who create a GPT/UEFI drive and try to use it in BIOS/Legacy
* Also make sure that we take into account the split space for both "SELECT" and "DOWNLOAD"
2019-03-16 13:12:08 +00:00
Pete Batard e073fb47b0
[net] add Windows retail ISO downloads
* This is accomplished through Fido (https://github.com/pbatard/Fido), a *SIGNED*
  PowerShell script, that is downloaded from GitHub and that resides in memory for
  the duration of a session.
* The reason we use a downloaded PS script, rather than an embedded on, is because:
  - Microsoft have regularly been changing the deal with regards to how retail ISOs
    can be downloaded, and not for the better, so we can't simply embed a static
    means of downloading ISOs and expect that to work forever.
  - By using an external script, we can immediately respond to whatever new means of
    *ANNOYING* their legitimate users Microsoft will come up with next, as well as
    make sure that, the minute a new retail version of Windows becomes available, it
    also becomes available for download in Rufus.
* Note that if you are concerned about downloading a remote PS script that is being
  run at the same level as an elevated application, you should understand that:
  - Only scripts downloaded from GitHub, from an account that is protected with 2FA,
    are allowed to run (i.e. someone would first have to steal a *physical* 2FA key
    to be in a position to upload a malicious script).
  - On top of this, only scripts that are signed with a separate private key (RSA +
    AES-256), that is itself also protected with a strong unique password which only
    a single person knows (and must manually enter each time they want to make a new
    version of the script available for download), are allowed to run.
  The above means that there's about as much chance for someone to manage to upload
  a malicious script on the GitHub servers, that Rufus would allow to run, as there
  is for someone to upload a malicious version of Rufus itself.
  Still, if you are paranoid and have concerns that, even as you can validate from
  its source that Rufus does not attempt to execute any remote script unless a user
  actively selected and clicked the DOWNLOAD button, you can also completely disable
  the remote script download feature, if you just set the update check to disabled
  (which, by the way, Rufus *EXPLICITLY* asks you to choose whether you want to
  enable or not, the very first time you run the application).
* Also remove _unlinkU() which duplicates what DeleteFileU() already does.
2019-03-02 23:34:32 +00:00
Pete Batard 5247ffa6ab
[core] add a notice about MBR and >2TB partitions
* Also fix Boot Options not displaying when no drive is plugged in advanced mode
2019-02-01 12:35:09 +00:00
Pete Batard 04a5793ee7
[misc] use compilation flag to undefine NDEBUG for assert 2018-11-21 17:45:18 +00:00
Pete Batard 619dd9862b [misc] use GetWindowLongPtr/SetWindowLongPtr everywhere
* Also remove WS_EX_RIGHT style from IDC_PERSISTENCE_SIZE since we apply it manually
2018-08-20 09:46:23 +01:00
Pete Batard e8745339e4 [ui] fix multiple persistence slider issues
* Range not being set when plugging a drive
* Set position to zero when no drive is selected
* Make sure the restored position can not be greater than the max
2018-08-14 23:05:52 +01:00
Pete Batard 71578459d7 [loc] fix spaces before full stops
* Also: "Asserts, it's not just for debug any more!"
2018-07-31 20:47:24 +01:00
Pete Batard 1004a6e066 [ui] update persistence size controls
* Also refactor ToggleImageOptions()
2018-07-18 12:22:37 +01:00
Pete Batard 59aab9b61d [core] refactor fast-zeroing code and fix warnings
* Fox coverity and MinGW warnings
2018-07-15 12:27:21 +01:00
Pete Batard f9275e4780 [loc] update the processing of version numbers
* Now only use major.minor for version references
* Drop the use of LOC_FRAMEWORK_VERSION. We'll use custom handling if we ever need a framework change.
* Also update/fix some of the UI elements for persistent partition
* Also reposition the language selection menu when we don't have a large number of them
2018-07-15 01:05:05 +01:00
Pete Batard a394b9731a [ui] add positioning, resizing & filling of the persistence controls
* Also add a test ISO to display these controls
* The intent is to use the next round of translation to get these new UI elements localized,
  as any translation work takes _months_, and it is a precondition to start working on #691.
* Also fix new issues with image options when switching language
2018-07-06 11:23:57 +01:00
Pete Batard 05f8400451 [misc] reorganize UI function calls into their own source
* Also fix ARM/ARM64 broken compilation due to missing __popcnt()
2018-07-06 05:46:36 +01:00