- 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.
Now, we make sure that we update ref count and BCB list membership
with the BCB lock held, in a row.
This will avoid race conditions where the BCB was removed from the
list, then referenced again, leading to inconsistencies in memory
and crashes later on.
This could notably be triggered while building ReactOS on ReactOS
(one would call this a regression).
CORE-15235
- 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
- Remove a non-recurring job from the job list after starting it.
- Remove a recurring job from the start list, calculate its next start time and insert it again.
- Calculate the timeout for the next job.
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.
Use WaitForMultipleObjects in the mail scheduler loop:
- Use events to signal service stop and job update events to the main loop.
- Use the timeout timer to start the next job.
Preparation to support pen width.
Split IntGdiWidenPath function from PATH_WidenPath function.
IntGdiWidenPath is independent from DC.
CORE-2527, CORE-13534
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