Skip to content

Commit

Permalink
[REACTOS] Introduce the experimental all-in-one ReactOS BootCD
Browse files Browse the repository at this point in the history
It contains both the text-mode 1st-stage installer and the LiveCD
functionality with the 1st-stage GUI installer.
Our separate LiveCD ISOs become obsolete, and this completely remove
the need for the so-called "hybridcd" ISO.

Some details:

- the "hybridcd" build target is completely removed, since now the new
  BootCD *is* basically what we used to call "hybridcd";

- the "livecd" build target is kept so far (to minimize the code changes),
  but internally I start to refer to it as "LiveImage", and it is reduced
  to a minimum: currently a minimal non-bootable "liveimage.iso" is built
  in order to implement the "ReactOS Live in RAMDISK" functionality
  (we currently don't support other file formats apart from ISO and
  flat disk for a RAMDISK), while the "ReactOS Live" (non-RAMDISK) is
  implemented by adding to the BootCD file tree the files from the LiveImage.
  These files add two root directories, "Profiles" and "reactos" (which is
  the SystemRoot for the non-ramdisk LiveImage).

- The minimal text-mode ReactOS installation used during the 1st-stage
  text-mode installer, including USETUP itself and the executable for
  the 1st-stage GUI installer and the reactos.cab (installation source)
  are moved to the root directory called "i386" (ideally, one directory
  per architecture).

- the "bootcdregtest" target, i.e. the ISOs we feed our testbots with,
  are left untouched, i.e. they are only constituted of the 1st-stage
  text-mode installation, in the root directory named "reactos".

More details will be presented in a subsequent mail to the ros-dev mailing list.

svn path=/branches/setup_improvements/; revision=75273
  • Loading branch information
HBelusca committed Oct 14, 2023
1 parent 3c296ab commit fecd466
Show file tree
Hide file tree
Showing 16 changed files with 137 additions and 233 deletions.
5 changes: 4 additions & 1 deletion base/setup/welcome/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ if(ARCH STREQUAL "i386")
endif()
endif()

add_cd_file(TARGET welcome DESTINATION reactos NO_CAB FOR bootcd)
add_cd_file(TARGET welcome DESTINATION reactos FOR all)

# Welcome.exe renamed as Setup.exe for the BootCD
add_cd_file(TARGET welcome DESTINATION root NO_CAB NAME_ON_CD setup.exe FOR bootcd)
40 changes: 9 additions & 31 deletions boot/boot_images.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ add_custom_target(bootcd
-publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME}
-eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 ${ISO_EFI_BOOT_PARAMS} -hide boot.catalog
-sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort
-no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcd.$<CONFIG>.lst
-duplicates-once -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcd.$<CONFIG>.lst
COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/bootcd.iso
DEPENDS isombr native-isohybrid native-mkisofs
DEPENDS isombr native-isohybrid native-mkisofs livecd
VERBATIM)

## BootCDRegTest
Expand All @@ -131,12 +131,12 @@ add_custom_target(bootcdregtest
-publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME}
-eltorito-boot loader/isobtrt.bin -no-emul-boot -boot-load-size 4 ${ISO_EFI_BOOT_PARAMS} -hide boot.catalog
-sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort
-no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.$<CONFIG>.lst
-duplicates-once -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/bootcdregtest.$<CONFIG>.lst
COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/bootcdregtest.iso
DEPENDS isombr native-isohybrid native-mkisofs
VERBATIM)

## LiveCD
## LiveImage -- Constitutes a small RAMDISK ISO, and is also merged with the regular BootCD
# Create the file list
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n")
Expand All @@ -149,42 +149,20 @@ add_allusers_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles
add_user_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/livecd.cmake.lst "Profiles" "Default User")

add_custom_target(livecd
COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/livecd.iso -iso-level 4
COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/liveimage.iso -iso-level 4
-publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME}
-eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 ${ISO_EFI_BOOT_PARAMS} -hide boot.catalog
-sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort
-no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/livecd.$<CONFIG>.lst
COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/livecd.iso
DEPENDS isombr native-isohybrid native-mkisofs
VERBATIM)

## HybridCD
# Create the file list
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.cmake.lst "")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.cmake.lst "${CMAKE_CURRENT_BINARY_DIR}/empty\n")

# Create user profile directories
add_allusers_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/hybridcd.cmake.lst "livecd/Profiles")
add_user_profile_dirs(${CMAKE_CURRENT_BINARY_DIR}/hybridcd.cmake.lst "livecd/Profiles" "Default User")

add_custom_target(hybridcd
COMMAND native-mkisofs -quiet -o ${REACTOS_BINARY_DIR}/hybridcd.iso -iso-level 4
-publisher ${ISO_MANUFACTURER} -preparer ${ISO_MANUFACTURER} -volid ${ISO_VOLNAME} -volset ${ISO_VOLNAME}
-eltorito-boot loader/isoboot.bin -no-emul-boot -boot-load-size 4 ${ISO_EFI_BOOT_PARAMS} -hide boot.catalog
-sort ${CMAKE_CURRENT_BINARY_DIR}/bootfiles.sort
-duplicates-once -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/hybridcd.$<CONFIG>.lst
COMMAND native-isohybrid -b ${_isombr_file} -t 0x96 ${REACTOS_BINARY_DIR}/hybridcd.iso
DEPENDS bootcd livecd
-duplicates-once -no-cache-inodes -graft-points -path-list ${CMAKE_CURRENT_BINARY_DIR}/livecd.$<CONFIG>.lst
DEPENDS native-mkisofs
VERBATIM)

if(DEFINED EFI_PLATFORM_ID)
# For things like flashing USB drives, we also add the efi file into efi/boot.
add_cd_file(TARGET efisys FILE ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin DESTINATION loader NO_CAB NOT_IN_HYBRIDCD FOR bootcd regtest livecd hybridcd)
add_cd_file(TARGET efisys FILE ${CMAKE_CURRENT_BINARY_DIR}/efisys.bin DESTINATION loader NO_CAB FOR bootcd regtest)

add_cd_file(
TARGET uefildr
DESTINATION efi/boot
NO_CAB
NAME_ON_CD boot${EFI_PLATFORM_ID}.efi
FOR livecd hybridcd)
FOR bootcd)
endif()
30 changes: 13 additions & 17 deletions boot/bootdata/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

add_subdirectory(packages)

# Common hives

# Setup settings file
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd regtest)

add_custom_target(converted_caroots_inf DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/caroots.inf)
Expand All @@ -11,33 +10,32 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/caroots.inf
DEPENDS native-utf16le ${CMAKE_CURRENT_SOURCE_DIR}/caroots.inf)
add_cd_file(TARGET converted_caroots_inf FILE ${CMAKE_CURRENT_BINARY_DIR}/caroots.inf DESTINATION reactos NO_CAB FOR bootcd regtest)

# Common hives
add_registry_inf(
hivecls.inf
hivedef.inf
hivesft.inf
hivesys.inf
hivebcd.inf)


# Regtest
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/regtest.cmd DESTINATION reactos/bin FOR all)

# autorun.inf
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun-bootcd.inf DESTINATION root NO_CAB NOT_IN_HYBRIDCD NAME_ON_CD autorun.inf FOR bootcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun-livecd.inf DESTINATION root NO_CAB NOT_IN_HYBRIDCD NAME_ON_CD autorun.inf FOR livecd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun-hybridcd.inf DESTINATION root NO_CAB NOT_IN_HYBRIDCD NAME_ON_CD autorun.inf FOR hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun.inf DESTINATION root NO_CAB FOR bootcd)

# icon.ico
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB NOT_IN_HYBRIDCD FOR all hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FOR bootcd)

# readme.txt
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB NOT_IN_HYBRIDCD FOR all hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR bootcd regtest)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION reactos FOR all)

# Welcome.exe optional custom configuration (only for HybridCD)
## NOTE: The root file Setup.exe is a renamed Welcome.exe for BootCD purposes.
# Welcome.exe optional custom configuration (only for LiveCD)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/welcome_config/)
# Copy the main configuration file
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/welcome_config/welcome.ini DESTINATION bootcd/reactos NO_CAB FOR hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/welcome_config/welcome.ini DESTINATION reactos NO_CAB FOR livecd)

# Convert the translation files (name format: xx-YY.ini) into UTF-16
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/welcome_config)
Expand All @@ -48,23 +46,21 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/welcome_config/)
add_custom_command(OUTPUT "${_converted_file}"
COMMAND native-utf16le "${_source_file}" "${_converted_file}"
DEPENDS native-utf16le "${_source_file}")
add_cd_file(TARGET converted_welcome_i18n_files FILE ${_converted_file} DESTINATION bootcd/reactos/welcome NO_CAB NAME_ON_CD ${_file} FOR hybridcd)
add_cd_file(TARGET converted_welcome_i18n_files FILE ${_converted_file} DESTINATION reactos/welcome NO_CAB NAME_ON_CD ${_file} FOR livecd)
list(APPEND _converted_welcome_i18n_files ${_converted_file})
endforeach(_file)
add_custom_target(converted_welcome_i18n_files DEPENDS ${_converted_welcome_i18n_files})
endif()

# freeldr.ini
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NOT_IN_HYBRIDCD NAME_ON_CD freeldr.ini FOR bootcd regtest)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NOT_IN_HYBRIDCD NAME_ON_CD freeldr.ini FOR livecd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hybridcd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR hybridcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd-regtest.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR regtest)

# Unattend
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION reactos NO_CAB FOR regtest)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd/unattend.inf DESTINATION reactos NO_CAB FOR bootcd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd/unattend.inf DESTINATION reactos NO_CAB FOR livecd)
add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION reactos NO_CAB FOR regtest)

# LiveCD shortcuts
# LiveImage shortcuts
macro(add_livecd_shortcut name app dest)
add_link(NAME ${name} CMD_LINE_ARGS ${app} ICON ${app} PATH livecd_start.cmd GUID "{450D8FBA-AD25-11D0-98A8-0800361B1103}" MINIMIZE)
list(APPEND LIVECD_SHORTCUTS "${CMAKE_CURRENT_BINARY_DIR}/${name}.lnk")
Expand Down
3 changes: 0 additions & 3 deletions boot/bootdata/autorun-bootcd.inf

This file was deleted.

3 changes: 0 additions & 3 deletions boot/bootdata/autorun-hybridcd.inf

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[autorun]
open=readme.txt
open=setup.exe
icon=icon.ico
13 changes: 13 additions & 0 deletions boot/bootdata/bootcd-regtest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[FREELOADER]
DefaultOS=Setup
TimeOut=0

[Display]
TitleText=ReactOS Setup
MinimalUI=Yes

[Operating Systems]
Setup="Setup"

[Setup]
BootType=ReactOSSetup
70 changes: 66 additions & 4 deletions boot/bootdata/bootcd.ini
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
[FREELOADER]
DefaultOS=Setup
TimeOut=0
DefaultOS=LiveCD_Debug
TimeOut=10

[Display]
TitleText=ReactOS Setup
TitleText=ReactOS Setup & Live BootCD
MinimalUI=Yes

[Operating Systems]
Setup="Setup"
Setup="ReactOS Setup (Text Mode)"
Setup_Debug="Setup (Debug)"
Setup_Aacpi="Setup ACPI APIC (Debug)"
Setup_Screen="Setup (Screen)"
;;;;
LiveCD="ReactOS Setup (Graphics Mode) & Live"
LiveCD_Debug="ReactOS Live (Debug)"
LiveCD_Aacpi="LiveCD ACPI APIC (Debug)"
LiveCD_VBoxDebug="ReactOS Live (VBox Debug)"
LiveCD_Screen="ReactOS Live (Screen)"
; LiveCD_LogFile="ReactOS Live (Log file)"
LiveCD_RamDisk="ReactOS Setup (Graphics Mode) & Live in RAM"
LiveCD_RamDisk_Debug="ReactOS Live in RAM (Debug)"
LiveCD_RamDisk_Screen="ReactOS Live in RAM (Screen)"
;;;;
HddBoot="Boot from first hard disk"

[Setup]
BootType=ReactOSSetup
SystemPath=\

[Setup_Debug]
BootType=ReactOSSetup
Expand All @@ -26,3 +39,52 @@ Options=/HAL=halaacpi.dll /DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /NOGUIBOOT /SI
[Setup_Screen]
BootType=ReactOSSetup
Options=/DEBUG /DEBUGPORT=SCREEN /SIFOPTIONSOVERRIDE

[LiveCD]
BootType=Windows2003
SystemPath=\reactos
Options=/MININT

[LiveCD_Debug]
BootType=Windows2003
SystemPath=\reactos
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT

[LiveCD_Aacpi]
BootType=Windows2003
SystemPath=\reactos
Options=/HAL=halaacpi.dll /DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT

[LiveCD_VBoxDebug]
BootType=Windows2003
SystemPath=\reactos
Options=/DEBUG /DEBUGPORT=VBOX /SOS /MININT

[LiveCD_Screen]
BootType=Windows2003
SystemPath=\reactos
Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT

; [LiveCD_LogFile]
; BootType=Windows2003
; SystemPath=\reactos
; Options=/DEBUG /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log /SOS /MININT

[LiveCD_RamDisk]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/MININT /RDPATH=liveimage.iso /RDEXPORTASCD

[LiveCD_RamDisk_Debug]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /MININT /RDPATH=liveimage.iso /RDEXPORTASCD

[LiveCD_RamDisk_Screen]
BootType=Windows2003
SystemPath=ramdisk(0)\reactos
Options=/DEBUG /DEBUGPORT=SCREEN /SOS /MININT /RDPATH=liveimage.iso /RDEXPORTASCD

[HddBoot]
BootType=Drive
BootDrive=hd0
68 changes: 0 additions & 68 deletions boot/bootdata/hybridcd.ini

This file was deleted.

45 changes: 0 additions & 45 deletions boot/bootdata/livecd.ini

This file was deleted.

Empty file removed boot/bootdata/livecdregtest/.keep
Empty file.
Loading

0 comments on commit fecd466

Please sign in to comment.