Commit graph

405 commits

Author SHA1 Message Date
Getequ b9415740a1 [REGEDIT] Fix importing very big *.reg files (HEX values commonly) (#618)
This bug was found when I tried to import *.reg with huge HEX value (about 500 and much more lines of hex text).
2018-06-22 20:15:12 +02:00
Hermès Bélusca-Maïto 12de9654b0
[EXPLORER] Simplify the current-shell-is-explorer check when trying to start the auto-start programs, by using the existing code. 2018-06-22 16:34:16 +02:00
Katayama Hirofumi MZ 0a8cd95cad [USERINIT][EXPLORER] Fix auto startup of Start Menu (#594)
- Remove code for Start-Menu auto-startup items from userinit and put it where it belongs: in explorer.

CORE-10839
2018-06-22 16:02:25 +02:00
Katayama Hirofumi MZ c84f398306 [EXPLORER] 'Run' (Win+R) should set the proper current directory (#593) 2018-06-21 18:18:57 +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
Erdem Ersoy a6bd5b8ceb [TRANSLATION][NOTEPAD] Update Turkish translation (#609) 2018-06-11 14:56:59 +02:00
Mark Jansen f133d01f20
[RAPPS] Fix command line handling 2018-06-09 17:14:06 +02:00
Mark Jansen 0ec08818b5
[RAPPS] Select the search bar with ctrl+f 2018-06-09 17:14:06 +02:00
Pierre Schweitzer 2149c3d0d0
[AUTOCHK] Let the timeout for disk repair to be configured 2018-06-09 00:19:09 +02:00
Bișoc George 4217688b49 [TRANSLATION][DRWTSN32] Implement Romanian and Italian resource translations for Dr.Watson (#607) 2018-06-08 19:06:56 +02:00
Serge Gautherie 637026ffd7 [RSHELL] Remove a duplicated add_custom_command() call (#570) 2018-06-05 20:17:34 +02:00
Pierre Schweitzer 79975ede26
[AUTOCHK] Allow users to skip disk checking if dirty
CORE-14692
2018-06-05 19:34:47 +02:00
Jared Smudde 76a73b4295 [MSHTA] Implement MSHTA.exe (#577) CORE-12813
Implement mshta.exe. It links directly to the function RunHTMLApplication in mshtml and passes the file name and other optional arguments along. While the function is unimplemented in mshtml, it's a start.

[MSHTML] Add ADD_IMPORTLIB to CMakeLists so mshta can link to mshtml.
[BOOTDATA] Add the association information for mshta.exe to the registry.
2018-06-05 17:17:00 +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 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
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
Hermès Bélusca-Maïto 528e6339c2
[WINLOGON] Update Italian translation (#513) (by deleted user) 2018-05-31 15:41:09 +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
Amine Khaldi 98cf80fbc5 [REG] Sync with Wine Staging 3.9. CORE-14656 2018-05-27 03:48:33 +01: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