[REG][REACTOS][EXPLORER][APPWIZ][CONSOLE][INETCPL][INPUT]
[INTL][OPENGLCFG][TIMEDATE][DEVCPUX][COMCTL32][COMDLG32]
[MSGINA][NETCFGX][NETID][SETUPAPI][SHELL32][SYSSETUP]
Update Simplified and Traditional Chinese translations.
- The converter is code7bit I made. code7bit: https://github.com/katahiromz/code7bit
- This converter converts non-clean characters in string literals.
- However I couldn't erase a ton of codepage C4819 warnings.
- CORE-15447
You can edit an European source file as follows:
- Right click the file in the Solution Explorer.
- Select "Open With...".
- Choose "C++ Source Code Editor (with encoding)".
- Choose "Central European (Windows) - Codepage 1260".
- Add checks for GPT disks and either fail or ignore the disk,
depending on the operation being executed.
[USETUP][REACTOS] Display the disk style more accurately.
CORE-7749
- Correctly insert discovered partitions in sorted order of StartSector,
and verify that they do not overlap (-> check for broken partitioning).
May help for CORE-10898.
- Use the correct reported partition numbers that may be modified after
partitioning changes, and that need to be used when opening
\Device\Harddisk'M'\Partition'N' files. This is achieving by
retrieving the returned value of the IOCTL_DISK_SET_DRIVE_LAYOUT call.
Distinguish them from the "on-disk" partition numbers that are the ones
that enumerate the partition in partition-table order (and is the order
known by e.g. the BIOS), and that should be used to construct the
destination ARC path.
May help for CORE-4870, CORE-13205.
- Simplify a lot of duplicated code by using helper functions.
Always perform the partition validity checks when creating new
primary/extended/logical partitions, and also when a new partition
is automatically created when unpartitioned space is selected for
ReactOS installation.
CORE-12246
This will allow compatibility with modern OSes and
modern disk management utilities.
It will also improve performances by properly aligning
partition start.
And it will let enough room at the begin of the disk
for 3rd party bootloaders.
WARNING: this is not compatible with previous partition
model, and old one will likely not be compatible. You'll
have to erase your whole partition table and start from
scratch.
Simplified implementation of the proposed solution by George Bișoc
and revised by Victor Perevertkin from PR #952.
NOTE: For whatever reason ERROR_INSTALL_BOOTCODE and ERROR_WRITE_BOOT
seem to be redundant with each other. To be investigated...
Most of Linux filesystems have the MBR ID assigned as 0x83 and when the user chooses BTRFS upon partitions page wizard, we're thinking of the partition as having Ext2 filesystem which is wrong and misleading.
- Interface the TreeList code and populate it with the list of
discovered disks and partitions. Code is adapted from USETUP.
Also display the names of the disks.
- Display some installation settings summary, before doing the
installation proper.
- Force the user to select a checkbox when (s)he acknowledges that
ReactOS is alpha-quality software and may break on his/her computer
or corrupt his/her data.
- Improve wizard pages transitions and buttons enabling/disabling.
- Press Shift-F10 to start a command-line (as in the 2nd-stage setup
in syssetup.dll).
- Use some explicit UNICODE functions/macros.
Add the TreeList control from Anton Zechner and Sébastien Kirche
from https://github.com/sebkirche/treelist (under GPL-3.0+) as a
*TEMPORARY* solution until a better-suited control for ReactOS is
developed.
- Compilation fixes for the TreeList control.
- SETUPLIB and USETUP: Convert PARTENTRY::DriveLetter to WCHAR.
- SETUPLIB: Retrieve volume label.
- SETUPLIB and USETUP: Move the partition types (IDs) table from
USETUP to SETUPLIB so that they can share it with the 1st-stage
GUI installer too. Also take the opportunity to update the table
with information from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
and cross-checked with the list from Paragon Hard-Disk Manager.
- USETUP: Simplify PrintPartitionData().
- Add some code comments.
This increases performance for each time the SETUPLIB calls (using NT paths)
Win32 SetupAPI functions which of course only accept Win32 paths.
- Handle also the fact that a NT path to convert may start with
\Device\HarddiskX\PartitionY\..., which can be a symlink to
\Device\HarddiskVolumeN\... on some systems. In that case, the
Win32 path mapping should be done slightly differently.
- Add support for network mapped drives.
- Improve UI usage and wizard transitions (Work In Progress).
- Add interfacing code that display installation status.
- When the user attempts to cancel the installation during file copying,
pause the file copying, and restart it if the user changes it mind and
wants to continue the installation. Otherwise file copying is properly
halted.
- BOOTDATA: Use standard INF signature string, so that they can be
opened successfully using ReactOS' or Windows' setupapi.dll with
the INF_STYLE_WIN4 style.
- SETUPLIB: Use the correct INF_STYLE_* INF styles in SpInfOpenInfFile() calls.
- REACTOS : Switch thread locale to user-specified LocaleId when calling
SetupOpenInfFileW(), so that the correct localized strings are used.
- In PrepareCopyInfFile(), explicitly use AddSectionToCopyQueueCab()
to retrieve the files from the CAB INF.
Otherwise if one continued to use and rely on AddSectionToCopyQueue()
to do this job instead, bad things could happen like, re-enumerating
twice or more (and adding them to the file queue) the same files.
This is because in the new code AddSectionToCopyQueue() can be called
many times to deal with different SIF file sections. The old code then
called AddSectionToCopyQueueCab() in turn, but on the same list...
Now the steps performed are clear, and everything works as intended.
- Simplify the code that computes the full source and destination paths
for the files to be copied and directories to be created, using helper
functions.
- Compute the source file and target location from the TXTSETUP.SIF
entries in a NT-compatible manner.
- Use adequate access flag when opening symbolic links.
- Simplify the prototype of UpdateRegistry() since now both Setup INF
handle and settings lists are inside the USETUP_DATA structure.
This means, call in the correct order the user callback with the correct
parameters (in particular the correct paths for file copy operations),
and check also for the callback returned value to know whether or not to
continue the file operations.
This allows using some of the SetupApi.dll functions when SETUPLIB is
used in the (Win32) GUI 1st-stage installer "REACTOS", while using the
custom implemented NT-aware functions in "USETUP".
- Add support for delete and move/rename operations, which are needed
for implementing ReactOS upgrading support.
- Use cabinet contexts.
- Use standard LIST_ENTRY structures for implementing the lists.
- Move the path-building hack code in SetupCommitFileQueueW() that had
been introduced in r66604 (97bb83f) out of the file-queues code.
- Make the function prototypes compatible with win32's setupapi functions.
- Fix the format of the data passed to the custom notification handler.
- Adjust the file-copy callback to correctly use its arguments (setupapi-compatible).
- Move a great deal of global variables into the USETUP_DATA structure
(the SetupInf, the SetupFileQueue, the generic lists...).
- Place the common setup initialization code into an InitializeSetup()
routine, and the cleanup code into FinishSetup().
- Implement the setup-code part support for the TXTSETUP.SIF setup
source path override variables "SetupSourceDevice" and "SetupSourcePath"
(see CORE-9023); support for them in SETUPLDR will be added later.
- In the 1st-stage GUI setup, display the list of existing discovered
NTOS installations, with its name, installation path and vendor name,
and an associated icon.
svn path=/branches/setup_improvements/; revision=75544
[SETUP:REACTOS] More interfacing of the 1st-stage GUI installer with the setuplib.
- Add a ConvertNtPathToWin32Path() helper function that allows converting
NT paths like: \Device\CdRom0\i386\txtsetup.sif file into a Win32 path
that the Win32 versions of the SetupApi functions (e.g. SetupOpenInfFileW)
can accept.
Note that RtlNtPathNameToDosPathName() cannot be used here because this
function only works for NT paths within the \DosDevices\ (or \??\) NTObj
directory, and not in other directories.
- Use this helper function in the implementation of SetupOpenInfFileExW.
Now the txtsetup.sif function can be loaded by setuplib *when being used*
by the 1st-stage GUI installer!
- Remove deprecated code.
svn path=/branches/setup_improvements/; revision=75668
svn path=/branches/setup_improvements/; revision=75721
svn path=/branches/setup_improvements/; revision=75750
This includes also to remove the created symlinks.
Symlinks deletion is special, as one has to open first the symlink
itself (and not its target), then remove the "SymbolicLinkTarget" value
before really deleting the key. Of course everything must be done under
proper access rights.
Additional changes:
- Change prototype BOOLEAN CmpLinkKeyToHive(...) to NTSTATUS CreateSymLinkKey(...).
- Silence few DPRINTs.
- Document some FIXMEs that I need to inspect later on ReactOS.
- HKEY --> HANDLE.
- It can therefore be also used by the 1st-stage GUI setup.
- Rename some function parameters to clarify what they should be.
Based on:
svn path=/branches/setup_improvements/; revision=75750
Additions:
- Use explicit __cdecl calling convention for variadic functions.
- Fix also the whitespace in consup.h.
svn path=/branches/setup_improvements/; revision=75749
[USETUP] Improve usage of ERROR_TXTSETUP_SECTION and ERROR_CABINET_SECTION error codes, correctly display associated error message, and remove a deprecated string.
- Apart from allowing a UI cache variable that may be used when
displaying GENERIC_LIST_ENTRY-ies, do not store any display strings
associated to these list entries. They should be instead computed only
when initializing a list UI (or a combo-box or list control if the
code is used in Win32 environment).
For this matter a callback is provided to InitGenericListUi() that
does the job of computing the displayed string corresponding to a
given GENERIC_LIST_ENTRY.
- Simplify the calls to InitGenericListUi(), and refactor the
RestoreGenericListUiState() function.
- Use for-loops for iterating over GENERIC_LIST items.
- Adapt the storage data format for lists of settings items.
- The txtsetup.sif INF format specified in LoadSetupInf() should not be
INF_STYLE_WIN4 (to be investigated...).
- Use OBJ_CASE_INSENSITIVE when initializing object attributes
(no actual reason why to keep case sensitivity there).
- Check the success of a RtlStringCchPrintfW call in EnumerateReactOSEntries().
- Explicitly check for returned STATUS_NOT_SUPPORTED from ChkdskPartition()
or FormatPartition(), and display an appropriate error message.
- Remove some left-over comments but also explain why I kept some
commented code (mainly for future reference).
Comment about the status of two '#if 0'.
[SETUPLIB] Fix some uninitialized variables (caught by clang-cl).
Also, initialize NtName->Length in return paths in ResolveArcNameManually().
Only convert to ANSI when needed (e.g. in the display code for usetup).
The 1st-stage GUI setup will however use the UNICODE strings directly.
svn path=/branches/setup_improvements/; revision=75753
[SETUPLIB] Copy the mui* files from usetup into the setuplib for later usage, and add mui.c to build.
svn path=/branches/setup_improvements/; revision=75711
[SETUPLIB][USETUP] Start massaging the MUI files and split up what concerns only the usetup "resources",
and what concerns general language parameters (in the setuplib).
It may be interesting to retrieve the language parameters
from INF file (e.g. intl.inf) (suggested by Giannis).
svn path=/branches/setup_improvements/; revision=75715
[SETUPLIB] Add the necessary headers to mui.c to be able to compile.
[USETUP] Comment out the languages that don't have any resources.
svn path=/branches/setup_improvements/; revision=75716
[SETUPLIB][USETUP] Adjust MUI and settings code.
- Re-enable settings code concerning language, keyboards & layout
in the setuplib, and remove the old code in usetup.
- Remove useless code in setuplib's mui.c.
- Rename usetup's MUI "LanguageList" into "ResourceList" so as to
avoid colliding with the "LanguageList" of setuplib.
- Add the magic CMakeLists line "add_definitions(${I18N_DEFS})" that
I forgot previously, that caused the "LanguageList" of setuplib to be empty!
The code compiles and works during my tests.
svn path=/branches/setup_improvements/; revision=75717
[SETUPLIB] Change some string pointer types & function prototypes so that the usetup-specific
"SelectedLanguageId" variable is not used in the library.
svn path=/branches/setup_improvements/; revision=75719
[SETUPLIB] Change some function prototypes so that the usetup-specific "SelectedLanguageId" variable is not used in the library.
Also, make AddEntriesFromInfSection(), DefaultProcessEntry() and the typedef PPROCESS_ENTRY_ROUTINE private again.
svn path=/branches/setup_improvements/; revision=75720
svn path=/branches/setup_improvements/; revision=75724
[USETUP] Code adaptations.
- Transform some do{}while() loops into while(){} ones, since the lists on which we work may only contain one single {NULL} element.
- Modify MUIGetOEMCodePage() call after r75719.
- Use PCWSTR where needed.
svn path=/branches/setup_improvements/; revision=75722
[USETUP] Adjust some MUI & settings calls, following the commits r75719, r75720 and r75721.
svn path=/branches/setup_improvements/; revision=75723
[INPUT.CPL] Adjust inclusion of "muifonts.h" (commit 3dbd44f) due to changes introduced in r75711 and r75715.
This code is moved ther since it'll be needed for 1st-stage GUI
installer as well.
The code dealing with keyboard layouts is however not moved yet,
since it uses MUI* functions from usetup.
I'll try to think how to include that in setuplib...
svn path=/branches/setup_improvements/; revision=75701
Move the bootsup.c code into the setuplib, as the code is generic
enough to be used by both USETUP and the 1st-stage GUI installer.
svn path=/branches/setup_improvements/; revision=75674
This helper is inspired by the reactos/reactos.c!LoadGenEntry() function.
Use this helper in the different Create*List() functions.
svn path=/branches/setup_improvements/; revision=75700
- Compute the installation source paths based on the full path of the
installer program that uses the setup library.
- Add INF_STYLE_OLDNT define in infsupp.h.
- Add some (silenced) diagnostic DPRINTs.
svn path=/branches/setup_improvements/; revision=75667
- Use correct inf style flags in SetupOpenInfFileEx() calls when opening
txtsetup.sif and unattend.inf. Technically txtsetup.sif would be
INF_STYLE_WIN4, but since we use "$ReactOS$" as its version signature,
it would not work when opening it with setupapi.dll functions.
Hence this flag is combined with INF_STYLE_OLDNT too.
- Don't fail if opening the \SystemRoot symbolic link doesn't work
(usually due to incorrect access rights); in that case, just use the
installer image file path as the installation source path.
svn path=/branches/setup_improvements/; revision=75676
And turn the previous two functions into macros.
svn path=/branches/setup_improvements/; revision=75635
svn path=/branches/setup_improvements/; revision=75652
Used in exiting code and in later code in this file.
svn path=/branches/setup_improvements/; revision=75632
svn path=/branches/setup_improvements/; revision=75652
- Move several global setup variables into a structure "USETUP_DATA",
similar to the syssetup structure "SETUPDATA" (or the WIP 1st-stage
installer structure of the same name), so that these variables can be
set easily by different helper setup functions;
- Move CheckUnattendedSetup() and GetSourcePaths() to setuplib and make
CheckUnattendedSetup() use the USETUP_DATA structure;
- Add a LoadSetupInf() function that loads the txtsetup.sif file
(factoring out the corresponding code in USETUP);
- Add a InstallSetupInfFile() function (that I'll probably rename later on)
whose purpose is to create a valid "$winnt$.inf" setup installation file
in the ReactOS\system32 directory, which should help the 2nd-stage installer
to correctly retrieve the source installation media we used during 1st-stage,
and contain the unattended setup lines copied from unattend.inf. This is
done in a Windows-compatible way.
svn path=/branches/setup_improvements/; revision=75518
[USETUP] Close the txtsetup.sif file at the end of the operations.
svn path=/branches/setup_improvements/; revision=75539
They currently do nothing, since the getter functions don't actually
capture (copy) the strings but merely return pointers to read-only strings.
But the calls are placed here for consistency, because if one day the
getters' implementation is changed so that strings are captured, it would
then be needed to free the allocated buffers.
In addition, fix a buggy call to INF_GetData() -- should be instead
INF_GetDataField() -- in AddSectionToCopyQueue().
svn path=/branches/setup_improvements/; revision=75516
Remove the commented-out IsValidPath() in that file, and remove
as well the temporary prototypes in regutil.c .
svn path=/branches/setup_improvements/; revision=75249
Split the registry helper code into registry utility functions
(create/mount/unmount/verify hives) and registry creation code
(the rest: initializing the system hives) and move it in the
setup library.
svn path=/branches/setup_improvements/; revision=75247
[USETUP][SETUPLIB] Improve how the Setup* INF APIs are interfaced in the code.
Define prototypes compatible (including their calling convention)
with the ones defined by setupapi (.h/.dll) so that it can be possible
to either use an internal implementation of these functions (via the
INFLIB library) as currently being done, or using imported setupapi
functions, as would be done by the future 1st-stage GUI installer.
[SETUPLIB] Cleanup the registry.c file and use the infsupp.h header.
svn path=/branches/setup_improvements/; revision=75345
svn path=/branches/setup_improvements/; revision=75346
[USETUP][SETUPLIB] Move some INF-related code from usetup to the setuplib.
- Move the generic INF_GetDataField() and INF_GetData() helpers to
setuplib, and rework them a bit so that they explicitly call setupapi
functions (or implementations thereof when being used in usetup);
- Rework the headers in accordance;
- Fix compilation in lib/registry.c .
- Fix compilation when these headers are used withing usetup (who
doesn't use setupapi.dll) and "reactos" (the 1st-stage GUI installer
that uses setupapi.dll).
svn path=/branches/setup_improvements/; revision=75515
svn path=/branches/setup_improvements/; revision=75537
svn path=/branches/setup_improvements/; revision=75538
- As GetSourcePaths() is used once in USETUP to initialize global
UNICODE_STRING path strings once, move it out of drivesup.c and
put it in usetup.c. Then remove drivesup.c : 1 file less!
- Move some INF file prototype declarations out of usetup.h and
inside inffile.h where they should better be, as inffile.h and .c
is the glue code for the INF library, defining similar functions
as the ones in setupapi.dll.
- I rename our local SetupOpenInfFileW() into SetupOpenInfFileExW()
because the latter one takes an extra user-provided LCID parameter,
and this is this one that we use in USETUP.
- Make 'UNICODE_STRING SourcePath;' visible only inside usetup.c
(not used elsewhere).
- Implement installation path validity check in case we are either
in repair/update, or unattended setup mode. If the path is detected
as invalid, then we fall back into manual path specification
(for now...; note that we could instead fail the installation too).
svn path=/branches/setup_improvements/; revision=75246
- Modify a bit the page flow so that the upgrade page is inserted before
the Device-settings page, and after the Install-Intro page.
- Insert some extra 'RepairUpdateFlag' checks in SelectPartitionPage() and
InstallDirectoryPage() to take specific actions in case the flag is TRUE.
svn path=/branches/setup_improvements/; revision=74576
svn path=/branches/setup_improvements/; revision=75525
Implement work-in-progress code that, when upgrading an existing
ReactOS installation, verifies whether the (existing) system registry
hives are valid (by loading & unloading them, this allows using the
built-in repair functionality if needed), or not.
If a given hive cannot be repaired successfully, it is backed up
(with a '.brk' extension, "brk" as "broken"), then is marked up for
recreation.
When all hives have been checked, if there are any hive that needs
to be recreated, we recreate its hive file, mount it, but we do *NOT*
mount the other valid existing hives for update. We create instead
dummy registry hives so that we can actually use, as the update code,
the same one as the one used when fully creating the registry hives
for a clean installation (of course, this choice can be improved later on).
The update code (i.e. the same as the registry clean-install one) then
adds the registry keys & values, either putting them in the dummy
registry hives (the ones that we don't want to recreate) or in the
registry hive that is recreated.
At the end, the (re)created registry hives are flushed back to disk,
and a copy of them (under a '.sav' extension) are created, so that they
can be used for restoration purposes if 2nd-stage (and up) goes berserk.
Extra fixes:
- Use the correct structure member field when initializing the
'InstallDir' variable, when performing an upgrade.
- CreateNestedKey() should be better analysed to see whether it correctly
creates the full registry path compatible with volatile/non-volatile keys
(under inspection).
svn path=/branches/setup_improvements/; revision=75010
Will be used soon to make backups of system files, like the registry hive files just freshly created.
- Make the SetupCopyFile() function closer to its win32 counterpart.
- Adjust the code that calls SetupCopyFile().
svn path=/branches/setup_improvements/; revision=75008
svn path=/branches/setup_improvements/; revision=75009
The rationale is as follows.
We now have the 1st-stage ReactOS setup running with its own registry SYSTEM hive,
similarly to regular ROS running instances (livecd, regular installation...).
The ReactOS-specific SetInstallPathValue() hack, introduced in a76689e9 (r3794)
and 5f973ce0 (r3795), is removed. This hack told the kernel that, during the setup,
it had to "switch" the used registry hives and instead use the ones of the ROS
installation being prepared.
This was really hackish because this means, mixing between registry settings used only
for the setup running instance, that could use different registry settings
than the ones that should be set for the ROS installation being actually performed.
Also, note that in the case of a 1st-stage GUI setup, consisting in running the
LiveCD + the GUI setup program, this situation would be untenable. Note also that
for people willing to use the Setup*** functions exported by setupapi.dll to parse
the registry INF files to initialize the registry of the ROS installation being
prepared, this would be impossible either.
Hence the need to have offline registry modification functionality.
svn path=/branches/setup_improvements/; revision=74766
- Also, reserve a new field to display whether the disk is MBR or GPT-initialized.
- Adjust the code that used the "STRING_HDDINFOUNKx" string labels.
The extra slot added to some of the strings is to indicate whether the disk is MBR or GPT.
As attentive readers will notice, the code that "determines" whether the disk is either MBR or GPT
is of course just temporary: it's just a placeholder code that should currently just show "MBR".
Having the NoMbr flag mostly signifies that the disk is uninitialized. A GPT disk also has a MBR
but it's for "backcompatibility" / "protective" reasons (so that MBR-only tools would see the disk
as just a big 1-partitioned only disk with which they could barely do anything). A real involved test
for the nature of the disk should involve calling the correct IOCTLs in the disk detection code in partlist.c .
This is for the future (and when ReactOS will better support GPT disks).
svn path=/branches/setup_improvements/; revision=74614
svn path=/branches/setup_improvements/; revision=74615
- The "intro" page is renamed into the "Welcome" page, because its corresponding resource indeed is the welcome screen;
- Because the "setup start" page can only be displayed once, move it out of the while-loop, and use its result as the initial value of the 'Page' variable.
- Remove unneeded _PAGE_NUMBER_DEFINED guards;
- Add a DPRINT in the RepairUpdateFlag case of RegistryPage() (because we don't implement yet a correct upgrading or repairing of the registry).
- In InstallIntroPage(), display the page itself only if needed (i.e. after all the validation checks & repair/update or unattended checks are done). Similar modifications are done also in DeviceSettingsPage(), SelectPartitionPage()
- Turn both CheckUnattendedSetup() and UpdateKBLayout() into static functions.
- Fix the code of ScsiControllerPage() so that it can be compiled if needed, and add a dummy OemDriverPage().
svn path=/branches/setup_improvements/; revision=74575
Fixes in particular a regression brought by 57402ee (thanks George Bisoc
for having noticed this), where the BTRFS bootsector code could not be
installed anymore.
CORE-15192
- Fix the usage of the BootEntry's "Version" member.
- Don't surround with too many quotation marks the "friendly" boot entry name in AddBootStoreEntry().
svn path=/branches/setup_improvements/; revision=74964
In particular the helper functions CreateCommonFreeLdrSections() and (Un)protectBootIni() are now removed from there (they are used in bldrsup.c only).
This should pave the way for future integration with other sorts of NT boot loaders (BootMgr and (u)EFI boot loader).
svn path=/branches/setup_improvements/; revision=74954
This concerns so far, only freeldr.ini and to an extent, boot.ini, but planning in the future to add support for registry-oriented BCD
as well as possibly direct (u)EFI entries, using the corresponding NT functions.
This code is so far only used in osdetect.c, but will be soon used by usetup's bootsup.c (note that some helper functions: CreateCommonFreeLdrSections()
and (Un)protectBootIni() are already taken from it and used in bldrsup.c).
- In EnumerateNTOSBootEntries(), continue enumerating the boot entries until the user callback returns an status code that is not successful.
- Remove some old code from osdetect.c; use directly BootEntry->FriendlyName when building the display names of the available installations, since now
BootEntry->FriendlyName is a PCWSTR (and not a UNICODE_STRING anymore).
svn path=/branches/setup_improvements/; revision=74943
[SETUPLIB] Make the NTOS_BOOT_ENTRY structure more generic, so that it can wrap around either actual NTOS boot entry options, or FreeLdr-like boot-sector options.
In a sense, the NTOS_BOOT_ENTRY structure now looks much more like the NT structure "BOOT_ENTRY".
- Adapt the code in bldrsup.c to these modifications, and re-enable FreeLdr-like boot-sector-file support code that was commented out.
More code cleanup will follow later.
svn path=/branches/setup_improvements/; revision=74952
- Convert almost all swprintf() into StringCchPrintfW() and wcscpy() into StringCchCopyW();
- Explicitly add a trailing path separator to the "\Device\HarddiskX\PartitionY(\)" paths
when they refer to FS directories (and not to partition objects);
- Remove useless (and half-buggy) "Remove trailing backslash" code.
With that, it is possible to install ReactOS in e.g. C:\ReactOS (as usual), C:\ReactOS\dir1\dir2 (as many dirs as you wish), and also in C:\ (yes yes!).
But in that latter case, a strange bug related to the registry arises...
Additionally:
- Adjust some comments;
- Add some debugging DPRINTs;
- The SetInstallPathValue() is part of the big hack I've mentioned in f51faa4a (r74709).
svn path=/branches/setup_improvements/; revision=74717
Also, trim any potential trailing path separator from the NT disk partition path before opening the partition object itself for read/write access.
svn path=/branches/setup_improvements/; revision=74715
- Don't hardcode the installer file name in ExpandInstallerPath() but
provide it from a parameter. Return TRUE/FALSE if the installer file
is/is not found.
- Expand any environment string present in the items command line.
- Enable/disable the menu buttons depending on whether or not an
associated command is present.
- Enable mirroring from resources.
- Add the MUI ID resource.
- Implement the shutdown timeout progress bar function and the TimeOut string handler.
- Add the resource string to other resource languages.
- Simplify the usage of the PUPDATE_PROGRESS callback.
- Add the possibility of specifying an initial non-zero StepCount when
creating the progress-bar (using the -Ex version), so that it can be
initially drawn with the expected initial count.
Of course ProgressSetStepCount() can continue to be used.
Updated the font substitutions to use the new Hebrew glyphs in the updated Tahoma font.
Also added substitution for the Ubuntu font to make the Lautus and Modern themes legible with Hebrew UI elements.
Follow up to PR #789 and #790 ; CORE-14880, CORE-14943
Improve the progress bar functions:
- Add a member in the struct, which will be used as a bar colour parameter for the new CreateProgressBarEx().
- CreateProgressBar() which will now invoke the Ex variant without the additional parameter.
- Improved Italian translation for USETUP, WELCOME, REACTOS, EXPLORER.
- Completed translation in SYSSETUP.
- Correct some characters encoding and text alignment in USETUP.
DIRECTORY_ALL_ACCESS is not the correct flag, because it is used with the NtCreateDirectoryObject API
that creates virtual "directories" in the NT object namespace; that's not our purpose here.
svn path=/branches/setup_improvements/; revision=74716
- Use NT string safe functions.
- Add support for other bootloaders;
- Update a couple of comments;
- Remove deprecated __REACTOS__ #ifdefs.
svn path=/branches/setup_improvements/; revision=74713
- Call OpenAndMapFile() with its new ReadWrite parameter;
- Add informative comments in osdetect.c;
- In partlist.c, check whether a disk has a valid MBR by also checking for its 0xAA55 signature.
svn path=/branches/setup_improvements/; revision=74712
- In DoesFileExist(): Call NtOpenFile with FILE_GENERIC_READ instead of the more generic GENERIC_READ access right.
- OpenAndMapFile(): Add support for opening & mapping files with write access (to be used latter).
svn path=/branches/setup_improvements/; revision=74710
- Split IniCacheLoad() and IniCacheSave() into: themselves & IniCacheLoadByHandle() and IniCacheSaveByHandle(),
respectively, so that we can load & save INI files if we already have an opened handle to them.
svn path=/branches/setup_improvements/; revision=74711
- Remove a redundant NtClose() call;
- Return failure if NtQuerySymbolicLinkObject() fails;
- Use RTL_CONSTANT_STRING and RtlInitEmptyUnicodeString() where needed;
- Reduce code indent level;
- Add old-style function annotations;
- Remove the deprecated code copyright notice, since the copyright in usage is already reported in the COPYING file in the top level ReactOS source code directory.
svn path=/branches/setup_improvements/; revision=74698
So far we only have:
- a function FindNTOSBootLoader() that detects the existence of a given boot loader;
- a function EnumerateNTOSBootEntries() (and corresponding helpers) that enumerate the different boot entries in the configuration file(s) for a given boot loader, and for each entry, calls a user-provided callback.
Only supported at the moment: ntldr and freeldr.
Doing that allows me to simplify large portions of the NT-OS detection code so that it becomes more bootloader-agnostic, and this will help me for simplifying some parts of usetup/bootsup.c too, later...
svn path=/branches/setup_improvements/; revision=74661
- Adjust also its callers, adjust OpenAndMapFile() parameters.
- Related to that, simplify IsValidNTOSInstallation() parameters & introduce a IsValidNTOSInstallation_UStr()
that does the same, but takes a UNICODE_STRING instead.
- Simplify CheckForValidPEAndVendor().
Now only exactly 5 calls use the "old" 'DoesFileExist' syntax, using a temporarily auxiliary function "DoesFileExist_2"...
svn path=/branches/setup_improvements/; revision=74641
This allows building concatenated paths with an arbitrary number of separated components.
- Use the newly-introduced CombinePaths() and ConcatPaths() functions.
- Fix also few comments, and place some UNICODE_NULLs here & there.
svn path=/branches/setup_improvements/; revision=74637
svn path=/branches/setup_improvements/; revision=74640
- filesup.c's functions ConcatPaths(), Does[Path|File]Exist(), NtPathToDiskPartComponents(), OpenAndMapFile(), UnMapFile();
- Move the inicache library to setuplib as it'll be used for the 1st stage GUI setup too (indeed, there is no good INI file API
under Win32; the Win32 profile "API" is just good enough to manipulate the win16 ini files, and are here anyways for backward
compatibility purposes only);
- Move the OS detector too.
- Remove the duplicated ConcatPaths() code in arcname.c.
svn path=/branches/setup_improvements/; revision=74634
svn path=/branches/setup_improvements/; revision=74638
- In the partlist.c disk getters: Remove useless "IsListEmpty(&List->DiskListHead)" checks, because this is actually the kind of check the while() loop does just after...
- Fix few DPRINTs.
svn path=/branches/setup_improvements/; revision=74629
- Improve FindExistingNTOSInstall() so that we can find an existing installation either by system root
ARC path or NT path. This is used during the enumeration of available installations from the boot.ini/freeldr.ini
and during other existence & validity checks of NTOS installations.
- Improve AddNTOSInstallation() so that we can save the system root ARC path and NT path of the installation,
as well as its partition entry structure pointer, for caching & later retrieval purposes.
- Remove some deprecated comments & todos, and implement other todos.
- Improve the output of some DPRINTs.
- Fix the return value of FindSubStrI.
svn path=/branches/setup_improvements/; revision=74632
- isspace('\0') returns FALSE anyways so no need to separately test for a NULL character;
- The (str/wcs)toul function cannot return a NULL pointer from its second paramter;
- VersionInfo32_FindChild(): the third argument is indeed a number of characters (not bytes),
so rename the parameter to make this fact clear. The function is however correctly used within this module.
svn path=/branches/setup_improvements/; revision=74629
In all the disks/partitions available, it searches for the presence of freeldr.ini / boot.ini, open & parse them,
and enumerates the available boot entries (as candidates for installations). For each of them, it maps their ARC paths
into the NT namespace (hence the ARC 2 NT path resolver committed in r74621), then attempts to detect in these paths
the existence of NTOS installations.
svn path=/branches/setup_improvements/; revision=74622
The NT path resolver allows mapping between an ARC path as specified in freeldr.ini / boot.ini , to its corresponding NT path, if possible.
Currently, only the mapping direction "ARC to NT" is implemented. It will be used wherever such mappings are needed, for example when identifying
the ReactOS / Windows installations from the available freeldr.ini / boot.ini entries (for upgrading / repair purposes).
The resolver supports the usual ARC paths: multi()disk()[r|f]disk()[partition()] ; eisa()disk()[r|f]disk()[partition()] ; multi()disk()cdrom() ;
scsi()disk()[r|f]disk()[partition()] ; scsi()cdrom()fdisk() ; ramdisk(x) ; net(x) (actually reported as "unsupported" since it would map to some
path on some network), and the newly-introduced Win2k signature()disk()rdisk()[partition()].
The code is in work-in-progress status.
Some validation tests, that were used during the implementation of the resolver, have been added.
svn path=/branches/setup_improvements/; revision=74621
svn path=/branches/setup_improvements/; revision=74631
The aim is to use this detector to be able to detect and select an existing installation of ReactOS for upgrading.
The user then could either select one, or skip this step and perform a regular ReactOS installation.
What remains to be done, is to parse the NTOS loader configuration files (freeldr.ini in ReactOS' case, or boot.ini in Win2k3's case, etc...)
to retrieve the actual installation paths. So far these are currently hardcoded for testing purposes only.
The detector attempts to distinguish between ReactOS and Windows installations by checking at the company name vendor of the ntoskrnl.exe & ntdll.dll files,
so that only ReactOS installations are allowed to be upgraded.
svn path=/branches/setup_improvements/; revision=74527
svn path=/branches/setup_improvements/; revision=74550
From the existing IniCacheLoad() function, introduce a IniCacheLoadFromMemory() function that just does the same (initialize an INI file cache and parse the INI file), but takes the input from a memory buffer. Then, rewrite the IniCacheLoad() function to just open the file given in input, and then fall back to calling IniCacheLoadFromMemory.
The IniCacheLoadFromMemory() function will be used later.
svn path=/branches/setup_improvements/; revision=74620
- Add a NtPathToDiskPartComponents() helper, that takes in input a fully qualified NT path to a file on hard disk,
e.g.: \Device\Harddisk1\Partition2\foo\bar, and returns in output the disk number ('1'), the partition number ('2'),
and the the path component "\foo\bar" that is after the device-harddisk-partition identifier.
- Make the OpenAndMapFile() return the file size of the opened file.
Both of these additions will be used soon.
- Turn a isspace() call into a iswspace() one.
svn path=/branches/setup_improvements/; revision=74619
- Use the previously-introduced 'PreparePartitionForFormatting()' function; set the FormatState of the newly-formatted partition to Formatted.
- Remove the hackish call to CreateFileSystemList() in SelectFileSystemPage().
- Move 'TempPartition' and 'FormatState' back to USETUP.
- Put large "case"-blocks into brackets.
svn path=/branches/setup_improvements/; revision=74575
svn path=/branches/setup_improvements/; revision=74576
- Add a PreparePartitionForFormatting routine that sets the partition ID depending on the chosen filesystem.
- The 'FORMATMACHINESTATE FormatState' machine-state and the 'TempPartition' members of the partition list structure is purely a USETUP convenience, so remove them from the PARTLIST structure and move them back into USETUP.
- Attempt to recognize the filesystem (set the 'FileSystem' member of PARTENTRY) of partitions we are adding into the PARTLIST list.
- Fix the return value of the SelectPartition function, which is by the way completely broken (it doesn't do what it is supposed to do; alternatively its naming is completely wrong...).
svn path=/branches/setup_improvements/; revision=74572
svn path=/branches/setup_improvements/; revision=74573
- Create the beginnings of a "setuplib" library, whose aim is to be shared between the (currently existing) 1st-stage text-mode installer, and the (future) 1st-stage GUI installer.
- Finish to split the GenList and PartList codes into their UI part, which remain in usetup, and their algorithmic part, which go into setuplib.
- Move SetMountedDeviceValue into the PartList module.
- Split the FileSystem list code into its UI and the algorithmic part (which goes into setuplib under the name fsutil.c).
* The algo part is meant to be able to manage the filesystems available on the running system, similarly to what is mostly done (in scattered form) in fmifs, format, chkdsk / autochk codes...
It also manages the partition filesystem recognition, using OS routines.
* The UI part manages the FS list as it appears on screen, showing only the possible FSes that can be used to format the selected partition (a bit similar to what we do in the shell32's drive.c, etc...).
- Adapt the calling code to these changes.
- Remove some "host" code that was dating back from the dark old times.
svn path=/branches/setup_improvements/; revision=74570
svn path=/branches/setup_improvements/; revision=74659
This will allow to reuse it for the 1st-stage GUI setup too, while using another UI representation.
Add also two partition iterator functions: GetNextPartition and GetPrevPartition.
svn path=/branches/setup_improvements/; revision=74554
The aim here is to decouple the UI-specific code from code that can be used by both the text-mode USETUP and a future 1st-stage GUI setup.
Indeed, the GenLists can actually be used in the 1st-stage GUI; and their contents be displayed inside ListBoxes/ListViews... (this is just one example amongst others).
Additionally (in usetup.c):
- Make both FormatPartitionPage and CheckFileSystemPage return PAGE_NUMBERs.
- Improve a couple of comments.
svn path=/branches/setup_improvements/; revision=74553
- Allow retrieving the number of items existing in the list;
- Fix the name of some function parameters.
svn path=/branches/setup_improvements/; revision=74547
- Document more some of the fields in the PARTENTRY, DISKETNRY and PARTLIST structures;
- Remove the redundant members "SystemDisk", "OriginalSystemDisk" and "TempDisk" in PARTLIST as these can be consistently deduced from the corresponding (Original)(System)(Temp)Partition members
(note that we however keep "CurrentDisk" alongside "CurrentPartition", see the comment in the code why we do it so).
- Adjust the rest of the code to take the removal of the redundant members into account. The 2nd parameter of GetNextUnformattedPartition() and GetNextUncheckedPartition() is now really optional.
- Introduce a SetPartitionType() helper to simplify the code that sets the partition type, which also automatically adjusts other internal variables of said partition in accordance.
- "Mounted" logical drives can have assigned letters too, registered in \DosDevices\.
svn path=/branches/setup_improvements/; revision=74532
- Use explicit ansi string safe functions (where they are used ansi, but not explicitely);
- Add (old-school) function parameters annotations;
- Use PARTITION_ENTRY_UNUSED where needed (instead of hardcoding its value);
- Turn some functions static to this module;
- Turn the 2nd parameter of both GetNextUnformattedPartition() and GetNextUncheckedPartition() optional (for next commit);
- Improve some comments;
- Use NT types.
svn path=/branches/setup_improvements/; revision=74531
- Introduce code that detects the filesystem of a (mounted?) partition, using NtQueryVolumeInformationFile() with FileFsAttributeInformation class,
aka. rely on ReactOS itself (kernel, storage stack, filesystem drivers...) to recognize the FS on a partition that should normally be seen by the system.
This currently half-works for whatever reason (to be insvestigated), while it works on Windows.
- Fix few comments & a function parameter name.
- Use NT string pointer types.
svn path=/branches/setup_improvements/; revision=74529
- ConcatPaths that concatenates paths (or a path and a file name);
- OpenAndMapFile (resp. UnMapFile), whose purpose is to open a file and map it in memory (resp. unmap it from memory).
- Add extra optional parameters to DoesPathExist and DoesFileExist: an optional "RootDirectory" handle and, for DoesFileExist only, an optional PathName.
- Close the opened file handles only on success.
svn path=/branches/setup_improvements/; revision=74528
svn path=/branches/setup_improvements/; revision=74538
svn path=/branches/setup_improvements/; revision=74549
- Path must not contain whitespace characters.
- Path must be at least 2 characters long.
- Path must start with a backslash.
- Path must not end with a backslash.
- Path components must not end with a dot.
CORE-9529
- Make sure the DWLP_* values are correct on _WIN64
- Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h
- Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG
Such a manifest is meant to be activated by the caller of the exports of the dll.
This means that the user of syssetup which is setup.exe is the one that should do the proper handling of the manifests.
Since setup.exe is the one that needs to do the right thing, add a CREATEPROCESS_MANIFEST_RESOURCE_ID to it and avoid
dealing with ISOLATIONAWARE_MANIFEST_RESOURCE_ID altogether (which is supposed to be used by activating the activation context
before calling the exports of the dll that has it). We don't really use ISOLATIONAWARE_MANIFEST_RESOURCE_ID correctly in any
place in the tree so let's rely on CREATEPROCESS_MANIFEST_RESOURCE_ID for now.
This fixes one part of CORE-14228 where no image was shown in the theme selector buttons. This happened because comctl32 was
statically linked and calling ImageList_LoadImage ended up creating an image list with comctl32 v5. Then we passed this image
list to a button created with comctl32 v6 and as a result the image list was unusable. This is yet another issue that needs
to be addressed in the future. Namely, it seems that in windows comctl32 v6 can use image lists created by comctl32 v5 whereas
we cannot.
This fix is not a hack but cleverly works around these two bugs that need to be addressed some time in the future.
CORE-14228
This avoids the open failing on certain file systems where GENERIC_WRITE access would be denied
for a readonly file.
This is an addendum to 82f44a2.
CORE-14158
In such situation, try to drop the readonly attribute before overwritting the file.
This fixes setup not being able to overwrite FAT bootcode when reusing a FAT partition
already installed without reformatting.
CORE-14158
it only perform a full check if dirty bit is set (which should never happen *cough*).
This is needed because otherwise, ReactOS installation takes forever when IopParseDevice is gone
due to slow ChkDsk.
* Fix Simplified Chinese Translation of EXPLORER.
* Fix Simplified Chinese Translation of MSCONFIG_NEW.
* Fix Simplified Chinese Translation of MSPAINT.
* Fix Simplified Chinese Translation of SHELL32.
* Fix Simplified Chinese Translation of SYSDM.
* Fix Simplified Chinese Translation of SETUP/REACTOS.