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
Following r75518, we use the $winnt$.inf file (created in System32
by the 1st-stage installer) as the setup information file for the
2nd-stage setup for:
- retrieving the installation source media path;
- retrieving the unattended information that was copied from the
unattend.inf file from the installation source media.
The installation source media path is converted from NT format to
Win32 format for usage with Win32 functions and storage in the registry:
this is done by GetInstallSourceWin32(), which replaces the hackish
GetRosInstallCD() function.
The $winnt$.inf file is also updated, and the registry values "SourcePath"
and "ServicePackSourcePath" are created / updated in:
HKLM\Software\Microsoft\Windows\CurrentVersion\Setup .
svn path=/branches/setup_improvements/; revision=75524
- 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
In windows the toolbar itself creates the search shell extension. In ros we send a command to the CShellBrowser to let it handle it itself. Use the same command for showing and hiding it.
CBaseBarSite: Ask the CBaseBar to close itself when the x button is pressed.
CBaseBar: Hide the bar and inform its site that it is closing when it gets the close command.
CShellBrowser: Cache the guid of the current vertical bar and use it to report correct command status to the toolbar.
Also implement toggling the Folders, Favorites, History and search commands.
CInternetToolbar: Query the Folders and Search command status from the site so that they can be properly be shown as pressed.
In Windows, user32!CloseWindow minimizes the window. It doesn't close the window actually. This is not a joke. This bad function naming is responsible to MS.
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
This fix is needed for the Delphi GUI programs.
- Don't enumerate the windows whose owner window exists.
- Use PostMessage SC_RESTORE instead of ShowWindowAsync SW_RESTORE.
CORE-15165
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