Commit graph

79 commits

Author SHA1 Message Date
Julio Carchi d7559e2354 [TRANSLATIONS] Fix spanish translations for some resources (#725)
Setup wizard
Network settings wizard
Input CPL
Open file dialogs
Devmgr
Explorer
2018-08-03 15:08:13 +02:00
Arnav Bhatt c771a6d339 [WELCOME] Add Hindi translation (#620) 2018-06-21 14:07:03 +02:00
Andrea Crescentini d303b70b7a [TRANSLATION] Improving italian translation (#623)
- Improved Italian translation for USETUP, WELCOME, REACTOS, EXPLORER.
- Completed translation in SYSSETUP.
- Correct some characters encoding and text alignment in USETUP.
2018-06-21 14:03:35 +02:00
Bișoc George b8036ea176 [USETUP] Some changes to address the recent review 2018-06-16 22:28:53 +02:00
Bișoc George 682ac75ecd [USETUP] Italian translation update 2018-06-16 22:28:53 +02:00
Adam Słaboń 565ce5e827 [TRANSLATION] Polish translation update (#611)
Polish translation update for MODE, USETUP and SHELL32.
2018-06-12 15:51:37 +02:00
Bișoc George 03b7e13df5 [USETUP] Display the ReactOS release status (#608)
Update the introduction page with a more up-to-date exposition of the current status of ReactOS.
2018-06-11 22:53:57 +02:00
Hermès Bélusca-Maïto b2606fd07a
[SETUPLIB] Silence annoying DPRINT1s. 2018-06-03 23:23:24 +02:00
Hermès Bélusca-Maïto 6f185c5fe2
[USETUP] Use correct flags for the NtCreateFile call that creates new file directories.
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
2018-06-03 22:12:46 +02:00
Hermès Bélusca-Maïto cacae6d9a0
[SETUPLIB][USETUP] Diverse additions.
- 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
2018-06-03 22:12:45 +02:00
Hermès Bélusca-Maïto 563d9f26c4
[SETUPLIB] Adjustments in the code.
- 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
2018-06-03 22:12:45 +02:00
Hermès Bélusca-Maïto 7f5428633b
[SETUPLIB] Additions for filesup.c and inicache.c.
- 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
2018-06-03 22:12:44 +02:00
Hermès Bélusca-Maïto 6b6163a5d9
[USETUP] Minor fixes & simplifications.
- 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
2018-06-03 22:12:43 +02:00
Hermès Bélusca-Maïto 6681fb8af5
[SETUPLIB] Add a new module "bldrsup.c" (WIP) where I place all the NT boot loaders (i.e. ntldr, freeldr, and possibly bootmgr in the future) management functions.
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
2018-06-03 22:12:43 +02:00
Hermès Bélusca-Maïto b53b7b11e3
[SETUPLIB][USETUP] Refactor the DoesFileExist() function so that it now looks closer to DoesPathExist() and use it almost everywhere.
- 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
2018-06-03 22:12:43 +02:00
Hermès Bélusca-Maïto d27ef70aab
[SETUPLIB][USETUP] Transform the existing ConcatPaths() function into a variadic function, and derive a CombinePaths() from it (plus their equivalent taking va_list).
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
2018-06-03 22:12:43 +02:00
Hermès Bélusca-Maïto 92b99b865e
[SETUPLIB][USETUP] Move some code to the SetupLib.
- 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
2018-06-03 22:12:35 +02:00
Hermès Bélusca-Maïto c434a5ab21
[USETUP] Some fixes/improvements suggested by Thomas (2/2).
- 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
2018-05-31 19:54:09 +02:00
Hermès Bélusca-Maïto f88d029c9d
[USETUP] Further improve the OS detection code.
- 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
2018-05-31 18:01:01 +02:00
Hermès Bélusca-Maïto 3074ad7159
[USETUP] Some fixes/improvements suggested by Thomas (1/2).
- 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
2018-05-31 18:01:00 +02:00
Hermès Bélusca-Maïto 5a6050902b
[USETUP] Improve the NTOS installations detector.
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
2018-05-31 18:00:59 +02:00
Hermès Bélusca-Maïto aa44ab1fbc
[SETUPLIB] Add an ARC path to (and from) NT path resolver.
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
2018-05-31 18:00:59 +02:00
Hermès Bélusca-Maïto b1741a07cf
[USETUP][SETUPLIB] Move all the code that retrieves the version resources from PE executable, out of osdetect.c, and place it in its own module inside the SetupLib.
Remove also some commented headers in precomp.h.

svn path=/branches/setup_improvements/; revision=74618
2018-05-31 18:00:58 +02:00
Hermès Bélusca-Maïto 2c76ce526c
[USETUP] PartList module: Add a couple of disk/partition getters: GetDiskByBiosNumber, GetDiskByNumber, GetDiskBySCSI, GetDiskBySignature, GetPartition, GetDiskOrPartition.
They will be used in the subsequent commits.

svn path=/branches/setup_improvements/; revision=74617
2018-05-31 18:00:58 +02:00
Hermès Bélusca-Maïto b76fa34121
[USETUP] Introduce an NT OS installation detector: a functionality that attempts to detect installations of NT 5.x operating systems (MS Windows <= 2k3, ReactOS).
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
2018-05-31 18:00:44 +02:00
Eric Kohl 975b7d427d [SETUP] Remove myself from the 1st stage setup code
Congratulations Hermès!
You just earned yourself full maintainership of the 1st stage setup. It's yours now. I'm out!
2018-05-27 21:33:07 +02:00
Hermès Bélusca-Maïto c8ea82d67b
[USETUP] Improve the inicache module.
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
2018-05-27 20:18:53 +02:00
Hermès Bélusca-Maïto 38e988ace7
[USETUP] Improve the FileSup module.
- 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
2018-05-27 20:18:53 +02:00
Hermès Bélusca-Maïto 1ed0e1c84a
[USETUP] Code fixups after the introduction of the SetupLib.
- 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
2018-05-27 20:18:52 +02:00
Hermès Bélusca-Maïto 1716749bcb
[SETUPLIB] Consolidate the FsUtil and PartList modules of the SetupLib.
- 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
2018-05-27 20:18:51 +02:00
Hermès Bélusca-Maïto 3a19ee6a96
[SETUPLIB][USETUP] Introduce a 'SetupLib' library. CORE-13544
- 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
2018-05-27 20:18:50 +02:00
Hermès Bélusca-Maïto 216f15c675
[USETUP] Similarly to what was done for GenLists, factor out the UI code from the partition list code.
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
2018-05-26 22:45:50 +02:00
Hermès Bélusca-Maïto 92692eae3d
[USETUP] Factor out the UI-specific code from the GenList code, and wrap it inside a GENERIC_LIST_UI structure.
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
2018-05-26 22:45:50 +02:00
Hermès Bélusca-Maïto 199fb91939
[USETUP] Additions for generic lists.
- Allow retrieving the number of items existing in the list;
- Fix the name of some function parameters.

svn path=/branches/setup_improvements/; revision=74547
2018-05-26 22:45:50 +02:00
Hermès Bélusca-Maïto 2521d3c478
[USETUP] Additions for the PartList code.
- 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
2018-05-26 22:45:39 +02:00
Hermès Bélusca-Maïto eaf7d6ebbe
[USETUP] Code improvements for PartList.
- 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
2018-05-26 19:09:39 +02:00
Hermès Bélusca-Maïto 56ea51bbe4
[USETUP] Enhancements for filesystem utility functions.
- 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
2018-05-26 19:09:38 +02:00
Hermès Bélusca-Maïto 60532e9c43
[USETUP] Add & modify some file utility functions that are going to be used next.
- 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
2018-05-26 19:09:38 +02:00
Hermès Bélusca-Maïto 14284ddc61
[USETUP] Fix some spacings in the french translation.
svn path=/branches/setup_improvements/; revision=74574
2018-05-26 19:09:37 +02:00
Hermès Bélusca-Maïto 833c0e59da
[USETUP] Code formatting only.
svn path=/branches/setup_improvements/; revision=74530
2018-05-26 19:09:35 +02:00
Hermès Bélusca-Maïto 7b618314c2
[USETUP] Remove now-unneeded file. 2018-05-20 19:27:57 +02:00
Eric Kohl de824808b7 [USETUP] Use _wcstoui64() instead of atoi() to convert the partition size in order to prevent unexpected misinterpretation of leading zeroes. 2018-05-19 13:33:28 +02:00
Eric Kohl 8a2cc3cdda [USETUP] Improved entering of partition size
Patch by Эдуард.

CORE-13249
2018-05-19 12:09:58 +02:00
Eric Kohl 7c3cff3a68 [USETUP] Remove the WIN32 support because usetup is a native-only application 2018-05-15 23:35:17 +02:00
Eric Kohl 4038773f45 [USETUP] Disable install path test that may tests 2018-05-15 22:58:34 +02:00
Eric Kohl 1b323ff2f4 [USETUP] Remove unused VolumeLabel and FileSystemName from the PARTENTRY type 2018-05-15 20:02:04 +02:00
Eric Kohl 3ce0c5d48b [USETUP] Get rid of the interface directory because we support text-mode only 2018-05-15 19:47:52 +02:00
Eric Kohl 849fe9f4eb [USETUP] Simplify the unattended code path in the install directory page and verify the unattended install path. 2018-05-15 18:11:12 +02:00
Eric Kohl 16daf6700a [USETUP] Improve the install path checks
- 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
2018-05-15 15:45:31 +02:00
Eric Kohl 3bf2f30cf2 [USETUP] Add support for HOME, END, DEL, LEFT and RIGHT keys to partition size and install path edit fields.
CORE-13975
2018-05-15 11:28:33 +02:00