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