This PR enables the developers to include the CJK standard fonts into ReactOS by adding them in Folder modules/optional. This feature is for test purpose only. You may not use the fonts illegally.
The embeddable font files are: mingliu.ttc, simsun.ttc, mssong.ttf, msgothic.ttc, msmincho.ttc, gulim.ttc and batang.ttc.
CORE-9619
Nowadays more and more people try to install ReactOS from removable
drives (e.g. USB sticks) onto fixed HDDs, or try to install it into
USB sticks too.
Both fixed and removable drives, as well as partitions on these, are
represented in NT using the same device name format:
\Device\HarddiskM\PartitionN ,
with an increasing disk number M. Using this number for building the
corresponding firmware-specific ARC multi(x)disk(y)rdisk(z) path used
by the NT/ROS loader (FreeLdr, ...) is then prone to error since there
may have been removable drives inserted and accounted for in the
calculation of the disk number. These drives must be correctly
subtracted in order to generate the correct ARC path, valid once all
the removable drives have been ejected (which should also be the
situation seen from the BIOS when booting up, except of course if you
boot on a USB stick).
This problem is now solved. Note that it matters only for the disks
that have also been enumerated by the firmware (BIOS; Int 13h). We
don't have to care about the other drives, since the ARC path will be
of a different format and will not use the disk number (instead, the
SCSI coordinates are used).
We also try to enumerate all the disks found in all the possible disk
adapters and controllers enumerated in the Hardware registry tree
(and that are visible by FreeLdr) in order to cover all.
Finally, we detect whether a disk reports as a "super-floppy", i.e.
an unpartitioned disk with a valid VBR. This is indeed how a standard
floppy disk looks like, or how USB sticks are partitioned on Windows.
Such disk is reported has having only one single partition starting at
the beginning of the disk, with partition number == 0, its type being
FAT16 non-bootable.
This allows us to forbid creating any new partitions on such disks.
Note that accessing either \Device\HarddiskN\Partition0 or Partition1
on such a disk returns the same data.
Note also that on the contrary, regular MBR-partitioned disks would
report at least four partitions entries, instead of just one.
The other improvements are:
- Do *NOT* write any MBR on a disk partitioned as "super-floppy".
CORE-13703
- Fix the computed disk identifier, of format: %08x-%08x-%c .
The numbers are respectively the checksum of the first sector, and
the disk signature. The terminating letter is A or X, depending
whether the first sector ends with 0x55AA/0xAA55 or not (see also
commit 5053f1f5).
- Warn if the user attempts to install ReactOS on a disk that is not
visible by the firmware of his computer, because it may not be
bootable.
- Add also some validation ASSERTs and simplify the code here and there.
- The installation partition is called "InstallPartition", while the
global "CurrentPartition" is the disk region currently selected in
the partition UI list, on which prtitioning operations are effectued.
- Extend CheckActiveSystemPartition() to use an optional alternative
disk or partition in case the actual system partition (present in the
first disk) cannot be used, e.g. because we don't support writes on it.
- Make some partitioning functions not dependent on the selected "CurrentPartition".
- Add some sanity checks.
- Improve some of the "is-partitioned" checks.
- Within the function's body code, check the status values returned by the called functions.
- Change the BuildInstallPaths's function type to NTSTATUS instead of VOID (and check the status of InitDestinationPaths() as well.
By default, we still fallback to FAT if nothing asked, or if there
is an invalid input.
0 is FAT, 1 is BtrFS. This can be grown as soon as we add more IFS.
CORE-7749
- Correctly insert discovered partitions in sorted order of StartSector,
and verify that they do not overlap (-> check for broken partitioning).
May help for CORE-10898.
- Use the correct reported partition numbers that may be modified after
partitioning changes, and that need to be used when opening
\Device\Harddisk'M'\Partition'N' files. This is achieving by
retrieving the returned value of the IOCTL_DISK_SET_DRIVE_LAYOUT call.
Distinguish them from the "on-disk" partition numbers that are the ones
that enumerate the partition in partition-table order (and is the order
known by e.g. the BIOS), and that should be used to construct the
destination ARC path.
May help for CORE-4870, CORE-13205.
- Simplify a lot of duplicated code by using helper functions.
- BOOTDATA: Use standard INF signature string, so that they can be
opened successfully using ReactOS' or Windows' setupapi.dll with
the INF_STYLE_WIN4 style.
- SETUPLIB: Use the correct INF_STYLE_* INF styles in SpInfOpenInfFile() calls.
- REACTOS : Switch thread locale to user-specified LocaleId when calling
SetupOpenInfFileW(), so that the correct localized strings are used.
- 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.
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".
- 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.
- 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
- 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).
- 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
- 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