Sync with trunk r63502.
[reactos.git] / boot / bootdata / CMakeLists.txt
index c2a0e9e..a6842d2 100644 (file)
@@ -1,20 +1,33 @@
 
 add_subdirectory(packages)
 
+#common hives
+
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd regtest)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivecls_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivecls.inf FOR bootcd regtest)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivedef_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivedef.inf FOR bootcd regtest)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesft_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesft.inf FOR bootcd regtest)
-add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/hivesys_${ARCH}.inf DESTINATION reactos NO_CAB NAME_ON_CD hivesys.inf FOR bootcd regtest)
+
+list(APPEND _common_hives
+    ${CMAKE_CURRENT_SOURCE_DIR}/hivecls.inf
+    ${CMAKE_CURRENT_SOURCE_DIR}/hivedef.inf
+    ${CMAKE_CURRENT_SOURCE_DIR}/hivesft.inf
+    ${CMAKE_CURRENT_SOURCE_DIR}/hivesys.inf)
+
+foreach(_hive ${_common_hives})
+    get_filename_component(_hive_name ${_hive} NAME)
+    set(_converted_hive ${CMAKE_CURRENT_BINARY_DIR}/${_hive_name})
+    add_custom_command(OUTPUT ${_converted_hive}
+                       COMMAND native-utf16le ${_hive} ${_converted_hive}
+                       DEPENDS native-utf16le ${_hive})
+    list(APPEND _converted_common_hives ${_converted_hive})
+    add_cd_file(FILE ${_converted_hive} DESTINATION reactos NO_CAB FOR bootcd regtest)
+endforeach()
+
+add_custom_target(converted_hives DEPENDS ${_converted_common_hives})
 
 # livecd hives
-list(APPEND CD_HIVES
-    ${CMAKE_CURRENT_SOURCE_DIR}/hivecls_${ARCH}.inf
-    ${CMAKE_CURRENT_SOURCE_DIR}/hivedef_${ARCH}.inf
-    ${CMAKE_CURRENT_SOURCE_DIR}/hivesft_${ARCH}.inf
-    ${CMAKE_CURRENT_SOURCE_DIR}/hivesys_${ARCH}.inf
+list(APPEND _livecd_hives
+    ${_converted_common_hives}
     ${CMAKE_CURRENT_SOURCE_DIR}/livecd.inf
-    ${CMAKE_CURRENT_SOURCE_DIR}/hiveinst_${ARCH}.inf)
+    ${CMAKE_CURRENT_SOURCE_DIR}/hiveinst.inf)
 
 add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sam
@@ -22,8 +35,8 @@ add_custom_command(
         ${CMAKE_CURRENT_BINARY_DIR}/security
         ${CMAKE_CURRENT_BINARY_DIR}/software
         ${CMAKE_CURRENT_BINARY_DIR}/system
-    COMMAND native-mkhive ${CMAKE_CURRENT_BINARY_DIR} ${CD_HIVES}
-    DEPENDS native-mkhive ${CD_HIVES})
+    COMMAND native-mkhive ${CMAKE_CURRENT_BINARY_DIR} ${_livecd_hives}
+    DEPENDS native-mkhive ${_livecd_hives} ${_converted_common_hives})
 
 add_custom_target(livecd_hives
     DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sam
@@ -45,14 +58,26 @@ add_cd_file(
 #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.inf DESTINATION root NO_CAB FOR all)
+
+#icon.ico
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FOR all)
+
+#readme.txt
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR all)
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION reactos FOR all)
+
+#system.ini
+add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/system.ini DESTINATION reactos FOR all)
+
 #freeldr.ini
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd regtest)
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR livecd)
 
 #unattend
 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION reactos NO_CAB FOR regtest)
-#uncomment this for unattend bootcd
-#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}/bootcd/unattend.inf DESTINATION reactos NO_CAB FOR bootcd)
 
 #LiveCD shortcuts
 macro(add_livecd_shortcut name app dest)