2010-10-30 11:51:13 +00:00
|
|
|
#reactos.dff
|
2010-10-30 09:53:53 +00:00
|
|
|
add_custom_command(
|
2010-10-30 11:51:13 +00:00
|
|
|
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${REACTOS_SOURCE_DIR}/boot/bootdata/packages/reactos.dff.in)
|
2010-10-30 11:51:13 +00:00
|
|
|
|
2010-10-30 09:53:53 +00:00
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt CAB_TARGET_ENTRIES)
|
|
|
|
foreach(ENTRY ${CAB_TARGET_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*" "\\1" _targetname ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
|
|
|
|
get_target_property(_FILENAME ${_targetname} LOCATION)
|
2010-10-30 11:51:13 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
|
|
|
DEPENDS ${_targetname}
|
2010-10-30 13:07:15 +00:00
|
|
|
APPEND)
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_cab.txt CAB_TARGET_ENTRIES)
|
|
|
|
foreach(ENTRY ${CAB_TARGET_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*" "\\1" _FILENAME ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.)" "\\1" _dir_num ${ENTRY})
|
2010-10-30 11:51:13 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E echo ${_FILENAME} ${_dir_num} >> ${REACTOS_BINARY_DIR}/boot/reactos.dff
|
|
|
|
DEPENDS ${_FILENAME}
|
2010-10-30 13:07:15 +00:00
|
|
|
APPEND)
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
|
2010-10-30 11:51:13 +00:00
|
|
|
#reactos.cab
|
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.inf
|
|
|
|
COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -L ${REACTOS_BINARY_DIR}/boot/bootcd/reactos -I
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${REACTOS_BINARY_DIR}/boot/reactos.dff)
|
2010-10-30 11:51:13 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.cab
|
|
|
|
COMMAND native-cabman -C ${REACTOS_BINARY_DIR}/boot/reactos.dff -RC ${REACTOS_BINARY_DIR}/boot/bootcd/reactos/reactos.inf -L ${REACTOS_BINARY_DIR}/boot/bootcd/reactos -N
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.inf)
|
|
|
|
list(APPEND BOOTCD_FILES ${REACTOS_BINARY_DIR}/bootcd/reactos/reactos.cab)
|
2010-10-30 11:51:13 +00:00
|
|
|
|
2010-10-30 09:53:53 +00:00
|
|
|
#bootcd target
|
|
|
|
set(BOOTCD_DIR "${REACTOS_BINARY_DIR}/boot/bootcd")
|
|
|
|
|
2010-10-30 13:07:15 +00:00
|
|
|
file(MAKE_DIRECTORY
|
|
|
|
"${BOOTCD_DIR}"
|
|
|
|
"${BOOTCD_DIR}/loader"
|
|
|
|
"${BOOTCD_DIR}/reactos"
|
|
|
|
"${BOOTCD_DIR}/reactos/system32")
|
2010-10-30 09:53:53 +00:00
|
|
|
|
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd_target.txt MINICD_TARGET_ENTRIES)
|
|
|
|
foreach(ENTRY ${MINICD_TARGET_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
|
|
|
|
get_target_property(_FILENAME ${_targetname} LOCATION)
|
|
|
|
set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
|
2010-10-30 13:07:15 +00:00
|
|
|
list(APPEND BOOTCD_FILES ${filename})
|
2010-10-30 09:53:53 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${filename}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD}
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${_targetname})
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_minicd.txt MINICD_ENTRIES)
|
|
|
|
foreach(ENTRY ${MINICD_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
|
|
|
|
set(filename ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD})
|
2010-10-30 13:07:15 +00:00
|
|
|
list(APPEND BOOTCD_FILES ${filename})
|
2010-10-30 09:53:53 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${filename}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${BOOTCD_DIR}/${_DIR}/${_NAMEONCD}
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${_FILENAME})
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target(bootcd
|
|
|
|
COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${BOOTCD_DIR} REACTOS ${REACTOS_BINARY_DIR}/minicd.iso
|
|
|
|
DEPENDS ${BOOTCD_FILES})
|
|
|
|
|
2010-10-30 11:51:13 +00:00
|
|
|
add_dependencies(bootcd dosmbr ext2 fat32 fat isoboot isobtrt vgafonts)
|
2010-10-30 09:53:53 +00:00
|
|
|
|
|
|
|
set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/minicd.iso)
|
|
|
|
|
|
|
|
#livecd target
|
2010-10-30 13:07:15 +00:00
|
|
|
file(MAKE_DIRECTORY
|
|
|
|
"${LIVECD_DIR}"
|
|
|
|
"${LIVECD_DIR}/loader"
|
|
|
|
"${LIVECD_DIR}/Profiles"
|
|
|
|
"${LIVECD_DIR}/Profiles/All Users"
|
|
|
|
"${LIVECD_DIR}/Profiles/All Users/Desktop"
|
|
|
|
"${LIVECD_DIR}/Profiles/Default User"
|
|
|
|
"${LIVECD_DIR}/Profiles/Default User/Desktop"
|
|
|
|
"${LIVECD_DIR}/Profiles/Default User/My Documents"
|
|
|
|
"${LIVECD_DIR}/reactos"
|
|
|
|
"${LIVECD_DIR}/reactos/inf"
|
|
|
|
"${LIVECD_DIR}/reactos/fonts"
|
|
|
|
"${LIVECD_DIR}/reactos/system32"
|
|
|
|
"${LIVECD_DIR}/reactos/system32/config")
|
2010-10-30 09:53:53 +00:00
|
|
|
|
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd_target.txt LIVECD_TARGET_ENTRIES)
|
|
|
|
foreach(ENTRY ${LIVECD_TARGET_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _targetname ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
|
|
|
|
get_target_property(_FILENAME ${_targetname} LOCATION)
|
|
|
|
set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
|
2010-10-30 13:07:15 +00:00
|
|
|
list(APPEND LIVECD_FILES ${filename})
|
2010-10-30 09:53:53 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${filename}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${_targetname})
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
file(STRINGS ${REACTOS_BINARY_DIR}/boot/ros_livecd.txt LIVECD_ENTRIES)
|
|
|
|
|
|
|
|
foreach(ENTRY ${LIVECD_ENTRIES})
|
|
|
|
string(REGEX REPLACE "^(.*)\t.*\t.*" "\\1" _FILENAME ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t(.*)\t.*" "\\1" _DIR ${ENTRY})
|
|
|
|
string(REGEX REPLACE "^.*\t.*\t(.*)" "\\1"_NAMEONCD ${ENTRY})
|
|
|
|
set(filename ${LIVECD_DIR}/${_DIR}/${_NAMEONCD})
|
2010-10-30 13:07:15 +00:00
|
|
|
list(APPEND LIVECD_FILES ${filename})
|
2010-10-30 09:53:53 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${filename}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${_FILENAME} ${LIVECD_DIR}/${_DIR}/${_NAMEONCD}
|
2010-10-30 13:07:15 +00:00
|
|
|
DEPENDS ${_FILENAME})
|
2010-10-30 09:53:53 +00:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
add_custom_target(livecd
|
|
|
|
COMMAND native-cdmake -v -j -m -b ${CMAKE_CURRENT_BINARY_DIR}/boot/freeldr/bootsect/isoboot.bin ${LIVECD_DIR} REACTOS ${REACTOS_BINARY_DIR}/livecd.iso
|
|
|
|
DEPENDS ${LIVECD_FILES})
|
2010-11-12 13:05:10 +00:00
|
|
|
add_dependencies(livecd isoboot livecd_hives vgafonts)
|
2010-10-30 09:53:53 +00:00
|
|
|
|
|
|
|
set_directory_properties(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${REACTOS_BINARY_DIR}/livecd.iso)
|