Commit graph

646 commits

Author SHA1 Message Date
Eric Kohl 0d4591c672 [SCHEDSVC] Start jobs on timeout
- Start jobs on timeout
- Add job flags to the idl file
2018-11-05 00:24:16 +01:00
Thomas Faber 8bb1b39f66
[REACTOS] Don't include another module's PCH aka fix build. 2018-11-02 11:14:09 +01:00
Hermès Bélusca-Maïto 8cbaca5724
[REACTOS] Temporarily exclude the 1st-stage GUI setup from build, until I (or someone else) finds the correct way to fix the GCC builds. 2018-11-01 23:20:27 +01:00
Hermès Bélusca-Maïto 1b0c26e21c
[SETUPLIB][USETUP] Minor improvements.
- Use adequate access flag when opening symbolic links.
- Simplify the prototype of UpdateRegistry() since now both Setup INF
  handle and settings lists are inside the USETUP_DATA structure.
2018-11-01 18:55:45 +01:00
Hermès Bélusca-Maïto 13998a15c9
[USETUP] Improve SetupCommitFileQueueW() to make it compatible with its Win32 counterpart.
This means, call in the correct order the user callback with the correct
parameters (in particular the correct paths for file copy operations),
and check also for the callback returned value to know whether or not to
continue the file operations.
2018-11-01 18:55:44 +01:00
Hermès Bélusca-Maïto 8f1ab791fa
[SETUPLIB][REACTOS][USETUP] Further improve the interfacing with INF and File-Queue APIs.
This allows using some of the SetupApi.dll functions when SETUPLIB is
used in the (Win32) GUI 1st-stage installer "REACTOS", while using the
custom implemented NT-aware functions in "USETUP".
2018-11-01 18:55:43 +01:00
Hermès Bélusca-Maïto 44c101c9dc
[USETUP] Improvements for the File-queues code.
- Add support for delete and move/rename operations, which are needed
  for implementing ReactOS upgrading support.

- Use cabinet contexts.
- Use standard LIST_ENTRY structures for implementing the lists.

- Move the path-building hack code in SetupCommitFileQueueW() that had
  been introduced in r66604 (97bb83f) out of the file-queues code.

- Make the function prototypes compatible with win32's setupapi functions.
- Fix the format of the data passed to the custom notification handler.
- Adjust the file-copy callback to correctly use its arguments (setupapi-compatible).
2018-11-01 18:55:35 +01:00
Eric Kohl ce15c84309 [UMPNPMGR] Implement PNP_DetectResourceConflict(). 2018-11-01 14:50:08 +01:00
Hermès Bélusca-Maïto 9169e881aa
[USETUP] Refactor the cabinet handling code to place all the global state variables into a CABINET_CONTEXT structure.
Place also all the private cabinet definitions into the .c, keeping
into the header file only the "public" structures and function prototypes.
2018-10-28 23:57:06 +01:00
Hermès Bélusca-Maïto 1a173dfdb2
[SETUPLIB][REACTOS][USETUP] Re-organize the setup state variables and some helpers.
- 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.
2018-10-28 23:40:28 +01:00
Hermès Bélusca-Maïto 9016b5f3ef
[SETUPLIB] Silence noisy DPRINTs. 2018-10-28 23:40:26 +01:00
Hermès Bélusca-Maïto 4bf9f6fa4a
[SETUP:REACTOS] Populate the list of existing installations.
- 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.
2018-10-28 19:00:01 +01:00
Hermès Bélusca-Maïto f7ee1e2ffd
[SETUP:REACTOS] Add a wizard page to select which existing OS installation to upgrade. 2018-10-28 18:59:56 +01:00
Hermès Bélusca-Maïto 82117d2192
[SETUP:REACTOS] Adapt the 1st-stage GUI setup to compile with the setuplib.
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
2018-10-28 18:59:47 +01:00
Hermès Bélusca-Maïto 9c64b57dc9
[SETUPLIB][USETUP] Move the remaining (directory-creation) functions from usetup's filesup to setuplib.
They will be used later in the library.
2018-10-28 18:17:34 +01:00
Eric Kohl dc0b249d16 [SCHEDSVC] Reschedule a job after it was started
- 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.
2018-10-28 18:12:55 +01:00
Hermès Bélusca-Maïto a972948051
[SETUPLIB][USETUP] Remove the deprecated GenericListHasSingleEntry() function and use instead GetNumberOfListEntries().
- Few FIXMEs get fixed in the process.
- Add some diagnostic ASSERTs.
2018-10-28 15:04:33 +01:00
Hermès Bélusca-Maïto a635aa8475
[SETUPLIB] Properly cleanup the temporary registry keys created for setting up the registry.
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.
2018-10-28 14:42:01 +01:00
Hermès Bélusca-Maïto 6c2d3dee04
[SETUPLIB][USETUP] Move the registry-update procedure into setuplib.
- 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
2018-10-28 14:42:00 +01:00
Hermès Bélusca-Maïto dae658088a
[USETUP] Introduce some -V functions for CONSOLE_ConOutPrintf, CONSOLE_SetStatusText and CONSOLE_SetStatusTextX.
Additions:
- Use explicit __cdecl calling convention for variadic functions.
- Fix also the whitespace in consup.h.

svn path=/branches/setup_improvements/; revision=75749
2018-10-28 14:41:57 +01:00
Mark Jansen 1fa4e5f29c
[DRWTSN32] Improve stack dumping 2018-10-28 13:00:44 +01:00
Hermès Bélusca-Maïto f80ec8b822
[SETUPLIB] Store the vendor name for each discovered NTOS installation.
Take also the opportunity to simplify a little bit the code.
2018-10-28 01:58:59 +02:00
Hermès Bélusca-Maïto a5bcd956fa
[USETUP] Add new file-operation-related messages for deletion, moving and renaming. 2018-10-28 01:58:55 +02:00
Hermès Bélusca-Maïto a7afba7703
[SETUPLIB] Remove a deprecated error number (that gets merged with ERROR_TXTSETUP_SECTION).
[USETUP] Improve usage of ERROR_TXTSETUP_SECTION and ERROR_CABINET_SECTION error codes, correctly display associated error message, and remove a deprecated string.
2018-10-28 01:43:56 +02:00
Hermès Bélusca-Maïto 4b148bcaf2
[USETUP] Remove now-redundant file (already used with SETUPLIB). 2018-10-28 01:32:37 +02:00
Hermès Bélusca-Maïto 1f4cb0977a
[SETUPLIB][USETUP] Don't store UI-related display strings in GENERIC_LIST_ENTRY-ies, + other code adaptations.
- 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...).
2018-10-28 01:32:15 +02:00
Hermès Bélusca-Maïto 765994c9e3
[SETUPLIB][USETUP] Bring some suggestions from PR #59 in.
- 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).
2018-10-28 01:08:57 +02:00
Hermès Bélusca-Maïto a7a11dd60d
[SETUPLIB] Improve the bootloader 'validity' checks -- Addendum to f06734e5 (r74512).
Adapted from PR #89 by Serge Gautherie.
This should improve the situation described in CORE-12672 and CORE-4870.
2018-10-28 00:59:46 +02:00
Hermès Bélusca-Maïto ad9e57895d
[SETUPLIB] Improve an alternate code implementation.
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().
2018-10-28 00:59:45 +02:00
Hermès Bélusca-Maïto c3ab29682a
[USETUP] Move the SetupExtractFile() function to where it is (only) used.
svn path=/branches/setup_improvements/; revision=75762
2018-10-28 00:59:44 +02:00
Hermès Bélusca-Maïto 48aab0fb20
[SETUPLIB][USETUP] Use NT RTL String Safe functions instead of Win32-oriented ones (and remove usage of HRESULT too).
Based on:
svn path=/branches/setup_improvements/; revision=75755
svn path=/branches/setup_improvements/; revision=75757
2018-10-28 00:58:46 +02:00
Hermès Bélusca-Maïto 254aa472e8
[SETUPLIB][USETUP] Make the GENERIC_LIST store the items display text in UNICODE (and not in ANSI).
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
2018-10-28 00:30:54 +02:00
Hermès Bélusca-Maïto b86d19e936
[USETUP] Whitespace fixes only.
svn path=/branches/setup_improvements/; revision=75752
2018-10-28 00:26:20 +02:00
Hermès Bélusca-Maïto 9d93100afc
[SETUPLIB][USETUP] Move the floppy-disk accessibility check into InstallFatBootcodeToFloppy().
svn path=/branches/setup_improvements/; revision=75751
2018-10-28 00:25:51 +02:00
Hermès Bélusca-Maïto aab937715b
[USETUP] Resources: fix a typo.
svn path=/branches/setup_improvements/; revision=75748
2018-10-28 00:13:09 +02:00
Hermès Bélusca-Maïto e405ad257c
[SETUPLIB][USETUP][INPUT.CPL] MUI integration with setuplib.
[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.
2018-10-28 00:13:07 +02:00
Eric Kohl e4d79e514a [SCHEDSVC] Improvements to the scheduler service
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.
2018-10-28 00:04:20 +02:00
Hermès Bélusca-Maïto 7af2f717bc
[SETUPLIB][USETUP] Move the settings code from usetup to setuplib.
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
2018-10-27 22:09:35 +02:00
Hermès Bélusca-Maïto 6f19c83b96
[SETUPLIB] Move the files that implement utility functions into their own subdirectory. The files remaining in the main directory implement setup procedures that use the utility functions.
svn path=/branches/setup_improvements/; revision=75695
2018-10-27 22:09:34 +02:00
Hermès Bélusca-Maïto 95a34ef6fc
[USETUP][SETUPLIB] Move the bootsup.c code into the setuplib, and perform the necessary adjustments.
Move the bootsup.c code into the setuplib, as the code is generic
enough to be used by both USETUP and the 1st-stage GUI installer.

svn path=/branches/setup_improvements/; revision=75674
2018-10-27 22:09:32 +02:00
Eric Kohl 19cabfc763 [WKSSVC][IDL] Add names of unsupported functions 2018-10-27 19:04:31 +02:00
Hermès Bélusca-Maïto 8f2c4f7a6d
[USETUP] Add an AddEntriesFromInfSection() helper that enumerates the entries of a given INF section, and adds these into a (user-allocated) GENERIC_LIST after some pre-processing.
This helper is inspired by the reactos/reactos.c!LoadGenEntry() function.
Use this helper in the different Create*List() functions.

svn path=/branches/setup_improvements/; revision=75700
2018-10-27 18:13:45 +02:00
Hermès Bélusca-Maïto 58e402e08e
[USETUP] Simplify code.
svn path=/branches/setup_improvements/; revision=75698
2018-10-27 18:13:44 +02:00
Hermès Bélusca-Maïto acd933faa0
[USETUP] Formatting fixes only.
svn path=/branches/setup_improvements/; revision=75697
svn path=/branches/setup_improvements/; revision=75699
2018-10-27 18:13:44 +02:00
Hermès Bélusca-Maïto e2a92634e1
[USETUP] Add few checks to forbid the user to attempt installing ReactOS in the installation source directory, or a subdirectory thereof, or to delete the partition containing the installation source.
This is needed because the ReactOS installer can also be present from within a HDD partition!

svn path=/branches/setup_improvements/; revision=75669
2018-10-27 18:13:43 +02:00
Hermès Bélusca-Maïto 959323902f
[USETUP] Group constant strings together. In EventThread(), use RtlReAllocateHeap() to resize the pnp-event buffer.
svn path=/branches/setup_improvements/; revision=75654
2018-10-27 18:13:42 +02:00
Hermès Bélusca-Maïto c560342f08
[SETUPLIB] Diverse fixes (incl. initialization fixes).
- Compute the installation source paths based on the full path of the
  installer program that uses the setup library.
- Add INF_STYLE_OLDNT define in infsupp.h.
- Add some (silenced) diagnostic DPRINTs.

svn path=/branches/setup_improvements/; revision=75667

- Use correct inf style flags in SetupOpenInfFileEx() calls when opening
  txtsetup.sif and unattend.inf. Technically txtsetup.sif would be
  INF_STYLE_WIN4, but since we use "$ReactOS$" as its version signature,
  it would not work when opening it with setupapi.dll functions.
  Hence this flag is combined with INF_STYLE_OLDNT too.

- Don't fail if opening the \SystemRoot symbolic link doesn't work
  (usually due to incorrect access rights); in that case, just use the
  installer image file path as the installation source path.

svn path=/branches/setup_improvements/; revision=75676
2018-10-27 18:13:42 +02:00
Hermès Bélusca-Maïto f1b9c071bb
[SETUPLIB] Code formatting fix.
svn path=/branches/setup_improvements/; revision=75656
2018-10-27 18:13:41 +02:00
Hermès Bélusca-Maïto a80f803a2a
[SETUPLIB] Introduce and use a UnMapAndCloseFile() macro that calls UnMapFile() and NtClose() on handles returned by the OpenAndMapFile() function.
svn path=/branches/setup_improvements/; revision=75651
svn path=/branches/setup_improvements/; revision=75657
2018-10-27 18:13:40 +02:00
Hermès Bélusca-Maïto 29fe31df1b
[SETUPLIB][USETUP] Code refactoring: rename the old DoesPathExist() into DoesDirExist(), and rename the new DoesPathExistEx() back into DoesPathExist().
svn path=/branches/setup_improvements/; revision=75636
2018-10-27 18:13:40 +02:00