97894208dc7c501b6fb738517e638e8edef98031
[reactos.git] / reactos / boot / bootdata / CMakeLists.txt
1
2 add_subdirectory(packages)
3
4 #common hives
5
6 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/txtsetup.sif DESTINATION reactos NO_CAB FOR bootcd regtest)
7
8 list(APPEND _common_hives
9 ${CMAKE_CURRENT_SOURCE_DIR}/hivecls.inf
10 ${CMAKE_CURRENT_SOURCE_DIR}/hivedef.inf
11 ${CMAKE_CURRENT_SOURCE_DIR}/hivesft.inf
12 ${CMAKE_CURRENT_SOURCE_DIR}/hivesys.inf)
13
14 foreach(_hive ${_common_hives})
15 get_filename_component(_hive_name ${_hive} NAME)
16 set(_converted_hive ${CMAKE_CURRENT_BINARY_DIR}/${_hive_name})
17 add_custom_command(OUTPUT ${_converted_hive}
18 COMMAND native-utf16le ${_hive} ${_converted_hive}
19 DEPENDS native-utf16le ${_hive})
20 list(APPEND _converted_common_hives ${_converted_hive})
21 endforeach()
22
23 add_custom_target(converted_hives DEPENDS ${_converted_common_hives})
24 add_cd_file(TARGET converted_hives
25 FILE ${_converted_common_hives}
26 DESTINATION reactos
27 NO_CAB
28 FOR bootcd regtest)
29
30 # livecd hives
31 list(APPEND _livecd_hives
32 ${_converted_common_hives}
33 ${CMAKE_CURRENT_SOURCE_DIR}/livecd.inf
34 ${CMAKE_CURRENT_SOURCE_DIR}/hiveinst.inf)
35
36 add_custom_command(
37 OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sam
38 ${CMAKE_CURRENT_BINARY_DIR}/default
39 ${CMAKE_CURRENT_BINARY_DIR}/security
40 ${CMAKE_CURRENT_BINARY_DIR}/software
41 ${CMAKE_CURRENT_BINARY_DIR}/system
42 COMMAND native-mkhive ${CMAKE_CURRENT_BINARY_DIR} ${_livecd_hives}
43 DEPENDS native-mkhive ${_livecd_hives} ${_converted_common_hives})
44
45 add_custom_target(livecd_hives
46 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sam
47 ${CMAKE_CURRENT_BINARY_DIR}/default
48 ${CMAKE_CURRENT_BINARY_DIR}/security
49 ${CMAKE_CURRENT_BINARY_DIR}/software
50 ${CMAKE_CURRENT_BINARY_DIR}/system)
51
52 add_cd_file(
53 FILE ${CMAKE_CURRENT_BINARY_DIR}/sam
54 ${CMAKE_CURRENT_BINARY_DIR}/default
55 ${CMAKE_CURRENT_BINARY_DIR}/security
56 ${CMAKE_CURRENT_BINARY_DIR}/software
57 ${CMAKE_CURRENT_BINARY_DIR}/system
58 TARGET livecd_hives
59 DESTINATION reactos/system32/config
60 FOR livecd)
61
62 #regtest
63 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/regtest.cmd DESTINATION reactos/bin FOR all)
64
65 #autorun.inf
66 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/autorun.inf DESTINATION root NO_CAB FOR all)
67
68 #icon.ico
69 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/icon.ico DESTINATION root NO_CAB FOR all)
70
71 #readme.txt
72 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION root NO_CAB FOR all)
73 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/readme.txt DESTINATION reactos FOR all)
74
75 #system.ini
76 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/system.ini DESTINATION reactos FOR all)
77
78 #freeldr.ini
79 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd.ini DESTINATION root NO_CAB NAME_ON_CD freeldr.ini FOR bootcd regtest)
80 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/livecd.ini DESTINATION root NAME_ON_CD freeldr.ini FOR livecd)
81
82 #unattend
83 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcdregtest/unattend.inf DESTINATION reactos NO_CAB FOR regtest)
84 add_cd_file(FILE ${CMAKE_CURRENT_SOURCE_DIR}/bootcd/unattend.inf DESTINATION reactos NO_CAB FOR bootcd)
85
86 #LiveCD shortcuts
87 macro(add_livecd_shortcut name app dest)
88 add_link(NAME ${name} CMD_LINE_ARGS ${app} ICON ${app} PATH livecd_start.cmd GUID "{450D8FBA-AD25-11D0-98A8-0800361B1103}" MINIMIZE)
89 list(APPEND LIVECD_SHORTCUTS "${CMAKE_CURRENT_BINARY_DIR}/${name}.lnk")
90 add_cd_file(FILE "${CMAKE_CURRENT_BINARY_DIR}/${name}.lnk"
91 TARGET livecd_links
92 DESTINATION ${dest}
93 FOR livecd)
94 endmacro(add_livecd_shortcut)
95
96 add_cd_file(FILE "${CMAKE_CURRENT_SOURCE_DIR}/livecd_start.cmd" DESTINATION "Profiles/Default User/My Documents" FOR livecd)
97 add_livecd_shortcut("Command Prompt" cmd.exe "Profiles/All Users/Desktop")
98 add_livecd_shortcut("Device Manager" devmgmt.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools")
99 add_livecd_shortcut("Event Viewer" eventvwr.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools")
100 add_livecd_shortcut("Service Manager" servman.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools")
101 add_livecd_shortcut("System Configuration" msconfig.exe "Profiles/All Users/Start Menu/Programs/Administrative Tools")
102 add_livecd_shortcut("Magnify" magnify.exe "Profiles/All Users/Start Menu/Programs/Accessibility")
103 add_livecd_shortcut("Calculator" calc.exe "Profiles/All Users/Start Menu/Programs/Accessories")
104 add_livecd_shortcut("Command Prompt" cmd.exe "Profiles/All Users/Start Menu/Programs/Accessories")
105 add_livecd_shortcut("Paint" mspaint.exe "Profiles/All Users/Start Menu/Programs/Accessories")
106 add_livecd_shortcut("Notepad" notepad.exe "Profiles/All Users/Start Menu/Programs/Accessories")
107 add_livecd_shortcut("Remote desktop" mstsc.exe "Profiles/All Users/Start Menu/Programs/Accessories")
108 add_livecd_shortcut("WordPad" wordpad.exe "Profiles/All Users/Start Menu/Programs/Accessories")
109 add_livecd_shortcut("Audiorecorder" sndrec32.exe "Profiles/All Users/Start Menu/Programs/Entertainment")
110 add_livecd_shortcut("Multimedia Player" mplay32.exe "Profiles/All Users/Start Menu/Programs/Entertainment")
111 add_livecd_shortcut("Volume Control" sndvol32.exe "Profiles/All Users/Start Menu/Programs/Entertainment")
112 add_livecd_shortcut("Solitaire" sol.exe "Profiles/All Users/Start Menu/Programs/Games")
113 add_livecd_shortcut("Spider Solitaire" spider.exe "Profiles/All Users/Start Menu/Programs/Games")
114 add_livecd_shortcut("WineMine" winmine.exe "Profiles/All Users/Start Menu/Programs/Games")
115 add_livecd_shortcut("Character Map" charmap.exe "Profiles/All Users/Start Menu/Programs/System Tools")
116 add_livecd_shortcut("Keyboard Layout Switcher" kbswitch.exe "Profiles/All Users/Start Menu/Programs/System Tools")
117 add_livecd_shortcut("ReactX Diagnostic" dxdiag.exe "Profiles/All Users/Start Menu/Programs/System Tools")
118 add_livecd_shortcut("Regedit" regedit.exe "Profiles/All Users/Start Menu/Programs/System Tools")
119 add_livecd_shortcut("ReactOS Explorer" explorer.exe "Profiles/All Users/Start Menu/Programs")
120
121 add_custom_target(livecd_links DEPENDS ${LIVECD_SHORTCUTS})