Commit graph

72180 commits

Author SHA1 Message Date
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
Mark Jansen c7eb46d9fd [NTOSKRNL] Ignore IMAGE_SCN_CNT_UNINITIALIZED_DATA
CORE-12582
CORE-14556
2018-06-03 20:40:51 +02:00
Thomas Faber ffa94ca0f0 [NTDLL_APITEST] Add tests for mapping and relocating an image with IMAGE_SCN_CNT_UNINITIALIZED_DATA
CORE-12582
CORE-14556
2018-06-03 20:40:51 +02:00
Stanislav Motylkov a551ec537a [CREDITS] Update the credits list 2018-06-03 20:32:39 +02:00
Stanislav Motylkov adf334eaf2 [SYSDM] Update the credits list
Added to Development Team:

Aleksandar Andrejevic
Alexander Shaposhnikov
Amine Khaldi
Benedikt Freisen
Cameron Gutman
David Quintana
Giannis Adamopoulos
Hermès Bélusca-Maïto
Jérôme Gardou
Katayama Hirofumi MZ
Mark Jansen
Peter Hater
Stanislav Motylkov
Thomas Faber
Vadim Galyant

Added to Release Engineers:

Amine Khaldi
Joachim Henze
Thomas Faber
2018-06-03 20:32:39 +02:00
Stanislav Motylkov 245d7bee43 [SYSDM] Fix typo in the credits
Contributers -> Contributors
2018-06-03 20:32:39 +02:00
SebastianoPistore 45b08ed38d [SCREENSAVER] Add Italian translation. (#587)
By Sebastiano Pistore.
2018-06-03 16:43:50 +02:00
Joachim Henze 1c151c9977 [COMCTL32] Simplify some ifdefs CORE-14649
Addendum to 16d6c9b5e0
Giannis suggested and Thomas explained:

Before the Wine sync, comctl32/button.c was based on ROS's
user32/button.c, so _USER32_ would highlight changes between
user32 (originally based on Wine) and comctl32. Now our
comctl32/button.c is based on Wine's comctl32/button.c, so
__REACTOS__ is enough.
2018-06-03 14:27:34 +02:00
Hermès Bélusca-Maïto a165999067
[CMD] Improve the situations when the console title can be changed.
- Introduce two small helpers to change and restore the console title.
- Console title can change even when internal commands are executed.
- Note that when commands are run from within batch files, title is unchanged.
- When "cmd.exe /c command" is run, the console title is unchanged; however
  when "cmd.exe /k command" is run, the console title changes.
2018-06-03 02:36:39 +02:00
Hermès Bélusca-Maïto 39af25024a
[CMD] Print a newline after the interactive 'pause' command message finishes to run. 2018-06-03 02:36:32 +02:00
Stanislav Motylkov 07302fe8eb [BOOTDATA] Use double quotes for mspaint file path
Addendum to 313ded4. CORE-13293
2018-06-02 23:32:20 +02:00
Joachim Henze ea42633bed [ZIPFLDR] Fix text-cutoff + improve de-DE CORE-14682 2018-06-02 22:03:03 +02:00
Eric Kohl 6ce2ca540b [SYSDM] Improvements to the user profile page
- Store the full profile user name in the listview item for later use in the delete and copy functions.
- Change the button state according to the selected profile.
- Fix some hard-coded string sizes.
2018-06-02 16:11:50 +02:00
Pierre Schweitzer 2dfe5e3f46
[CRT] Reimplement qsort() using FreeBSD implementation.
Our implementation had a bug that could be triggered while
building our USBD library on ReactOS: the compare function
could be called with a NULL pointer instead of a valid value.

With this bug fixed (and the cmd hack in CORE-14648), ReactOS
can totally selfhost :-)! I was able to build LiveCD and BootCD
without any trouble, crash, deadlock or whatever.
(Next step: having a buildbot slave hosted on ReactOS ;-)).

Enjoy: https://twitter.com/HeisSpiter/status/1002880397103988737

CORE-14680
2018-06-02 13:56:42 +02:00
Joachim Henze 16d6c9b5e0 [COMCTL32] Fix regression CORE-14649
Fixes a regression that was introduced by Wine Staging 3.3 Sync.
Symptom was missing button text and icons for specific buttons
in Delphi applications, e.g. Double-Commander, Lazarus, Peazip.
The patch restores and ifdef-guards previous changes of Giannis.
2018-06-02 12:28:47 +02:00
Eric Kohl e3905cc68a [SYSDM] Retrieve and show the domain and user names for the user profiles
Fixes CORE-11789
2018-06-02 12:18:19 +02:00
Eric Kohl bd2f3d39a9 [KERNEL32] Get/SetTimeZoneInformation: Convert the Milliseconds value between TIME_FIELDS and SYSTEMTIME too
CORE-14658
2018-06-01 12:49:26 +02:00
Dheeraj Bhaskar ce5d4fd3e1 Create a Code of conduct to complete the Github community checklist (#431) 2018-05-31 23:26:33 +02:00
Benedikt Freisen 313ded449c [MSPAINT] use __targv[1] instead of lpszArgument
This should make Paint's handling of command line strings less brittle.

CORE-13293
2018-05-31 20:17:30 +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 4911382913 [NDK] Replace the SYSTEMTIME fields StandardDate and DaylightDate in RTL_TIME_ZONE_INFORMATION by TIME_FIELDs and fix resulting errors
Patch will be sent upstream.

CORE-14658
2018-05-31 17:48:29 +02:00
Eric Kohl ac45758aff [NTDLL_APITEST] Add missing test file for 0f8e7207.
CORE-14658
2018-05-31 17:12:52 +02:00
Eric Kohl 0f8e720711 [NTDLL_APITEST][LIB_RTL] Add a test for RtlQueryTimeZoneInformation and fix the bug in RtlpQueryRegistryDirect
In working on some problems with Time Zone adjustments in  ReactOS I found that the RtlQueryTimeZoneInformation function is partially broken and wrote an apitest to capture the failures.

Patch by Doug Lyons.

CORE-14658
2018-05-31 16:47:42 +02:00
Hermès Bélusca-Maïto 528e6339c2
[WINLOGON] Update Italian translation (#513) (by deleted user) 2018-05-31 15:41:09 +02:00
Katayama Hirofumi MZ 222534a5a2 [SHELL32] Fix and improve the PickIconDlg function (#574)
CORE-10972
2018-05-31 15:33:07 +02:00
Eric Kohl 5d8bbf72e3 [USERENV] LoadUserProfileW: User the user name passed in via lpProfileInfo to create the profile directory instead of the user name extracted from the token 2018-05-30 23:29:14 +02:00
Katayama Hirofumi MZ 5187ec858f [SHELL32] Implement the 'Advanced' button of the 'File Types' dialog (#565)
This allows the user to edit the File Type / extension information by clicking 'Advanced' button in the 'File Types' property sheet of Folder Options.
CORE-12906, CORE-10972
2018-05-30 17:22:31 +02:00
Eric Kohl f0a792631d [MSGINA] Remove a dialog that should not have been added. 2018-05-30 15:22:56 +02:00
Baruch Rutman a4a59ad413 [GDI32][LPK] BiDi support for ExtTextOut and GetCharacterPlacement (#534)
Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.

To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
  Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
  Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
  (As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
  Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
  A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.
2018-05-30 14:41:22 +02:00
Serge Gautherie 3ca1ac639c [REACTOS] Improve/Fix some "printf" formats (#555)
The smbios.c one was initially spotted by "Alahndro" on CORE-6328.
2018-05-30 14:18:23 +02:00
Katayama Hirofumi MZ e0f5ded66a [FONTS] Improve Tahoma Bold font (tahomabd.ttf) #580 2018-05-30 13:44:54 +02:00
Eric Kohl f0273d814e [SYSSETUP][USERENV] Create the system profile after the creation of the default profile has been finished
CopySystemProfile: Don't try to create the user hive. Just copy it as it has already been created.
2018-05-30 09:21:14 +02:00
Eric Kohl e7340a2800 [SYSSETUP] Save the HKEY_USERS\.DEFAULT hive in the ntuser.dat file of the default user profile 2018-05-30 08:18:55 +02:00
Eric Kohl 249dc97165 [SYSSETUP] Fix an issue that may be caused by a missing security settings file
Found by Serge Gautherie
2018-05-29 12:49:24 +02:00